query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
b3e60fb14c1060b79aea096060e52184
Returns the static model of the specified AR class.
[ { "docid": "42b5c838d92fc6430769ae648eea0d9e", "score": "0.0", "text": "public static function model($className=__CLASS__){\n\t\treturn parent::model($className);\n\t}", "title": "" } ]
[ { "docid": "b0057b95cf2481a9838c948c81d83bc7", "score": "0.72562826", "text": "public function as(string $class): Model\n {\n return $class::findOrFail($this->getKey());\n }", "title": "" }, { "docid": "073363dc113f71889d87b7e22db515e1", "score": "0.7241839", "text": "public function staticModel($className = null)\n {\n if ($className === null)\n $className = $this->getModelClass();\n return $className::model();\n }", "title": "" }, { "docid": "03550cdf4d4434979cff4de0fb834013", "score": "0.7154113", "text": "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "title": "" }, { "docid": "03550cdf4d4434979cff4de0fb834013", "score": "0.7154113", "text": "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "title": "" }, { "docid": "97a0c2c570c1cd72cfd65507881b5674", "score": "0.70629025", "text": "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "title": "" }, { "docid": "65a07ac39d2e71b95725b81fbb33da3d", "score": "0.69277567", "text": "public static function make():Model{\n return Application::getInstance()->container()->get(get_called_class());\n }", "title": "" }, { "docid": "b374f75f119a4c0b5538ea3114acca9f", "score": "0.6925706", "text": "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "e8d97461baf90706bfe0a5e239de28d4", "score": "0.6910972", "text": "public static function model() {\n return new static();\n }", "title": "" }, { "docid": "b89513e64e5fcdd2618d48b9a2356e70", "score": "0.6902751", "text": "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "title": "" }, { "docid": "b89513e64e5fcdd2618d48b9a2356e70", "score": "0.6902751", "text": "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "title": "" }, { "docid": "6546adf8eef733a1d3ddb03561e229ad", "score": "0.6894916", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "c60374431eaedc4b94705be574083f6a", "score": "0.68948084", "text": "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "14fb23887a36c60aaaf4599f4a3a9aaf", "score": "0.68900806", "text": "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" }, { "docid": "8fc5cb179e6ca5826414aaf84a9ccdcf", "score": "0.68698424", "text": "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "title": "" } ]
65e840c8f1b6d4da4d81597c187f6307
Get all data for a given id
[ { "docid": "352374bbfe0e280e8085d89e6f2b3bef", "score": "0.0", "text": "public static function getComment($id)\n {\n return (array)BackendModel::getContainer()->get('database')->getRecord('SELECT i.*, UNIX_TIMESTAMP(i.created_on) AS created_on,\n\t\t\t p.id AS product_id, p.title AS product_title, m.url AS product_url\n\t\t\t FROM catalog_comments AS i\n\t\t\t INNER JOIN catalog_products AS p ON i.product_id = p.id AND i.language = p.language\n\t\t\t INNER JOIN meta AS m ON p.meta_id = m.id\n\t\t\t WHERE i.id = ?\n\t\t\t LIMIT 1', array((int)$id));\n }", "title": "" } ]
[ { "docid": "2a056fd9dfc7d1c7371c289e24a3021f", "score": "0.8203524", "text": "public function getData($id=null)\n {\n if($id !== null) {\n return $this->model->find($id);\n }\n return $this->model::all();\n }", "title": "" }, { "docid": "15d41566ca726fc2d4674fad36548705", "score": "0.7956095", "text": "public function getData($id) {\n return $this->run('getData', array($id));\n }", "title": "" }, { "docid": "2659af7ba41ecd6292d3ef5a41419b89", "score": "0.7716624", "text": "public static function getData($id)\n\t{\n\t\treturn static::find($id);\n\t}", "title": "" }, { "docid": "841df0fb137f3b7d9c46b93b81489d8f", "score": "0.76267767", "text": "public static function fetchDataOnID($id)\n {\n\n $sql = \"SELECT * FROM dataset_contacts_3_Feuil1 WHERE id=\" . $id;\n return DB::select(DB::raw($sql));\n\n // return DB::table('dataset_contacts_3_Feuil1')->where('id',$id)->get();\n // return DB::select(DB::raw($sql));\n\n }", "title": "" }, { "docid": "fbbe15029ea99ffe47013d83565ed12f", "score": "0.7587981", "text": "public function get(int $id): array;", "title": "" }, { "docid": "4d2acc0d0c30d3e7a6bd4cff22288e7b", "score": "0.7587903", "text": "function getById($id){\n $this->db->where('id = ', $id);\n $query = $this->db->get($this->table);\n if($query->num_rows() > 0 ){\n foreach ($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n }", "title": "" }, { "docid": "c9f6712e88232656653993186c22021b", "score": "0.74799985", "text": "function findData($id)\n {\n $query = $this->createQueryBuilder('q')\n ->where('q.id = :id')\n ->setParameter('id', $id)\n ->getQuery();\n try {\n $result = $query->getArrayResult();\n } catch(NoResultException $e) {\n $result = null;\n }\n return $result;\n }", "title": "" }, { "docid": "02ccc1be4ec019025bb01dd1508f9ccc", "score": "0.74699175", "text": "public function readById($id){\n // query to select id specific data\n $sql = \"SELECT * FROM $this->table WHERE id=:id\";\n // prepare a database connection\n $stmt = $this->connect()->prepare($sql);\n // bind value to database column\n $stmt->bindParam(':id',$id);\n // execute the query\n $stmt->execute();\n // fetch all data\n $data = $stmt->fetch();\n // return all data\n return $data;\n }", "title": "" }, { "docid": "c0e2fb859036b799f49236587e63afa9", "score": "0.73749447", "text": "public function getDataById($id)\n {\n return $this->db->query(\"select *,cf_aturan.id as id_data,gejala.id as id_gjl, kerusakan.id as id_krskn FROM cf_aturan INNER JOIN gejala ON cf_aturan.id_gejala = gejala.id \n INNER JOIN kerusakan ON cf_aturan.id_kerusakan = kerusakan.id\n WHERE cf_aturan.id = '$id'\")->result();\n }", "title": "" }, { "docid": "91aaeca7d015f5d775782a671b402fc1", "score": "0.7260438", "text": "public function getAllByID($id){\r\n \r\n $db = new Database();\r\n \r\n $value = \"\r\n user_id,\r\n user_name,\r\n user_pass,\r\n user_right,\r\n user_active,\r\n user_firstname,\r\n user_address\r\n \";\r\n \r\n $condition = array(\r\n 'where' => 'user_active=1 AND user_id='.$id,\r\n 'order_by' => 'user_date_update DESC'\r\n );\r\n \r\n $result = $db->getSData('user',$value,$condition);\r\n \r\n return $result;\r\n }", "title": "" }, { "docid": "58ca356d8819616a727cbbe096e791f9", "score": "0.71654975", "text": "public function getByAll($id){\n \n $rezultat = Jela::has('sastojci')->has('kategorija')->whereHas('tag', function ($q) use ($id) {\n $q->where('tag_id', $id);\n })->paginate();\n return JelaResource::collection($rezultat);\n }", "title": "" }, { "docid": "b94b0486c4faeebcda862cca3016aedb", "score": "0.71518886", "text": "public function getUserData(int $id);", "title": "" }, { "docid": "9084d5eb27be18710b8eea2374c420e6", "score": "0.7131052", "text": "public function selectAllFromTableById($id = 'all'){\n\t $sql = 'SELECT * FROM `'.$this->tableName.'` WHERE `'.$this->tableName.'ID` = '.$id;\n\t \n\t if($id == 'all'){\n\t\t $sql = 'SELECT * FROM `'.$this->tableName.'`';\n\t }\n\t \n\t $result = $GLOBALS['mysql']->query($sql);\n\t \n\t\tif ($result->num_rows > 0) {\n\t\t\t$returnData = [];\n\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\tarray_push($returnData,$row);\n\t\t\t}\n\t\t\treturn $returnData;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n }", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.7104656", "text": "public function get($id);", "title": "" }, { "docid": "1fcc867819cb1d94f3f7989716f4eeae", "score": "0.70921135", "text": "public function listar($id = NULL){\n\t\t\t\t\tif(!empty($id)){\n\t\t\t\t\t\tif(is_numeric($id))\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->setId($id);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where = \" WHERE id = \".$this->getId();\n\t\t\t\t\t\t\t$sql = \" SELECT * FROM \".$this->table.\"\".$where;\n\t\t\t\t\t\t\t$dados = $this->Query($sql,1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$sql = \"SELECT * FROM \".$this->table;\n\t\t\t\t\t\t$dados = $this->Query($sql,1);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\treturn $dados;\n\t\t\t\n\t\t\t\t}", "title": "" }, { "docid": "e98aec2e71625130116f2d4b142c007d", "score": "0.7061104", "text": "public function showAll($id)\n {\n $stmt = $this->conn->prepare(\"SELECT * FROM tickets WHERE ticketAssignedTo = :userId AND ticketStatus != 3\");\n $stmt->execute(array(\":userId\" => $id));\n\n $data = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $data;\n\n }", "title": "" }, { "docid": "6f11644cda360e6a2e531ba839ecc270", "score": "0.70461106", "text": "public function detail_data($id)\n {\n return $this->db->get_where('matapelajaran', ['id_matapelajaran' => $id])->row_array();\n }", "title": "" }, { "docid": "99f32f9ac350e2215a61854ae7c563ef", "score": "0.7031824", "text": "public function get_all_data_user_id($id){\n\n\t\t\t$stmt = $this->conn->prepare(\"SELECT * FROM penumpang WHERE id_penumpang = ?\");\n\t\t\t$stmt->bind_param(\"i\", $id);\n\t\t\tif ($stmt->execute())\n\t\t\t{\n\t\t\t\t$res = $stmt->get_result();\n\t\t\t\t$fetch = $res->fetch_assoc();\n\n\t\t\t\treturn $fetch;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6604c88345f8f3c3a75e7efab001f77e", "score": "0.70246094", "text": "public static function findWithData($id)\n\t{\n\t\treturn self::with(array('locality','society','category'))->find($id);\n\t}", "title": "" }, { "docid": "9ca44f89e8be5e39c8f986512b5b429d", "score": "0.7019103", "text": "function get_by_id($id)\n \t{\n \t\t$this->db->where($this->_table . 'Id', $id);\n\t\treturn $this->db->get($this->_prefix . $this->_table)->row_array();\n \t}", "title": "" }, { "docid": "9ca44f89e8be5e39c8f986512b5b429d", "score": "0.7019103", "text": "function get_by_id($id)\n \t{\n \t\t$this->db->where($this->_table . 'Id', $id);\n\t\treturn $this->db->get($this->_prefix . $this->_table)->row_array();\n \t}", "title": "" }, { "docid": "4884e25f6ec479d62507e3a70169ea79", "score": "0.70064485", "text": "private function getdata($id)\n {\n include_once \"../app/API/newdb.php\";\n $conn = getconn();\n $sql = \"SELECT * from metadata where id = $id\";\n $myres = array();\n $result = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($result)) {\n $item = array(\n 'id' => $row['id'],\n 'songName' => $row['songName'],\n 'albumName' => $row['albumName'],\n 'artists' => $row['artists'],\n 'releaseDate' => $row['releaseDate'],\n 'songImage' => $row['songImage'],\n 'genre' => $row['genre'],\n 'popularity' => $row['popularity']\n );\n\n array_push($myres, $item);\n }\n $conn->close();\n return $myres[0];\n }", "title": "" }, { "docid": "8a521c3f05d58aa0c3139cdbefaa11ee", "score": "0.70005804", "text": "public function fetchAllByPid(int $id): array;", "title": "" }, { "docid": "1debb05c7b76ff7082ffd56c1f666ef6", "score": "0.69919145", "text": "public function get( $id );", "title": "" }, { "docid": "1ecec0d51bf8bc9b92504c94e2ced55d", "score": "0.6987108", "text": "public function get($id)\n {\n }", "title": "" }, { "docid": "7a42bdf4c6f74bac22c8ec462e3f82da", "score": "0.6948997", "text": "public function getDataById($id)\n {\n $this->db->where('CONSECUTIVO', $id);\n return $this->db->get('Dep')->result();\n }", "title": "" }, { "docid": "45952f445543b52922dfb5930bd2c2af", "score": "0.69449407", "text": "public function get(string $id);", "title": "" }, { "docid": "45952f445543b52922dfb5930bd2c2af", "score": "0.69449407", "text": "public function get(string $id);", "title": "" }, { "docid": "4b3721a9da5b5c17e428972745d4f4d8", "score": "0.6943409", "text": "public function runData($id = -1){\n\t\treturn $this->_handler->getData($id);\n\t}", "title": "" }, { "docid": "cbf955b1f354f31e3e160fb617623bc8", "score": "0.69292593", "text": "public function get($id)\n {\n return $this->getAdapter()->get($id);\n }", "title": "" }, { "docid": "bdb279277346704cd69ce4efa17fc0c3", "score": "0.6924432", "text": "public function fetch($id);", "title": "" }, { "docid": "bdb279277346704cd69ce4efa17fc0c3", "score": "0.6924432", "text": "public function fetch($id);", "title": "" }, { "docid": "bdb279277346704cd69ce4efa17fc0c3", "score": "0.6924432", "text": "public function fetch($id);", "title": "" }, { "docid": "89e533a13ce47e441056169b1fb4adde", "score": "0.69237036", "text": "public function find($id)\n {\n $query = $this->fpdo->from($this->table)->where(\"id\", $id);\n return $this->toArray($query);\n }", "title": "" }, { "docid": "7c70446e81758baba7972fcc6c212730", "score": "0.6909259", "text": "public function read($id);", "title": "" }, { "docid": "a3e06c306f73d7f546804710a264823f", "score": "0.6905593", "text": "public static function DataGetAll($id){//this function accepts and manages all users\n\t\t\t$table_friends = \"Friends_\".$id;\n\t\t\t$table_message = \"Messages_\".$id;\n\t\t\t$consult = \"SELECT P.id, P.name, \n\t\t\t\t\t\t\tP.last_name, \n\t\t\t\t\t\t\tF.status, \n\t\t\t\t\t\t\tF.date_friends,\n\t\t\t\t\t\t\t M.message, \n\t\t\t\t\t\t\t M.hour_sms,\n\t\t\t\t\t\t\t M.kind_message\n\t\t\t FROM PersonalInfo P\n\t\t\t LEFT JOIN $table_friends F ON F.Id = P.id\n\t\t\t LEFT JOIN $table_message M ON M.user = P.id\n\t\t\t AND M.Id = (SELECT MAX(M2.Id) FROM $table_message M2 WHERE M2.user = M.user)\";\n\n\t\t\t$result = Database::getInstance()->getDb()->prepare($consult);\n\n\t\t\t$result->execute();\n\n\t\t\t$list = $result->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\treturn $list;\n\n\t\t}", "title": "" }, { "docid": "de901d3b3a070815b7e01c990ad85faf", "score": "0.6881282", "text": "public function get($id)\n {\n $sql = \"SELECT * FROM {$this->table} WHERE id={$id}\";\n return $this->executeQuery($sql);\n }", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.6860371", "text": "public function getById($id);", "title": "" }, { "docid": "1d0eb2bd7163689fd5877bed80e568ce", "score": "0.6831129", "text": "public function solicitudes($id)\n {\n $solicitudes = Solicitud::where('cargo_user_id', '=', $id)\n ->with('presupuesto')\n ->with('tipoHoras')\n\n // ->with('tipo_horas.nombre_hora')\n ->get();\n return ($solicitudes);\n }", "title": "" }, { "docid": "f6c3111a75526c917cd0b9cc3b863ae2", "score": "0.6830916", "text": "function find($id): array\n {\n return $this->findSingle();\n }", "title": "" }, { "docid": "4d51a71165127cd81384f3c616be4d08", "score": "0.68256277", "text": "public function get_entire_data1($id)\n {\n\t\t\t\t$id=$this->uri->segment(2, 0);\n\t\t\t\t//$this->db>where('flag',$flag);\n $query = $this->db->get_where('dokumen',array('id_butir'=>$id));\n //$query = $this->db->get('dokumen');\n\t\t\t\t//$query = 'select * from dokumen where flag=\"view\"';\n return $query->result_array();\n }", "title": "" }, { "docid": "62db2ff141fd78ae4252ba67fbce96a3", "score": "0.68182814", "text": "public function getDatataById($id)\n {\n // return $this->db->get_where('datata', ['id' => $id])->row_array();\n return $this->db->query(\n \"SELECT\n d.datata_id ,\n d.mhs_id ,\n d.tanggal,\n m.nim ,\n m.name ,\n d.judul ,\n d.sinopsis,\n d.status,\n d.jurusan_id,\n dd.dosen_id,\n dd.id as id_detail,\n dd.status as status_dosen\n FROM\n datata d\n inner join datata_detail dd on\n dd.datata_id = d.datata_id\n inner join mahasiswa m on\n m.mhs_id = d.mhs_id\n where\n d.datata_id = $id\"\n )->result();\n }", "title": "" }, { "docid": "c758a1adc6dfd08e7d3e3ba524e34253", "score": "0.68153465", "text": "public function getById(int $id) {\n return $this->model\n ->where('id', $id)\n ->get();\n }", "title": "" }, { "docid": "498a877d29e96c2102f879481324f4c6", "score": "0.6810957", "text": "public function getById( $id );", "title": "" }, { "docid": "bac2899007a7f09c3413a7102e6972f8", "score": "0.68035215", "text": "protected function getDetailDataById($id)\n {\n //create model\n $model = $this->getUserModel();\n $users = $this->mongoService->getDetailDataById($model, $id, $this->allowFilter);\n\n return $users;\n }", "title": "" }, { "docid": "572c4c1abd9dfdd54d5f2d5429e80b2c", "score": "0.6802086", "text": "public function getById(int $id);", "title": "" }, { "docid": "572c4c1abd9dfdd54d5f2d5429e80b2c", "score": "0.6802086", "text": "public function getById(int $id);", "title": "" }, { "docid": "96858802d2f1f3d785dcfcbd8d4833d6", "score": "0.6800972", "text": "public function get($id = null);", "title": "" }, { "docid": "273556c13b732d4b54031441541eda99", "score": "0.67875385", "text": "private function getDataById($id){\n $sql = \"SELECT * FROM $this->table WHERE `id` = '$id'\";\n $con = new Dbconnection();\n $db = $con->connect();\n $result = $db->prepare($sql);\n $result->execute();\n $count = $result->rowCount();\n if ($count > 0) {\n $this->data = $result->fetch(PDO::FETCH_ASSOC);\n } else {\n $error = \"Wrong result\";//TODO Make error a real thing\n echo \"error - No result<br />id = $this->id\";\n return;\n }\n }", "title": "" }, { "docid": "1b87ad85aa661381321e014beb03a28b", "score": "0.6781608", "text": "public function retrieve($id);", "title": "" }, { "docid": "1b87ad85aa661381321e014beb03a28b", "score": "0.6781608", "text": "public function retrieve($id);", "title": "" }, { "docid": "615db50bf77791f01cb6665c105ea0f7", "score": "0.6781111", "text": "public static function get($id) {}", "title": "" }, { "docid": "828c8cb823063a84edafdfadd8fbe261", "score": "0.67800087", "text": "public function getbyId($id)\n {\n }", "title": "" }, { "docid": "fb4c9accda95bfc4c390ff38dda853bb", "score": "0.677925", "text": "public function get_some_data ($id) {\n\t\treturn array (\n\t\t\t'id' => $id,\n\t\t\t'value' => 'Some data'\n\t\t);\n\t}", "title": "" }, { "docid": "32e68db1f5aa3237ef1f2fee76627d96", "score": "0.6778963", "text": "public function index_get($id = 0){\n if(!empty($id)){\n $data = $this->db->get_where(\"items\", ['id' => $id])->row_array();\n } else {\n $data = $this->db->get(\"items\")->result();\n }\n\n $this->response($data, REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "c80538c3e2dd2ddaa6dc29c9c8cc0642", "score": "0.6772276", "text": "public function get_all_by_id($id)\n {\n $this->db->where('category_id', $id);\n $query = $this->db->get('industrial_and_security_products');\n return $query->result_array();\n }", "title": "" }, { "docid": "885db55f139f80320ad167dfb57b433e", "score": "0.6767114", "text": "function ambil_data_id($id){\n\t\t$this->db->where($this->id, $id);\n\t\treturn $this->db->get($this->nama_table)->row();\n\t}", "title": "" }, { "docid": "68ced182f7e594a4736c21254e23bf42", "score": "0.6765821", "text": "public function read($id = null): array\n {\n }", "title": "" }, { "docid": "bfe4234c433b9ede88ca580d8727d1a8", "score": "0.67590266", "text": "function service_get_data($id)\n{\n\t$query = db()->prepare('select name, latitude, longitude, address, ' .\n\t\t\t\t\t\t\t\t'phone_number, outdoor_seating, takeout, hours, price, ' .\n\t\t\t\t\t\t\t\t'parking, alcohol, accepts_credit_cards, reservations '.\n\t 'from restaurants where rid = ?');\n\t$query->execute(array($id));\n\t\t\n\treturn ($query->rowCount() > 0) ? $query->fetch() : NULL;\n}", "title": "" }, { "docid": "3713af6ad114c85097e4256be364b370", "score": "0.6756569", "text": "public function show($id)\n {\n //\n $info = DataResource::find($id)->toJson();\n return $info;\n }", "title": "" }, { "docid": "a5cfb8fe618b25750d2451452ebf9f94", "score": "0.67563695", "text": "public function getByID($id)\n {\n return $this\n ->where('id', $id)\n ->get();\n }", "title": "" }, { "docid": "2be6d6ca1147f02737deab1b83c20de9", "score": "0.67536974", "text": "public function listAll($id)\n {\n return $this->model\n ->where('city_id', $id)\n ->distinct()\n ->get();\n\n }", "title": "" }, { "docid": "ab6144be72f766f6cc639f8ab382a10d", "score": "0.67514414", "text": "public function get($id)\r\n {\r\n }", "title": "" }, { "docid": "42f8ad231a69ce05b83b1dd4dd59a199", "score": "0.6750192", "text": "public function fetchById($id);", "title": "" }, { "docid": "87ad10a9f6e060d0be6173f05d9ae66f", "score": "0.6746665", "text": "public function fetchById($id) {\n $select = $this->select()->where('id = ?', $id);\n return $this->fetchRow($select);\n }", "title": "" }, { "docid": "97b4fb6b0358673c00a74d378f95280a", "score": "0.6745155", "text": "public function getAPupilData(int $id)\n {\n $token = csrf_token();\n $p = Pupil::withTrashed('deleted_at')->whereId($id)->firstOrFail();\n\n $subjects = $p->classe->subjects;\n if ($p->level === \"primary\") {\n $subjects = Subject::whereLevel('primary')->get();\n }\n\n $classeFMT = $p->classe->getFormattedClasseName();\n $birthday = ModelHelper::birthFormattor($p, 0);\n\n $helper = new ModelHelper($p);\n $surname = $helper->setLastNameAndFirstName();\n\n $lastName = $helper->getLastName();\n $firstName = $helper->getFirstName();\n\n $classeName = $p->classe->name;\n\n return response()->json(['p' => $p, 'subjects' => $subjects, 'token' => $token, 'classeFMT' => $classeFMT, 'birthFMT' => $birthday, 'classeName' => $classeName, 'firstName' => $firstName, 'lastName' => $lastName]);\n }", "title": "" }, { "docid": "683d9bad3bb97d59735b99f9d9df46e8", "score": "0.6741662", "text": "public function getDatatable($id)\n {\n return Publication::where('created_by', $id)->orderBy('created_at', 'desc');\n }", "title": "" }, { "docid": "f6077d3672ec0da077584ef4e1bfb789", "score": "0.6741255", "text": "private function fetchItemData($id)\n {\n $response = $this->handleQuery(QueryDto\\LicenceVehicle\\PsvLicenceVehicle::create(['id' => $id]));\n\n return $response->getResult();\n }", "title": "" }, { "docid": "e95a620eca1ed5b6a8711001f3d769c1", "score": "0.67379725", "text": "public static function byUser($id)\n {\n return static::filtered($id)->get();\n }", "title": "" }, { "docid": "e1fad3e07d06acf1223925d159f87865", "score": "0.6735612", "text": "public function show($id)\n\t{\n\t\treturn showAll($id);\n\t}", "title": "" }, { "docid": "1eccd3cca6ee0178da93804342393a45", "score": "0.67323333", "text": "public function find(int $id): array;", "title": "" }, { "docid": "7c60fe9e4291202e03ebd1f51df7a889", "score": "0.6731925", "text": "public function consultarPorId($id)\n {\n $options = [\n 'path' => $this->getResourceEndpoint() . '/' . $id,\n 'method' => API::GET\n ];\n return $this->getAPI()->request($options);\n }", "title": "" }, { "docid": "7c60fe9e4291202e03ebd1f51df7a889", "score": "0.6731925", "text": "public function consultarPorId($id)\n {\n $options = [\n 'path' => $this->getResourceEndpoint() . '/' . $id,\n 'method' => API::GET\n ];\n return $this->getAPI()->request($options);\n }", "title": "" }, { "docid": "79faf13d98a43a58a7bac47f157337c8", "score": "0.67279255", "text": "public function getRecord($id);", "title": "" }, { "docid": "f81c53ff12b78c1c1b335fd42ebbc588", "score": "0.6723703", "text": "public function get( $id = null ) {\n $db = \\db\\Mysqli::getInstance();\n\n // Generating SQL query that selects single or all rows from table that we receive from child class\n // Output: SELECT * FROM Employees\n $sql = \"SELECT * FROM \" . $this->getTableName();\n\n // Condition checks if GET parameter named \"id\" was used in the request URL.\n // If it's true, then SQL query changes to following: SELECT * FROM Employees WHERE id = 1\n //\n if ( $id ) {\n $sql = $sql . \" WHERE id=$id\";\n }\n\n // Assigns response ( mysqli_result object ) of our previously created SQL query to the variable.\n // To access actual rows via this object, we have to trigger it with mysqli_fetch_assoc function.\n //\n $dbRes = $db->query( $sql );\n\n\n // Checks if an \"id\" get parameter was passed from client's request URL\n // and instantly returns the row. We don't have to use loop here, because\n // we know that only one row must be returned ( unique id ).\n //\n if ( $id ) {\n return mysqli_fetch_assoc( $dbRes );\n }\n\n // Creates an empty array that will be used to store data from the SQL response\n $resultSet = [];\n\n // Loop thought all rows in our table.\n // $answer contains associative array at every iteration.\n // This associative array contains single row data and looks like this:\n //\n //////////////////////////////\n //\n // [\"id\"]=> \"1\"\n // [\"firstname\"]=> \"Boris\"\n // [\"lastname\"]=> \"Berman\"\n // [\"gender\"]=> \"m\"\n // [\"age\"]=> \"26\"\n //\n //////////////////////////////\n //\n // Next, at every iteration we assign associative array to numeric array we've created earlier.\n // So our numeric array would look like this:\n //\n // [0] =>\n // [\"id\"]=> \"1\"\n // [\"firstname\"]=> \"Boris\"\n // [\"lastname\"]=> \"Berman\"\n // [\"gender\"]=> \"m\"\n // [\"age\"]=> \"26\"\n // [1] =>\n // [\"id\"]=> \"2\"\n // [\"firstname\"]=> \"Michael\"\n // [\"lastname\"]=> \"Cohen\"\n // [\"gender\"]=> \"m\"\n // [\"age\"]=> \"35\"\n //\n //\n while( $answer = mysqli_fetch_assoc( $dbRes ) ){\n $resultSet[] = $answer;\n }\n\n // Return an array that contain all the rows from the table\n // Numeric array of associative arrays :)\n // return json_encode( $resultSet );\n return $resultSet;\n }", "title": "" }, { "docid": "d552470312c5c28b6f80b5b11305b9d7", "score": "0.6722874", "text": "function get_all () {\n\t\treturn $this->cache->get(\n\t\t\t'all',\n\t\t\tfunction () {\n\t\t\t\treturn $this->search([], 1, PHP_INT_MAX, 'id', true);\n\t\t\t}\n\t\t);\n\t}", "title": "" } ]
644d9059aada2185f5beaf4b925da6e0
Method to check whether this connector is enabled or not
[ { "docid": "8161a420c701a930112b9b904ed9a707", "score": "0.67880636", "text": "public function isEnabled()\n\t{\n\t\treturn $this->checkComponent('com_akeebasubs');\n\t}", "title": "" } ]
[ { "docid": "145b46a0473db5323c6f8134a8996e30", "score": "0.7731778", "text": "public function isConnectEnabled()\n {\n return craft()->charge_connect->getConnectEnabledStatus();\n }", "title": "" }, { "docid": "d5221e144a4f43462a5cc8010be3936a", "score": "0.7309763", "text": "public function enabled()\n {\n if (!empty($this->_data[self::VENDOR]) && !empty($this->_data[self::PASSWORD])) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "65230929a221aef61ad3fe0eff343032", "score": "0.7221516", "text": "public function isEnabled(): bool\n {\n return $this->config['enabled'] ?? false;\n }", "title": "" }, { "docid": "3edce9989a70f546d834c32aa22c028c", "score": "0.7210134", "text": "public function is_enabled() : bool\n {\n return $this->enabled ?? FALSE;\n }", "title": "" }, { "docid": "df255265d1c0e6e8ea1c87af8debbe37", "score": "0.7201776", "text": "public function isEnabled()\n {\n return $this->enabled; // on retourne le champ de notre BDD\n }", "title": "" }, { "docid": "fd9813c3fe7a9f2ab1fb8c7584f2e7b2", "score": "0.7191645", "text": "public function isEnabled()\n {\n return $this->config->isEnabled();\n }", "title": "" }, { "docid": "5870685b76172220457cc7c202573c97", "score": "0.71906763", "text": "function is_enabled() {\n $destination = $this->get_destination();\n $profile = $this->get_profile();\n return (!empty($this->enabled) && !empty($destination) && !empty($profile));\n }", "title": "" }, { "docid": "88e48320939247b50b24a515e092a651", "score": "0.71443945", "text": "public function isEnabled()\n {\n return $this->getConfig()->isEnabled();\n }", "title": "" }, { "docid": "0bbab5e2f72e8d23a29eb690ab98861d", "score": "0.71251446", "text": "public function isEnabled(): bool\n {\n return $this->data['enabled'];\n }", "title": "" }, { "docid": "5a6afeebe751c55b838983316c05a0d3", "score": "0.7101924", "text": "public function enabled() {\r\n\t\treturn (bool) $this->request(WebDriver_Base::HTTP_GET, 'enabled');\r\n\t}", "title": "" }, { "docid": "85b2b9d393733a2545ab6c36282329f3", "score": "0.70698535", "text": "function isEnabled() {\n\t\treturn $this->getSetting('enabled');\n\t}", "title": "" }, { "docid": "af703c253bc78c1ec34eba0510247c4d", "score": "0.70588756", "text": "public function isEnabled() {\n\t\t$c = $this->getConfig();\n\t\treturn isset($c[\"enabled\"]) && $c[\"enabled\"];\n\t}", "title": "" }, { "docid": "095e5ff98b74fa56d2c773dee4b358fd", "score": "0.7029505", "text": "public function isEnabled()\n\t{\n\t\treturn $this->checkComponent('com_community');\n\t}", "title": "" }, { "docid": "023a2a6ce6a3b27667530630eeb97b1c", "score": "0.7011634", "text": "public function isEnabled()\n {\n return Mage::getStoreConfig(self::XML_PATH_FASTLY_CDN_WEBHOOKS_ENABLED);\n }", "title": "" }, { "docid": "153b7267f5c581483da439e9bb2e899c", "score": "0.69994813", "text": "public function is_enabled(){\n\t\treturn $this->enabled;\n\t}", "title": "" }, { "docid": "1d751e9f7bed4a9e19881b1db4e8644d", "score": "0.69828075", "text": "public function isEnabled()\n {\n return\n !!$this->scopeConfig->getValue(static::XML_PATH_ENABLED) &&\n !!$this->getApiHostname() &&\n !!$this->getIntegrationKey() &&\n !!$this->getApiHostname() &&\n !!$this->getSecretKey();\n }", "title": "" }, { "docid": "6c218f30d2061eff4282cad76dcc86e3", "score": "0.69774663", "text": "public static function enabled(): bool\n {\n return self::$enabled;\n }", "title": "" }, { "docid": "1e5e2807d8b91b1596c0e6c3203247ed", "score": "0.697621", "text": "public function hasConnector()\n {\n return null !== $this->__codeConn && null !== $this->__secretKey;\n }", "title": "" }, { "docid": "8bea55ca758ba7c2b4d47074160771fc", "score": "0.6973595", "text": "public function isEnable()\n {\n return $this->scopeConfig->getValue('mageowl/config/enable');\n }", "title": "" }, { "docid": "3932dd6be35024849ba29763c10ec642", "score": "0.69538134", "text": "public function isEnabled()\n {\n $nextCloud = new NextcloudSettings();\n return (string)$nextCloud->enabled === \"1\";\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "bbdd18e3c9097a27f4880c8c9d78830d", "score": "0.69123584", "text": "public function isEnabled()\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "ec9dc39c6cfbafb26723edbb694c5a4e", "score": "0.6897692", "text": "public function is_enabled() {\n\t\treturn defined( 'HKM_REQUEST_PROXY_HOST' ) && defined( 'HKM_REQUEST_PROXY_PORT' );\n\t}", "title": "" }, { "docid": "f9c30c2617da1c8331aa1fe0aec29a04", "score": "0.68968487", "text": "public function isConnected()\n {\n return isset($this->conn);\n }", "title": "" }, { "docid": "7b2edd5ee74eee5889df442506a073fb", "score": "0.6894042", "text": "public function isEnabled(): bool\n {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "5516cfda884b224e3fd1a5ab961d8e4b", "score": "0.68888366", "text": "public function isEnabled()\n {\n return $this->metadata()['enabled'];\n }", "title": "" }, { "docid": "5b429602d1adc334b352fc30444af5fc", "score": "0.68621415", "text": "public function isEnabled()\n\t{\n\t\treturn $this->enabled;\n\t}", "title": "" }, { "docid": "d491d9f949fc01dc65a876596e3a384c", "score": "0.686181", "text": "public function isConnected() {\n return isset($this->conn);\n }", "title": "" }, { "docid": "5b40f3401cd41b6b89153732930bdcdf", "score": "0.68595", "text": "public function isEnabled() {\r\n return $this->enabled;\r\n }", "title": "" }, { "docid": "08ad9a78ecda1863febd129e26f5afa9", "score": "0.68586534", "text": "public function isEnabled()\n {\n return (bool) $this->getData(self::ENABLED);\n }", "title": "" }, { "docid": "08fffef515f8942f6b7c088c0bd34409", "score": "0.684644", "text": "public function isEnabled()\n {\n return Mage::helper('greenghost_hauntedworld')->isEnabled();\n }", "title": "" }, { "docid": "6e01cf3678b212e965df237467664e3e", "score": "0.68413377", "text": "public function isEnabled()\n {\n return $this->_enabled;\n }", "title": "" }, { "docid": "b82a17e45374d50821901aab1a08de7f", "score": "0.6833447", "text": "protected function checkStatusEnabled()\n {\n return config('tail-db.enabled');\n }", "title": "" }, { "docid": "ab7026139a3ce4a141ae5f80e31fbbd2", "score": "0.68314207", "text": "public function isEnabled()\n {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "ab7026139a3ce4a141ae5f80e31fbbd2", "score": "0.68314207", "text": "public function isEnabled()\n {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "2500307651b18b8f6940e212240d4fa1", "score": "0.68276983", "text": "public function is_enabled() : Bool\n\t{\n\t\treturn $this->_enabled;\n\t}", "title": "" }, { "docid": "7a83393c1e736d4e5df7b62f41444b66", "score": "0.6827137", "text": "public function isEnabled() {\n return $this->isEnabled;\n }", "title": "" }, { "docid": "638f875b0bf9442bd5a18d06b0ec811b", "score": "0.682443", "text": "public function isEnabled(){\n return $this->enabled;\n }", "title": "" }, { "docid": "70601d49ba4965f100e5911b3eaa4829", "score": "0.6815799", "text": "public function hasConnection()\n {\n return (bool) $this->_connection;\n }", "title": "" }, { "docid": "55ec0c2c1e9a86c735a0a700f45d3a48", "score": "0.6804553", "text": "public function isEnabled(): bool\n\t{\n\t\treturn $this->isEnabled;\n\t}", "title": "" }, { "docid": "b4bad66e9ec727a39dd45efb8c924726", "score": "0.6797334", "text": "public function isEnabled()\n\t{\n\t\treturn $this->getIsEnabled();\n\t}", "title": "" }, { "docid": "1461036382c6cb9d7d7c1bd043b7c778", "score": "0.6796205", "text": "public function isConnected() {\n\t\treturn isset($this->conn);\n\t}", "title": "" }, { "docid": "1286ecaff61e5d94ff2f647e9a990698", "score": "0.6784973", "text": "public function canEnable()\n {\n // check necessary permissions\n return $this->gatewaySettings->isReady() && $this->gatewayPermissions->hasPermission('tfa');\n }", "title": "" }, { "docid": "c25388b9e0643e027ba25c210ec33923", "score": "0.67844003", "text": "public function hasIsEnabled()\n {\n return $this->is_enabled !== null;\n }", "title": "" }, { "docid": "99c71da99acfec74ca64c350d8246c8f", "score": "0.67792404", "text": "public function isEnabled( )\n {\n if ( $this->isEnabled === NULL )\n {\n /**\n * In another use, this was populated by a memcache key.\n * Changed to use the constant, but left it in so it's still configurable.\n */\n $this->isEnabled = self::NEXMO_API_ENABLED;\n }\n\n return $this->isEnabled;\n }", "title": "" }, { "docid": "d9ed8431238c8d1b01755d6d16037d3f", "score": "0.6778575", "text": "function is_connected()\n {\n return !is_null($this->connectionid);\n }", "title": "" }, { "docid": "fc15b78acb2093b6627a4584ab27a9ab", "score": "0.67768043", "text": "public function isEnabled() {\n return Mage::getStoreConfigFlag(self::CONFIG_ENABLED);\n }", "title": "" }, { "docid": "8cc1d698847f022c3eecededb70134dc", "score": "0.67715526", "text": "private function isConnected()\r\n {\r\n /** @var \\Concrete\\Core\\Marketplace\\Marketplace $marketplace */\r\n $marketplace = Marketplace::getInstance();\r\n\r\n return $marketplace->isConnected();\r\n }", "title": "" }, { "docid": "7208cc26777336b040a0420fea069c1a", "score": "0.67665267", "text": "public function isEnabled()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_IS_ENABLED, $payload);\n\n $payload = unpack('C1enabled', $data);\n\n return (bool)$payload['enabled'];\n }", "title": "" }, { "docid": "2b8029fc2d08435415df4d2ef9930d99", "score": "0.6759073", "text": "public function isEnabled()\n\t{\n\t\treturn \\IPS\\Settings::i()->authy_enabled;\n\t}", "title": "" }, { "docid": "ec53bf92de3bf6297060b112de38a659", "score": "0.67476577", "text": "public function isEnabled()\n\t{\n\t\treturn $this->checkComponent('com_ccnewsletter');\n\t}", "title": "" }, { "docid": "58bad0f517a5d75fda0752aa92779ce5", "score": "0.67467034", "text": "public function getEnabled()\n {\n return isset($this->enabled) ? $this->enabled : false;\n }", "title": "" }, { "docid": "285297016ca77f022c7fa98b8578b5f6", "score": "0.6737993", "text": "public function isEnabled() {\n if (!$this->enabled){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "aada369ecba3dd95ed994b1abdc83428", "score": "0.67369455", "text": "public function getIsEnabled()\n {\n return $this->getEngine()->getIsEnabled();\n }", "title": "" }, { "docid": "339f890fce2cf3c6b9e584baeb93d3f9", "score": "0.67365915", "text": "private function _isEnabled() {\n return Mage::getStoreConfigFlag(\"contactlab_transactional/global/enabled\");\n }", "title": "" }, { "docid": "1d8b829c4b1364ceed7bfe87a73fc76d", "score": "0.6735189", "text": "public function enabled(){\n\t\t$settings = $this->get_settings();\n\t\tif( $settings[ 'cdn' ] ){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "97b9108b2527f8658834f5feacaecf8b", "score": "0.6728567", "text": "public function isEnabled()\n {\n return Mage::getStoreConfigFlag(self::XML_ENABLED_PATH);\n }", "title": "" }, { "docid": "05dbde9def85483c09d69e4b4f3d376d", "score": "0.6727112", "text": "public function enabled()\n {\n if($this->status == 'enabled')\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b478b70a0c6f46486e3caf8b5b86915e", "score": "0.6712077", "text": "function is_enabled() {\n\t\treturn $this->debug;\n\t}", "title": "" }, { "docid": "9ae7fe053f654d4e256243b44e45f5be", "score": "0.6707288", "text": "public function getIsEnabled();", "title": "" }, { "docid": "5181f4570cc885c7c667e5c0eb91c935", "score": "0.6685116", "text": "public function isConnected()\n {\n return $this->isConnected;\n }", "title": "" }, { "docid": "0f425f6634f249df45a42b57d5ead0de", "score": "0.66831356", "text": "public function getEnabled() : bool\n {\n return $this->getProperty()->enabled;\n }", "title": "" }, { "docid": "a50f6e311e40eb75041ced378d25018d", "score": "0.6682574", "text": "public function isEnable() {\n\t\t\treturn Mage::getStoreConfig('addressvalidator/addressvalidator_settings/addressvalidator_active');\n\t}", "title": "" }, { "docid": "ddb3ef7cd13407c4cae3eaea91b7682b", "score": "0.6680571", "text": "protected function isConnected()\n {\n return $this->is_connected;\n }", "title": "" }, { "docid": "3bbabc69b40cb80de30acbec166057c2", "score": "0.66730434", "text": "public function isConnected()\n {\n return $this->connection->isConnected();\n }", "title": "" }, { "docid": "3bbabc69b40cb80de30acbec166057c2", "score": "0.66730434", "text": "public function isConnected()\n {\n return $this->connection->isConnected();\n }", "title": "" }, { "docid": "054a44a958e038a28a3a4f39b5697454", "score": "0.6668789", "text": "public function isConnected()\n {\n return $this->resource !== null;\n }", "title": "" }, { "docid": "4538bcba240afb92ee1618f551e8b36c", "score": "0.66638935", "text": "public function is_enabled() {\n $enabled = (bool) get_config('reportgen', 'rootDetails');\n return $enabled;\n }", "title": "" }, { "docid": "21f5a12f1bf6b1a637c707b36fa1fb64", "score": "0.66615033", "text": "public function is_connected()\n {\n return($this->connected);\n }", "title": "" }, { "docid": "4d59261a88857718f00e0a4240b4f1dc", "score": "0.66502875", "text": "public function isEnabled() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "05d4db84460820ff5f80b3db126db960", "score": "0.66500944", "text": "public function isEnabled()\n {\n return true;\n }", "title": "" }, { "docid": "ea65ad2e1169867bd2a63a6dd9a77e3a", "score": "0.6642524", "text": "public function isEnabled()\n {\n // verify solr server response\n \n return $this->_solrIsEnabled;\n }", "title": "" }, { "docid": "b7b3100a22c6d1e60e4e913185525f85", "score": "0.6637622", "text": "public function isEnable()\n {\n return $this->scopeConfig->getValue(DefaultConfig::CONFIG_PATH_IS_ENABLE);\n }", "title": "" }, { "docid": "d6a3d52e205fd027dbfb0a119e78ac94", "score": "0.66367507", "text": "public function isConnected() {\n return $this->_isConnected;\n }", "title": "" }, { "docid": "24c96c879b7551f36b74d01dcae29ea2", "score": "0.6633758", "text": "public function isEnabled()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "98a76bdf22c0edb4537253563f72477d", "score": "0.66275656", "text": "public function isConnected() : bool\n {\n return isset($this->streamSocket);\n }", "title": "" }, { "docid": "c67c6c1d94f9dee065162d27e5f79397", "score": "0.66194654", "text": "public function getIsEnabled()\n {\n return true;\n }", "title": "" }, { "docid": "fe4b9e202884514aab029382fdf86cb6", "score": "0.6615054", "text": "public function enabled()\r\n\t{\r\n\t\treturn $this->enabled;\r\n\t}", "title": "" }, { "docid": "20c0e9c50d5a9b381db27d9a60dde3b1", "score": "0.6614092", "text": "public function enabled()\n {\n if ((bool)$this->getStoreConfig('advanced/modules_disable_output/Yireo_EmailTester')) {\n return false;\n }\n\n return $this->getStoreConfig('emailtester/settings/enabled');\n }", "title": "" }, { "docid": "d0a4edf5e3a7deab03ff82e2431abe70", "score": "0.66135526", "text": "public function isEnabled() : bool\n {\n return $this->status == $this::ACTIVE;\n }", "title": "" }, { "docid": "ec118f77e24abef6e01ce3bccb504d0e", "score": "0.661144", "text": "public function isEnabled(): bool\n {\n return !$this->disabled;\n }", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "cb047fb10f3a18baa736c0e8c86243a6", "score": "0.66097796", "text": "public function isEnabled();", "title": "" }, { "docid": "2c8c2f0267b4d40b31d755a4b3162bcc", "score": "0.66079944", "text": "public function isConnected()\n {\n return $this->_connection !== null;\n }", "title": "" }, { "docid": "c2a81e11e78e134ad1f92fefc11000a8", "score": "0.66004753", "text": "public function alternateAccessCheck() {\n return self::config()->enabled;\n }", "title": "" }, { "docid": "f138f8b5e81d7939bfc599fa7b11f713", "score": "0.65982276", "text": "public function isEnabled()\n {\n return $this->getIsActive();\n }", "title": "" } ]
d44768dc39112d55ad6be4f4262a68a5
The function checks if the product exists in $items and return the position in $items or 1 if the product doesn't exist.
[ { "docid": "e76a7bd35b4b395c60b3828f8b33ebc3", "score": "0.7808392", "text": "private function existsInItems($productName) {\n $pos = -1;\n if($this->numItems == 0)\n return $pos;\n $arr = $this->items;\n for($i = 0; $i < count($arr); $i++) {\n if($arr[$i][0] == $productName) { \n $pos = $i;\n break;\n }\n }\n return $pos;\n }", "title": "" } ]
[ { "docid": "4bfd10837b90c84b5fdaa918cf8c0205", "score": "0.6641367", "text": "function check_item($product_item_id) {\r\n\t\r\n\t\t$products = $this->Session->read('Cart'); \r\n\t\tif (isset($products[$product_item_id])) {\r\n\t\t\treturn $products[$product_item_id];\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2c890b80f14915785bda2226db7c30aa", "score": "0.6462003", "text": "private function findItem($name){\n $index = 0;\n foreach($this->inventory as $item){\n if($item->name == $name) {\n return $index;\n }\n $index++;\n }\n return null;\n }", "title": "" }, { "docid": "2cd7c99197f067c904f87497154fdc66", "score": "0.6068631", "text": "public function get($itemInput)\n {\n $count = 0;\n foreach ($this->itemQtyArr as $item => $qty) {\n if ($item == $itemInput) {\n return $qty;\n }\n }\n return $count;\n }", "title": "" }, { "docid": "d32f32b28cb943aefc9dc80a7a6f47bb", "score": "0.58862936", "text": "function product_exists($product_id)\r\n{\r\n\t$product_id = intval($product_id);\r\n\t$max = count($_SESSION['cart']);\r\n\t$flag = 0;\r\n\t\r\n\tfor($i = 0; $i < $max; $i++)\r\n\t{\t\r\n\t\tif($product_id == $_SESSION['cart'][$i]['productid']) //here again changed to id was productid\r\n\t\t{\r\n\t\t\t$flag = 1;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn array ($flag,$i);\r\n\t\r\n}", "title": "" }, { "docid": "14a3bd38bd0820f97971cd0fb0a62e06", "score": "0.5795401", "text": "public function actionIsItemExist($product_id) {\r\n if (Yii::$app->user->getId()) {\r\n $exist = Wishlist::find()->where(['item_id' => $product_id, 'customer_id' => Yii::$app->user->getId()])->one();\r\n return ($exist) ? $exist->wishlist_id : 0;\r\n }\r\n }", "title": "" }, { "docid": "b4852b06f65b4d43d24bb8dbc0ec05e4", "score": "0.5777025", "text": "function item_id_exists($item_id='') {\n\t // Return TRUE if an item exists\n\t // Return FALSE otherwise\n\t if($item_id != '') {\n\t\t $query = \"SELECT * FROM items WHERE id = '\".mydb::cxn()->real_escape_string($item_id).\"'\";\n\t\t $result = mydb::cxn()->query($query);\n\t \n\t\t return $result->num_rows > 0 ? TRUE : FALSE;\n\t }\n\t else return FALSE;\n }", "title": "" }, { "docid": "3a35bfcd9d8d848a8e3f9e0aaa3ea4f5", "score": "0.5756743", "text": "public function itemExists($sku);", "title": "" }, { "docid": "8ba18ad53d4d295bc0a33a69d0f5f110", "score": "0.5708303", "text": "function findIndex($items, $label, $value)\n{\n if (!is_array($items))\n {\n throw new Exception(\"Items is not array\");\n }\n $found = false;\n $indexOf = -1;\n foreach ($items as $key => $item) {\n if ($found === true) break;\n if ($item[$label] === $value)\n {\n $found = true;\n $indexOf = $key;\n }\n }\n\n return $indexOf;\n}", "title": "" }, { "docid": "61c172f18065791d47bc1f710f958fcb", "score": "0.56765884", "text": "function find($item) {\n\t\treturn $this->zc_type(array_search($item, $this->a));\n\t}", "title": "" }, { "docid": "b786a6ac0f2b2c78c48807cedcbae1aa", "score": "0.5661562", "text": "public function exist( $idProductoItem )\n\t{\n\t\treturn (bool) $this->createQuery('ppi')\n \t\t\t ->addWhere('ppi.id_producto_item = ?', array( $idProductoItem ) )\n \t\t\t ->count();\n\t}", "title": "" }, { "docid": "005f4d925ca5eb3e886231411e0fead6", "score": "0.56423324", "text": "private function getIndexProduct ( $newproduct ) {\n\t\t$NS = new Zend_Session_Namespace ( 'Default' );\n\t\tif (! empty ( $NS->cart->products ) && is_array ( $NS->cart->products )) {\n\t\t\t$products = $NS->cart->products;\n\t\t\t$index = 0;\n\t\t\t\n\t\t\tif (is_array ( $products ) && count ( $products ) > 0) {\n\t\t\t\t\n\t\t\t\t// Read all the product added in the cart\n\t\t\t\tforeach ( $products as $product ) {\n\t\t\t\t\t// Match the product cycled with the hosting product previously inserted in the cart\n\t\t\t\t\tif ($product ['product_id'] == $newproduct ['product_id']) {\n\t\t\t\t\t\treturn $index;\n\t\t\t\t\t}\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "07b1d09f08e3c2908488758a25d83d5f", "score": "0.56421626", "text": "public function inCart($searchItem){\n \t$this->loadModel();\n foreach($this->cart as $key => $item){\n if($item[$this->model][$this->Model->primaryKey] == $searchItem[$this->model][$this->Model->primaryKey]){\n return $key;\n }\n }\n return false;\n }", "title": "" }, { "docid": "8f5681d774c501a7aec335c951ad623e", "score": "0.5630493", "text": "private static function check_items($items){\n\n\n if ($items == null || !is_array($items) || count($items) === 0){\n return \"Order Items not found\";\n }\n\n foreach($items as $item){\n $product = Product::where(\"id\", $item['id'])->where('available', '>=', $item['unit'])->first();\n if ($product === null){\n return $item['name'].' Not Available';\n }\n }\n\n if (self::total_cost($items) > 1000){\n return 'Sorry, The maximum order you can make at a time is $1000';\n }\n\n return null;\n }", "title": "" }, { "docid": "dd51cf562d064fd8779e37de5df157d4", "score": "0.56046534", "text": "public function findCartItemIndex(string $id): ?int\n {\n $items = $this->getAttribute('items');\n\n foreach ($items as $index => $item) {\n if ($item->id === $id) {\n return $index;\n }\n }\n\n return -1;\n }", "title": "" }, { "docid": "112873f0acadf807d1d795cd329ce5a5", "score": "0.5604363", "text": "public function getPosition()\n {\n if (count($this->getItemsAsArray()) == 0) {\n return -1;\n }\n\n \treturn parent::getPosition();\n }", "title": "" }, { "docid": "c82cee23f8efef21c3a2913510e3cf7b", "score": "0.5600829", "text": "function checkIfProductsExists($quantityAvailable) {\n foreach($quantityAvailable as $product=>$quantity) {\n if($quantity > 0) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "6781bfb7e256097df58aa897e7329b32", "score": "0.5596194", "text": "public function exists(){\r\n\r\n // query to count existing cart item\r\n $query = \"SELECT count(*) FROM \" . $this->table_name . \" WHERE product_id=:product_id AND user_id=:user_id\";\r\n\r\n // prepare query statement\r\n $stmt = $this->conn->prepare( $query );\r\n\r\n // sanitize\r\n $this->product_id=htmlspecialchars(strip_tags($this->product_id));\r\n $this->user_id=htmlspecialchars(strip_tags($this->user_id));\r\n\r\n // bind category id variable\r\n $stmt->bindParam(\":product_id\", $this->product_id);\r\n $stmt->bindParam(\":user_id\", $this->user_id);\r\n\r\n // execute query\r\n $stmt->execute();\r\n\r\n // get row value\r\n $rows = $stmt->fetch(PDO::FETCH_NUM);\r\n\r\n // return\r\n if($rows[0]>0){\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "720d4083d8cfc5b02e012a873a6b320a", "score": "0.55416405", "text": "function check_existence_id($arr,$index)\r\n {\r\n foreach ($arr as $single_index) \r\n {\r\n \r\n if($single_index['product_id'] == $index)\r\n {\r\n return FALSE;\r\n }\r\n\r\n }\r\n return TRUE;\r\n }", "title": "" }, { "docid": "a958390200f16a1ec7dfea0bbc2823f2", "score": "0.5513908", "text": "public function testShouldFindItem()\n {\n $item = $this->service\n ->setModel($this->model)\n ->handle();\n\n $this->assertTrue($item);\n $this->assertDatabaseMissing('items', [\n 'id' => $this->model->id\n ]);\n }", "title": "" }, { "docid": "30b1032ce00d2fc6aef703e20e40d452", "score": "0.54885787", "text": "public function indexOf( $item )\n\t\t{\n\t\t\tif( $item instanceof EventBase )\n\t\t\t{\n\t\t\t\tfor( $i = 0, $count = count( $this->items ); $i < $count; $i++ )\n\t\t\t\t{\n\t\t\t\t\tif( $this->items[$i]->name === $item->name )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidArgumentException(\"Argument 1 passed to \".get_class($this).\"::indexOf() must be an object of type EventBase\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bca46d973cc557f6dfae985ae2ff12b3", "score": "0.5484898", "text": "public function exist_product ($product_id) {\n $sql = \"SELECT id FROM prod WHERE id = ?\";\n $exist = $this->db_query($sql, \"i\", array($product_id));\n if (isset($exist)){\n return 1;\n }\n return 0;\n }", "title": "" }, { "docid": "cae7b0ab7b3b97ea7f1a055aef04585e", "score": "0.54846984", "text": "function cnt($item)\n {\n // PHP7.1 and below returns 0 on any number\n if (is_null($item)) return 0;\n\n // PHP7.1 and below returns 1 on any number\n if (is_numeric($item)) return 1;\n\n // PHP7.1 and below returns 1 on any string\n if (is_string($item)) return 1;\n\n try {\n // Use PHP's native count\n return count($item);\n } catch (\\Exception $e) {\n // If its object does not impliment Countable, return 0\n return 0;\n }\n }", "title": "" }, { "docid": "9c56c61f4dbd7888eafbd2d4409d776f", "score": "0.54762757", "text": "function osc_has_items() {\n if ( View::newInstance()->_exists('resources') ) {\n View::newInstance()->_erase('resources');\n }\n if ( View::newInstance()->_exists('item_category') ) {\n View::newInstance()->_erase('item_category');\n }\n if ( View::newInstance()->_exists('metafields') ) {\n View::newInstance()->_erase('metafields');\n }\n if(View::newInstance()->_get('itemLoop')!='items') {\n View::newInstance()->_exportVariableToView('oldItem', View::newInstance()->_get('item'));\n View::newInstance()->_exportVariableToView('itemLoop', 'items');\n }\n $item = View::newInstance()->_next('items');\n if(!$item) {\n View::newInstance()->_exportVariableToView('item', View::newInstance()->_get('oldItem'));\n View::newInstance()->_exportVariableToView('itemLoop', '');\n } else {\n View::newInstance()->_exportVariableToView('item', View::newInstance()->_current('items'));\n }\n return $item;\n }", "title": "" }, { "docid": "56f33681c3c2737230e13b6804838a14", "score": "0.54524297", "text": "public function search($value): ?int\n\t{\n\t\treturn ($result = array_search($value, $this->items)) !== false ? $result : null;\n\t}", "title": "" }, { "docid": "cee6bd23d671e04fc76c4d40ab097a70", "score": "0.5448984", "text": "function get_item($items, $item_name) {\n foreach ($items as $current) {\n $current_name = $current[\"name\"];\n if ($current_name === $item_name) { // name matches\n return $current;\n }\n }\n\n return null; // not in items\n }", "title": "" }, { "docid": "211ad26ce175be988d3b7336f5809298", "score": "0.5441611", "text": "function sp_menu_check_duplicate_items($id, $namespace)\n{\n\t$db = database();\n\n\t$result = $db->query('', '\n\t\tSELECT\n\t\t\tid_item\n\t\tFROM {db_prefix}sp_menu_items\n\t\tWHERE namespace = {string:namespace}\n\t\t\tAND id_item != {int:current}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'namespace' => $namespace,\n\t\t\t'current' => $id,\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\tlist ($has_duplicate) = $db->fetch_row($result);\n\t$db->free_result($result);\n\n\treturn $has_duplicate;\n}", "title": "" }, { "docid": "ff8e7cb086dd021e65f8dd54ffa12c8c", "score": "0.54330957", "text": "protected function searchProductById(array $productList, int $productId, array & $usedIndexes)\n\t{\n\t\tif ($productId === 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$usedIndexes[$productId] ??= [];\n\t\tforeach ($productList as $index => $item)\n\t\t{\n\t\t\tif (in_array($index, $usedIndexes[$productId], true))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($productId === (int)$item['PRODUCT_ID'])\n\t\t\t{\n\t\t\t\t$usedIndexes[$productId][] = $index;\n\t\t\t\treturn $index;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7f8aae98806c93e94a40fed683000498", "score": "0.5432758", "text": "public function check_product_exists($params, $item_name_vn = null)\n {\n $this->db->select(\"1\");\n $this->db->from('m_items');\n $this->db->where('trim(item_code)', trim($params['item_code']));\n // $this->db->where('trim(customer_code)', trim($params['customer_code']));\n if (isset($params['customer'])) {\n $this->db->where('trim(customer)', trim($params['customer']));\n }\n $this->db->where('trim(jp_code)', trim($params['jp_code']));\n $this->db->where('trim(item_name)', trim($params['item_name']));\n if(isset($item_name_vn) && $item_name_vn != null) {\n $this->db->where('trim(item_name_vn)', trim($item_name_vn));\n }\n $this->db->where('trim(salesman)', trim($params['salesman']));\n $this->db->where('trim(size)', trim($params['size']));\n $this->db->where('trim(color)', trim($params['color']));\n $this->db->where('del_flg', '0');\n\n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n return TRUE;\n } else {\n if($query->result_array())\n return FALSE;\n }\n }", "title": "" }, { "docid": "c79a89749eaea65b8b93df3c51531e0b", "score": "0.5419483", "text": "public function compare(Item $itemA, Item $itemB): int;", "title": "" }, { "docid": "1cbcec78fd6b059d12d01ca4ff02476f", "score": "0.5411128", "text": "function num_items() {\r\n\t\r\n\t\t$products = $this->Session->read('Cart'); \r\n\t\treturn count($products);\r\n\t}", "title": "" }, { "docid": "fad855591c7805d729a64db5c21de532", "score": "0.5397724", "text": "function findIdenticalItem($product, DataObjectSet $productOptions) {\n\t \n\t foreach ($this->Items() as $item) {\n\n\t if ($item->ObjectID == $product->ID && $item->ObjectVersion == $product->Version) {\n\t \n \t $productOptionsMap = array();\n \t $existingOptionsMap = array();\n \t \n \t if ($productOptions) {\n \t $productOptionsMap = $productOptions->map('ID', 'Version');\n \t }\n\n \t if ($item) foreach ($item->ItemOptions() as $itemOption) {\n \t $productOption = $itemOption->Object();\n \t $existingOptionsMap[$productOption->ID] = $productOption->Version;\n \t }\n \t \n \t if ($productOptionsMap == $existingOptionsMap) {\n \t return $item;\n \t }\n\t }\n\t }\n\t}", "title": "" }, { "docid": "a446fabd5f689388ce6ccd65f898c920", "score": "0.53514296", "text": "function GetNumOfItems()\n {\n $sql = \"SELECT 0 FROM item WHERE itemCategory='\".$this->categoryId.\"'\";\n $result = mysqli_query($this->conn, $sql);\n\n return mysqli_num_rows($result);\n }", "title": "" }, { "docid": "6c02d8113ae972ca041016b85d5c9310", "score": "0.53476363", "text": "public function getProductId($item)\n {\n return $item->getProduct()->getId();\n }", "title": "" }, { "docid": "f53a8aa5cfa685d68618d63a2aea871e", "score": "0.53336483", "text": "function productExistInShoppingCart($dale, $product_id, $id_user){\n\t\t$shopCart = $dale->kueri(\"SELECT *\n\t\t\t\t\t\t\t\t FROM `shopping_cart` \n\t\t\t\t\t\t\t\t WHERE id_service_product = '\".$product_id.\"' AND\n\t\t\t\t\t\t\t\t \t\t id_user = '\".$id_user.\"'\");\n\n\t\t$shopCart = json_decode($shopCart);\n\n\t\tif(sizeof($shopCart) == 0){\n\t\t\treturn null;\n\t\t}\n\t\treturn $shopCart[0] -> id_shopcart;\n\t}", "title": "" }, { "docid": "b1971ce75df95e4afa85eb9e0a577255", "score": "0.53203386", "text": "public function key($item);", "title": "" }, { "docid": "1fda215e2d5a932f50f964412bc1f40e", "score": "0.53172094", "text": "function findMatchingItem($item) {\n if($item->getParentId() == 0) {\n $dar = $this->searchMatchingItem($item, 0);\n if($dar && !$dar->isError() && $dar->rowCount() == 1) {\n $row = $dar->getRow();\n if($this->checkItemPermissions($row['item_id'])) {\n $this->itemMapping[$item->getId()] = $row['item_id'];\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "7014cb541a95721fc0c448f47f600cd9", "score": "0.53143877", "text": "function linearSearch($anArray, $item) {\n for ($i = 0; $i < sizeof($anArray); $i++) {\n if ($anArray[$i] === $item) {\n return $i;\n }\n }\n return -1;\n}", "title": "" }, { "docid": "d04315f0c3f7fa75ad68bb9b69e4a38f", "score": "0.5310248", "text": "public function GetIndex() {\n $index = key($this->_item);\n if (is_numeric($index))\n return intval($index);\n return -1;\n }", "title": "" }, { "docid": "27bcd0904c27e3be2fa2f67ffe5aacd9", "score": "0.52986944", "text": "protected function items_Found() {\n $countProjects = Productodefecto::CountAll();\n if ($countProjects == 0) {\n QApplication::ExecuteJavaScript(\"itemsFound(1);\");\n } else {\n QApplication::ExecuteJavaScript(\"itemsFound(2);\");\n }\n }", "title": "" }, { "docid": "59f03dbdc965cbda1d3556cfa256e282", "score": "0.52726644", "text": "public function izbergProductInIzbergCart($items, $izberg_product_id)\n {\n $result = null;\n foreach($items as $item) {\n if ($item->product->id == $izberg_product_id) {\n $result = $item;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "b75fa12510724032a1ff838885ffde35", "score": "0.5249119", "text": "public function offsetExists($index) {\n return isset($this->_items[$index]);\n }", "title": "" }, { "docid": "94ef6b6649d3b489509b0ca0e7007694", "score": "0.5240557", "text": "public function itemCount(): int {\n\t\treturn count($this->m_items);\n\t}", "title": "" }, { "docid": "49d5fde6d16563e5d7590e719da771a6", "score": "0.52374816", "text": "public function getBasketItem($productId, $price = NULL, array $props = array())\n {\n $needCheckProps = !empty($props);\n\n foreach($this->getBasket() as $item)\n {\n if($item->getProductId() == $productId && (isset($price) ? $item->getField('PRICE') == $price : true))\n {\n if($needCheckProps)\n {\n $found = true;\n $count = 0;\n foreach($item->getPropertyCollection() as $prop)\n {\n ++$count;\n $code = $prop->getField('CODE');\n $found = $found && isset($props[$code]) && $props[$code] == $prop->getField('VALUE');\n }\n if($count <= count($props) && $found)\n return $item;\n }\n else\n return $item;\n }\n }\n return false;\n }", "title": "" }, { "docid": "bb16fc24f1a64702c1ca2f570ee70406", "score": "0.5233642", "text": "function verifyItems($origItems, $origPrices, $items, $prices) {\n\t$origItemsMap = [];\n\tforeach ($origItems as $key => $value) {\n\t\t$origItemsMap[$value] = $origPrices[$key];\n\t}\n\t$mistake = 0;\n\tforeach ($items as $key => $value) {\n\t\tif(!array_key_exists($value, $origItemsMap)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif($origItemsMap[$value] !== $prices[$key]) {\n\t\t\t$mistake++;\n\t\t}\n\t}\n\treturn $mistake;\n}", "title": "" }, { "docid": "39d2712ba25c98fb542f2e29b0ad19a3", "score": "0.52290344", "text": "public function getProductRank($products, $asin)\r\n\t{\r\n\t\tforeach ($products as $key => $product) {\r\n\t\t\tif ($product->asin == $asin) {\r\n\t\t\t\t$rank = $key + 1;\r\n\t\t\t\treturn $rank;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "a10ca11a7821b45e515b056cee8e4f1c", "score": "0.52208424", "text": "private function find($item)\n {\n $low = 0;\n $high = $this->data->count() - 1;\n\n while ($low <= $high) {\n $mid = ($low + $high) >> 1; //shift the bits of ($low+$hight) result to the right (each step means \"divide by two\")\n $tmp = $this->data->offsetGet($mid);\n\n if ($item instanceof ComparableInterface) {\n $result = $this->getComparableMode() === self::COMPARABLE_MODE_CASE_SENSITIVE\n ? $item->compareTo($tmp)\n : $item->compareToIgnoreCase($tmp);\n } elseif (is_int($item) || is_float($item)) {\n if ($item < $tmp) $result = -1;\n elseif ($item > $tmp) $result = 1;\n else $result = 0;\n } elseif (is_string($item)) {\n $result = $this->getComparableMode() === self::COMPARABLE_MODE_CASE_SENSITIVE\n ? strcasecmp($item, $tmp)\n : strcmp($item, $tmp);\n } else {\n throw new \\InvalidArgumentException('BinarySearch::find only accepts ComarableInterface|string|int|float, '.gettype($item) . ' given.');\n }\n\n if ($result === 0) //item has been found, return its location\n return $mid;\n if ($result < 0) //item comes before middle elements, search the top of the table\n $high = $mid - 1;\n else //item comes after the middle elements, search the bottom of the table\n $low = $mid + 1;\n }\n //item is not in the list, return a signal that gives the location where\n //the item should be inserted into the list.\n return -$low - 1;\n }", "title": "" }, { "docid": "7a74836fa29577129e1952d8a77baf89", "score": "0.52200705", "text": "public function hasItemId(){\r\n return $this->_has(11);\r\n }", "title": "" }, { "docid": "c69ce4a14043ccfdbd25d48312789b40", "score": "0.5217291", "text": "function productExists($product_id) {\r\n //use sprintf to make sure that $product_id is inserted into the query as a number - to prevent SQL injection\r\n $sql = sprintf(\"SELECT * FROM product_info WHERE id = %d;\",$_SESSION['product_id']); \r\n return mysql_num_rows(mysql_query($sql)) > 0;\r\n }", "title": "" }, { "docid": "a1bd67c73542a9d1eabc6f500033c3a6", "score": "0.52163386", "text": "public function hasItems(){\r\n return $this->_has(1);\r\n }", "title": "" }, { "docid": "befeede4641d8c3f955462c77a7b0304", "score": "0.5197313", "text": "abstract protected function getNonExistentItemId(): string;", "title": "" }, { "docid": "b7209c8d9be8d526e242d6fd818d56e1", "score": "0.5188166", "text": "public function isExist(Product $product) {\n $req=$this->connection->prepare('SELECT EXISTS(SELECT 1 FROM article WHERE id_article=?) AS exist');\n $req->execute( array($product->getId()) );\n $exist=($req->fetch())['exist'];\n return $exist;\n }", "title": "" }, { "docid": "ffeb3dc27768acb9648c5b2ee06c73ce", "score": "0.5185564", "text": "function productExists($product_id) {\n //use sprintf to make sure that $product_id is inserted into the query as a number - to prevent SQL injection\n $sql = sprintf(\"SELECT * FROM php_shop_products WHERE id = %d;\", $product_id);\n \n return pg_num_rows(pg_query($sql)) > 0;\n}", "title": "" }, { "docid": "8fae65f4dfce44c9cba82cf6fbaa4f1f", "score": "0.5185203", "text": "function ItemAtPos($itemkey)\r\n {\r\n if(isset($this->_items[$itemkey]))\r\n return $this->_items[$itemkey];\r\n else\r\n return null;\r\n }", "title": "" }, { "docid": "d07f9cd9f778b805ce9e8b288d923d99", "score": "0.5184657", "text": "public function offsetExists($key) { return array_key_exists($key, $this->items); }", "title": "" }, { "docid": "64d2b347f47503a410661ed043bdbfb5", "score": "0.51833856", "text": "function countItems($item, $table) {\n\n\t\tglobal $con;\n\n\t\t$stmt2 = $con->prepare(\"SELECT COUNT($item) FROM $table\");\n\n\t\t$stmt2->execute();\n\n\t\treturn $stmt2->fetchColumn();\n\n\t}", "title": "" }, { "docid": "8e73a6c6465c2884a4c4a742e33fd77b", "score": "0.5182411", "text": "function CartItemExists($conn, $email, $itemID) {\n\t/** Check if parameters are valid/null */\n\tif(!$conn) mysql_fatal_error(\"Connection cannot be null\");\n\tif($conn->connect_error) mysql_fatal_error($conn->connect_error); // Test connection\n\tif(!$email) mysql_fatal_error(\"Email cannot be null\");\n\tif(!$itemID) mysql_fatal_error(\"Item ID cannot be null\");\n\t/** Perform query */\n\tif(!$stmt = $conn->prepare(\"SELECT * FROM Carts WHERE email=? AND itemID=?;\")) mysql_fatal_error(\"Prepare statement failed: \".$conn->error);\n\tif(!$stmt->bind_param('ss', $email, $itemID)) mysql_fatal_error(\"Binding parameters failed: \".$conn->error); // Bind parameters for sanitization\n\tif(!$stmt->execute()) mysql_fatal_error(\"Execute failed: \".$conn->error); // Execute statement\n\t/** Store result */\n\tif(!$stmt->store_result()) mysql_fatal_error(\"Store result failed : \".$conn->error);\n\t$rowcount = $stmt->num_rows; // Get rowcount\n\t$stmt->close(); // Close statement\n\treturn $rowcount; // Success\n}", "title": "" }, { "docid": "74638818b26a8024a9275922b4bcba26", "score": "0.5181057", "text": "public function has_item($value){\n $items = $this->get_info('player_items');\n if (is_numeric($value)){ return in_array($value, $items) ? true : false; }\n else { return isset($items[$value]) ? true : false; }\n }", "title": "" }, { "docid": "434c6e8088673bf0cedfd5fb9f76b3a7", "score": "0.5179742", "text": "function playlist_item_exists($item_id, $uid = NULL)\n {\n if ($uid)\n {\n $ucond = \" AND userid='$uid' \";\n }\n\n global $db;\n\n $count = $db->count(tbl('playlist_items'), \"playlist_item_id\", \"playlist_item_id='$item_id' $ucond \");\n\n if ($count)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "b0d35441e58d900d024636333c79c45d", "score": "0.51794285", "text": "public static function has($item){\n\n if(!self::$items)\n self::$items = include_once(dirname(__FILE__).'/../config/parameters.php');\n\n return array_key_exists($item, self::$items);\n }", "title": "" }, { "docid": "e062bc6d3b25730a577a4913d2febbe5", "score": "0.5174976", "text": "Public function isProductExistsinLocation($product_id=null,$location_id=null,$code_packaging_level=null) {\n\t\t$answerQuery = $this->db->get_where('inventory_on_hand', array('product_id' => $product_id, 'location_id' => $location_id, 'code_packaging_level' => $code_packaging_level));\n\t\t//print $answerQuery;\n if($answerQuery->num_rows() > 0){\n return true;\n }\n\t\t//return false;\n }", "title": "" }, { "docid": "922ea9c8a40b848f4ac9226413d6a6ed", "score": "0.51582247", "text": "function offsetExists($pos) { return $this->exists($pos);}", "title": "" }, { "docid": "693d660a9421130bde9f5a40db2338be", "score": "0.5143898", "text": "public function itemCount() {\n\t\tif (!isset($this->_item_count)) {\n\t\t\t$this->_item_count = count($this->item_ids);\n\t\t}\n\t\treturn $this->_item_count;\n\t}", "title": "" }, { "docid": "c76339a64c189faaadb479ee4f4ce124", "score": "0.5141307", "text": "public function get_items_count(){\n $items = $this->get_info('player_items');\n return count($items);\n }", "title": "" }, { "docid": "ad1534542b663d4d4efa6a060ae49ad4", "score": "0.51390135", "text": "function item_in_cart($product_id) {\r\n\tif(isset($_SESSION['cart'][$product_id]) and $_SESSION['cart'][$product_id] != 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "title": "" }, { "docid": "f8e729dffa3884d221f5783a102863e6", "score": "0.5137014", "text": "function has_item ($item, $login)\r\n {\r\n # do_mysq\r\n //$login = preg_replace ('/[^a-z_0-9]/i', '', $login);\r\n //$item = preg_replace ('/[^a-z0-9\\._]/i', '', $item);\r\n $q = do_mysql (\"SELECT price FROM items WHERE fullname = '\".$item.\"' AND belongs = '\".$login.\"' AND is_in <> 'ban';\");\r\n if (!mysql_num_rows ($q)) return 0;\r\n else return 1;\r\n }", "title": "" }, { "docid": "610b53abf8cf247003dbe3710b63939e", "score": "0.5134692", "text": "public function hasItems();", "title": "" }, { "docid": "42a8157438356320fa1eab99543b0619", "score": "0.51286054", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM products WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested product (\". $this->id .\") does not exist - possibly the product has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "47ea17dca0a62021173f7f6f46c9c7e9", "score": "0.5124002", "text": "public function count() {\n return count($this->_itemIds);\n }", "title": "" }, { "docid": "cdc91ba783e0932d834236562edd7561", "score": "0.51184237", "text": "function hasItem($name);", "title": "" }, { "docid": "92477d569303a0c1abb44868ead039e9", "score": "0.51091135", "text": "private function getPositionById($id)\n {\n\n $statement = $this->db->prepare('SELECT list.position FROM list WHERE list.id=:id');\n $statement->bindParam(':id', $id);\n $statement->execute();\n\n $position = $statement->fetchColumn();\n\n if ($position === false)\n throw new InvalidArgumentException(\"Item with ID; ${id} doesn't exist\");\n else\n return intval($position);\n }", "title": "" }, { "docid": "b078612986a21645fcc7ac17410ccda1", "score": "0.5104502", "text": "public function getFbInventoryByProductId($productId){\n $inventory = DB::table(\"pabile_inventories\")->where(\"product_id\", $productId)->whereNull(\"order_id\")->count();\n return $inventory;\n }", "title": "" }, { "docid": "927263a036d5cc4450a828753aff94f0", "score": "0.5102964", "text": "public function getItemsCount() {\n\t\treturn count($this->items);\t\n\t}", "title": "" }, { "docid": "525ce94c1d8fe4ea8c303058eab8031c", "score": "0.50998825", "text": "function count_cart_products()\n{\n $cart = $_SESSION[\"cart\"];\n $count = count($cart);\n\n if ($count == 1) {\n echo $count . \" \" . \"product\";\n } else {\n echo $count . \" \" . \"products\";\n }\n}", "title": "" }, { "docid": "012231066812e301954c50e44dd6d16f", "score": "0.50967544", "text": "function get_cart_quantity_for($product_id) {\r\n\tif(isset($_SESSION['cart'][$product_id]) and $_SESSION['cart'][$product_id] != 0)\r\n\t\treturn $_SESSION['cart'][$product_id];\r\n\telse\r\n\t\treturn 0;\r\n}", "title": "" }, { "docid": "7072436e1fea362fe873f3ccd78a9941", "score": "0.5081129", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM products WHERE id='\". $this->obj_productform->productid .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested product (\". $this->obj_productform->productid .\") does not exist - possibly the product has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "f7090129f1f77819bcb4490064ab7670", "score": "0.5080363", "text": "public function getItemCount() {\n return count($this->items);\n }", "title": "" }, { "docid": "e5cae989102a44844c662c42d537f5b8", "score": "0.50743663", "text": "public function getFirstItemOnPage(): ?int;", "title": "" }, { "docid": "23bd531999696d47c6b319fd28b976be", "score": "0.50713915", "text": "public function productExists($name){\r\n $database = Database::getInstance();\r\n $name = $database->escape_value($name);\r\n $sql = \"SELECT * FROM \" . self::$table_name;\r\n $sql .= \" WHERE name= '{$name}' ;\";\r\n\r\n $result_array = self::find_by_sql($sql);\r\n \r\n return !empty($result_array) ? array_shift($result_array) : false;\r\n }", "title": "" }, { "docid": "4d88a95790cd429ce6f306a36c27fe19", "score": "0.50695544", "text": "public function is_item($words){\n $words_in=array();\n foreach($words as $word){\n $words_in[]=\"'\".$word.\"'\"; \n }\n $words = implode(\",\",$words_in);\n $sql = \"SELECT * from item_types WHERE name IN ($words)\";\n $item_type = $this->db->query($sql);\n \n if (count($item_type)==0)\n return false;\n return $item_type[0];\n }", "title": "" }, { "docid": "b80019b75223a2c046673ff6ea4eb8b5", "score": "0.5062202", "text": "public function checkShipment($items){ \n if(!is_array($items)){ \n return 0;\n } \n foreach($items as $item_id => $qty){\n $item = Mage::getModel('sales/order_item')->load($item_id);\n $product_id = $item->getProductId();\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id);\n $manageStock = $stockItem->getManageStock();\n if ($stockItem->getUseConfigManageStock()) {\n $manageStock = Mage::getStoreConfig('cataloginventory/item_options/manage_stock', Mage::app()->getStore()->getStoreId());\n }\n if (!$manageStock) {\n continue;\n }\n if (in_array($item->getProductType(), array('configurable', 'bundle', 'grouped', 'virtual', 'downloadable')))\n continue;\n \n if($this->selectWarehouseToShip($product_id,$qty) == 0){ \n return 0;\n };\n }\n return 1;\n }", "title": "" }, { "docid": "222c8b92dc58cf6aee943a3fe67667d6", "score": "0.50593495", "text": "public function insert($item = array()){\n if(!is_array($item) OR count($item) === 0){\n return FALSE;\n }else{\n if(!isset($item['id'], $item['name'], $item['price'], $item['qty'])){\n return FALSE;\n }else{\n \n // het aantal wordt ingevoerd\n $item['qty'] = (float) $item['qty'];\n if($item['qty'] == 0){\n return FALSE;\n }\n // de prijs wordt ingevoerd\n $item['price'] = (float) $item['price'];\n // maakt een unieke identifier aan vaan in de winkelwagen\n $rowid = md5($item['id']);\n $old_qty = isset($this->cart_contents[$rowid]['qty']) ? (int) $this->cart_contents[$rowid]['qty'] : 0;\n $item['rowid'] = $rowid;\n $item['qty'] += $old_qty;\n $this->cart_contents[$rowid] = $item;\n \n // save Cart Item\n if($this->save_cart()){\n return isset($rowid) ? $rowid : TRUE;\n }else{\n return FALSE;\n }\n }\n }\n }", "title": "" }, { "docid": "2dc307d8ebd585e4034a47738be01957", "score": "0.5054077", "text": "public function countExists($item_name){\n\t\t$q = \"SELECT * FROM {$this->countTable} WHERE `item_name` = '{$item_name}'\";\n\t\t$r = mysql_query($q);\n\t\tif(mysql_num_rows($r)>0){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8e70d8289810b74c85374cb585db4074", "score": "0.5048591", "text": "public function hasItems(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "530f0e36e15d8e3f13efbb5c9c00a6d3", "score": "0.5046074", "text": "public function count(): int\n {\n return \\count($this->itemList);\n }", "title": "" }, { "docid": "4cfcd478844a8f6cb3b8e2b6e56029fd", "score": "0.50396234", "text": "public static function getItemsCount($item = null)\n\t{\n\t\tif (!$item || !UsersHelper::isAdmin())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//get db\n\t\t$db = Factory::getDb();\n\t\t$query = $db->getQuery(true);\n\n\t\t//query\n\t\t$query->select('count(*)');\n\t\t$query->from('#__' . $item);\n\n\t\t//return results\n\t\t$db->setQuery($query);\n\n\t\treturn $db->loadResult();\n\t}", "title": "" }, { "docid": "6ec7cd7d0ca452a10bfd3b18322c92ed", "score": "0.5039102", "text": "function checkItemQuantity($destin_id, $pdo){\n\t\t$stmt = $pdo->prepare(\"SELECT quantity from items where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $quantity = $stmt->fetchAll();\n\t\tif($quantity[0][\"quantity\"] > 0){\n\t\t\treturn true;\n\t\t}else return false;\n\t}", "title": "" }, { "docid": "dfaeb058a9996b9595f8a10d1aa3bfdb", "score": "0.50371873", "text": "public function item_exists() {\n if ( ! isset( $this->data['fields'] ) ) {\n return false;\n }\n\n return ! empty( $this->data['fields']['id'] );\n }", "title": "" }, { "docid": "93233d66178173f39a1ccf54a094883c", "score": "0.5032981", "text": "public function getItemCount($items);", "title": "" }, { "docid": "97cfddafa9ee6e70611591a31e3316b5", "score": "0.5028767", "text": "function countItems();", "title": "" }, { "docid": "5d6d8868f3579be164db105c6341f938", "score": "0.50277036", "text": "public function insert($item = []){\n\t\t\tif (!is_array($item) or count($item) === 0){\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tif (!isset($item['id'], $item['name'], $item['qty'])){\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t/*\n\t\t\t\t\t * Insert Item\n\t\t\t\t\t */\n\t\t\t\t\t// prep the quantity\n\t\t\t\t\t$item['qty'] = (float) $item['qty'];\n\t\t\t\t\tif ($item['qty'] == 0){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// create a unique identifier for the item being inserted into the cart\n\t\t\t\t\t$rowid = md5($item['id']);\n\t\t\t\t\t// get quantity if it's already there and add it on\n\t\t\t\t\t$old_qty = isset($this -> cart_contents[$rowid]['qty'])? (int) $this -> cart_contents[$rowid]['qty']: 0;\n\t\t\t\t\t// re-create the entry with unique identifier and updated quantity\n\t\t\t\t\t$item['rowid'] = $rowid;\n\t\t\t\t\t$item['qty'] += $old_qty;\n\t\t\t\t\t$this -> cart_contents[$rowid] = $item;\n\n\t\t\t\t\t// save Cart Item\n\t\t\t\t\tif ($this -> save_cart()){\n\t\t\t\t\t\treturn isset($rowid)? $rowid: true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d740468717d476bbdf1d79274549af59", "score": "0.5026911", "text": "static function cartItem()\n {\n $userId = Session::get('user')['id'];\n return Cart::where('user_id', $userId)->count();\n }", "title": "" }, { "docid": "2c63f41563b34022f2779211d896e824", "score": "0.5026203", "text": "Public function isProductExistsinLocationOverallGlobalInventoryInHand($product_id=null,$location_id=null,$code_packaging_level=null,$userId=null) {\n\t\t$answerQuery = $this->db->get_where('overall_global_inventory_in_hand', array('product_id' => $product_id, 'location_id' => $location_id, 'code_packaging_level' => $code_packaging_level, 'created_by_id' => $userId, 'inventory_date' => date(\"Y-m-d\")));\n\t\t//print $answerQuery;\n if($answerQuery->num_rows() > 0){\n return true;\n }\n\t\t//return false;\n }", "title": "" }, { "docid": "c11f32033bd05f70b75bba8917a6b3af", "score": "0.50242156", "text": "protected function item_count() {\n\t\treturn $this->items->count_all();\n\t}", "title": "" }, { "docid": "85cc0cfb7987f5414af0accee7894cc9", "score": "0.50219756", "text": "function exists($item_id)\n\t{\n\t\t$this->con->from('items')->where('item_id', $item_id);\n\t\t$query = $this->con->get();\n\n\t\treturn ($query->num_rows()==1);\n\t}", "title": "" }, { "docid": "4b9a6004aa440b11ffe0edeac9f2d6b5", "score": "0.5014462", "text": "private function exists(Package $package) {\n\n foreach($this as $i => $childPackage) {\n if($childPackage === $package) {\n return $i;\n }\n }\n return false;\n }", "title": "" }, { "docid": "c6170fa17c549e625a1a720401c09412", "score": "0.5007317", "text": "public function existItem(T $a): bool;", "title": "" }, { "docid": "1c9e045a3a34564701caf4b8ebe5a237", "score": "0.50030637", "text": "public function count(){\n return count($this->items);\n }", "title": "" }, { "docid": "484ca1d3c71e3779b10a50dc459e0475", "score": "0.49942794", "text": "public function countItems()\n {\n if (!isset($this->arrCache['countItems'])) {\n $this->arrCache['countItems'] = ProductCollectionItem::countBy('pid', (int) $this->id);\n }\n\n return $this->arrCache['countItems'];\n }", "title": "" }, { "docid": "5f5d4c71fe9adae2906020aecdc4c88e", "score": "0.49924248", "text": "public function checkIfItemExists($item)\n {\n return Cart::where('item_id', $item->id)\n ->where('is_checkedout', true)\n ->exists();\n }", "title": "" }, { "docid": "e122e17888257877b6683fad1c539f32", "score": "0.49897587", "text": "abstract protected function getExistingItemId(): string;", "title": "" } ]
514b245bbea54b68fcd2c3d5365f78c8
Adds a delegate with its verification status set directly to `accepted`, without sending any verification email. The delegate user must be a member of the same Google Workspace organization as the delegator user. Gmail imposes limitations on the number of delegates and delegators each user in a Google Workspace organization can have. These limits depend on your organization, but in general each user can have up to 25 delegates and up to 10 delegators. Note that a delegate user must be referred to by their primary email address, and not an email alias. Also note that when a new delegate is created, there may be up to a one minute delay before the new delegate is available for use. This method is only available to service account clients that have been delegated domainwide authority. (delegates.create)
[ { "docid": "9bdf4c082d1556110d1fb64f26c04664", "score": "0.4925558", "text": "public function create($userId, Delegate $postBody, $optParams = [])\n {\n $params = ['userId' => $userId, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], Delegate::class);\n }", "title": "" } ]
[ { "docid": "75344a4ba96b58776058e713f6fcba4e", "score": "0.6018199", "text": "public function addDelegations() {\n $manager = $this->input->post('manager_id', TRUE);\n $delegate = $this->input->post('delegate_id', TRUE);\n if (($this->user_id != $manager) && ($this->is_hr === FALSE)) {\n $this->output->set_header(\"HTTP/1.1 403 Forbidden\");\n } else {\n if (isset($manager) && isset($delegate)) {\n $this->output->set_content_type('text/plain');\n $this->load->model('delegations_model');\n if (!$this->delegations_model->isDelegateOfManager($delegate, $manager)) {\n $id = $this->delegations_model->addDelegate($manager, $delegate);\n echo $id;\n } else {\n echo 'null';\n }\n } else {\n $this->output->set_header(\"HTTP/1.1 422 Unprocessable entity\");\n }\n }\n }", "title": "" }, { "docid": "9cf8e67c1f59179d8ac492392824b526", "score": "0.50856495", "text": "public function setDelegate(Automaton\\IMachineDelegate $delegate);", "title": "" }, { "docid": "15649ada3f48dd28b279f1dc2d3e9172", "score": "0.48214853", "text": "public function created(Delegate $delegate)\n {\n //\n }", "title": "" }, { "docid": "d8b7cd54977d41226e7ac0d8eff956a3", "score": "0.47904563", "text": "public function setDelegate($delegate)\n { \n $this->delegateMethodHandler = $delegate;\n }", "title": "" }, { "docid": "d715b40538f8a177abdcc75393f14abd", "score": "0.4783393", "text": "public function update(Request $request, Delegate $delegate)\n {\n $delegate->user_intranet = $request->get('user_intranet');\n $delegate->delegate_intranet = $request->get('delegate_intranet');\n $delegate->delegate_notesid = $request->get('delegate_notesid');\n $delegate->save();\n \n return response()->json($delegate);\n }", "title": "" }, { "docid": "a21a56ad246b1e750705034cdcb4b1cf", "score": "0.47503847", "text": "public function testCanCreateRecipients()\n {\n $data['data'] = [\n 'offer_id' => rand(1, 999999),\n 'recipient_id' => rand(1, 999999),\n 'expiration_date' => date('Y-m-d', strtotime( '+'.mt_rand(0,30).' days'))\n ];\n $this->json('POST', \"/voucher/code\", $data)\n ->seeJson([\n 'code' => 200,\n 'status' => true\n ]);\n }", "title": "" }, { "docid": "7df61c6369a0f39740a42582565e6471", "score": "0.46372706", "text": "function friends_add_friend( $initiator_userid, $friend_userid, $force_accept = false ) {\r\n\tglobal $bp;\r\n\r\n\t$friendship = new BP_Friends_Friendship;\r\n\r\n\tif ( (int)$friendship->is_confirmed )\r\n\t\treturn true;\r\n\r\n\t$friendship->initiator_user_id = $initiator_userid;\r\n\t$friendship->friend_user_id = $friend_userid;\r\n\t$friendship->is_confirmed = 0;\r\n\t$friendship->is_limited = 0;\r\n\t$friendship->date_created = bp_core_current_time();\r\n\r\n\tif ( $force_accept )\r\n\t\t$friendship->is_confirmed = 1;\r\n\r\n\tif ( $friendship->save() ) {\r\n\r\n\t\tif ( !$force_accept ) {\r\n\t\t\t// Add the on screen notification\r\n\t\t\tbp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, $bp->friends->id, 'friendship_request' );\r\n\r\n\t\t\t// Send the email notification\r\n\t\t\trequire_once( BP_PLUGIN_DIR . '/bp-friends/bp-friends-notifications.php' );\r\n\t\t\tfriends_notification_new_request( $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );\r\n\r\n\t\t\tdo_action( 'friends_friendship_requested', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );\r\n\t\t} else {\r\n\t\t\tdo_action( 'friends_friendship_accepted', $friendship->id, $friendship->initiator_user_id, $friendship->friend_user_id );\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}", "title": "" }, { "docid": "c7fc950a3dcc717c1b64ec40c123af09", "score": "0.45640373", "text": "public function createVerification($recipient);", "title": "" }, { "docid": "14962537f3ef957e4bab27e46f8d7b43", "score": "0.45600682", "text": "public function makeAccepted()\n {\n $this->setAttribute('accepted', self::ACCEPTED);\n }", "title": "" }, { "docid": "c7f0743e64c81bf7566b600361cfaa65", "score": "0.44960773", "text": "public function setDelegatedUsers(\\GoetasWebservices\\Client\\SalesforceEnterprise\\Types\\QueryResultType $delegatedUsers)\n {\n $this->delegatedUsers = $delegatedUsers;\n return $this;\n }", "title": "" }, { "docid": "933fc793b21aa73d8321cd3785d28a57", "score": "0.44788104", "text": "public function setDelegate($delegate)\n {\n $this->includeFile('Sonic/App/Delegate.php');\n $this->autoloader($delegate);\n\n $delegate = new $delegate;\n\n if (!$delegate instanceof \\Sonic\\App\\Delegate) {\n throw new \\Exception('app delegate of class ' . get_class($delegate) . ' must be instance of \\Sonic\\App\\Delegate');\n }\n\n $this->_delegate = $delegate;\n $this->_delegate->setApp($this);\n return $this;\n }", "title": "" }, { "docid": "47d90cd046e0ed5932eb5a180656b2f0", "score": "0.44784653", "text": "public function setAcceptedPayments(array $acceptedPayments)\n {\n $this->acceptedPayments = $acceptedPayments;\n return $this;\n }", "title": "" }, { "docid": "2f036b4f73466e1ac6bbe3e4ab5fcb81", "score": "0.44023526", "text": "public function sendPending()\n\t{\n\t\tif ( $this->type === static::REPLY_PENDING )\n\t\t{\n\t\t\t$this->type = static::REPLY_STAFF;\n\t\t\t$this->save();\n\t\t\t\n\t\t\t$defaultRecipients = $this->item()->getDefaultRecipients();\n\t\t\t$this->sendCustomerNotifications( $defaultRecipients['to'], $defaultRecipients['cc'], $defaultRecipients['bcc'] );\n\n\t\t\t$this->sendNotifications();\n\t\t}\n\t}", "title": "" }, { "docid": "25a8acaf514a5272a31a9b4874b609e9", "score": "0.4362195", "text": "function acceptInvite($group, $who) {\n global $manager;\n $manager->addUserToGroup($group->getGroupId(), $who);\n }", "title": "" }, { "docid": "553b7e3328fcdb85ce0bf97fc8b24fb0", "score": "0.43529317", "text": "public function addDelegator($name, $factory)\n {\n $this->configure(['delegators' => [$name => [$factory]]]);\n }", "title": "" }, { "docid": "ad468a986de62b47fd678548c310759d", "score": "0.43143928", "text": "public function addRecipient(Recipient $recipient);", "title": "" }, { "docid": "3d3ca59523e2e749a65f0c58514adb4c", "score": "0.4286347", "text": "public function postInviteUser()\n {\n try {\n execute(new InviteUserCommand(\n array_unique(array_filter((array) Binput::get('emails')))\n ));\n } catch (ValidationException $e) {\n return cachet_redirect('dashboard.team.invite')\n ->withInput(Binput::except('password'))\n ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.invite.failure')))\n ->withErrors($e->getMessageBag());\n }\n\n return cachet_redirect('dashboard.team.invite')\n ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.invite.success')));\n }", "title": "" }, { "docid": "bb9f5e82ab67d9fff797ad1b3c429095", "score": "0.4277822", "text": "public function invite($optional = [])\n {\n return $this->apiCall('post', '/conversations.invite', ['json' => array_merge([\n ], $optional)]);\n }", "title": "" }, { "docid": "850a60c85b69c246facbd021bbe0917e", "score": "0.42725414", "text": "public function accept()\n {\n $flight = $this->flight;\n\n if (Auth::id() === $flight->requestee_id) {\n $this->requestee_accept = Auth::id();\n } else {\n $this->acceptee_accept = Auth::id();\n }\n\n $this->save();\n }", "title": "" }, { "docid": "72790be25fbb68ca6dcbb7ae0cb4e2eb", "score": "0.42665076", "text": "private function _activate_merchant_account_verification(){\n\t\t\t$activation = $this->_get_bank_account_verification_fee();\n\t\t\t\n\t\t\t$role = '';\n\t\t\tif( isset( $this->class_settings['user_details'][ ''.$this->class_settings['user_id'] ][ 'role' ] ) ){\n\t\t\t\t$role = $this->class_settings['user_details'][ ''.$this->class_settings['user_id'] ][ 'role' ];\n\t\t\t}\n\t\t\t\n\t\t\tif( $activation ){\n\t\t\t\t//2. check gen settings for user role\n\t\t\t\tif( $role == 'seller' ){\n\t\t\t\t\t\n\t\t\t\t\t//CREATE NOTIFICATION && //CREATE PENDING TASKS\n\t\t\t\t\t$this->class_settings['notification_data'] = array(\n\t\t\t\t\t\t'title' => 'Verify Your Bank Account',\n\t\t\t\t\t\t'detailed_message' => 'Your don\\'t have a verified bank account, that would enable us send payment to you once your items have been purchased',\n\t\t\t\t\t\t'send_email' => 'no',\n\t\t\t\t\t\t'notification_type' => 'pending_task',\n\t\t\t\t\t\t'target_user_id' => $this->class_settings['user_id'],\n\t\t\t\t\t\t'class_name' => $this->table_name,\n\t\t\t\t\t\t'method_name' => 'bank_account_verified',\n\t\t\t\t\t\t\n\t\t\t\t\t\t'task_status' => 'pending',\n\t\t\t\t\t\t'task_type' => 'system_generated',\n\t\t\t\t\t\t\n\t\t\t\t\t\t'trigger_function' => '?action=site_users&todo=display_user_details',\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$notifications = new cNotifications();\n\t\t\t\t\t$notifications->class_settings = $this->class_settings;\n\t\t\t\t\t$notifications->class_settings[ 'action_to_perform' ] = 'add_notification';\n\t\t\t\t\t$notifications->notifications();\n\t\t\t\t\t\n\t\t\t\t\t//Send Verify Bank Account Email\n\t\t\t\t\t/*\n\t\t\t\t\t$this->class_settings['message_type'] = 1;\n\t\t\t\t\t$this->_send_email();\n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\t//. redirect to activation menu - ACTIVATION MENU + Welcome Message\n\t\t\t\t\treturn '?action=merchant_accounts&todo=bank_account_manager';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "c9897f197812b4dae5a89657fdf67de5", "score": "0.4253531", "text": "private function is_delegated(string $name, $delegate): string|null\n {\n if (is_array($delegate)) {\n if ('' != $delegate['prefix']) {\n $name = substr($name, strlen($delegate['prefix']) + 1);\n }\n\n if (in_array($name, $delegate['delegate'])) {\n return $name;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "4becf9354691fe23975ebae9b9ffa1af", "score": "0.42249995", "text": "public static function acceptRejectTeamInviteNotification(User $user, User $captain, $status){\n\t\t$notification = new Notification([\t'type' => 'Other',\n\t\t\t\t\t\t\t\t\t\t\t'data' => json_encode(['user_id' => $user->id]),\n \t\t\t\t\t\t\t\t\t\t'message' => $user->email . \" has \" . $status . \" your team request.\"\n \t]);\n\n\t\t$captain->notifications()->save($notification);\n \t \n \t//Send Team Acceptation Mail\n \tMail::to($captain)->send(new TeamRequestAcceptRejectMail($user, $captain, $status));\n \t\n \treturn true;\n\t}", "title": "" }, { "docid": "aa0229be269a85c236ff207bcee04a07", "score": "0.42236853", "text": "protected function __MemberBuilder($referer, User $user)\n {\n $done = Member::create([\n 'name' => $user->name,\n 'email' => $user->email,\n 'referer' => $referer,\n 'user_id' => $user->id,\n ]);\n if ($done) {\n $account = Account::create(['author' => $done->id]);\n if ($account) {\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "b7b8a1bea0bbc397caccd5b5bb590c2c", "score": "0.4214664", "text": "public function accept()\n {\n return $this->update(['status' => 'accepted']);\n }", "title": "" }, { "docid": "62baa6595622a7eb19ccc437094b28be", "score": "0.42102212", "text": "public function createDelegateInstance(array $configuration = []);", "title": "" }, { "docid": "f80c5967c1b5326925cd125dd81519de", "score": "0.420052", "text": "public function accept_invitation($invitation_code){\n\t\t$inviteArr = $this->Invite->findByUnique_code($invitation_code);\n\t\tif(!empty($inviteArr)){\n\t\t\t$saveData['id'] = $inviteArr['Invite']['id'];\n\t\t\t$saveData['unique_code'] = 'verified';\n\t\t\t$saveData['status'] = '1';\n\t\t\t$this->Invite->save($saveData);\n\t\t}\n\t\t$this->redirect(SITE_PATH);\n\t\texit;\n\t}", "title": "" }, { "docid": "1a94f3204e8818e1337410c93c759cae", "score": "0.4183666", "text": "public function create(Administrator $administrator)\n {\n return Gate::check('manageUsers');\n }", "title": "" }, { "docid": "6a309ea5290464174012adff7d62c97a", "score": "0.4155484", "text": "public function store(Request $request)\n {\n $delegate = new Delegate([\n 'user_intranet' => $request->get('user_intranet'),\n 'delegate_intranet' => $request->get('delegate_intranet'),\n 'delegate_notesid' => $request->get('delegate_notesid')\n ]);\n $delegate->save();\n \n return response()->json($delegate);\n }", "title": "" }, { "docid": "560ee57b305e709d941bdf4fcc722fa3", "score": "0.41512677", "text": "public function accept($name, Google_Service_MyBusiness_AcceptInvitationRequest $postBody, $optParams = array())\n {\n $params = array('name' => $name, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('accept', array($params), Google_Service_MyBusiness_MybusinessEmpty::class);\n }", "title": "" }, { "docid": "9c780c7eeaf5e0a13786c00983524f71", "score": "0.41406643", "text": "public function store()\n {\n $invitation = Invitation::findByCode(request('invitation_code'));\n abort_if($invitation->hasBeenUsed(), 403);\n \n $user = User::where('email', $invitation->email)->first();\n abort_if($user->isNot(auth()->user()), 403);\n\n \t$invitation->update(['user_id' => $user->id]);\n $invitation->workspace->addMember($user);\n\n return redirect(route('tasks.index', $invitation->workspace->id));\n }", "title": "" }, { "docid": "465dd3f2a562a97e9de424d60f245b46", "score": "0.41379243", "text": "public function accept_invite_() {\n\t\teval(USER);\n\t\t$this->assign('waitSecond',1);\n\n\t\t$cond['team_id'] = $_GET['team'];\n\t\t$cond['user_id'] = session('userid');\n\t\t$data['statecode'] = 1;\n\n\t\ttry {\n\t\t\t$res = DBModel::updateDB('cernet_teammate', $cond, $data);\n\t\t\tunset($cond['team_id']);\n\t\t\t$cond['statecode'] = 0;\n\t\t\t$data['statecode'] = -1;\n\t\t\t$res = DBModel::updateDB('cernet_teammate', $cond, $data);\n\t\t\t$this->move2state3();\n\n\t\t\t$this->success('','__ROOT__/User/currentstage');\n\t\t}catch(Exception $e){\n\t\t\tthrow_exception($e->getMessage());\n\t\t}\t\n\t}", "title": "" }, { "docid": "7f026219bca3a22b5eb79121353981c5", "score": "0.41370684", "text": "public function deleted(Delegate $delegate)\n {\n //\n }", "title": "" }, { "docid": "1ab2a4131c7aebefabe0e18e08e18fec", "score": "0.41320974", "text": "public function testDelegate()\n {\n $proxy = new SimpleProxy('http://example.com/');\n $response = $proxy->delegate(Request::create('/'));\n $this->assertTrue($response->isOk());\n }", "title": "" }, { "docid": "0a3cae04383f5a50e5f3f9a3970fe562", "score": "0.41111773", "text": "public function deleteDelegations() {\n $manager = $this->input->post('manager_id', TRUE);\n $delegation = $this->input->post('delegation_id', TRUE);\n if (($this->user_id != $manager) && ($this->is_hr == FALSE)) {\n $this->output->set_header(\"HTTP/1.1 403 Forbidden\");\n } else {\n if (isset($manager) && isset($delegation)) {\n $this->output->set_content_type('text/plain');\n $this->load->model('delegations_model');\n $id = $this->delegations_model->deleteDelegation($delegation);\n echo $id;\n } else {\n $this->output->set_header(\"HTTP/1.1 422 Unprocessable entity\");\n }\n }\n }", "title": "" }, { "docid": "ab9361051cdb0339a9527b4162b747f3", "score": "0.40969282", "text": "public function accept() {\n $admin = new Admin();\n $message = new Message();\n\n $is_accepted = $_POST['is_accepted'];\n $id = $_POST['id'];\n\n $message->setMsg('You create task.','success');\n $admin->updateCommentIsAccepted($is_accepted,$id);\n\n Controller::redirect('/admin/comments');\n }", "title": "" }, { "docid": "66dc00122b0bb2d7687fa721ca9faf3b", "score": "0.40826055", "text": "public function addRequester($requester)\n {\n $this->requester[] = $requester;\n return $this;\n }", "title": "" }, { "docid": "11c2173a209124e5259f26c0264256af", "score": "0.40768003", "text": "public function setValueDelegate($valueDelegate);", "title": "" }, { "docid": "e62f2c689fc70b92d0fd5715cf69554e", "score": "0.40760764", "text": "function add_pending_user($email, $name){\n \t// Make sure the user does not already exist in database\n \t$query = $this->db->get_where('users', array('email' => $email));\n\n \tif($query->num_rows() > 0){\n \t\tthrow new RecoverableException(\"A user already exists with this email.\");\n \t}\n\n \t// Add the user\n \t$data = array(\n \t\t'email' => $email,\n \t\t'is_admin' => 0,\n \t\t'name' => $name\n \t);\n \t\n \t$this->db->insert('users', $data);\n \n $user_id = $this->db->insert_id();\n\n return $this->add_registration_hash($user_id);\n }", "title": "" }, { "docid": "954e54ce8e28e534f5e0dae9367209b7", "score": "0.40633643", "text": "public function create(BannedEmailListener $listener)\n {\n $bannedEmail = new BannedEmail();\n $form = $this->presenter->form($bannedEmail);\n\n return $listener->showCreateForm(compact('bannedEmail', 'form'));\n }", "title": "" }, { "docid": "f6d3110dfedf3ea2eacb184497f2d382", "score": "0.40589327", "text": "function add(&$subscriber, $type = null) {\n\t\tglobal $pommo;\n\t\t$dbo =& $pommo->_dbo;\n\t\t$logger =& $pommo->_logger;\n\t\t\n\t\tswitch ($type) {\n\t\t\tcase 'add':\n\t\t\tcase 'del':\n\t\t\tcase 'change':\n\t\t\tcase 'password':\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$logger->addErr('Unknown type passed to PommoPending::add');\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$p = array(\n\t\t\t'subscriber_id' => $subscriber['id'],\n\t\t\t'type' => $type,\n\t\t\t'code' => PommoHelper::makeCode(),\n\t\t\t'array' => ($type == 'change') ?\n\t\t\t\t$subscriber : array()\n\t\t\t);\n\t\t\t\n\t\t$pending = PommoPending::make($p);\n\t\t\n\t\tif (!PommoPending::validate($pending)) {\n\t\t\t$logger->addErr('PommoPending::add() failed validation');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!empty($pending['array']))\n\t\t\t$pending['array'] = serialize($pending['array']);\n\t\t\n\t\t// check for pre-existing pending request\n\t\tif (PommoPending::isPending($pending['subscriber_id']))\n\t\t\treturn false;\n\t\t\t\n\t\t$query = \"\n\t\t\tINSERT INTO \".$dbo->table['subscriber_pending'].\"\n\t\t\tSET\n\t\t\t\t[pending_array='%S',]\n\t\t\t\tsubscriber_id=%i,\n\t\t\t\tpending_type='%s',\n\t\t\t\tpending_code='%s'\";\n\t\t$query = $dbo->prepare($query,array(\n\t\t\t$pending['array'],\n\t\t\t$pending['subscriber_id'],\n\t\t\t$pending['type'],\n\t\t\t$pending['code']));\n\t\t\t\n\t\tif (!$dbo->query($query))\n\t\t\treturn false;\n\t\t\n\t\treturn $pending['code'];\n\t}", "title": "" }, { "docid": "a9374472762e23bc55eca4ca3f23c440", "score": "0.4052591", "text": "public function updated(Delegate $delegate)\n {\n //\n }", "title": "" }, { "docid": "c3e228406fbef5ffe316679caeb4f1f4", "score": "0.40498355", "text": "public function accepted()\n {\n return $this->state(function (array $attributes) {\n return [\n 'status' => Friendship::STATUS_ACCEPTED,\n ];\n });\n }", "title": "" }, { "docid": "7a5a13c852fdbe75cecd675c80e3ed27", "score": "0.40421793", "text": "public function addToAcceptedPayments(\\Devlabs91\\TravelgateNotify\\Models\\Ota\\PaymentFormType $acceptedPayment)\n {\n $this->acceptedPayments[] = $acceptedPayment;\n return $this;\n }", "title": "" }, { "docid": "a6219e4be4eee13116dc083e99659adc", "score": "0.40314233", "text": "public function sendInviteFriends(){\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$user = $this->getLoguedUser();\n\n\t\tif(Referal::where('to', '=', Input::get('to'))->first() != null){\n\t\t\treturn Redirect::route('invite-friends')->with('message', $input['to'] . ' has already been refered.');\n\t\t}\n\t\t\n\t\t$after_message = 'Our portal connects members to contacts and opportunities that drive sales results \n\t \tfor businesses! The first active network! Working actively in our platform \n\t \twill cut down your prospecting process by half the time, thereby \n\t \tincreasing your productivity!\n\t \t<br>\n\t\t\t\t\t<br>\n\t\t\t\t\tOur Site: <a href=\"www.leadcliq.com\">www.leadcliq.com</a>\n\t\t\t\t\t<br>\n\t\t\t\t\t<br>\n\t\t\t\t\tContact Us: support@leadcliq.com';\n\t\tEmailController::sendMail($input['to'], '', $user->first_name . ' ' . $user->last_name . ': ' . Input::get('subject','Join Me At Leadcliq'), Input::get('message') . $after_message);\n\n\t\t$length = 20;\n\t\t$randomString = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyz\"), 0, $length);\n\n\t\tReferal::create(array(\n\t\t'user_id' => Sentry::getUser()->id,\n\t\t'from' => @$input['from'],\n\t\t'to' => $input['to'],\n\t\t'subject' => @$input['subject'],\n\t\t'message' => @$input['message'],\n\t\t'token' => $randomString,\n\t\t'status' => Referal::$NOT_SIGNED_YET\n\t\t));\n\n\t\treturn Redirect::route('home')->with('message', 'Thanks! Invite as many friends as you want.');\n\t}", "title": "" }, { "docid": "61b3d08193525ffe98781650202a94ce", "score": "0.40276545", "text": "public function acceptedAnswer($value)\n {\n $this->setProperty('acceptedAnswer', $value);\n return $this;\n }", "title": "" }, { "docid": "bcd560bc5c4966d68d9cff82ef63be18", "score": "0.4021126", "text": "Public function add($validator)\n {\n $this->validators[] = $validator;\n }", "title": "" }, { "docid": "412f8daa8c2a96da2c67f6dc0e0fc7be", "score": "0.40081555", "text": "public function addFriend($recipient)\n\t{\n\t\tif(Auth::id() != $recipient->id): \n\t\t\tAuth::user()->befriend($recipient);\n\t\tendif;\n\t}", "title": "" }, { "docid": "7300d992f9b5e7a257ba57809d6fc413", "score": "0.40054592", "text": "public function acceptInvite()\n\t{\n\t\t$headerStringValue = apache_request_headers();\n\t\tif(isset($_POST) && !empty($_POST))\n\t\t{\n\t\t\tif( (!empty($_POST['user_id']) && isset($_POST['user_id'])) && (!empty($headerStringValue['webservice_token'])) && (!empty($_POST['invite_id']) && isset($_POST['invite_id'])) && (!empty($_POST['status']) && isset($_POST['status'])) )\n\t\t\t{\n\t\t\t\t/*inputs for validation */\n\t\t\t\t$webservice_token = $headerStringValue['webservice_token'];\n\t\t\t\t$user_id = $this->input->post(\"user_id\");\n\t\t\t\t$status = $this->input->post(\"status\");\n\t\t\t\t\n\t\t\t\t$validate_data = array(\"user_id\"=>$user_id,\"webservice_token\"=>$webservice_token);\n\t\t\t\t\n\t\t\t\t/*call function for validate user */\n\t\t\t\t$validate = $this->UM->validateWebservice($validate_data);\n\t\t\t\tif($validate['is_valid']==1){\n\t\t\t\t\t\n\t\t\t\t\t$invite_id = $this->input->post(\"invite_id\");\n\t\t\t\t\t$response = $this->FHI->acceptInvite($invite_id,$user_id,$status);\n\t\t\t\t\tif($response)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"1\",\"msg\"=>\"Data Updated\"));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo json_encode(array(\"status\"=>\"0\",\"msg\"=>\"Date not updated try again\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo json_encode(array(\"status\"=>\"0\",\"msg\"=>\"Not valid user\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode(array(\"status\"=>\"0\",\"msg\"=>\"Invalid Paramater\"));\n\t\t\t}\t\n\t\t}\n\t\telse{\n\t\t\techo json_encode(array(\"status\"=>\"0\",\"msg\"=>\"Invalid request\"));\n\t\t}\n\t}", "title": "" }, { "docid": "648817e4c0b610c85789a67de3b0a8c5", "score": "0.39790404", "text": "public function add($requested_id) {\n\t\t$this->check($requested_id);\n\t\t\n\t\tif($this->allowRequest()) {\n\t\t\t// check first for a previous request just to avoid any error later on\n\t\t\t$this->previousRequest();\n\t\t\t\n\t\t\tNotification_Service::origin('Registration', $this->ids['current'])\n\t\t\t\t->destinationId($this->ids['requested'])\n\t\t\t\t->params(['notif_type' => 'friend_request'])\n\t\t\t\t->send();\n\t\t\t\n\t\t\t$this->request->create([\n\t\t\t\t\t'requesting_user_id' => $this->ids['current'],\n\t\t\t\t\t'requested_user_id'\t=> $this->ids['requested'],\n\t\t\t\t\t'status' => 0\n\t\t\t]);\n\t\t\treturn true;\n\t\t}\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "62c247950baec17098911769b3371ae5", "score": "0.39787632", "text": "function sendWelcomeAndVerificationEmails($userEmailAddress) {\r\n\r\n\t//Verify a user email address was passed. If not, return NULL.\r\n\tif (!$userEmailAddress) {return NULL;}\r\n\t\r\n\t//Get the user. If not found, return NULL.\r\n\tif (!($newUser = User::getUserByEmailAddress($userEmailAddress))) {return NULL;}\r\n\r\n\t//Get the user's client\r\n\t$newUserClient = Client::getClient($newUser->getClientID());\r\n\r\n\t//---------------------------------- Welcome Email ----------------------------------\r\n\r\n\t//Create the welcome email subject\r\n\t$welcomeEmailSubject = \"AdShotRunner: Thank You for Registering!\"; \r\n\r\n\t//Create the welcome email body\r\n\t$welcomeEmailBody = $newUser->getFirstName() . \" \" . $newUser->getLastName() . \",\\n\\n\";\r\n\t$welcomeEmailBody .= \"Thank you for registering with AdShotRunner. An email has been sent to your Company Administrator to request access. In the meantime, find more information at: https://www.adshotrunner.com/ \\n\\n\";\r\n\t$welcomeEmailBody .= \"We look forward to having you on board!\\n\\n\";\r\n\t$welcomeEmailBody .= \"If you believe you received this email in error, you may ignore it. You will receive no future emails.\";\r\n\r\n\t//Set the email addresses\r\n\t$fromEmailAddress = ASRProperties::emailAddressDoNotReply();\r\n\t$toEmailAddress = $newUser->getEmailAddress();\r\n\r\n\t//Send the welcome email\r\n\tEmailClient::sendEmail($fromEmailAddress, $toEmailAddress, $welcomeEmailSubject, $welcomeEmailBody);\r\n\r\n\t//---------------------------------- Verification Email ----------------------------------\r\n\r\n\t//Create the verification code specific for this user.\r\n\t$verificationCode = md5($newUser->getID() . $newUser->getClientID() . $newUser->getEmailAddress());\r\n\r\n\t//Create the subject line for the verification email\r\n\t$verificationSubject = \"AdShotRunner: New User Request (\" . $newUser->getFirstName() . \" \" . $newUser->getLastName() . \")\";\r\n\t\r\n\t//Create the verification email body\r\n\t$verificationBody = \"The following new user has requested access to your AdShotRunner account: \\n\\n\";\r\n\t$verificationBody .= \"Name: \" . $newUser->getFirstName() . \" \" . $newUser->getLastName() . \"\\n\";\r\n\t$verificationBody .= \"Email Address: \" . $newUser->getEmailAddress() . \"\\n\\n\";\r\n\t$verificationBody .= \"If you would like to give this user access to your account, please click the link below or paste it into your browser: \\n\\n\";\r\n\t$verificationBody .= \"http://\" . ASRProperties::asrDomain() . \"/verifyAccount.php?id=\" . $newUser->getID() . \"&v=\" . $verificationCode;\r\n\t$clientVerifyAddress = $newUserClient->getVerifyUserEmailAddress();\r\n\tEmailClient::sendEmail($fromEmailAddress, $clientVerifyAddress, $verificationSubject, $verificationBody);\r\n\r\n\t//Return successful.\r\n\treturn true;\r\n}", "title": "" }, { "docid": "c9509af91d3949b49b388fe6e114b006", "score": "0.3971213", "text": "function startDelegate($fromEID, $toEID) {\n\tglobal $dbh;\n\tglobal $default;\n\t\n\t/* ---------- GET USERS APPROVAL LEVELS ---------- */\n\t$app_sql = \"SELECT controller, one, two, three, four FROM Users WHERE eid='\" . $fromEID . \"'\";\n\t$APP = $dbh->getRow($app_sql);\n\n\t/* ---------- CONTROLLER APPROVER ---------- */\n\tif ($APP['controller'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE controller='\" . $fromEID . \"' AND level IN ('controller')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET controller='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'controller', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t/* ---------- FIRST APPROVER ---------- */\n\tif ($APP['one'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE app1='\" . $fromEID . \"' AND level IN ('controller', 'app1')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET app1='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'app1', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t/* ---------- SECOND APPROVER ---------- */\n\tif ($APP['two'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE app2='\" . $fromEID . \"' AND level IN ('controller', 'app1', 'app2')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET app2='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'app2', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t/* ---------- THIRD APPROVER ---------- */\n\tif ($APP['three'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE app3='\" . $fromEID . \"' AND level IN ('controller', 'app1', 'app2', 'app3')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET app3='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'app3', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\n\t/* ---------- FOURTH APPROVER ---------- */\n\tif ($APP['four'] == '1') {\n\t\t$request_sql = \"SELECT DISTINCT(type_id) FROM Authorization WHERE app4='\" . $fromEID . \"' AND level IN ('controller', 'app1', 'app2', 'app3', 'app4')\";\n\t\t$request_query = $dbh->prepare($request_sql);\n\t\t$request_sth = $dbh->execute($request_query);\n\n\t\twhile($request_sth->fetchInto($REQUEST)) {\n\t\t\t$dbh->query(\"UPDATE Authorization SET app4='\" . $toEID . \"' WHERE type_id=\" . $REQUEST['type_id']);\n\t\t\t$sql = \"INSERT INTO Delegate (recorded, type_id, level, from_eid, to_eid) VALUES (NOW(), '\" . $REQUEST['type_id'] . \"', 'app4', '\" . $fromEID . \"', '\" . $toEID . \"')\";\n\t\t\t$dbh->query($sql);\n\t\t\t\n\t\t\tif ($default['debug_capture'] == 'on') {\n\t\t\t\tdebug_capture($_SESSION['eid'], $REQUEST['type_id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql)));\t\t// Record transaction for history\n\t\t\t}\t\t\t\n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "d0642612917bfed94859668a840b62ae", "score": "0.39685708", "text": "public function welcome_applicant($v_id,$lease_id,$no_preview=False,$v_status=Null,$bcc=array()){\n\n if ($lease_id != 'status') $lease = loader::getInstance_new('bForm_vm_Lease',$lease_id,array('strict'));\n $this->visit = (empty($lease) || empty($lease->parentForm)\n\t\t ? loader::getInstance_new('bForm_vm_Visit',$v_id,'fatal')\n\t\t : $lease->parentForm);\n\n //\n if (!send_welcomeMail_to_applicants){\n // Check is the visitor subject of getting the \"welcome Email\" \n $case = \"NO WELCOME MAILS configured\";\n }elseif($this->visit->getValue('v_type',1) !== VISIT_TYPE_PROGRAM){\n $case = 'not_VISIT_TYPE_PROGRAM';\n }elseif (!empty($v_status) && ($v_status !== STATUS_YES)){\n // Shortcut to save time\n $case = $v_status;\n }else{\n $name = $this->visit->av->fmtName('fl');\n \n // Catch the refused/pending visits\n if ($this->visit->getValue('v_status',1) !== STATUS_YES) $case = $v_status;\n \n // This mail should not be sent to the local organizers\n if ($this->visit->av->isOrganizer($this->visit->e->ID) && $this->visit->av->isE(True)) $case = 'isOrganizer';\n }\n\n // Exit if the visitor is not concerned\n if (!empty($case)){\n $reply = CONST_not_concerned;\n if (empty($name)) $name = 'visitor';\n $this->dbg(sprintf(\"%s, %s, <em>%s</em>\",var_export($reply,True),$case,$name),True);\n return $reply;\n }\n \n // Is it the status request?\n if ($lease_id === 'status'){\n $this->m_applicant_info_mail($this->visit,'status',False);\n $reply = ($this->visit->getPolicy(VM_V_welcomeMailQueued)\n\t\t? in_queue\n\t\t: $this->visit->getPolicy(VM_V_welcomeMailSent));\n $this->dbg(var_export($reply,True).\" \".x('em',$this->visit->av->fmtName('fl')));\n return $reply;\n }\n\n // This mail to be sent once, but there is no harm to send it again\n if ($no_preview && $this->visit->getPolicy(VM_V_welcomeMailSent) === True){\n $this->dbg(\"Mail to \".$this->visit->av->name().\" was already sent\");\n }\n \n // Put this mail into the execution queue, not waist time in the interactive session\n if (!myPear_taskManager()->exec_request && $no_preview){\n myPear_taskManager()->addTask(get_class($this),__function__,array($this->visit->ID,\n\t\t\t\t\t\t\t\t\t$lease_id,\n\t\t\t\t\t\t\t\t\tTrue,\n\t\t\t\t\t\t\t\t\tNull,\t\n\t\t\t\t\t\t\t\t\t(is_object(bAuth::$av)\n\t\t\t\t\t\t\t\t\t ? array(bAuth::$av->getEmail())\n\t\t\t\t\t\t\t\t\t : array())));\n $this->visit->setPolicy(VM_V_welcomeMailQueued,1);\n return True;\n }elseif (empty($bcc) && is_object(bAuth::$av)){\n $bcc[] = bAuth::$av->getEmail();\n }\n \n /*\n * Accommodation block (not for the local people)\n */\n $this->attachments = array();\n $blabla = array();\n $include_accommodation_in_welcomeMail = (include_accommodation_in_welcomeMail && !empty($lease_id) && $this->visit->hut_codes($without_BI=True));\n $this->dbg(\"include_accommodation_in_welcomeMail=\".var_export($include_accommodation_in_welcomeMail,True),cnf_dev);\n if ($include_accommodation_in_welcomeMail){\n\n // Save attachments\n foreach($this->attachmentFile($this->visit->ID,0,'hotel_confirmation') as $file) $this->attachments[(int)preg_replace('/[a-zA-Z_]*/','',basename($file))] = $file; \n if (!empty($this->attachments)) $this->dbg($this->attachments);\n\n $a = loader::getInstance_new('bForm_vm_Room',$lease->getValue('lease_aid'),array('strict'));\n $a_name = bForm_vm_Room::_a_name($lease->formDB,'for_applicant'); \n if (strpos($a_name,'[Shared] ')) $a_name = str_replace('[Shared] ','',str_replace('Room ','Shared room ',$a_name));\n $billedTo = (empty($a_name)\n\t\t ? array()\n\t\t : array($a_name.'.'));\n\n // Get aaccompaning persons \n $v_accompaning = (($n = $this->visit->getValue('v_accompaning',True))\n\t\t\t? array('',\"You are expected to be accompanied by $n person\".($n>1?'s':'').'.','')\n\t\t\t: array());\n\n // Get cotenants\n $cotenant = (($ct = $this->visit->cotenants())\n\t\t ? array('','You will share the room with ' . join(', ',$ct).'.','')\n\t\t : array());\n if (!empty($cotenant)) $v_accompaning = array();\n \n $blabla[] = '\nACCOMMODATION\n-------------\nYour accommodation will be at '.$a->hut->name().' in '.$a->hut->getValue('hut_city',1).'. '.join(\", \",$billedTo).'\n'.join(\"\\n\",$cotenant).join(\"\\n\",$v_accompaning).'\n'.(stripos($a->hut->name(),'Biz')===False ? '' : 'You will receive a separate confirmation of the room reservation from '.$a->hut->name().'. ').\n'Any changes in dates are subject to availability and should be taken up directly with '.$a->hut->name(). // ', '.myOrg_nameS.' can\\'t help with that '. \n' (see '.$a->hut->getValue('hut_url').' for contact information).\n\nPlease read carefully the cancellation policy. The violation of the cancellation policy will be on Your charge.\n';\n }\n \n \n /*\n * Reimbursement block\n */\n $exp = $this->visit->getExp();\n $VM_V_payTrip = $this->visit->getPolicy(VM_V_payTrip);\n $VM_V_payPerdiem = $this->visit->getPolicy(VM_V_payPerdiem);\n \n $include_payForms_in_welcomeMail = (include_payForms_in_welcomeMail && ($VM_V_payTrip || $VM_V_payPerdiem));\n $this->dbg(\"include_payForms_in_welcomeMail=\".var_export($include_payForms_in_welcomeMail,True),cnf_dev);\n $cc = array();\n if ($include_payForms_in_welcomeMail){\n $cc[] = reimbursement_email;\n foreach(VM::$forms2send as $pdf_tpl){\n\t$attachments_to_sign = True;\n\t$this->attachments[] = $exp->pdfReceipt($pdf_tpl,sys_get_temp_dir() . \"/${pdf_tpl}_\" . $this->visit->ID . '.pdf');\n }\n }\n \n $pd = array();\n $this->dbg(\"VM_V_payTrip=\".var_export($VM_V_payTrip,True),cnf_dev);\n if ($VM_V_payTrip){\n $trip = $exp->getValue('exp_travel_est', True);\n $pay[] = 'contribute up to '.b_fmt::money($trip).' Swedish Crowns towards the cost of your return travel to '.myOrg_name;\n }\n \n $this->dbg(\"VM_V_payPerdiem=\".var_export($VM_V_payPerdiem,True),cnf_dev);\n if ($VM_V_payPerdiem){\n $perdiem = $exp->getValue('exp_perdiem_est',True);\n $pay[] = 'provide a '.VM_wordPerdiem.' of '.b_fmt::money($perdiem).' Swedish Crowns towards local expenses';\n $pd = array('','If you are receiving a '.VM_wordPerdiem.' the signed forms need to be received by us three weeks in advance of your visit.');\n } \n \n if (!empty($pay)){\n $blabla[] = '\nREIMBURSEMENT\n-------------\nWe will '.join(\" and \",$pay).'.\n\n';\n if (!empty($attachments_to_sign)) $blabla[] = \"For this we need you to fill the attached forms.\n\nPlease provide your name, home address, date of birth, the dates that you are traveling, and the date of your PhD (the last item is required by local university regulations).\n\nIt is important to fill in the bank information also, with name and address of the bank, IBAN number, and Swift code. Otherwise the money transfer for your reimbursement cannot be issued.\n\nBring the forms together with copies of your tickets to the Nordita administration. You can also mail it to reimbursement@nordita.org .\n\".join(\"\\n\",$pd);\n }\n \n \n //\n // personal web site\n //\n $this->dbg(\"include_personalPage_in_welcomeMail=\".var_export(include_personalPage_in_welcomeMail,True),cnf_dev);\n if (include_personalPage_in_welcomeMail){\n if (!$this->visit->av->isE(True)) $blabla[] = '\nPERSONAL WEB PAGE\n-----------------\nWe have created a web page for you which you can access here:\n{login_url}\n\nPlease use this page to update your contact information. We also ask for the following:\n- your birth date (needed for registration of wireless Internet access),\n- a photograph of yourself so that we, and your fellow participants, can put a face together with your name.\n\nVia your personal page you obtain more information about the event, including photos and dates of stay of other participants.';\n if (!empty($pay)) $blabla[] = '\nNote, that the forms for the reimbursement get your personal information, like the address, affiliation, email, etc. from (naively saying) \"your web page\". Please check that your record is correct.'; \n }\n \n //\n // Gather all the pieces...\n //\n $messageBody = 'Dear '.$this->visit->av->fmtName('sfl',0).',\n \n'.(is_object($this->visit->e)\n ?'This is to confirm that your application for the upcoming '.myOrg_name.' Event \"'.$this->visit->e->name(False).'\" which takes place '.b_time::period($this->visit->e->getValue('e_start',1),$this->visit->getValue('e_end',1),'h').' has been accepted.\n\nWe look forward '.($this->visit->av->isE(True) ? '' : 'to seeing you at '.myOrg_name).' and hope you will have a pleasant and productive meeting.\n'.($this->visit->av->isE(True) ? '' : 'For directions to '.myOrg_name.\", see http://www.nordita.org/map\\n\")\n .join(\"\\n\",$blabla).'\n\nSincerely,\nOrganizing committee for \"'.$this->visit->e->name(False).'\".'\n :'');\n \n // Show or not the button \"send email\" in the preview mode\n $this->tooLateForEmail = VM_tooLateForEmail($this->visit,$this->visit->e,True);\n\n // Now send the mail\n if ($ok = $this->send(array($this->visit->av,\n\t\t\t\tarray('q'=>sprintf(\"%s/%s/\",VM_MODULE,APImenu::tab_code(tab_vm_home))),\n\t\t\t\tFalse),\n\t\t\t $this->visit->av->getEmail(),\n\t\t\t (is_object($this->visit->e)?$this->visit->e->name():'Your visit to '.myOrg_name),\n\t\t\t $messageBody,\n\t\t\t $syslog_thisMail=True,\n\t\t\t $no_preview,\n\t\t\t $cc,\n\t\t\t $bcc)){\n $this->visit->setPolicy(VM_V_welcomeMailSent,1,True,True);\n $this->visit->setPolicy(VM_V_welcomeMailQueued,0);\n $this->m_applicant_info_mail($this->visit,'status',False);\n MSG::MESSAGE(sprintf('Confirmation mail is sent to %s',$this->visit->av->name()));\n }\n $this->dbg('Mail to '.$this->visit->av->fmtName('fl').' is '.($ok ? 'OK' : 'NOT sent ...'),cnf_dev);\n return $ok;\n }", "title": "" }, { "docid": "97dd4a52a23911b86444b451d92ae572", "score": "0.39640984", "text": "public function add_friend($user_requested_id)\n {\n if($this->id === $user_requested_id)\n {\n return 0;\n }\n\n //if they are already friends\n if($this->is_friends_with($user_requested_id) === 1)\n {\n return \"already friends\";\n }\n\n\n if($this->has_pending_request_sent_to($user_requested_id) === 1)\n {\n return \"Friend request sent already!\";\n }\n if($this->has_pending_request_from($user_requested_id) === 1)\n {\n return $this->accept_friend($user_requested_id);\n }\n\n $friendship = Friendship::create([\n 'requester' => $this->id,\n 'user_requested' => $user_requested_id\n ]);\n\n if($friendship)\n {\n return 1;\n }\n return 0;\n }", "title": "" }, { "docid": "04ce0e60880a61369400d107884e3413", "score": "0.39625907", "text": "public function destroy(Delegate $delegate)\n {\n $delegate->delete();\n return response()->json(['message' => 'Delegate deleted']);\n }", "title": "" }, { "docid": "b68a8f189864fdfb7b390b55348b338c", "score": "0.3958169", "text": "public function addVerification(User $user)\n\t{\n\t\t$this->verified = 1;\n\t\t$this->verified_user_id = $user->id;\n\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "913f1bc6780396a683a7173348d611a0", "score": "0.39581028", "text": "public function add(\n string $code,\n string $userLpaActorToken,\n string $siriusUid,\n DateTime $expires,\n string $organisation,\n ?int $actorId\n );", "title": "" }, { "docid": "a22fccf630beceb77e9df089422a4374", "score": "0.3944279", "text": "public function accept($id)\n {\n \t// set the gateman id\n \t$gateman_id = $this->user->id;\n\n \t// retrieve the request\n $gateman = Gateman::find($id);\n\n\t\t// check for the existence of the request on the db\n if (!$gateman) {\n return response()->json(['status' => false, 'message' => 'Request not found!'], 404);\n } else {\n\t // ensure that only the right gateman can accept the request\n\t if ($gateman->gateman_id != $gateman_id) {\n\t return response()->json(['status' => false, 'message' => 'Access denied'], 401);\n\t }\n\n \t// check if the request has not been accepted\n \t$request = $gateman->where('id', $id)\n \t\t->where('gateman_id', $gateman_id)\n \t\t->where('request_status', 0)\n \t\t->exists();\n\n \t// update the request\n \tif ($request) {\n \t\t$gateman->request_status = 1;\n\n \t\tif ($gateman->save()) {\n // Send the resident a notification informing them\n // of the acceptance\n $resident = User::find($gateman['user_id']);\n $user = User::find($gateman_id);\n \t\t $resident->notify(new GatemanAcceptanceNotification($resident, $user));\n\t\t\t return response()->json([\n\t\t\t \t'message' => 'The request has been accepted successfully',\n\t\t\t \t'status' => true,\n\t\t\t \t'resident_gateman' => $gateman\n\t\t\t ], 202);\n \t\t} else {\n\t\t\t return response()->json([\n\t\t\t \t'message' => 'The request could not be accepted at the moment',\n\t\t\t \t'status' => false\n\t\t\t ], 500);\n\t\t\t\t}\n \t} else {\n\t\t return response()->json([\n\t\t \t'message' => 'This request has already been accepted',\n\t\t \t'status' => true\n\t\t ], 200);\n \t}\n }\n }", "title": "" }, { "docid": "aa132e206e5b3b6431d2804c09dbc213", "score": "0.39403385", "text": "protected function create_interface_flex_gateway_fee($batch_id, $status, $dto_obj)\n\t{\n\t\t$ifgf_dao = $this->get_ifgf_dao();\n\t\t$ifgf_obj = $ifgf_dao->get();\n\n\t\t$ifgf_obj->set_flex_batch_id($batch_id);\n\t\t$ifgf_obj->set_gateway_id($this->get_pmgw());\n\t\t$ifgf_obj->set_txn_id($dto_obj->get_ref_txn_id());\n\t\t$ifgf_obj->set_txn_time($dto_obj->get_date());\n\t\t$ifgf_obj->set_currency_id($dto_obj->get_currency_id());\n\t\t$ifgf_obj->set_amount(ereg_replace(\",\", \"\", $dto_obj->get_amount()));\n\t\t$ifgf_obj->set_status($status);\n\t\t$ifgf_obj->set_batch_status(\"N\");\n\t\t$result = $ifgf_dao->insert($ifgf_obj);\n\n\t\t//var_dump($ifgf_dao->db->last_query());die();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "65ab010bd5edfb40f577ac64cc5fcfdf", "score": "0.39268827", "text": "public function index(DelegateDataTable $delegate)\n {\n\n return $delegate->render('admin.delegates.index', ['title'=> trans('admin.delegates')]);\n }", "title": "" }, { "docid": "27f36db6df899e6e0ec3b56f78dd22c0", "score": "0.39221337", "text": "public function save(Validator $validator, $notRequiredActivation = false)\n {\n\n $errors = $this->validate($validator);\n\n if (empty($errors)) {\n $password_hash = password_hash($this->password, PASSWORD_DEFAULT);\n\n $token = new Token();\n $this->activation_hash = $token->getHash();\n\n if ($notRequiredActivation) {\n $sql = 'INSERT INTO users (name, email, password_hash, permission, join_date, is_active) VALUES (:name, :email, :password_hash, :permission, :join_date, 1)';\n\n } else {\n $sql = 'INSERT INTO users (name, email, password_hash, ip, join_date, activation_hash) VALUES (:name, :email, :password_hash, :ip, :join_date, :activation_hash)';\n\n }\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':name', $this->name, PDO::PARAM_STR);\n $stmt->bindValue(':email', $this->email, PDO::PARAM_STR);\n $stmt->bindValue(':password_hash', $password_hash, PDO::PARAM_STR);\n $stmt->bindValue(':join_date', date('Y-m-d H:i:s', time()), PDO::PARAM_STR);\n\n if (!$notRequiredActivation){\n $stmt->bindValue(':activation_hash', $this->activation_hash, PDO::PARAM_STR);\n $stmt->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);\n\n } else {\n $stmt->bindValue(':permission', $this->permission);\n }\n\n return $stmt->execute();\n }\n\n return false;\n }", "title": "" }, { "docid": "d125feba27594dba1212119cc9c4a294", "score": "0.39164847", "text": "public function addValidator(callable $validator)\n {\n // TODO: Implement addValidator() method.\n }", "title": "" }, { "docid": "2b2557d94aebff586cabcf1cedf8942d", "score": "0.3908915", "text": "public function add() {\n\t\t\n\t\t$result = $this->Api->Resource\n\t\t\t->forModel('User')\n\t\t\t->withId(0)\n\t\t\t->withData($this->request->data)\n\t\t\t->save();\n\n\t\tif (empty($result)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->Api->setResponseCode(2000);\n\t\t\n\t\t$this->Api->specialViewVars(array(\n\t\t\t'developerMessage' => 'The user was successfully created. To view and/or act as the user, ' .\n\t\t\t\t\t\t\t\t\t'you must authenticate and retrieve an access token.'\n\t\t));\n\t\t\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "c3469e8e592343aca14aef81fc23e6de", "score": "0.39061296", "text": "public function markEmailAsVerified()\n {\n return $this->forceFill([\n 'email_verified_at' => $this->freshTimestamp(),\n 'member_email_bind' => 1,\n ])->save();\n }", "title": "" }, { "docid": "a1f98f5ba0207ba07c65d534c69add8f", "score": "0.39035714", "text": "public function makeNotAccepted()\n {\n $this->setAttribute('accepted', self::NOT_ACCEPTED);\n }", "title": "" }, { "docid": "6c4b84c8ff2648b865db6a023503545c", "score": "0.3898443", "text": "public function create(CreateUserVerificationDTO $details)\r\n {\r\n $details = json_decode(json_encode($details), true);\r\n $res = $this->userVerifyModel->create($details);\r\n\r\n return $res;\r\n }", "title": "" }, { "docid": "9e010efa412b8b316eb073968af1a2a4", "score": "0.38952088", "text": "public function addAttendee(UserInterface $attendee);", "title": "" }, { "docid": "621d498b77dee0c72451c163dc532a45", "score": "0.38869256", "text": "public function post_invite_usage() {\n\t\t\n\t}", "title": "" }, { "docid": "3a9c5ef990f7a7cf414d66c2b296f9be", "score": "0.38863087", "text": "public function triggerSubscribe($delegate, $method, &$one = null, &$two = null, &$three = null, &$four = null)\n {\n $objectHash = spl_object_hash($delegate);\n $return = null;\n if (isset($this->delegates[$objectHash])) {\n foreach ($this->delegates[$objectHash] as $target) {\n $return = $target->$method($one, $two, $three, $four);\n if ($return === false) {\n break;\n }\n }\n }\n return $return;\n }", "title": "" }, { "docid": "6c909e8c34b1742a864eb28ca86c9bb4", "score": "0.38857737", "text": "public function store(UserInviteRequest $request)\n {\n $d = $request->all();\n $d['role'] = $request->get('is_admin') === true ? 'admin' : 'user';\n $u = UserInvite::create($d);\n if(MegaHelpers::getSettingsEmail()->type !== 'manual')\n {\n Mail::to($u)->queue(new Invitation($u));\n }\n return response()->json($u);\n }", "title": "" }, { "docid": "0ac2394341609173981ebebaa70d4995", "score": "0.38777512", "text": "public function postCreate()\n\t{\n\t\t$item = $this->item();\n\t\t\n\t\tif ( $this->type === Reply::REPLY_MEMBER or $this->type === Reply::REPLY_ALTCONTACT )\n\t\t{\n\t\t\t$item->status = Status::load( TRUE, 'status_default_member' );\n\t\t}\n\t\t\n\t\treturn parent::postCreate();\n\t}", "title": "" }, { "docid": "77884b69695bfefe3ba6c05c499ab0de", "score": "0.38774154", "text": "public function actionNewInvite()\n\t{\n\t\tif( !Yii::app()->params['anonInvites'] )\n\t\t{\n\t\t\tprint json_encode(array(\n\t\t\t\t'error'=>'Anonymous invitations are not enabled.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\n\t\t$cnt = $this->getCodesLeft();\n\t\tif( $cnt <= 0 )\n\t\t{\n\t\t\tprint json_encode(array(\n\t\t\t\t'error'=>'There are no anonymous invitations left, '.\n\t\t\t\t\t'wait a day and try again.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif( Yii::app()->db->createCommand('SELECT count(*) AS count FROM invitation_code WHERE senderid IS NULL AND created>=(now()-INTERVAL \\'30 min\\')')->query()->readAll()[0]['count'] > 0 )\n\t\t{\n\t\t\tprint json_encode(array(\n\t\t\t\t'error'=>'There are no anonymous invitations left, '.\n\t\t\t\t\t'wait an hour and try again.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$invite = new InvitationCode;\n\t\t$invite->senderid = NULL;\n\t\t$src = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\tdo\n\t\t{\n\t\t\t$invite->code = '';\n\t\t\tfor( $j = 0; $j < 16; $j++ )\n\t\t\t{\n\t\t\t\t$invite->code .= $src[mt_rand(0,61)];\n\t\t\t}\n\t\t} while( !$invite->save() );\n\t\tprint json_encode(array('code'=>$invite->code, 'count'=>max(0,$cnt-1)));\n\t}", "title": "" }, { "docid": "628840e9fd95ba141c817dd14d5e6307", "score": "0.38773882", "text": "public function respondRequest(int $userID, int $friendID, bool $accept) : bool {\n\t\t//If the request is to refuse friendship request, there isn't any security check to perform\n\t\tif(!$accept){\n\t\t\t//Perform a request on the database\n\t\t\t$conditions = \"ID_personne = ? AND ID_amis = ? AND actif = 0\";\n\t\t\t$conditionsValues = array(\n\t\t\t\t$userID*1,\n\t\t\t\t$friendID*1\n\t\t\t);\n\n\t\t\t//Try to perform request\n\t\t\tif(CS::get()->db->deleteEntry($this->friendsTable, $conditions, $conditionsValues))\n\t\t\t\treturn true; //Operation is a success\n\t\t\telse\n\t\t\t\treturn false; //An error occured\n\t\t}\n\n\t\t//Else it is a little more complicated\n\t\t//First, check the request was really performed\n\t\tif(!$this->checkFriendShipRequestExistence($friendID, $userID))\n\t\t\treturn false; //There isn't any existing request\n\t\t\n\t\t//Else we can update the database to accept the request\n\t\t//Update the table\n\t\t$conditions = \"ID_personne = ? AND ID_amis = ? AND actif = 0\";\n\t\t$whereValues = array(\n\t\t\t$userID*1,\n\t\t\t$friendID*1\n\t\t);\n\t\t$modifs = array(\n\t\t\t\"actif\" => 1\n\t\t);\n\n\t\t//First update the table\n\t\tif(!CS::get()->db->updateDB($this->friendsTable, $conditions, $modifs, $whereValues))\n\t\t\treturn false;\n\n\t\t//Then insert the second friend line\n\t\t$insertValues = array(\n\t\t\t\"ID_personne\" => $friendID,\n\t\t\t\"ID_amis\" => $userID,\n\t\t\t\"actif\" => 1\n\t\t);\n\t\tif(!CS::get()->db->addLine($this->friendsTable, $insertValues))\n\t\t\treturn false; //An error occurred\n\t\t\n\t\t//The operation is a success\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d3572da80b02add442e5db2565c3edde", "score": "0.38759387", "text": "public function create(Authenticatable $user)\n {\n $token = $this->token->create($user);\n\n $notification = $this->config->getNotification('verify_email');\n\n $user->notify(new $notification($token));\n }", "title": "" }, { "docid": "c681b11c59fb363b09e2d26297492057", "score": "0.38759345", "text": "function queue_invite($challenge_id,$group_id,$user_id=NULL,$fname=NULL,$lname=NULL,$email=NULL,$type=NULL){\n\t\t$this->checkAuth();\n\t\t$invite_token = sha1(time().$this->salt);\n\t\t\n\t\t// check for existing user. if new user, create user record\n\t\tif(!$user_id){\n\t\t\t$user = $this->User->findByEmail($email);\n\t\t\tif(!$user){\n\t\t\t\t$this->User->id = NULL;\n\t\t\t\t$new_user = array(\t'User' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\t'invite_token'\t=> $invite_token,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'firstname'\t\t\t=> $fname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'lastname'\t\t\t=> $lname,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'login'\t\t\t\t\t=> $email,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'email'\t\t\t\t\t=> $email,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'user_type'\t\t\t=> $type ));\n\t\t\t\t$this->User->save($new_user);\n\t\t\t\t\n\t\t\t\t$status = array(\t'Status' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\t'user_id'\t\t\t\t=> $this->User->id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'challenge_id'\t=> $challenge_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'status'\t\t\t\t=> 'P' ));\n\t\t\t\t$this->Status->save($status);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$challenge = $this->Challenge->find('first',array('conditions'=>'Challenge.id = '.$challenge_id,'recursive'=>2));\n\t\tif($user){\n\t\t\t$inGroup = false;\n\t\t\tforeach($challenge['ClassSet'] as $c){\n\t\t\t\tforeach($c['User'] as $u){\n\t\t\t\t\tif($u['id'] == $user['User']['id']){\n\t\t\t\t\t\t$inGroup = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$inGroup){\n\t\t\t\t$status = array(\t'user_id'\t\t\t\t=> $user['User']['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'challenge_id'\t=> $challenge_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'status'\t\t\t\t=> 'P' );\n\t\t\t\t$this->Status->save($status);\n\t\t\t}\n\t\t}\n\t\tif(($user && !$inGroup) || $this->User->id){\n\t\t\t// add to challenge\n\t\t\t$challenge_update = array('Challenge'=>array('id'=>$challenge_id));\n\t\t\t$challenge_update['Collaborator'] = array(@$user ? @$user['User']['id'] : $this->User->id);\n\t\t\tforeach($challenge['Collaborator'] as $u) if(array_search($u['id'],$challenge_update['Collaborator']) === false) $challenge_update['Collaborator'][] = $u['id'];\n\t\t\t$this->Challenge->save($challenge_update);\n\t\t}\n\t\n\t\tdie();\n\t}", "title": "" }, { "docid": "dab4e31b9b01944acbaf72718c725ce6", "score": "0.38738632", "text": "function bibdk_provider_wayf_accept_create_new_user($mail) {\n $account = bibdk_provider_register_new_user($mail);\n $account->data = array();\n // Save wayf_login on user\n $account->data['accept_wayf'] = $_SESSION['accept_wayf'];\n $account->data['wayf_login'] = $_SESSION['wayf_login'];\n\n // save user\n user_save($account);\n}", "title": "" }, { "docid": "818e14d97d934e84e865d22154d55679", "score": "0.3872616", "text": "public function create(User $actor)\n {\n return $actor->hasPermissionTo('create news');\n }", "title": "" }, { "docid": "a72dcab0e4d65b771c7f87a97ee85d31", "score": "0.3872191", "text": "public function testCanUpdateRecipients()\n {\n $id = rand(1,9999999999);\n $data['data'] = [\n 'expiration_date' => date('Y-m-d', strtotime( '+'.mt_rand(0,30).' days'))\n ];\n $this->json('PUT', \"/voucher/code/{$id}\", $data)\n ->seeJson([\n 'code' => 200,\n 'status' => true\n ]);\n }", "title": "" }, { "docid": "df0a185ab2f840908febd8bed333010f", "score": "0.38497388", "text": "public function request_activation($foundId, $initialRedirect = false) {\n\t\t// require birthday, email, and address\n\t\t$this->User->Profile->validate['birth_date']['required'] = true;\n\t\t$this->User->Profile->validate['birth_date']['allowEmpty'] = false;\n\t\t$this->User->Profile->validate['primary_email']['email']['required'] = true;\n\t\t$this->User->Profile->validate['primary_email']['email']['allowEmpty'] = false;\n\t\t$this->User->Address->validate['address_line_1'] = array(\n\t\t\t'rule' => 'notempty',\n\t\t\t'message' => 'Please enter a valid address.'\n\t\t);\n\t\t$this->User->Address->validate['state'] = array(\n\t\t\t'rule' => 'notempty',\n\t\t\t'message' => 'Please enter a valid state.'\n\t\t);\n\t\t$this->User->Address->validate['city'] = array(\n\t\t\t'rule' => 'notempty',\n\t\t\t'message' => 'Please enter a valid city.'\n\t\t);\n\n\t\tif (!empty($this->data) && !$initialRedirect && $foundId) {\n\t\t\t$this->data['User']['active'] = false;\n\t\t\t$this->data['Address'][0]['model'] = 'User';\n\n\t\t\t$validates = $this->User->saveAll($this->data, array('validate' => 'only'));\n\n\t\t\t// create near-empty user for now (for merging)\n\t\t\tif ($validates && $this->User->createUser($this->data, null, $this->activeUser, false)) {\n\t\t\t\t// save merge request\n\t\t\t\t$MergeRequest = ClassRegistry::init('MergeRequest');\n\t\t\t\t$MergeRequest->save(array(\n\t\t\t\t\t'model' => 'User',\n\t\t\t\t\t'model_id' => $this->User->id,\n\t\t\t\t\t'merge_id' => $foundId,\n\t\t\t\t\t'requester_id' => $this->User->id\n\t\t\t\t));\n\t\t\t\t$this->Notifier->notify(array(\n\t\t\t\t\t'to' => Core::read('notifications.activation_requests'),\n\t\t\t\t\t'template' => 'users_request_activation',\n\t\t\t\t\t'subject' => 'Account merge request',\n\t\t\t\t));\n\t\t\t\t$this->Session->setFlash('Account merge request has been received. You will receive an email when it is confirmed!', 'flash'.DS.'success');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Unable to send account merge request. Please try again.', 'flash'.DS.'failure');\n\t\t\t}\n\t\t}\n\n\t\t$this->set('foundId', $foundId);\n\t}", "title": "" }, { "docid": "45654f0c452bd64b70b520ce7560775c", "score": "0.38419348", "text": "public function accept($inviteable, string $email, string $role = null)\n {\n $this->validate($inviteable, $email, $role);\n\n $newMember = User::where('email', $email)->first();\n\n $inviteable->users()->attach(\n $newMember,\n ['role' => $role]\n );\n }", "title": "" }, { "docid": "54b04e8ab6b12a70f1223ccfccd5152a", "score": "0.383799", "text": "public function confirmed()\n {\n $this->state = 'A';\n $this->save();\n return $this;\n }", "title": "" }, { "docid": "13f8c887e0ebdf5ea70ab6179a7d0633", "score": "0.38359004", "text": "public function action_addbuddy()\n\t{\n\t\tglobal $modSettings;\n\n\t\tcheckSession('get');\n\t\tis_not_guest();\n\n\t\t// Who's going to be your buddy\n\t\t$user = $this->_req->getQuery('u', 'intval', '');\n\n\t\t// You have to give a user\n\t\tif (empty($user))\n\t\t{\n\t\t\tthrow new Exception('no_access', false);\n\t\t}\n\n\t\tcall_integration_hook('integrate_add_buddies', array($this->user->id, &$user));\n\n\t\t// Add if it's not there (and not you).\n\t\tif (!in_array($user, $this->user->buddies) && $this->user->id != $user)\n\t\t{\n\t\t\t$this->user->buddies[] = $user;\n\n\t\t\t// Do we want a mention for our newly added buddy?\n\t\t\tif (!empty($modSettings['mentions_enabled']))\n\t\t\t{\n\t\t\t\t$notifier = Notifications::instance();\n\t\t\t\t$notifier->add(new NotificationsTask(\n\t\t\t\t\t'buddy',\n\t\t\t\t\t$user,\n\t\t\t\t\t$this->user->id,\n\t\t\t\t\tarray('id_members' => array($user))\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\t// Update the settings.\n\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\tupdateMemberData($this->user->id, array('buddy_list' => implode(',', $this->user->buddies)));\n\n\t\t// Redirect back to the profile\n\t\tredirectexit('action=profile;u=' . $user);\n\t}", "title": "" }, { "docid": "e6a51391468d28dcf6fcc4595ba9539a", "score": "0.38352042", "text": "public function testClientVerificationCreate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "a36478dedfe2094dd5d8fd453e95bf5d", "score": "0.3832612", "text": "function addRecipient()\n {\n if ((!isset($this->passedArgs['recipient_id'])) && (!isset($this->params['form']['recipient_id']))) {\n $this->cakeError('error404');\n }\n\n $recipient_id = isset($this->passedArgs['recipient_id']) ? $this->passedArgs['recipient_id'] : $this->params['form']['recipient_id'];\n $this->User->recursive = -1;\n if (!($recipient = $this->User->find('first', array('conditions' => array('User.id' => $recipient_id))))) {\n $this->cakeError('error404');\n }\n\n //$this->autoRender = false;\n $this->layout = false;\n $this->ajax = true;\n\n $tmp_recipients = $this->Session->read('email_recipients');\n array_push($tmp_recipients, $recipient);\n //Store added recipient to session\n $this->Session->write('email_recipients', $tmp_recipients);\n $this->set('recipient', $recipient['User']);\n $this->render('/elements/emailer/edit_recipient');\n\n }", "title": "" }, { "docid": "d4496df1168782f9f278d873f0f3bb83", "score": "0.38323617", "text": "function &getDelegate(){\n\t\tif ( $this->delegate === -1 ){\n\t\t\t$delegate_path = DATAFACE_SITE_PATH.'/conf/ApplicationDelegate.php';\n\t\t\tif ( is_readable($delegate_path) ){\n\t\t\t\timport($delegate_path);\n\t\t\t\t$this->delegate = new conf_ApplicationDelegate();\n\t\t\t} else {\n\t\t\t\t$this->delegate = null;\n\t\t\t}\n\t\t}\n\t\treturn $this->delegate;\n\t\t\t\t\n\t}", "title": "" }, { "docid": "e5f17ea3960bfa55bb5d807c4daed40a", "score": "0.3830707", "text": "public function acceptConsentRequest($challenge, $body)\n {\n return $this->put('consent', 'accept', $challenge, $body);\n }", "title": "" }, { "docid": "3111e0f0671ad0ea5dc42fdca30ec2c3", "score": "0.38287333", "text": "public function retrieved(Delegate $delegate)\n {\n //\n }", "title": "" }, { "docid": "d33c8b37d2574ae068f6a85ba8abec90", "score": "0.38279492", "text": "public function create(Mailbox $user)\n {\n return $user->administratedDomains()\n ->count() > 0;\n }", "title": "" }, { "docid": "6539467ce6a585559466a3896c01c37b", "score": "0.38271213", "text": "public function create(array $aliases): ClaimCheckerManager\n {\n $checkers = [];\n foreach ($aliases as $alias) {\n if (! isset($this->checkers[$alias])) {\n throw new InvalidArgumentException(sprintf(\n 'The claim checker with the alias \"%s\" is not supported.',\n $alias\n ));\n }\n $checkers[] = $this->checkers[$alias];\n }\n\n return new ClaimCheckerManager($checkers);\n }", "title": "" }, { "docid": "c2d7a8d7ca2d4c6fe7a660cf092a803a", "score": "0.3815944", "text": "public function store(CreateAcceptedRecordsRequest $request)\n {\n $input = $request->all();\n\n $acceptedRecords = $this->acceptedRecordsRepository->create($input);\n\n Flash::success('Accepted Records saved successfully.');\n\n return redirect(route('acceptedRecords.index'));\n }", "title": "" }, { "docid": "8bfc61185024f2ac399ebb7bb75f1ec2", "score": "0.38126898", "text": "public function acceptFriendship($sender)\n\t{\n\t\tAuth::user()->acceptFriendRequest($sender);\n\t}", "title": "" }, { "docid": "2e0fc368f77d6d75f5b6092678b82c4c", "score": "0.38114992", "text": "public function saveCooperativeMember($cooperative,$name,$id_no,$phone,$dob,$gender){\n\t\t$query=\"INSERT INTO coo_members(cooperative,name,id_no,phone,dob,gender,status)\n\t\tVALUES (\\\"$cooperative\\\",\\\"$name\\\",\\\"$id_no\\\",\\\"$phone\\\",\\\"$dob\\\",\\\"$gender\\\",'ACTIVE')\";\n\t\t$status=$this->insert($query);\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "e3623540c0f98c8abed432ae4f192f6a", "score": "0.38107184", "text": "public function addTeamMember(): void\n {\n $this->addTeamMemberForm->getState();\n\n if (Features::sendsTeamInvitations()) {\n app(InvitesTeamMembers::class)->invite(\n $this->user,\n $this->team,\n $this->email,\n $this->role\n );\n\n $message = __('filament-jet::teams/add-member.messages.invited');\n } else {\n app(AddsTeamMembers::class)->add(\n $this->user,\n $this->team,\n $this->email,\n $this->role\n );\n\n $message = __('filament-jet::teams/add-member.messages.added');\n }\n\n $this->email = '';\n $this->role = null;\n\n $this->team = $this->team->fresh();\n\n Notification::make()\n ->title($message)\n ->success()\n ->send();\n }", "title": "" }, { "docid": "bd42b808792f171a933ff920b7c09fb8", "score": "0.3808275", "text": "public function addMembership(\n string $id,\n string $first_name,\n string $last_name,\n string $offer,\n DateTime $start_date,\n DateTime $expire_date,\n ?string $email = null,\n ?string $notes = null,\n ?string $status = null,\n ?bool $provisional = null,\n ?array $additional_metadata = null\n ): stdClass {\n try {\n $this->getMembershipById($id);\n // Simulates existing API response.\n throw new BadRequestException(\n new Response(400, [], json_encode(['errors' => ['__all__' =>\n ['Membership with this Station call sign and Membership ID already exists.']\n ]]))\n );\n } catch (MembershipNotFoundException) {\n // Continue execution, as this exception is desired.\n }\n $data = [\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'offer' => $offer,\n 'notes' => $notes,\n 'start_date' => $start_date,\n 'expire_date' => $expire_date,\n 'status' => $status,\n 'provisional' => $provisional,\n 'additional_metadata' => $additional_metadata,\n ];\n self::dateTimesToStrings($data);\n // Remove null/empty values.\n $data = array_filter($data, [__CLASS__, 'notEmptyOrNull']);\n $response = $this->request('put', 'memberships/' . $id, ['json' => $data]);\n return json_decode($response->getBody()->getContents());\n }", "title": "" }, { "docid": "852690bd5dba48daf8a895ed86ad5603", "score": "0.37977982", "text": "public function store(Request $request)\n {\n $request->validate(\n [\n 'user_id' => 'required|max:255',\n 'email' => 'required|email:rfc,dns'\n ],\n [\n 'user.required' => 'User Id is required',\n 'user.email' => 'Email address is required',\n ]\n );\n\n $id = Auth::id();\n $user = User::where('id', $id)->first();\n\n // check email if exist\n $inviteUser = User::where('email', $request->input('email'))->first();\n\n // check if already sent the email invite\n $inviteRequest = ContactInvite::where('email', $request->input('email'))\n ->where('user_id', $user->id)\n ->first();\n\n if($inviteRequest) {\n return response()->json(['status' => true, 'message' => 'Already sent an invitation']);\n }\n\n if($inviteUser) {\n $contactList = ContactLists::where('user_id', $user->id)\n ->where('contact_id', $inviteUser->id)\n ->first();\n \n if($contactList) {\n return response()->json(['status' => true, 'message' => 'Contact already added']);\n }\n }\n\n if($inviteUser) {\n // end direct notification invite\n // create invite link and send to email\n $data = [\n 'user_id' => $id,\n 'contact_id' => $inviteUser->id,\n 'email' => $request->input('email'),\n 'direct_invite' => 1,\n 'status' => 1\n ];\n\n $contactInvite = ContactInvite::create($data);\n // create contact list record\n ContactLists::create(['user_id' => $id, 'contact_id' => $inviteUser->id, 'status' => 1]);\n // send notification\n $contactInvite->name = $user->name;\n Notification::send($inviteUser, new SendUserNotification($contactInvite));\n return response()->json(['status' => true, 'message' => \"Sent invitation for contact. Invite will be on the user's notification page.\"]);\n }\n\n \n // create invite link and send to email\n $data = [\n 'user_id' => $id,\n 'email' => $request->input('email'),\n 'invite_link' => md5(time().\"$id\")\n ];\n\n\n $contact = ContactInvite::create($data);\n $data['url'] = $url = route('register').\"?invite_link=\".$data['invite_link'];\n $data['name'] = $user->name;\n $user->email = $data['email'];\n // $user->email = $data['email'];\n\n // Mail::to($request->input('email'))->send(new InviteContact($user));\n Notification::send($user, new InviteContacts($data));\n return response()->json(['status' => true, 'message' => 'Sent invitation via email for contact']);\n }", "title": "" }, { "docid": "1b0cd1cd601bd6beb5e8331e6dd03d24", "score": "0.37834176", "text": "public function add(string $alias, ClaimChecker $checker): void\n {\n $this->checkers[$alias] = $checker;\n }", "title": "" }, { "docid": "0b7569a050e3adf50cd0df1d8d8fba16", "score": "0.37820402", "text": "public function store(BanValidator $input, $userId): RedirectResponse\n {\n $user = $this->usersRepository->find($userId) ?: abort(Response::HTTP_NOT_FOUND);\n\n if (Gate::allows('block', $user)) { // Check if the user is allowed to perform the action.\n if ($user->isNotBanned()) { // The given user is not currently banned.\n if ($user->ban(['comment' => $input->reason, 'expired_at' => $input->endDate])) { // DB = USER BANNED\n $message = \"{$user->name} has been blocked in the system.\";\n activity()->causedBy(auth()->user())->log(\"Has blocked {$user->name} in the system\");\n\n Mail::to($user->email)->queue(new BlockActionPerformed($input->all()));\n }\n } else { // The user is already banned in the database.\n $message = \"{$user->name} has already been blocked in the system.\";\n }\n }\n\n flash(isset($message) ? $message : 'You are not permitted to perform this action.')->info();\n return redirect()->route('users.index');\n }", "title": "" }, { "docid": "c4acd44d61e0f1406489362a5c9ffb75", "score": "0.3780678", "text": "public function actionInviteAccept()\n {\n\n $this->forcePostRequest();\n $space = Space::findOne(['guid' => Yii::$app->request->get('sguid')]);\n\n // Load Pending Membership\n $membership = $space->getMembership();\n if ($membership == null) {\n throw new HttpException(404, Yii::t('SpaceModule.controllers_SpaceController', 'There is no pending invite!'));\n }\n\n // Check there are really an Invite\n if ($membership->status == Membership::STATUS_INVITED) {\n $space->addMember(Yii::$app->user->id);\n }\n\n return $this->redirect($space->getUrl());\n }", "title": "" }, { "docid": "ac0db3ab85decd53642aea0f92636c4e", "score": "0.3779772", "text": "public function createUser( array $data, $verified = true )\n {\n if ( empty( $data['user']['name'] ) || empty( $data['user']['email'] ) ) {\n throw new \\Exception( 'Users need a name or an email to be created' );\n }\n $data['user']['verified'] = $verified;\n return $this->_api->call( '/users' , json_encode( $data ), 'POST' );\n }", "title": "" }, { "docid": "d7c27e58fc697e204ea915c0b565c4c2", "score": "0.37796295", "text": "public function createMemberIfMemberDoesNotExist($fullName, $phone, $email,\n $location, $dateOfBirth, $gender, $approvalStatus, $disapprovedStatus, $userId) {\n $member = $this->getMemberByUserId($userId);\n if ($member == null) {\n return \\App\\Member::create([\n 'full_name' => $fullName,\n 'phone' => $phone,\n 'email' => $email,\n 'location' => $location,\n 'date_of_birth' => $dateOfBirth,\n 'approved_status' => $approvalStatus,\n 'disapproved_status' => $disapprovedStatus,\n 'gender' => $gender,\n 'user_id' => $userId,\n ]);\n }\n return $member;\n }", "title": "" }, { "docid": "3e229b3796243b0fbb35e4f1d7dd5ac6", "score": "0.37766787", "text": "public function add_member() {\n TeamMembers::create([\n 'user_id' => request('user_id'),\n 'team_id' => request('team_id')\n ]);\n return redirect()->route('team');\n }", "title": "" } ]
0649df9976766086b17a0dbb6021cba0
We'll set the base value to whatever is in our Event Parameters
[ { "docid": "75f75ecc2331d9872bf55f661eb0f86b", "score": "0.46832326", "text": "protected function ParseEventParameters()\n\t{\n\t\t$this->_value = DIunescape($this->_eventParameters[strtolower($this->Name)]);\n\n\t\tif (is_set($this->_value))\n\t\t{\n\t\t\tif (is_array($this->_value) == false)\n\t\t\t{\n\t\t\t\t$this->_value = explode(\",\", $this->_value);\n\t\t\t}\n\n\t\t\tforeach($this->_elements as $tempElement)\n\t\t\t{\n\t\t\t\t$this->SetElementSelectedFromControlValue($tempElement);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ClearAllSelections();\n\t\t}\n\n\t}", "title": "" } ]
[ { "docid": "453a8c02c9d5c4e1835559f38dbcc3dc", "score": "0.72171867", "text": "function event_buffer_base_set($bevent, $event_base)\n{\n}", "title": "" }, { "docid": "9a54b30f0d9aa4f3397e4d305a7dfa13", "score": "0.58900565", "text": "function setBase ($base) {\r\n $this->BASE = $base;\r\n }", "title": "" }, { "docid": "fe78b9c4c97b675cd01c259f03445dc0", "score": "0.58765167", "text": "public function setBase($base)\r\n {\r\n\r\n if ($base > strlen($this->alnum_digit) OR $base < 2)\r\n die(\"<br><b>Invalid Base \" . $value . \" Allowed Range = 2 - \" . strlen($this->alnum_digit) . \"</b>\");\r\n\r\n if ($base != $this->base) {\r\n $this->base = $base;\r\n $this->build_nBase_number();\r\n }\r\n }", "title": "" }, { "docid": "a5b09f334150d36c68d323ac03ef2a46", "score": "0.5781843", "text": "public static function set_base()\r\n {\r\n self::set_is_category();\r\n self::set_is_article();\r\n self::set_is_alternate();\r\n\r\n rex_register_extension_point('REX488_SET_BASE', '', array('url' => self::$url, 'category_id' => self::$category_id, 'article_id' => self::$article_id), true);\r\n }", "title": "" }, { "docid": "9af624a80ad486363b1f6e475473e060", "score": "0.56988454", "text": "public function setBaseAdjustment($baseAdjustment);", "title": "" }, { "docid": "797d218cb3139ed2043d3505bbcc0f2e", "score": "0.55247724", "text": "public function getBase(): \\EventBase {}", "title": "" }, { "docid": "4042bb44a5b769b3eb0b4af1cee855b6", "score": "0.5480787", "text": "public function setDocumentBasevalue(float $document_basevalue)\n {\n $this->document_basevalue = $document_basevalue;\n }", "title": "" }, { "docid": "421e22ab59c224a5cfc552a8c10c1eff", "score": "0.5467048", "text": "public function SetBase($base)\n {\n $this->_base = $base;\n }", "title": "" }, { "docid": "a64ae0ad63b6d771bd716854c0f84942", "score": "0.54584724", "text": "public function setBase($base)\n {\n $this->base = $base;\n }", "title": "" }, { "docid": "eb62d57f3e08e22f82a60796ef57cd42", "score": "0.5314676", "text": "public static function configParams($event)\r\n {\r\n }", "title": "" }, { "docid": "11758c487e3f537a88aed233b6f9297d", "score": "0.52633053", "text": "function __construct($base = \"\") {\r\n $this->BASE = $base;\r\n }", "title": "" }, { "docid": "5654e92512de2490194e351ca963402f", "score": "0.52574384", "text": "public function setBaseToGlobalRate($baseToGlobalRate);", "title": "" }, { "docid": "68c2d8c6e3fac697b1a6c3eeedbe6caf", "score": "0.51993656", "text": "function set_current_value($new_value) {\n $this->current_value=$new_value;\n}", "title": "" }, { "docid": "3847028c7f5b103d9c9271de949edb34", "score": "0.51847905", "text": "function Feuchtigkeit_LogValue()\n\t\t\t{\n\t\t\t// result formatieren für Ausgabe in den LogNachrichten\n\t\t\t$variabletyp=IPS_GetVariable($this->variable);\n\t\t\tif ($variabletyp[\"VariableProfile\"]!=\"\")\n\t\t\t\t{\n\t\t\t\t$result=GetValueFormatted($this->variable);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{ \n\t\t\t $result=number_format(GetValue($this->variable),2,',','.').\" %\";\n }\n \n\t\t\t$unchanged=time()-$variabletyp[\"VariableChanged\"];\n\t\t\t$oldvalue=GetValue($this->variableLogID);\n\t\t\tSetValue($this->variableLogID,GetValue($this->variable));\n\t\t\techo \" Feuchtigkeit_LogValue: Neuer Wert fuer \".$this->variablename.\" ist \".GetValue($this->variable).\" %. Alter Wert war : \".$oldvalue.\" unverändert für \".$unchanged.\" Sekunden.\\n\";\n\t\t\tIPSLogger_Dbg(__file__, 'CustomComponent Feuchtigkeit_LogValue: Variable OID : '.$this->variable.' Name : '.$this->variablename);\n \n\t\t\t/*****************Agreggierte Variablen beginnen mit Gesamtauswertung_ */\n\t\t\tif (isset ($this->installedmodules[\"DetectMovement\"]))\n\t\t\t\t{\n\t\t\t\t$groups=$this->DetectHandler->ListGroups(\"Feuchtigkeit\",$this->variable); // nur die Gruppen für dieses Event updaten, mit Angabe Feuchtigkeit können auch mehrere Gruppen pro Event ausgegeben werden \n //print_r($groups);\n\t\t\t\tforeach($groups as $group=>$name)\n\t\t\t\t {\n\t\t\t\t echo \" --> Gruppe \".$group.\" behandeln.\\n\";\n\t\t\t\t\t$config=$this->DetectHandler->ListEvents($group);\n //print_r($config);\n\t\t\t\t\t$status=(float)0;\n\t\t\t\t\t$count=0;\n\t\t\t\t\tforeach ($config as $oid=>$params)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$status+=GetValue($oid);\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t//echo \"OID: \".$oid.\" Name: \".str_pad(IPS_GetName(IPS_GetParent($oid)),30).\"Status: \".GetValue($oid).\" \".$status.\"\\n\";\n\t\t\t\t\t\techo \"OID: \".$oid.\" Name: \".str_pad(IPS_GetName($oid).\".\".IPS_GetName(IPS_GetParent($oid)),50).\"Status: \".GetValue($oid).\" \".$status.\"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\tif ($count>0) { $status=$status/$count; }\n else echo \"Gruppe \".$group.\" hat keine eigenen Eintraege.\\n\";\n\t\t\t\t\t$statusint=(integer)$status;\n\t\t\t\t echo \"Gruppe \".$group.\" hat neuen Status : \".$statusint.\"\\n\";\n\n\t\t\t\t\t//$log=new Feuchtigkeit_Logging($oid);\n\t\t\t\t\t//$class=$log->GetComponent($oid);\n\t\t\t\t\t// Herausfinden wo die Variablen gespeichert, damit im selben Bereich auch die Auswertung abgespeichert werden kann \n\t\t\t\t\t$statusID=CreateVariableByName($this->HumidityAuswertungID, \"Gesamtauswertung_\".$group,1,'~Humidity',null,1000,null);\n $oldstatus=GetValue($statusID);\n\t\t\t\t\tif ($oldstatus != $statusint) \n {\n \t\t\t\t\techo \"Gesamtauswertung_\".$group.\" ist auf OID : \".$statusID.\" Änderung Wert von $oldstatus auf $statusint.\\n\";\n SetValue($statusID,$statusint); // Vermeidung von Update oder Change Events\n }\n\t\t\t \t }\n\t\t\t\t} \n\n\t\t\tparent::LogMessage($result);\n\t\t\tparent::LogNachrichten($this->variablename.\" mit Wert \".$result);\n\t\t\t}", "title": "" }, { "docid": "2899dfbf3b7c07860e1bdfca7de694ff", "score": "0.5184569", "text": "public function __construct($base = 'EUR')\n {\n $this->base = $base;\n }", "title": "" }, { "docid": "fe6c2dfa2584caa2667254f8da7bb582", "score": "0.5169831", "text": "public function setEventParameters($request)\n {\n if (!array_key_exists('notification_action', $request)) {\n throw new Exception('Action not defined!');\n }\n\n $request['action'] = $request['notification_action'];\n\n parent::setEventParameters($request);\n\n }", "title": "" }, { "docid": "ee07d28a1288cba329ed52d1eccc24cf", "score": "0.51375914", "text": "public function set_base_energy($energy){\n $this->set_info('player_base_energy', $energy);\n }", "title": "" }, { "docid": "c2ec7dea773f317f40e36c35287691df", "score": "0.5124493", "text": "public function getBaseAdjustment();", "title": "" }, { "docid": "ff2fe2d8ccb1e19ebe60c1dafc63a3f6", "score": "0.5121672", "text": "public function setDevolutionBaseAttribute($value)\n {\n $this->attributes['devolutionBase'] = (float) $value;\n }", "title": "" }, { "docid": "51c4ad06335a7ac6f81856e75f439ee8", "score": "0.5092735", "text": "public function set_base_image($image){\n $this->set_info('player_base_image', $image);\n }", "title": "" }, { "docid": "ad7de92c6ad6998acbc77e6c1a44dab9", "score": "0.50888085", "text": "public function getDocumentBasevalue()\n {\n return $this->document_basevalue;\n }", "title": "" }, { "docid": "29d04fb0bda44a10db611e01fa072ca3", "score": "0.50722134", "text": "public static function setPointValue()\n\t{\n\t\tself::$value = (include \"bootstrap/values.php\")[self::getConfiguration()[\"pointValue\"]];\n\t}", "title": "" }, { "docid": "32f33fe4956f41d8d477b638a0251627", "score": "0.5064473", "text": "public function setBaseModule($baseModule)\n {\n $this->baseModule = $baseModule;\n }", "title": "" }, { "docid": "dfd331687c952266d342e4ba274bf8c1", "score": "0.5018597", "text": "public function setEventValue($value)\n {\n throw new SystemException(SystemException::EX_INVALIDMETHODCALL, 'Event values are bound through BindingMemberEventValue.');\n }", "title": "" }, { "docid": "07a3175cbee1bedd60d548c805c898e3", "score": "0.50181234", "text": "protected function setArgument() {}", "title": "" }, { "docid": "e2ff0d62b5423da2822d2ddeeedf2c9c", "score": "0.50001264", "text": "public function setNum($value, $base=10)\r\n {\r\n $this->num = $value;\r\n $this->base = $base;\r\n $this->dec_num = $this->calc_dec($value);\r\n }", "title": "" }, { "docid": "00c3bc97c137ccd807bfad19bd78344f", "score": "0.4982725", "text": "function set_event($field, $event, $value){\r\n\t\t$this->form['components'][$field]['attributes'][\"on\".$event] = $value;\r\n\t}", "title": "" }, { "docid": "fa1291b6ca112a7a7ca691ceaafd99fd", "score": "0.49760267", "text": "public function setParam($param) : void\n {\n $this->base_endpoint .= '/' . $param;\n }", "title": "" }, { "docid": "cac20d0e77efea2a531a9f9d10ceef9c", "score": "0.4946886", "text": "public function preSaveEvent($value);", "title": "" }, { "docid": "03c604007002da98823f8fc18c27b1c2", "score": "0.49307096", "text": "protected function getBaseUpdate() {\n\t\t$this->signedMicrotime = microtime(true);\n\t\t$update = array(\n\t\t\t'$set' => array(\n\t\t\t\t'calc_time' => $this->signedMicrotime,\n\t\t\t)\n\t\t);\n\t\treturn $update;\n\t}", "title": "" }, { "docid": "847e196064d9c01b6c410bb016efe3ab", "score": "0.48954493", "text": "public function testUpdateEvent0()\n {\n }", "title": "" }, { "docid": "847e196064d9c01b6c410bb016efe3ab", "score": "0.48954493", "text": "public function testUpdateEvent0()\n {\n }", "title": "" }, { "docid": "caafc86a2e27277d0286e149915a891e", "score": "0.4873153", "text": "public function set(\\EventBase $base, $fd, int $what = NULL, callable $cb = NULL, $arg = NULL): bool {}", "title": "" }, { "docid": "b5d836d018853c7d1e94eda54dfa5047", "score": "0.48724633", "text": "abstract protected function _paramSetup();", "title": "" }, { "docid": "7be4c3469c9610fb0a9baba42023041b", "score": "0.48638552", "text": "public function setBaseLength($length) {\n $this->base_length = $length;\n }", "title": "" }, { "docid": "33dc98277d6717ac19d5e62e5bfe46c8", "score": "0.48554593", "text": "abstract public function baseProtocolParameters();", "title": "" }, { "docid": "584e7b4ad8bdd99ffce051a2cc8dc9da", "score": "0.48496744", "text": "public function setBaseCost($baseCost);", "title": "" }, { "docid": "6ce93ec2638cd2700724e033ee95d0c8", "score": "0.48395556", "text": "public function setEvent($event) {\r\n\t$this->event = $event;\r\n }", "title": "" }, { "docid": "c3a43d0db6c6cd37b4231955470f94b6", "score": "0.48365772", "text": "public function preSave($event)\n {\n if ( intval($this->duration).'' != ''.$this->duration )\n {\n $str = $this->duration;\n $this->duration = intval(strtotime($this->duration.'+0',0));\n \n // for durations > 24h\n if ( !$this->duration )\n {\n $arr = explode(':', $str);\n $this->duration = intval($arr[1])*60 + intval($arr[0])*3600;\n }\n }\n\n parent::preSave($event);\n }", "title": "" }, { "docid": "9af525a4229ebdf5d926816727430439", "score": "0.4826145", "text": "protected function setParamConfig()\n {\n $this->paramConfig = ArrayManipulation::deepMerge($this->paramConfig, array(\n 'prefix' => array(\n 'name' => 'Prefix (Optional)',\n 'type' => 'textfield',\n 'help' => 'Wird den Formular-Keys vorangestellt, wenn angegeben.'\n )\n ));\n }", "title": "" }, { "docid": "1c95fe8a7a285e4671a3787b4bf81058", "score": "0.48245552", "text": "public function setBaseURI($baseURI)\n {\n $baseURI .= (substr($baseURI, -1) == '/' ? '' : '/');\n $this->_baseURI = $baseURI;\n }", "title": "" }, { "docid": "e665bfc025deedc3d3bc863809adad10", "score": "0.48201442", "text": "public function setEventID($eventID) {$this->eventID = $eventID;}", "title": "" }, { "docid": "adb835c220b6a5f0d02326bb6c0359fe", "score": "0.48094162", "text": "public function setEvent( $event );", "title": "" }, { "docid": "5ac327135eab871e6290ead778102adf", "score": "0.48069778", "text": "public function setBindingMemberEventValue($value)\n {\n if (is_string($value) === false)\n throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = value');\n \n $this->bindingMemberEventValue = $value;\n }", "title": "" }, { "docid": "1e50bf652a2ae54347297e3f8d1c1674", "score": "0.47947642", "text": "public function __construct(\\EventBase $base, $fd, int $what, callable $cb, $arg = NULL) {}", "title": "" }, { "docid": "eb23627efe548ea9919aa10c9c4fbc8d", "score": "0.47897592", "text": "public function __construct(\\EventBase $base, $socket = NULL, int $options = 0, callable $readcb = NULL, callable $writecb = NULL, callable $eventcb = NULL) {}", "title": "" }, { "docid": "9b3cd0da91b09879cc4f41c00ff1e3a8", "score": "0.47827742", "text": "public function setBaseAdjustmentPositive($baseAdjustmentPositive);", "title": "" }, { "docid": "40484dac64da60bf8f3369f718cce2f2", "score": "0.4780809", "text": "function set_values(){\n $this->door_count = 10;\n }", "title": "" }, { "docid": "94e599ef3f64edba9ef559b22765d1be", "score": "0.47793975", "text": "public function setEventName($value)\n {\n if (is_string($value) === false)\n throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = value');\n \n $this->eventName = $value;\n }", "title": "" }, { "docid": "38a1125c567ba4d856149a8337218586", "score": "0.47749692", "text": "public static function setBaseUri(string $baseUri)\n {\n self::$baseUri = $baseUri;\n }", "title": "" }, { "docid": "2f43278959f8565001504239eda9039a", "score": "0.4773132", "text": "function _setXmlRpcArgument()\n\t{\n\t\tif($this->getRequestMethod() != 'XMLRPC')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$xml = $GLOBALS['HTTP_RAW_POST_DATA'];\n\t\tif(Security::detectingXEE($xml))\n\t\t{\n\t\t\theader(\"HTTP/1.0 400 Bad Request\");\n\t\t\texit;\n\t\t}\n\n\t\t$oXml = new XmlParser();\n\t\t$xml_obj = $oXml->parse($xml);\n\n\t\t$params = $xml_obj->methodcall->params;\n\t\tunset($params->node_name, $params->attrs, $params->body);\n\n\t\tif(!count(get_object_vars($params)))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tforeach($params as $key => $val)\n\t\t{\n\t\t\t$this->set($key, $this->_filterXmlVars($key, $val), TRUE);\n\t\t}\n\t}", "title": "" }, { "docid": "bfe531f45959a53f8bc8fa55cb8768ac", "score": "0.47725877", "text": "public function reactToOnCalcHp($event) { \r\n // $event->params['bonusAbs'] += 235;\r\n }", "title": "" }, { "docid": "7f374dfe6daacadb8c5f1741d58be423", "score": "0.47675258", "text": "function setDefaultValue( $value_start = 'now', $value_end='')\r\n\t{\r\n\t\tif ($this->actionType=='search' && $value_start == 'now')\r\n\t\t{\r\n\t\t\t$value_start = '';\r\n\t\t}\r\n\t\tif (!empty($value_start))\r\n\t\t{\r\n\t\t\tif (!preg_match('~^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$~s', $value_start))\r\n\t\t\t{\r\n\t\t\t\t$value_start = date('Y-m-d',strtotime($value_start));\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$value_start = '';\r\n\t\t}\r\n\t\tif (!empty($value_end))\r\n\t\t{\r\n\t\t\tif (!preg_match('~^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$~s', $value_end))\r\n\t\t\t{\r\n\t\t\t\t$value_end = date('Y-m-d',strtotime($value_end));\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$value_end = $this->actionType=='search' ? '' : $value_start;\r\n\t\t}\r\n\t\t$this->defaultValue = $value_start;\r\n\t\t$this->defaultValueEnd = $value_end;\r\n\t\tif (!empty($this->endDate))\r\n\t\t{\r\n\t\t\t$this->endDate->setDefaultValue($value_end);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "426b754b8a6a51af4f22d6425e0067ae", "score": "0.47535744", "text": "function __construct($config) {\n $this->method = \"loweramount\";\n parent::__construct($config);\n }", "title": "" }, { "docid": "67590d7173afc7e9159b6e479ce38e56", "score": "0.47444046", "text": "public function getCallbackEventParameter()\n\t{\n\t\treturn $this->getAdapter()->getCallbackEventParameter();\n\t}", "title": "" }, { "docid": "4bdc1b73260d7bf6fa2ca9e0ce1e047d", "score": "0.47397903", "text": "public function set_base_attack($attack){\n $this->set_info('player_base_attack', $attack);\n }", "title": "" }, { "docid": "450b33f792387268d95dcca977c70016", "score": "0.47370493", "text": "public function __construct(){\n\n\t\tparent::setUnits($this->volumeUnits);\n\t}", "title": "" }, { "docid": "4899b29b3d3f2f757319a576e8517a65", "score": "0.47339708", "text": "public function init()\n {\n parent::init();\n\n // new attribute to store the original value of total attribute.\n $this->total_before_discount = $this->total;\n }", "title": "" }, { "docid": "99c5aea340fcc3c58a641e6303a23338", "score": "0.47295457", "text": "protected function setDefaultValues() {\n $timestamp = time();\n $date_time_array = getdate($timestamp);\n\n $hours = $date_time_array['hours'];\n $minutes = $date_time_array['minutes'];\n $seconds = $date_time_array['seconds'];\n $month = $date_time_array['mon'];\n $day = $date_time_array['mday'];\n $year = $date_time_array['year'];\n\n $timestamp = mktime($hours, $minutes, $seconds, $month + 6, $day, $year);\n\n parent::setDefaultValues();\n //$this->publicationDate = $this->embargoDate = date('Y-m-d');\n //$this->expirationDate = date('Y-m-d', $timestamp);\n $this->siteId = $this->channelId = 0;\n }", "title": "" }, { "docid": "5d5f88644c233695f7b7478f4ecf52ed", "score": "0.47140616", "text": "public function set_base_name($name){\n $this->set_info('player_base_name', $name);\n }", "title": "" }, { "docid": "de887a80d48be867c6af2ea8b0244dca", "score": "0.47137702", "text": "protected function _getEventParam()\n {\n /* reset object state instead of instantiating new object over and over again */\n if (!$this->_eventParam) {\n $this->_eventParam = new \\Magento\\TestFramework\\Event\\Param\\Transaction();\n } else {\n $this->_eventParam->__construct();\n }\n return $this->_eventParam;\n }", "title": "" }, { "docid": "ab0f4e745ec49c139c75cc1f95dc90de", "score": "0.4709651", "text": "public function __construct()\n\t\t{\n\t\t\t//set parameter for properties\n\t\t}", "title": "" }, { "docid": "89ade999bca1a5279517131844c59197", "score": "0.47036397", "text": "public function setTimer(\\EventBase $base, callable $cb, $arg = NULL): bool {}", "title": "" }, { "docid": "de3a750a3b90810e824fa19631829e14", "score": "0.46922514", "text": "protected function setDefaultValues()\n {\n $timestamp = time();\n $date_time_array = getdate($timestamp);\n \n $hours = $date_time_array['hours'];\n $minutes = $date_time_array['minutes'];\n $seconds = $date_time_array['seconds'];\n $month = $date_time_array['mon'];\n $day = $date_time_array['mday'];\n $year = $date_time_array['year'];\n \n $timestamp = mktime($hours, $minutes, $seconds, $month+6, $day, $year);\n\t\t\n parent::setDefaultValues();\n //$this->publicationDate = $this->embargoDate = date('Y-m-d h:i:s');\n //$this->expirationDate = date('Y-m-d h:i:s', $timestamp);\n $this->siteId = $this->channelId = 0;\n }", "title": "" }, { "docid": "a61046d6420cb0d72e3c8bac7435e993", "score": "0.4691414", "text": "public function beforeSave()\n {\n $this->setParams([\n 'url' => $this->getFieldsetDataValue('api_url'),\n 'apiKey' => $this->getFieldsetDataValue('api_key'),\n 'version' => $this->getValue()\n ]);\n\n $this->validateApiVersion($this->api, $this->getValue());\n\n parent::beforeSave();\n }", "title": "" }, { "docid": "648e871b30ff7efe76cfd2241b5b7e36", "score": "0.46871054", "text": "public function setBasePrice($price);", "title": "" }, { "docid": "40795a622f71d6fc97a0b6040df5cd57", "score": "0.4682478", "text": "protected function setBasicVariables() {}", "title": "" }, { "docid": "0627f630a76000b4b4d1e754fb68c6d4", "score": "0.46724463", "text": "function setWfPoint7() {\n //calculation and formauls\n $calVal = 50 * ( 1 - (($this->emiLoanCC / $this->userIncomePerMonth ) / 0.2) );\n $calVal = ($calVal > 50) ? 50 : $calVal;\n $calVal = ($calVal < -50) ? -50 : $calVal;\n $this->wfPoint7 = $calVal;\n }", "title": "" }, { "docid": "3c52e6528acc34a2a1987f6957a0872f", "score": "0.4671407", "text": "abstract protected function setParameter($key, $value);", "title": "" }, { "docid": "b9669e956ccbb3da3197a6d3c3e20d13", "score": "0.46711606", "text": "protected function initialize(int $base): void\n {\n if ($base != 256 && $base != -256) {\n parent::initialize($base);\n return;\n }\n\n $val = $this->value;\n $this->value = [];\n $vals = &$this->value;\n $i = strlen($val);\n if (!$i) {\n return;\n }\n\n while (true) {\n $i -= 4;\n if ($i < 0) {\n if ($i == -4) {\n break;\n }\n $val = substr($val, 0, 4 + $i);\n $val = str_pad($val, 4, \"\\0\", STR_PAD_LEFT);\n if ($val == \"\\0\\0\\0\\0\") {\n break;\n }\n $i = 0;\n }\n [, $digit] = unpack('N', substr($val, $i, 4));\n $step = count($vals) & 7;\n if (!$step) {\n $digit &= static::MAX_DIGIT;\n $i++;\n } else {\n $shift = 8 - $step;\n $digit >>= $shift;\n $shift = 32 - $shift;\n $digit &= (1 << $shift) - 1;\n $temp = $i > 0 ? ord($val[$i - 1]) : 0;\n $digit |= ($temp << $shift) & 0x7F000000;\n }\n $vals[] = $digit;\n }\n while (end($vals) === 0) {\n array_pop($vals);\n }\n reset($vals);\n }", "title": "" }, { "docid": "fbc367116f8d5a8f906ea8b810e18698", "score": "0.46699488", "text": "public function setUploadVars() {\n $large_img = DTUploadedFile::getInstance($this, '[' . $this->upload_key . ']image_large');\n $its_t = new DTFunctions();\n if (!empty($large_img)) {\n\n $this->image_large = $its_t->getRanddomeNo(10) . \".\" . $large_img->extensionName;\n $this->image_small = str_replace(\" \", \"_\", \"small_\" . $this->image_large);\n $this->image_detail = str_replace(\" \", \"_\", \"detail_\" . $this->image_large);\n } else {\n\n $this->image_large = $this->oldLargeImg;\n $this->image_small = $this->oldSmallImg;\n $this->image_detail = $this->oldDetailImg;\n }\n }", "title": "" }, { "docid": "4d380b591dfeb1e22405dceebc47185b", "score": "0.4668746", "text": "public function getBase(): void {}", "title": "" }, { "docid": "e86a267c68cc5b0ff9ae0bd7fe528056", "score": "0.4667277", "text": "abstract protected function _set();", "title": "" }, { "docid": "eb94c7b32132f8ed5fb3cf5c6462d6b7", "score": "0.46672678", "text": "public function setBase( $base )\n\t{\n\t\t$this->base = $base;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2a9f28cae8f3d6c7ea07066585f4fdc6", "score": "0.46644434", "text": "public function setBase($base)\n {\n $this->base = (int) $base;\n return $this;\n }", "title": "" }, { "docid": "60e32d668ca480bbf8e75b74bdeb0a4c", "score": "0.4654911", "text": "public function Merge(AbstractEvent $event) : void\n\t{\n\t\t$this->data['End'] = $event->GetEnd();\n\t\t$this->data['Duration'] = $this->GetEnd()->diff($this->GetStart());\n\t}", "title": "" }, { "docid": "7b45ed9645b7bc37b825d43d0bfd6cf3", "score": "0.46504906", "text": "public function testOffsetSet()\n {\n $rand = rand();\n\n $this->arguments['random'] = $rand;\n\n $original = Property::get($this->arguments, 'original');\n $override = Property::get($this->arguments, 'override');\n\n $this->assertNotSame(\n $rand,\n $original['random'],\n 'Make sure the original value is unchanged.'\n );\n\n $this->assertSame(\n $rand,\n $override['random'],\n 'Make sure the override is set.'\n );\n }", "title": "" }, { "docid": "2420481b6d022fcb26403e388cebcca6", "score": "0.46377897", "text": "function setValue($value) {$this->_value = $value;}", "title": "" }, { "docid": "f62e5bf8ef1f168b3f91414f10804659", "score": "0.46326968", "text": "public function preSave($event) \n {\n $user_id = GlobalFunctions::getUserId();\n \n $this->setUserId($user_id);\n $this->setCreatedatetime(date(\"Y-m-d H:i:s\"));\n\n parent::preSave($event);\n }", "title": "" }, { "docid": "db7914e9bdcbda9c433aaee1ed16c697", "score": "0.46314028", "text": "function __construct($event) {\n\t\tparent::__construct();\n\t\t\n\t\t$this->event = $event;\n\t}", "title": "" }, { "docid": "588acacc01a4650d7d79e9f1e4553dc2", "score": "0.4629576", "text": "public function set_base_url($url)\n\t{\n\t\tif ( is_absolute_url($url) ) {\n\t\t\t$this->_base_url = $url;\n\t\t} else {\n\t\t\t$this->_base_url = site_url($url);\n\t\t}\n\t}", "title": "" }, { "docid": "f97814be87e39a69492dc9b1516e59a7", "score": "0.46292737", "text": "public function getBaseValue();", "title": "" }, { "docid": "711ce32da90f91b0710a0f4ac1178887", "score": "0.46289068", "text": "private function setParams()\n {\n $this->params = router::getInstance()->getParams();\n foreach($this->params as $key => $value)\n {\n if(strtolower($key) == 'rectotal') $this->params[$key] = $this->recTotal;\n if(strtolower($key) == 'recperpage') $this->params[$key] = $this->recPerPage;\n if(strtolower($key) == 'pageID') $this->params[$key] = $this->pageID;\n }\n }", "title": "" }, { "docid": "7b24173080d0d2ee417aee8ef0a3058f", "score": "0.4622868", "text": "public function setChanged()\n {\n $this->internalInitialValue = true;\n }", "title": "" }, { "docid": "e038cd77baf0d39cf9881216b3630124", "score": "0.46186477", "text": "abstract public function setValue($value);", "title": "" }, { "docid": "1cd1c5964dae815cb9b1cb49e30333e7", "score": "0.4605493", "text": "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->changedAtMs = func_get_arg(0);\n $this->fuelPercentage = func_get_arg(1);\n }\n }", "title": "" }, { "docid": "3b00251dafaf7fa4a6caa6b013c02dfc", "score": "0.4599721", "text": "public function setBasePath($base_path)\n {\n $this->basePath = $base_path;\n }", "title": "" }, { "docid": "c3e0b63b55aa306404ee9afb659218af", "score": "0.4599498", "text": "function __construct(){\r\n parent::__construct();\r\n $this->limite = 0.00;\r\n }", "title": "" }, { "docid": "8fdf11412bad29906912e789d32cf759", "score": "0.4598544", "text": "public function applyDefaultValues()\n {\n $this->bklhordrbase = '';\n $this->bklhseq = 0;\n }", "title": "" }, { "docid": "4b59d82928c7f2ce0349e68f39cd442f", "score": "0.45981172", "text": "public function setBaseToGlobalRate($rate);", "title": "" }, { "docid": "3dddf1c743af50344d355c39b83bb4c8", "score": "0.45907652", "text": "protected function setEvent($event)\n {\n $this->_event = array_merge(\n $event,\n array('timestamp' => time())\n );\n\n $this->notify();\n }", "title": "" }, { "docid": "d7921e7b8da7e8d957f11822f08b0801", "score": "0.4585027", "text": "public function set_base_defense($defense){\n $this->set_info('player_base_defense', $defense);\n }", "title": "" }, { "docid": "fc8506f400e9d6639b80a687d0fe7cb0", "score": "0.45847473", "text": "public function setBaseURI(string $baseURI): void\n {\n if (!$baseURI || $baseURI == '/') {\n $this->baseURI = '';\n } else {\n $this->baseURI = '/' . trim($baseURI, '/');\n }\n }", "title": "" }, { "docid": "adc3153c3e2cd2c51b378d31c41747d2", "score": "0.45845985", "text": "public function __construct($value) { $this->value = $value; }", "title": "" }, { "docid": "db3bede16498de3ecc852a8fe005c015", "score": "0.45755047", "text": "public function setValue($new_value): void\n {\n }", "title": "" }, { "docid": "8ea386bbb403baea925e70b6d19b6026", "score": "0.45665663", "text": "protected function getSignatureBase() {\n\t\treturn \"{$this->account}{$this->getFormatedPrice()}{$this->currency}{$this->getFormatedVS()}{$this->getFormatedSS()}{$this->getFormatedCS()}{$this->returnUrl}\";\n\t}", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.45632663", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.45632663", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.45632663", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.45632663", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" } ]
695c04b2527e3cb54e8ab27a5421a3c7
Add elements to form
[ { "docid": "ec58e006e9f013e79810d6955b993057", "score": "0.6057305", "text": "public function definition() {\n global $CFG, $DB;\n \n $mform = $this->_form; // Don't forget the underscore! \n\n add_contact_info_elements_to_form($mform); \n add_profile_elements_to_form($mform);\n\n $mform->addElement('submit', 'submit', get_string('profile_lbl_submit', 'local_mentoring'));\n }", "title": "" } ]
[ { "docid": "446a67884fa68de219fb12845be0cca1", "score": "0.7769082", "text": "protected function addElements()\n {\n// // Add \"author\" field\n// $this->add([\n// 'type' => Text::class,\n// 'name' => 'author',\n// 'attributes' => [\n// 'id' => 'author'\n// ],\n// 'options' => [\n// 'label' => 'Author'\n// ]\n// ]);\n\n // Add \"comment\" field\n $this->add([\n 'type' => Textarea::class,\n 'name' => 'comment',\n 'attributes' => [\n 'id' => 'comment'\n ],\n 'options' => [\n 'label' => 'Comment'\n ]\n ]);\n\n // Add the submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [\n 'value' => 'Save',\n 'id' => 'submitbutton'\n ]\n ]);\n }", "title": "" }, { "docid": "e8f695c40e586d9765f35f61e6d8cc85", "score": "0.74218017", "text": "protected function add()\r\n\t{\r\n\t\tglobal $tpl;\r\n\r\n\t\t$form = $this->initForm();\r\n\r\n\t\t$tpl->setContent($form->getHTML());\r\n\t}", "title": "" }, { "docid": "0b3c260271f9dbef05ce2d62399c81bb", "score": "0.74058723", "text": "protected function addElements()\n {\n $this->add([\n 'type' => 'hidden',\n 'name' => 'application_id',\n ]);\n\n $this->add([\n 'type' => 'Zend\\Form\\Element\\Hidden',\n 'name' => 'product_uid',\n ], ['priority'=>10]);\n $this->add([\n 'type' => 'Zend\\Form\\Element\\Hidden',\n 'name' => 'stock_uid',\n ], ['priority'=>10]);\n\n $this->add(array(\n 'type' => 'Zend\\Form\\Element\\Radio',\n 'name' => 'stock_product_remove_confirm',\n 'options' => array(\n 'label' => 'Are you sure you want to delete the product?',\n 'value_options' => array(\n '0' => 'Nah',\n 'yes' => 'Yes I am sure',\n ),\n ),\n ));\n\n // Add the CSRF field\n $this->add([\n 'type' => 'csrf',\n 'name' => 'csrf',\n 'attributes' => [],\n 'options' => [\n 'csrf_options' => [\n 'timeout' => 600\n ]\n ],\n ]);\n\n // Add the submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [\n 'value' => 'Next Step',\n 'id' => 'submitbutton',\n ],\n ]);\n }", "title": "" }, { "docid": "e4fac83f92d45ab58bf7590324cef084", "score": "0.72648376", "text": "protected function addElements()\n {\n $this->add([\n 'type' => 'text',\n 'name' => 'name_human',\n 'attributes'=>[\n 'id'=>'name_human'\n ],\n 'options'=>[\n 'label' => ' '\n ],\n ]);\n \n //add the email field\n $this->add([\n 'type' => 'text',\n 'name' => 'human_email',\n 'attributes'=>[\n 'id'=>'human_email'\n ],\n 'options'=>[\n 'label' => ' '\n ],\n ]);\n \n //add the topic field\n $this->add([\n 'type' => 'text',\n 'name' => 'human_topic',\n 'attributes'=>[\n 'id'=>'human_topic'\n ],\n 'options'=>[\n 'label' => ' '\n ],\n ]);\n \n //add the message field\n $this->add([\n 'type' => 'textarea',\n //'type' => 'text',\n 'name' => 'human_message',\n 'attributes'=>[\n 'id'=>'human_message'\n ],\n 'options'=>[\n 'label' => ' '\n ],\n ]);\n \n \n //add the CSRF field\n $this->add([\n 'type' => 'csrf',\n 'name' =>'csrf',\n 'attributes' => [],\n 'options' => [\n 'csrf_options' => [\n 'timeout' => 601\n ],\n ],\n ]); \n \n //add the submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes'=>[\n 'value' => 'Отправить сообщение',\n 'id' => 'submit_contact'\n ],\n ]);\n \n }", "title": "" }, { "docid": "ff21621fc54337013fd1da7ba7b620bb", "score": "0.7218776", "text": "abstract function form_elements();", "title": "" }, { "docid": "e77ce753cbf28674751ab7e46c3be84d", "score": "0.7123463", "text": "public function add()\n {\n $this->form();\n }", "title": "" }, { "docid": "c9c606da3b4af607183fa405de682e95", "score": "0.7108807", "text": "private function add_elements()\n {\n $this->addElement(\n 'checkbox', \n self::PARAM_DIRECT_SUBSCRIBE_AVAILABLE, \n Translation::get('DirectSubscribeAvailable'));\n $this->addElement('checkbox', self::PARAM_UNSUBSCRIBE_AVAILABLE, Translation::get('UnsubscribeAvailable'));\n $this->add_datepicker(self::PARAM_SUBSCRIPTION_DEADLINE, Translation::get('SubscriptionDeadline'), false);\n $this->add_textfield(self::PARAM_MIN_GROUP_MEMBERS, Translation::get('MinimumAmountOfGroupMembers'));\n $this->add_textfield(self::PARAM_MAX_GROUP_MEMBERS, Translation::get('MaximumAmountOfGroupMembers'));\n \n // TODO add filter group\n $this->addElement('checkbox', self::PARAM_FILTER_MIN_MAX, Translation::get('FilterMinMaxScores'));\n $this->addElement('checkbox', self::PARAM_FILTER_SELF, Translation::get('FilterSelfAssessment'));\n \n $this->addElement(\n 'style_submit_button', \n FormValidator::PARAM_SUBMIT, \n Translation::get('Submit', null, Utilities::COMMON_LIBRARIES));\n }", "title": "" }, { "docid": "3e2e3aef09d13dac146da7c13a1df674", "score": "0.6977027", "text": "public function addForm()\n {\n $listActions = $this->model->getActions();\n $listUsers = $this->model->getUsers();\n $ticketById = $this->model->getTicketById();\n $this->view->addForm($listActions,$listUsers,$ticketById);\n }", "title": "" }, { "docid": "ad93955e7a75262d2540cfabc57fa400", "score": "0.68987805", "text": "public function buildForm()\n {\n $this\n ->addNarrative('title')\n ->addAddMoreButton('add_title', 'title');\n }", "title": "" }, { "docid": "97d28e9db9c136565b7aa597fa80b74c", "score": "0.6826718", "text": "function addForm($seed,array $form_elements,array $form_attributes)\n\t{\n\t\t$innerText = $this->innerTags($form_attributes);\n\t\tforeach($form_elements as $tag)\n\t\t{\n\t\t\t$this->form[$seed]['element'][] = $tag;\n\t\t}\n\t\t\n\t\t$build_string =\"<form \" . $innerText . \">\";\n\t\t$this->form[$seed]['form'] = $build_string;\n\t}", "title": "" }, { "docid": "88af2c44eb8550e4be10f6a911c95c88", "score": "0.6729166", "text": "function article_add_form() {\n\n\t\t$accessName = 'New Article';\n\n\t\t$this->session_lib->check_permission_with_redirect_page($accessName);\n\n\t\t$this->log_activity_lib->log($accessName, $this->activityName);\n\n\t\t$addAttribPage = array(\n\t\t\t\t\t\t\t'subtitleMenu' => '<i class=\"fa fa-plus\"></i> New Article',\n\t\t\t\t\t\t\t'sublinkMenu' => '<li class=\"active\">\n\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-plus\"></i> New Article\n\t\t\t\t\t\t\t\t\t\t\t</li>'\n\t\t\t\t\t\t);\n\n\t\t$viewData = array_merge($addAttribPage, $this->attribPage, $this->attribThisPage);\n\n\t\t$this->template_lib->webadmin_default_template('webadmin/content/article/add', $viewData);\n\n\t}", "title": "" }, { "docid": "fe04cdb79b5feab2345ed397d9c86e5e", "score": "0.67250013", "text": "public function addElementForm($add_options = NULL)\n {\n \t\n\t\t$fields = array(\"name\", \"uploading_date\", \"uploaded_by\", \"description\", \"file_uploaded\");\n\t\t$fields_types = array(\"text\", \"date\", \"text\", \"textarea\", \"file\");\n\t\t$options = ($add_options != NULL )? $add_options : array(NULL, array('format' => 'MMMM dd yyyy', 'years'=>range((date('Y')-100), date('Y')), \"data\" => new \\DateTime(\"now\")), NULL, NULL, array(\"required\"=>FALSE));\n\t\t$items['entity'] = \"\\\\files\";\n\t\t$items['fields'] = $fields;\n\t\t$items['options'] = $options;\n\t\t$items['fields_types'] = $fields_types;\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "cbed79544b4ae54d585252d4a67350ec", "score": "0.6722823", "text": "public function add_elements_to_form($attributes)\n {\n $attributes['class'] = 'hiddentext';\n $this->_form->addElement('hidden', $this->name, null, $attributes);\n $this->_form->applyFilter($this->name, 'trim');\n\n $this->_form->addFormRule([&$this, 'validate']);\n }", "title": "" }, { "docid": "2ac2492fa47f4934b3db490f4f5a7d74", "score": "0.6688497", "text": "protected function form_elements() {\n return array();\n }", "title": "" }, { "docid": "a6c50257e90c691f14e072484fd2739f", "score": "0.66813934", "text": "public function addForm()\n {\n $this->getState()->template = 'applications-form-add';\n $this->getState()->setData([\n 'help' => $this->getHelp()->link('Services', 'Register')\n ]);\n }", "title": "" }, { "docid": "178c55ec3e12eac311c1bcdea8ae73d4", "score": "0.6610663", "text": "public function addToForm($element) {\n\t\t$this->_form->addElement($element);\n\t}", "title": "" }, { "docid": "07ca453b07cfec7fdc356c854b426725", "score": "0.6587271", "text": "public function _createElements() {\n\n $this->_generateId();\n\n $this->setElements([\n $this->createFormElement('text', 'filetypes', $this->getLabel(), [\n 'id' => $this->getAttribute('id'),\n ]),\n\n $this->createFormElement('static', 'browser', null,\n '<span data-filetypesbrowser=\"'.$this->getAttribute('id').'\"></span>'),\n\n $this->createFormElement('static', 'descriptions', null,\n '<div data-filetypesdescriptions=\"'.$this->getAttribute('id').'\"></div>')\n ]);\n }", "title": "" }, { "docid": "62c266bd263fb627ac5ed577a1bde9ca", "score": "0.6580229", "text": "public function addform() {\n $this->setMethod('post');\n\t\t\n $this->addElement('text', 'name', array(\n 'required' => true,\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n\t\t\t 'placeholder' => 'username',\n 'filters' => array('StringTrim'),\n 'maxlength' => '50',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'UserName field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Name field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t\n\t\t\n\t\n\t$this->addElement('password', 'password', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'Password',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Password cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Sign In',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors',)\n ));\t\n\t\t}", "title": "" }, { "docid": "13536cef833da7fe25a4dde98cb2c832", "score": "0.65567136", "text": "public function addAddFormInput(): void\n {\n if($this->isAddAble())\n {\n $container = $this->netteGrid->getAddContainer();\n $input = $this->getAddInput();\n $container->addComponent($input, $this->name);\n }\n }", "title": "" }, { "docid": "b1b9b9d8a3816c398050dfe05a92a16b", "score": "0.6522328", "text": "public function addForm() {\n $view = new DrumAdd();\n $view->display();\n }", "title": "" }, { "docid": "6e74ab3dbbd035c0d2e600ec6294ef7e", "score": "0.65145206", "text": "function addForm($form) {\n if (!empty($form->componentes)) {\n foreach ($form->componentes as $nome=>$widget) {\n $this->addComponent($nome,$widget);\n }\n }\n }", "title": "" }, { "docid": "378fab0518d0297c1301138528ca8ac9", "score": "0.64684063", "text": "public function addAction() {\n\t\t$this->_helper->layout()->disableLayout();\n\n\t\t$labelRepo = $this->_entityManager->getRepository('Model\\Label');\n\n\t\t$form = new Dis_Form_Passenger();\n\t\t$form->getElement('label')->setMultiOptions($labelRepo->findAllArray());\n\n\t\t$this->view->form = $form;\n\t}", "title": "" }, { "docid": "7900596b18e42a64b16bc9676af95add", "score": "0.64555544", "text": "protected function _getElements() {\n $this->addElement(\"hidden\", \n \"id\", array(\n 'required' => false,\n 'attribs' => array()\n )\n )\n ->addElement(\"Imagen\", \n \"art\", array(\n 'label' => \"Art\",\n 'required' => false,\n 'attribs' => array(\"class\" => \"\")\n )\n )\n ->addElement(\"text\", \n \"name\", array(\n 'label' => \"Name\",\n 'required' => true,\n 'decorators' => $this->getTextDecorator(),\n 'attribs' => array(\"class\" => \"form-control\")\n )\n )\n ->addElement(\"text\", \n \"letter\", array(\n 'label' => \"Letter\",\n 'required' => true,\n 'decorators' => $this->getTextDecorator(),\n 'attribs' => array(\"class\" => \"form-control\")\n )\n )\n ->addElement(\"select\", \n \"category\", array(\n 'label' => \"Art Category\",\n 'required' => true,\n 'decorators' => $this->getTextDecorator(),\n 'attribs' => array(\"class\" => \"form-control chosen\")\n )\n )\n ->addElement(\"FlexCheckbox\", \n \"activo\", array(\n 'label' => \"Active\",\n 'required' => false,\n 'attribs' => array()\n )\n )\n ->addElement(\"FlexCheckbox\", \n \"default\", array(\n 'label' => \"Default\",\n 'required' => false,\n 'attribs' => array()\n )\n )\n ->addElement(\"Mensaje\", \n \"mensaje\", array(\n 'required' => false\n )\n )\n ->addElement(\"FormAction\", \n \"buttons\", array(\n 'label' => \"\",\n 'required' => false,\n 'attribs' => array()\n )\n );\n }", "title": "" }, { "docid": "1343fdcfa0249196f1bf9c7bc1985566", "score": "0.6422582", "text": "function add_elements_to_form($attributes)\n {\n $attributes = array_merge($attributes, array\n (\n 'class' => 'fileselector',\n 'id' => \"{$this->_namespace}{$this->name}\",\n ));\n $this->_upload_element = $this->_form->createElement('file', \"{$this->name}_file\", '', $attributes);\n\n $attributes = Array\n (\n 'class' => 'fileselector',\n 'id' => \"{$this->_namespace}{$this->name}_video\",\n );\n $this->_upload_element_video = $this->_form->createElement('file', \"{$this->name}_file_video\", '', $attributes);\n\n $elements = Array();\n $elements_video = Array();\n\n if (isset($this->_type->attachments['main']) && !isset($this->_type->attachments['main_video']))\n {\n $this->_create_replace_elements($elements);\n $this->_create_upload_elements_video($elements_video);\n }\n elseif (isset($this->_type->attachments['main_video']) && !isset($this->_type->attachments['main']))\n {\n $this->_create_replace_elements_video($elements_video);\n $this->_create_upload_elements($elements);\n }\n elseif (isset($this->_type->attachments['main_video']) && isset($this->_type->attachments['main']))\n {\n $this->_create_replace_elements($elements);\n $this->_create_replace_elements_video($elements_video);\n }\n else\n {\n $this->_create_upload_elements($elements);\n $this->_create_upload_elements_video($elements_video);\n }\n\n $this->_form->addGroup($elements, $this->name, \"Screenshot\", ' ', false);\n $this->_form->addGroup($elements_video, $this->name .\"_video\", \"Video\", ' ', false);\n }", "title": "" }, { "docid": "3d691738f4dbfa2419b29d82a0e106ec", "score": "0.64174217", "text": "public function divyapghomeform() {\n\t \n $this->setMethod('post');\n\t\t\n\t\t$this->addElement('text', 'name', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'PG Name',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'name cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'location', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'location',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'location cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'rooms', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rooms',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n\t\t\t'type'=>'number',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Room field cannot be empty'\n )\n )), \n \t\t\t\t\n )\n ));\n\t\t\n\t\t$this->addElement('text', 'rent', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rent',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Rent field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Rent field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'address', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Address',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'address field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Address field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'balcony', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'balcony',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t\n\t\t$this->addElement('text', 'electricity', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'electricity',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'parking', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'parking',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'security', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'security',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'fireexit', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'fireexit',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'airconditioned', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'AC',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Sign In',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors',)\n ));\t\t\n\t }", "title": "" }, { "docid": "c6aced651d15517103d2b71b5fc9f80d", "score": "0.64169824", "text": "public function buildForm()\n {\n $this\n ->add('year', 'text', ['label' => trans('elementForm.year'), 'help_block' => $this->addHelpText('Activity_Result_Indicator_Baseline-year')])\n ->add('value', 'text', ['label' => trans('elementForm.value'), 'help_block' => $this->addHelpText('Activity_Result_Indicator_Baseline-value')])\n ->addComments(['class' => 'indicator_baseline_comment_title_narrative']);\n }", "title": "" }, { "docid": "a43d57de3d87be3dcb2f8973c65890a7", "score": "0.6411093", "text": "public function added_to_form ($form) {}", "title": "" }, { "docid": "17ec76074d21747d75bfd05b6fe99031", "score": "0.6373505", "text": "public function buildForm()\n {\n $this\n ->add('activity', 'file', ['label' => trans('elementForm.activity_csv_file'),'wrapper' => ['class' => 'form-group col-xs-6 col-sm-6 activity-file-choose']]);\n }", "title": "" }, { "docid": "12f4cbab3a957fd2ed15c3bce6e53005", "score": "0.63618034", "text": "protected function addElements()\n {\n $this->add([\n //'type' => 'number',\n //'type' => 'toint',\n 'type' => 'text',\n 'name' => 'id_comment',\n 'attributes'=>[\n 'id' => 'idComment'\n ],\n 'options'=>[\n 'label' => 'idComment'\n ],\n ]);\n \n //add name user comment\n $this->add([\n 'type' => 'text',\n 'name' => 'name_user_comment',\n 'attributes'=>[\n 'id' => 'id_name_user_comment'\n ],\n 'options'=>[\n 'label' => 'Введите ваше имя фамилию',\n ],\n ]);\n //add message user comment\n $this->add([\n 'type' => 'textarea',\n 'name' => 'message_user_comment',\n 'attributes'=>[\n 'id' => 'id_message_user_comment'\n ],\n 'options'=>[\n 'label' => 'Введите комментарий'\n ],\n ]);\n //add photo user comment\n $this->add([\n 'type' => 'file',\n 'name' => 'photo_user',\n 'attributes'=>[\n 'id' => 'id_image_user',\n ],\n 'options'=>[\n 'label'=>'Загрузить своё фото (необязательно)'\n ],\n ]);\n \n //add email user comment\n $this->add([\n 'type' => 'text',\n 'name' => 'email_user_comment',\n 'attributes'=>[\n 'id' => 'id_email_user_comment'\n ],\n 'options'=>[\n 'label' => 'Введите ваш E-mail'\n ],\n ]);\n \n //add id_descriptionDish\n $this->add([\n //'type' => 'number',\n 'type' => 'text',\n 'name' => 'id_descriptionDish',\n 'attributes'=>[\n 'id' => 'id__id_descriptionDish'\n ],\n 'options'=>[\n 'label' => 'id__id_descriptionDish',\n ]\n ]);\n \n //add id_commentDish\n $this->add([\n //'type' => 'number',\n 'type' => 'text',\n 'name' => 'id_commentDish',\n 'attributes'=>[\n 'id' => 'id__id_commentDish'\n ],\n 'options'=>[\n 'label' => 'id__id_commentDish',\n ]\n ]);\n \n //add reply\n $this->add([\n 'type' => 'checkbox',\n 'name' => 'reply',\n 'attributes'=>[\n 'id' => 'id_replay'\n ],\n 'options'=>[\n 'label' => 'Ответил',\n ]\n ]);\n \n //add foods/life\n $this->add([\n 'type' => 'checkbox',\n 'name' => 'foods-life',\n 'attributes'=>[\n 'id' => 'id_foods_life'\n ],\n 'options'=>[\n 'label' => 'Foods-Life',\n ]\n ]);\n \n //add reply_name\n $this->add([\n 'type' => 'text',\n 'name' => 'reply_name',\n 'attributes'=>[\n 'id' => 'id_reply_name'\n ],\n 'options'=>[\n 'label' => 'Reply Name'\n ]\n ]);\n \n //add the CSRF field\n $this->add([\n 'type' => 'csrf',\n 'name' => 'csrf',\n 'attributes' => [],\n 'options' => [\n 'csrf_options' => [\n 'timeout' => 601\n ],\n ],\n ]);\n \n //add the submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes'=>[\n 'value' => 'Комментировать',\n 'id' => 'submit_comment'\n ],\n ]);\n \n }", "title": "" }, { "docid": "7193ca5b720ed1121eb6dfef8dade8be", "score": "0.6352389", "text": "public function renderForm() {\n $this->_getElements();\n $this->_populateCategory();\n $this->activo->setValue(\"checked\");\n\n }", "title": "" }, { "docid": "989e1e23cf1367a99b49193aeca2d10d", "score": "0.6349054", "text": "abstract protected function buildForm();", "title": "" }, { "docid": "4f3d342af10a390173abd19440d64b7c", "score": "0.63343155", "text": "public function iconize_taxonomy_add_form_fields() {\n\t\t?>\n\t\t<div class=\"form-field\">\n\t\t\t<label class=\"preview-icon-label\">\n\t\t\t\t<?php _e( 'Icon: ', $this->plugin_slug ); ?><br /><button type=\"button\" class=\"preview-icon button iconized-hover-trigger\"><span class=\"iconized\"></span></button>\n\t\t\t</label>\n\t\t\t<span>\n\t\t\t\t<input type=\"hidden\" id=\"icon_name\" name=\"icon_name\" class=\"iconize-input-name\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_set\" name=\"icon_set\" class=\"iconize-input-set\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_transform\" name=\"icon_transform\" class=\"iconize-input-transform\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_color\" name=\"icon_color\" class=\"iconize-input-color\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_size\" name=\"icon_size\" class=\"iconize-input-size\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_align\" name=\"icon_align\" class=\"iconize-input-align\" value=\"\">\n\t\t\t\t<input type=\"hidden\" id=\"icon_custom_classes\" name=\"icon_custom_classes\" class=\"iconize-input-custom-classes\" value=\"\">\n\t\t\t</span>\n\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "2e2d63e463164639cb53840a7b692208", "score": "0.63068175", "text": "protected function formElements()\n\t\t{\n\t\t\t$this->addFormElement((new Text(\"name\", 'Menu text*'))->setClasses('half inline-label first')->addValidation(Element::REQUIRED), \"Content\");\n\t\t\t//$this->addFormElement((new Text(\"contentTitle\", 'Content Title'))->setClasses('inline-label half'), \"Content\");\n\n\t\t\tparent::formElements();\n\t\t\t// if(PAGE_BANNER)\n\t\t\t// {\n\t\t\t// \t$this->addFormElement(new ImageElement('bannerImage', 'Banner', $this->bannerImage), \"Content\");\n\t\t\t// }\n\n\t\t\t$this->addFormElement(new BasicEditor(\"contentTitle\", 'Content Title <span>(optional)</span>'), \"Content\");\n\n\t\t\t$this->addFormElement(new Editor(\"content\", 'Content'), \"Content\");\n\n\n\n\t\t\t// if(PAGE_BANNER_TEXT)\n\t\t\t// {\n\t\t\t// \t$this->addFormElement((new Text(\"bannerText\", 'Banner Text')), \"Content\");\n\t\t\t// }\n\n\t\t\t if(PAGE_AUX_IMAGE)\n\t\t\t {\n\t\t\t \t$this->addFormElement(new ImageElement('image', 'Image', $this->image), \"Content\");\n\t\t\t }\n\n\t\t\tif(PAGE_HAS_SLIDESHOW)\n\t\t\t{\n\t\t\t\t$this->addFormElement(new Checkbox(\"useSlideshow\", 'Display banner/slideshow'), \"Banner/Slideshow\");\n\t\t\t\t//\n\t\t\t\t// /** @var ImageProperty $imageProperty */\n\t\t\t\t$this->addFormElement(new GridElement('slides', 'Slides'), \"Banner/Slideshow\");\n\t\t\t}\n\n\t\t\t$this->addFormElement(new Text(\"title\", 'Page Title'), \"Metadata\");\n\t\t\t$this->addFormElement(new Textarea(\"keywords\", 'Keywords'), \"Metadata\");\n\t\t\t$this->addFormElement(new Textarea(\"description\", 'Description'), \"Metadata\");\n\t\t\t$this->addFormElement(new Select(\"module\", 'Page type', $this->getPageTypeOptions()), \"Setup\");\n\t\t\t$this->addFormElement(new SearchingText(\"parent\", 'Parent (\"Select none\" for top level pages)', $this->getParentSearchValues()), \"Setup\");\n\n\t\t\t$pageType = \"normalPage\";\n\n\t\t\tif($this->isExternalRedirect)\n\t\t\t{\n\t\t\t\t$pageType = \"externalLink\";\n\t\t\t}\n\t\t\telse if($this->isInternalRedirect)\n\t\t\t{\n\t\t\t\t$pageType = \"internalLink\";\n\t\t\t}\n\t\t\telse if($this->isDuplicate)\n\t\t\t{\n\t\t\t\t$pageType = \"duplicate\";\n\t\t\t}\n\n\t\t\t$this->addFormElement(new Radio(\"actsAs\", \"Acts as\",\n\t\t\t[\n\t\t\t\t\"Normal Page\" => \"normalPage\",\n\t\t\t\t\"External Link (enter URL below)\" => \"externalLink\",\n\t\t\t\t\"Internal Link (select page below)\" => \"internalLink\",\n\t\t\t\t\"Duplicate of (select page below)\" => \"duplicate\"\n\t\t\t], $pageType), \"Setup\");\n\n\t\t\t$this->addFormElement(new Text(\"redirect\", \"Redirect URL\", $this->redirect), \"Setup\");\n\t\t\t$this->addFormElement(new SearchingText(\"original\", \"Link to / Duplicate of\", $this->getOriginalSearchValues()), \"Setup\");\n\t\t\t$this->addFormElement(new Checkbox(\"onNav\", 'Display in main menu'), \"Setup\");\n\n\t\t\tif(SITE_SECONDARY_NAV)\n\t\t\t{\n\t\t\t\t$this->addFormElement(new Checkbox(\"onSecondaryNav\", 'Display in footer menu (Quicklinks)'), \"Setup\");\n\t\t\t}\n\n\t\t\t$this->addFormElement(new Checkbox('useNewWindow', 'Open in new browser tab'), \"Setup\");\n\t\t\t$this->addFormElement(new Checkbox('isHomepage', 'Set as Home page'), \"Setup\");\n\t\t\t$this->addFormElement(new Checkbox(\"isErrorPage\", 'Set as Error page'), \"Setup\");\n\t\t}", "title": "" }, { "docid": "5b83b3df00ccf709088570990e19a5b4", "score": "0.62680924", "text": "public function shivapghomeform() {\n\t \n $this->setMethod('post');\n\t\t\n\t\t$this->addElement('text', 'name', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'PG Name',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'name cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'location', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'location',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'location cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'rooms', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rooms',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n\t\t\t'type'=>'number',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Room field cannot be empty'\n )\n )), \n \t\t\t\t\n )\n ));\n\t\t\n\t\t$this->addElement('text', 'rent', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rent',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Rent field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Rent field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'address', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Address',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'address field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Address field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'balcony', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'balcony',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t\n\t\t$this->addElement('text', 'electricity', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'electricity',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'parking', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'parking',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'security', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'security',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'fireexit', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'fireexit',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'airconditioned', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'AC',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Sign In',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors',)\n ));\t\t\n\t }", "title": "" }, { "docid": "4a28010087c69e5cfce0166529387350", "score": "0.6258301", "text": "public function addAction() {\n\t\t$this->_helper->layout()->disableLayout();\n\n\t\t$labelRepo = $this->_entityManager->getRepository('Model\\Label');\n\t\t$taxiRepo = $this->_entityManager->getRepository('Model\\Taxi');\n\t\t$taxisArray = $taxiRepo->findByStatusArrayNumber(Taxi::WITHOUT_CAREER);\n\n\t\t$form = new Dis_Form_Ride();\n\t\t$form->getElement('taxi')->setMultiOptions($taxisArray);\n\t\t$form->getElement('label')->setMultiOptions($labelRepo->findAllArray());\n\n\t\t$this->view->form = $form;\n\t}", "title": "" }, { "docid": "ee19caab89ec7fc2fe44a07277a2fb04", "score": "0.62555057", "text": "function get_add_form()\n\t{\n\t\treturn $this->place_dyn_fields();\n\t}", "title": "" }, { "docid": "bbaeaebdf37f23474b35e03ed4f3175b", "score": "0.6251195", "text": "private function _get_add_form(&$data)\n\t{\n\t\t$data['input'] = array(\n\t\t\t'type' => 'text',\n\t\t\t'name' => 'add_entry',\n\t\t\t'maxlength' => 512\n\t\t);\n\t\tforeach($this->_allowed_types as $t)\n\t\t{\n\t\t\t$data['hidden_' . $t] = array(\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'name' => 'type',\n\t\t\t\t'value' => $t\n\t\t\t);\n\t\t}\n\n\t\t$data['submit'] = array(\n\t\t\t'type' => 'submit',\n\t\t\t'name' => 'submit',\n\t\t\t'value' => 'Add',\n\t\t\t'class' => 'one-line'\n\t\t);\n\t}", "title": "" }, { "docid": "5f519ec21d284280cbd8d2ccd4d2f252", "score": "0.62491816", "text": "public function add()\n {\n return $this->form();\n }", "title": "" }, { "docid": "7fc2ee30a5eeb3127dc975c917b4c99d", "score": "0.62436855", "text": "function build_creation_form()\n {\n \n if (! $this->isSubmitted())\n {\n unset($_SESSION['mc_number_of_options']);\n unset($_SESSION['mc_skip_options']);\n }\n \n if (! isset($_SESSION['mc_number_of_options']))\n {\n $_SESSION['mc_number_of_options'] = 1;\n }\n \n if (! isset($_SESSION['mc_skip_options']))\n {\n $_SESSION['mc_skip_options'] = array();\n }\n \n if (isset($_POST['add']))\n {\n $_SESSION['mc_number_of_options'] = $_SESSION['mc_number_of_options'] + 1;\n }\n if (isset($_POST['remove']))\n {\n $indexes = array_keys($_POST['remove']);\n $_SESSION['mc_skip_options'][] = $indexes[0];\n }\n \n $number_of_options = intval($_SESSION['mc_number_of_options']);\n \n for($option_number = 0; $option_number < $number_of_options; $option_number ++)\n {\n if (! in_array($option_number, $_SESSION['mc_skip_options']))\n {\n $group = array();\n $group[] = $this->add_name_field($option_number);\n if ($number_of_options - count($_SESSION['mc_skip_options']) > 1)\n {\n $group[] = $this->createElement('image', 'remove[' . $option_number . ']', Theme :: get_common_image_path() . 'action_list_remove.png', array('style=\"border: 0px;\"'));\n }\n $this->addGroup($group, PlatformCategory :: PROPERTY_NAME . $option_number, Translation :: get('CategoryName'), '', false);\n $this->addRule(PlatformCategory :: PROPERTY_NAME . $option_number, Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\n }\n }\n \n $this->addElement('image', 'add[]', Theme :: get_common_image_path() . 'action_list_add.png', array('style=\"border: 0px;\"'));\n $this->build_footer('Create');\n }", "title": "" }, { "docid": "89aab787d94087f9ea133af5b8a12c7f", "score": "0.6220882", "text": "public function setForm(){\n\t\t$translator = Zend_Registry::get('Zend_Translate');\n\t\t$this->setMethod('post');\n\t\t \n\t\t$this->addElement('text', 'name', array (\n\t\t\t'label' => 'applicantStatusName',\n\t\t\t'required' => true,\n\t\t\t'filters' => array ( 'StringTrim' ),\n\t\t\t'validators' => array (array ('validator' => 'StringLength','options' => array (1,50)))));\n\n\t\t$this->getElement('name')->setAttrib('class','inputAccesible');\n\t\t$this->getElement('name')->addPrefixPath('ZFForm_Decorator','ZFForm/Decorator','decorator');\n\t\t$this->getElement('name')->setDecorators(array('FieldsetForm'));\n\n\n\t\t$this->addElement('submit', 'submit', array ('ignore' => true,'label' => 'save',));\n\t\t$this->getElement('submit')->setAttrib('class','submit');\n\t\t$this->getElement('submit')->addPrefixPath('ZFForm_Decorator','ZFForm/Decorator','decorator');\n\t\t$this->getElement('submit')->setDecorators(array('FieldsetForm'));\n\n\t\t$this->addDisplayGroup(array(\n 'name', \n\t\t 'submit'\n \n\t\t ),'createAmenity',array('legend' => $this->getLegend()));\n\n\t\t $this->getDisplayGroup('createAmenity')->setDecorators(array(\n 'FormElements',\n 'Fieldset', \n\t\t ));\n\t}", "title": "" }, { "docid": "e99cf996303a40f6345fe98f846b466d", "score": "0.62142414", "text": "public function init()\r\n\t{\r\n\t\t$this->setMethod('post');\r\n\t\t$this->setAttrib('class', 'inline-form');\r\n\r\n\t\t$this->addElement('text', 'email_address', array(\r\n\t\t\t'label'\t\t\t=> 'Email address:',\r\n\t\t\t'required'\t\t=> true,\r\n\t\t\t'filters'\t\t=> array('StringTrim'),\r\n\t\t\t'validators'\t=> array(\r\n\t\t\t\t'EmailAddress',\r\n\t\t\t)\r\n\t\t));\r\n\t\t\r\n\t\t$this->addElement('password', 'old_password', array(\r\n\t\t\t'label'\t\t\t=> 'Old Password:',\r\n\t\t\t'required'\t\t=> true,\r\n\t\t\t'filters'\t\t=> array('StringTrim'),\r\n\t\t\t'validators'\t=> array()\r\n\t\t));\r\n\t\t\r\n\t\t$this->addElement('password', 'new_password', array(\r\n\t\t\t'label'\t\t\t=> 'New Password:',\r\n\t\t\t'required'\t\t=> true,\r\n\t\t\t'filters'\t\t=> array('StringTrim'),\r\n\t\t\t'validators'\t=> array()\r\n\t\t));\r\n\t\t\r\n\t\t$this->addElement('password', 'new_password_again', array(\r\n\t\t\t'label'\t\t\t=> 'New Password Again:',\r\n\t\t\t'required'\t\t=> true,\r\n\t\t\t'filters'\t\t=> array('StringTrim'),\r\n\t\t\t'validators'\t=> array()\r\n\t\t));\r\n\t\t\r\n\t\t$this->addDisplayGroup(array('email_address', 'old_password', 'new_password', 'new_password_again'), 'user_info', array(\r\n\t\t\t'decorators' => array(\r\n\t\t\t\t'Description', \r\n\t\t\t\t'FormElements', \r\n\t\t\t\tarray('Fieldset'),\r\n\t\t\t)\r\n\t\t));\r\n\r\n\t\t// Add the submit button\r\n\t\t$this->addElement('button', 'submit', array(\r\n\t\t\t'type' => 'submit',\r\n\t\t\t'ignore'\t=> true,\r\n\t\t\t'label'\t\t=> 'Save',\r\n\t\t\t'decorators' => array('ViewHelper')\r\n\t\t));\r\n\t\t\r\n\t\t$this->addDisplayGroup(array('submit'), 'buttons1', array(\r\n\t\t\t'decorators' => array(\r\n\t\t\t\t'FormElements', \r\n\t\t\t\tarray('HtmlTag', array('tag' => 'div', 'class' => 'buttons')),\r\n\t\t\t)\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "51c454dd689d5444338acde9eac4a221", "score": "0.62009704", "text": "function build_basic_form()\r\n {\r\n $this->addElement('html', '<div style=\"float: left;width: 100%;\">');\r\n\r\n $this->addElement('html', '<div class=\"configuration_form\">');\r\n $this->addElement('html', '<span class=\"category\">' . Translation :: get('Required', null, Utilities :: COMMON_LIBRARIES) . '</span>');\r\n\r\n // Name\r\n $this->addElement('text', Category :: PROPERTY_NAME, Translation :: get('Name'));\r\n $this->addRule(Category :: PROPERTY_NAME, Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n\r\n $this->addElement('checkbox', Category :: PROPERTY_POOL, Translation :: get('Pool'));\r\n //$this->addRule(Category :: PROPERTY_POOL, Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n\r\n\r\n // Submit button\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Save', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n\r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n\r\n $this->addElement('html', '<div style=\"clear: both;\"></div>');\r\n $this->addElement('html', '</div></div>');\r\n }", "title": "" }, { "docid": "426302f00a59b5b9c08b5d78d197fd8e", "score": "0.61841244", "text": "public function render() {\n\t\t$this->wrap('form',$this->attrs);\n\t\tparent::render();\n\t}", "title": "" }, { "docid": "9bd448daef3795c2cb9e49120f8a16ba", "score": "0.6183329", "text": "function addForm()\n {\n $this->getState()->template = 'displayprofile-form-add';\n }", "title": "" }, { "docid": "c9d9c0a924ad31ace6a626ebf2de670e", "score": "0.61779153", "text": "public function add_fields() {\n\t\tforeach ( $this->options as $id => $option ) {\n\t\t\t$this->metabox->add_field( $option );\n\t\t}\n\t}", "title": "" }, { "docid": "83373500ad543400ee2bdd20523af04d", "score": "0.6177236", "text": "protected function populateForm()\r\n {\r\n $uloha = $this->pageParameters->getUloha(); \r\n $basePath = $this->pageParameters->getBasePath();\r\n $zobrazujZvoleneOdpovedi = $this->populatorParameters->getZobrazujZvoleneOdpovedi();\r\n \r\n $this->addTabs( $uloha->getNavigace()->getNapis() ); \r\n $this->form->setAttribute('action', $basePath . $this->pageParameters->getFormActionNav());\r\n \r\n $otazka = $uloha->getOtazka();\r\n /* @var $fieldset \\HTML\\QuickForm2 */ \r\n $fieldset = $this->form->addElement('fieldset')->setLabel($otazka->getLegend());\r\n $imgFileName = $otazka->getZadani()->getObsah()->getImgFileName();\r\n if ($imgFileName) {\r\n //toto vytvori odkaz na obrazek\r\n //$fieldset->addElement('image', 'img'. $imgFileName , array('src' => $basePath.self::IMAGES_PATH . $imgFileName) ); \r\n \r\n $obrazek = $fieldset->addElement('static', 'obrazek');\r\n $obrazek->setContent( \"<img src='\" . $basePath.self::IMAGES_PATH . $imgFileName . \"' />\");\r\n //$obrazek->setLabel( \"<img src='\" . $basePath.self::IMAGES_PATH . $imgFileName . \"' />\");\r\n $obrazek->setLabel( \"Obrázek k úloze \" . $uloha->getNavigace()->getNapis() . \":\" );\r\n }\r\n \r\n \r\n $zadani = $fieldset->addElement('static', 'zadani')\r\n ->setLabel($uloha->getOtazka()->getZadani()->getObsah()->getLabel())\r\n ->setContent($uloha->getOtazka()->getZadani()->getObsah()->getText()); \r\n \r\n $radioGroup = $fieldset->addElement('group')\r\n ->setLabel($uloha->getOtazka()->getZadani()->getOdpoved()->getData()->getLabel() ) \r\n ->setSeparator('<br/>');\r\n \r\n //-------------------------- radia ------------\r\n if ($uloha->getOtazka()->getZadani()->getOdpoved()->getType()== 'radia' ) {\r\n \r\n foreach ($uloha->getOtazka()->getZadani()->getOdpoved()->getData()->getContent() as $key => $value ) { \r\n //---- ziskani spravne odpovedi pro radia, - pro jine mozna jinak\r\n $valueZobrazovaci = $value;\r\n if ($uloha->getOtazka()->getZadani()->getOdpoved()->getType() == 'radia' ) { \r\n\r\n //$C = $this->getController(); // page tabeddTesterovyController // $Id = $C->getId(); // Id tabbedu je 'Tabbed'\r\n $odpovediZTabbedControlleruArray = $this->getController()->getValue(); //pole odpovedi \r\n $okOdpoved = $uloha->getOtazka()->getZadani()->getOdpoved()->getData()->getOk(); \r\n \r\n // $parPopul = $this->populatorParameters;\r\n $IdUloha = $this->pageParameters->getIdUloha(); \r\n if ($zobrazujZvoleneOdpovedi) {\r\n if (isset ($odpovediZTabbedControlleruArray[$IdUloha]) ) {\r\n if ( ($key == $odpovediZTabbedControlleruArray [$IdUloha]) ) { \r\n if ($key == $okOdpoved) {\r\n $valueZobrazovaci .= '<span class=\"spravnaVolba\"> vaše volba </span>' ; \r\n }else {\r\n $valueZobrazovaci .= '<span class=\"vaseVolba\"> vaše volba - chyba</span>' ; } \r\n } \r\n } \r\n if ( ($key == $okOdpoved) ) { \r\n $valueZobrazovaci .= '<span class=\"spravnaVolba\"> správná volba </span> ' ; \r\n } \r\n } //vypisovane informace patri do parametru - asi ulohy\r\n \r\n $el = $radioGroup/*$elpara*/->addElement('group');\r\n $el->addElement('hidden');\r\n $el->addElement('radio',\r\n $this->pageParameters->getIdUloha(), /*tj. name inputu*/ \r\n array( 'value' => $key ), \r\n array( 'content' => $valueZobrazovaci ) ); /* to da do <label></label>*/\r\n }\r\n //$el->\r\n } //foreach\r\n \r\n \r\n }\r\n \r\n \r\n if (!$this->populatorParameters->getJenCist()) {\r\n if (!$this->populatorParameters->getBezPravidel()) {\r\n $radioGroup->addRule('required', 'Vyberte jednu odpověď!');\r\n } \r\n //tlacitko Pokracuj\r\n if (!$this->populatorParameters->getBezPravidel()) {\r\n $this->addGlobalSubmit( $basePath . $this->getPageParameters()->getFormActionSubmit() );\r\n }\r\n }\r\n \r\n }", "title": "" }, { "docid": "b7f4747df22ac2c1f35c2b21329ed965", "score": "0.6163771", "text": "private function build_basic_form()\r\n {\r\n \r\n $this->add_select(InternshipOrganizerRegionManager :: PARAM_REGION_ID, Translation :: get('Region'), $this->get_regions());\r\n \r\n if ($this->import_type == null)\r\n {\r\n $this->add_select('type', Translation :: get('Type'), $this->get_types());\r\n }\r\n else\r\n {\r\n $this->addElement('hidden', 'type');\r\n }\r\n \r\n $this->addElement('file', self :: IMPORT_FILE_NAME, Translation :: get('FileName'));\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import'), array('class' => 'positive import'));\r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "title": "" }, { "docid": "f2f0096c49653be5fe6250dfc8d6c8f7", "score": "0.6162103", "text": "function getNewForm($cmd_pc=NULL) {\n $arg=null;\n $temp=new PieceTemplate($arg,$cmd_pc->getPiece());\n $this->form->addElement($temp->getModel());\n \n $p_add=new P();\n $l_add=new Label('');\n $l_add->addElement(new Text('Nouvelle offre'));\n $add=new Input();\n $add->setAttribute('class','add-piece');\n $add->setAttribute('name','add-piece');\n $add->setAttribute('type','submit');\n $add->setAttribute('value','+'); \n $p_add->addElements(Array($add,$l_add));\n $this->form->addElement($p_add);\n }", "title": "" }, { "docid": "99d3ff256d02bd2492e0d03a26bc06d7", "score": "0.61593413", "text": "function add(){\n\t\t$data = $this->get_data();\n\t\tif(isset($this->noAjax)):\n\t\t\t$this->layout->view('echocms/forms/'.$this->tbl_name, $data);\n\t\telse:\n\t\t\t$this->load->view('echocms/forms/'.$this->tbl_name, $data);\n\t\tendif;\n\t}", "title": "" }, { "docid": "0e5f5de3959f8ff8ae4e45271e6eff8e", "score": "0.6156812", "text": "function build_editing_form()\n {\n $this->addElement($this->add_name_field());\n $this->addElement('hidden', PlatformCategory :: PROPERTY_ID);\n $this->build_footer('Update');\n }", "title": "" }, { "docid": "ad266df58ea293dc5243111c7d7fbe79", "score": "0.6150983", "text": "function formAdd(){\n\t$html = '\n\t\t\t<!-- No edit the next line -->\n\t\t\t<form method=\"post\" name=\"f\" id=\"f\">\n\t\t\t\n\t\t\t<table border=\"1\" width=\"100%\" class=\"adminlist\">\n\t\t\t<tr>\n\t\t\t\t<td nowrap align=\"left\">No, de APD*</td>\n\t\t\t\t<td align=\"left\">\n\t\t\t\t<input type=\"text\" id=\"apd\" name=\"apd\" size=\"5\">\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap align=\"left\">UID*</td>\n\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"uid\" name=\"uid\" size=\"15\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\" align=\"center\"><button id=\"submitButton\" onClick=\\'xajax_save(xajax.getFormValues(\"f\"));return false;\\'>Continue</button></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</form>\n\t\t\t* Obligatory fields\n\t\t\t';\n\t\t\n\t\treturn $html;\n\t\t/*\n\t\t\t\t$arreglo = APDUser::getAllAPD();\n\t\t\t\twhile($row = $arreglo->fetchRow()){\n\t\t\t\t\t$html .= '<option value=\"'.$row['apd'].'\">'.$row['apd'].'</option>';\n\t\t\t\t}*/\n\t}", "title": "" }, { "docid": "ffa5b5ff61d4daf9d2eb75fdaeeb82fa", "score": "0.61492795", "text": "public function add_elements_to_form($attributes)\n {\n $attributes['class'] = 'checkbox';\n\n $title = ($this->show_title) ? $this->_translate($this->_field['title']) : '';\n\n if (is_array($this->jsevents)) {\n $attributes = array_merge($attributes, $this->jsevents);\n }\n\n $this->_form->addElement('checkbox', $this->name, $title, $this->description, $attributes);\n }", "title": "" }, { "docid": "d22effc1a18786b27b620afd4a1cfe2e", "score": "0.6129021", "text": "public function addform()\n\t{\n $this->setMethod('post');\n\n $this->addElement('text', 'title', array( \t\t\t\n 'required' => true,\n\t\t\t 'class' => 'validate[required] text-input',\n 'filters' => array('StringTrim'),\n\t\t\t'maxlength' => '100',\n\n\t\t\t\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors'\n\t\t ),\n 'validators' => array(\n\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Project name can\\'t be empty'\n )\n )),\n array('Regex',\n false,\n array('/^[a-z][a-z0-9., \\'-]{0,}$/i', 'messages'=>array(\n'regexNotMatch'=>'Project name field has special characters.Please remove them and try again.')))\n ),\n\n \n ));\n\t\t\n\t\t$this->addElement('textarea', 'details', array( \t\t\t\n \n\t\t\t 'class' => 'validate[required] text-input',\n 'filters' => array('StringTrim'),\n\t\t\t\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors'\n\t\t ),\n \n\n \n ));\t\n\t\t// $this->addElement('text', 'plan_of_act', array(\n // 'label' => '',\n // 'id' => 'plan_of_act',\n\t\t// \t'filters' => array('StringTrim'),\n \t\t\t\n\t\t// \t'decorators'=>Array(\n\t\t// \t'ViewHelper',\n\t\t// \t'Errors',\n\t\t\t\n\t\t// ),\n\t\t\t\n \n \n // ));\n\t\t\n\t // $role_collect = new Zend_Form_Element_Select('customer',array( \t\t\t\n \n\t\t \n // 'label' => '',\n\t\t// 'required' => true,\n // 'multiOptions' => array(\n // '0' => 'Select Customer',\n \n // ),\n\t\t\t\n\t\t// 'decorators'=>Array(\n\t\t// \t'ViewHelper','Errors'\n\t\t// ),\n\t\t\n\t\t// ));\n\n\n // $required = new Zend_Validate_NotEmpty ();\n // $required->setType ($required->getType() | Zend_Validate_NotEmpty::INTEGER | Zend_Validate_NotEmpty::ZERO);\n\t\t// \t$role_collect->addValidators (array ($required));\n \n // $role = new Application_Model_Project; \n\t // \t$showrolename = $role->roleuser();\n\t\t// $showdetails = $role->edituserclient($_GET['id']);\n\t\t\n\t\t// //echo \"<pre>\";\n\t\t// \t\t//print_r($showrolename);\n\t\t// \t\t//echo \"</pre>\";\n\t\t// \t\t//die;\n\n\t\t\n \n\t\t// foreach($showrolename as $key => $value)\n\t\t// \t{\n\t\t// \t$name = $value['organisation'];\n\t\t\t\n\t\t// \t$role_collect->addMultiOption($value['id'], $name);\n\t\t\n\t\t// \t}\n\n \n\t\t\n\t\t\n\t\t\n\t\t// $role_collect->setValue($showdetails['customer_id']);\n\n // $this->addElement($role_collect);\n\t\t\n\t\t\n\t\t\n\t\t// // date picker.......\n\t\t\n\t\t// \t // Start Date input box\n\t\t// $this->addElement('text', 'start_date', array(\n // 'label' => '',\n // 'id' => 'projectdate',\n\t\t// \t'filters' => array('StringTrim'),\n // 'class' => 'button',\n\t\t// \t'style' => array('width:100px'),\n\t\t// \t'attribs' => array('readonly' => 'true'),\n\t\t// \t 'autocomplete' => 'off',\n\t\t// \t'decorators'=>Array(\n\t\t// \t'ViewHelper',\n\t\t// \t'Errors',\n\t\t\t\n\t\t// ),\n\t\t\t\n \n \n // ));\n\n\n\t\t// $this->addElement('text', 'end_date', array(\n // 'label' => '',\n // 'id' => 'projectdate1',\n // 'filters' => array('StringTrim'),\n // 'class' => 'button',\n\t\t// \t'style' => array('width:100px'),\n\t\t// \t'attribs' => array('readonly' => 'true'),\n\t\t// \t 'autocomplete' => 'off',\n\t\t// \t'decorators'=>Array(\n\t\t// \t'ViewHelper',\n\t\t// \t'Errors',\n\t\t\t\n\t\t// ),\n\t\t\n \n \n // ));\n\t\t \n // Add the submit button\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Submit',\n ));\n\n // And finally add some CSRF protection\n $this->addElement('hash', 'csrf', array(\n 'ignore' => true,\n ));\n\n\t\t\n\t}", "title": "" }, { "docid": "4ee35f501eaf750ab9580d61732bdd76", "score": "0.612098", "text": "public function setForm() {\n\t\t$this->setMethod('post');\n\t\tif( $this->getIsAdmin() )\n\t\t$this->addUnits();\n\t\t$this->addTitle();\n\t\t$this->addDescription();\n\t\t$this->addPermissionToEnter();\n\t\t$this->addSubmitButton();\n\n\t\t$this->addDisplayGroup($this->displayGroupArray,\n\t\t\t\t 'createMaintenanceRequest',\n\t\tarray('legend' => $this->getLegend()));\n\t\t$this->getDisplayGroup('createMaintenanceRequest')->setDecorators(array('FormElements','Fieldset'));\n\t}", "title": "" }, { "docid": "226528ab273f08f7de338628cc44b7be", "score": "0.6115206", "text": "public function addAdditionalFormElements(&$form, $form_fields)\r\n\t{\r\n\t\tglobal $lng;\r\n\t\t/*$short_name = new ilTextInputGUI($lng->txt(\"certificate_short_name\"), \"short_name\");\r\n\t\t$short_name->setRequired(TRUE);\r\n\t\trequire_once \"./Services/Utilities/classes/class.ilStr.php\";\r\n\t\t$short_name->setValue(strlen($form_fields[\"short_name\"]) ? $form_fields[\"short_name\"] : ilStr::subStr($this->object->getTitle(), 0, 30));\r\n\t\t$short_name->setSize(30);\r\n\t\tif (strlen($form_fields[\"short_name\"])) {\r\n\t\t\t$short_name->setInfo(str_replace(\"[SHORT_TITLE]\", $form_fields[\"short_name\"], $lng->txt(\"certificate_short_name_description\")));\r\n\t\t} else {\r\n\t\t\t$short_name->setInfo($lng->txt(\"certificate_short_name_description\"));\r\n\t\t}\r\n\t\tif (count($_POST)) $short_name->checkInput();\r\n\t\t$form->addItem($short_name);\r\n\r\n\t\t$visibility = new ilCheckboxInputGUI($lng->txt(\"certificate_enabled_scorm\"), \"certificate_enabled_scorm\");\r\n\t\t$visibility->setInfo($lng->txt(\"certificate_enabled_scorm_introduction\"));\r\n\t\t$visibility->setValue(1);\r\n\t\tif ($form_fields[\"certificate_enabled_scorm\"])\r\n\t\t{\r\n\t\t\t$visibility->setChecked(TRUE);\r\n\t\t}\r\n\t\tif (count($_POST)) $visibility->checkInput();\r\n\t\t$form->addItem($visibility);*/\r\n\t}", "title": "" }, { "docid": "2b241ce8301a20e38562fe8755ad06f6", "score": "0.6108706", "text": "function add()\n\t{\t\t\t\n\t\t$this->data['data'] = $_POST;\n\t\t$this->data['widgettext'] = 'Add New ' . cms_depluralize($this->data['table']);\n\t\t$this->data['helpertext'] = 'To add a new ' . cms_depluralize($this->data['table']) . ' fill out the field below and click \"save\"';\n\t\t$this->data['type'] = 'add';\n\t\t\n\t\t$this->_add_edit_shared_func();\n\t}", "title": "" }, { "docid": "faab9d15b9fc161a4db8a8f7c1ff9a29", "score": "0.61036026", "text": "public function buildFormFields()\n {\n }", "title": "" }, { "docid": "e70ad8bd15fd639407eca4a7f4c21c8a", "score": "0.60924494", "text": "function formAdd(){\n\t$html = '\n\t\t\t<!-- No edit the next line -->\n\t\t\t<form method=\"post\" name=\"f\" id=\"f\">\n\t\t\t\n\t\t\t<table border=\"1\" width=\"100%\" class=\"adminlist\">\n\t\t\t<tr>\n\t\t\t\t<td nowrap align=\"left\">Kode *</td>\n\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"v_kode\" name=\"v_kode\" size=\"35\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td nowrap align=\"left\">Nama Poliklinik *</td>\n\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"v_nama\" name=\"v_nama\" size=\"35\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\" align=\"center\"><button id=\"submitButton\" onClick=\\'xajax_save(xajax.getFormValues(\"f\"));return false;\\'>Simpan</button></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</form>\n\t\t\t* Tidak boleh kosong\n\t\t\t';\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "7ff93e0946e8fa923aa4864d0e95bd1e", "score": "0.6082414", "text": "protected function getInput()\n {\n $values = $this->value;\n\n if (is_string($values) && !empty($values)) {\n $values = json_decode(htmlspecialchars_decode($this->value), true);\n }\n\n // cast to array\n $values = (array) $values;\n\n // default\n if (empty($values)) {\n $values = array(\n array(\n 'name' => '',\n 'value' => '',\n ),\n );\n }\n\n $subForm = new JForm($this->name, array('control' => $this->formControl));\n $children = $this->element->children();\n\n $subForm->load($children);\n $subForm->setFields($children);\n\n $fields = $subForm->getFieldset();\n\n // And finaly build a main container\n $str = array();\n\n foreach ($values as $value) {\n $str[] = '<div class=\"form-field-repeatable-item wf-keyvalue\">';\n $str[] = ' <div class=\"form-field-repeatable-item-group well well-small p-2 bg-light\">';\n\n $n = 0;\n\n foreach ($fields as $field) {\n $field->element['multiple'] = true;\n\n $name = (string) $field->element['name'];\n\n $val = is_array($value) && isset($value[$name]) ? $value[$name] : '';\n \n // escape value\n $field->value = htmlspecialchars_decode($val);\n\n $field->setup($field->element, $field->value, $this->group);\n\n // reset id\n $field->id .= '_' . $n;\n\n // reset name\n $field->name = $name;\n\n $str[] = $field->renderField();\n \n $n++;\n }\n\n $str[] = ' </div>';\n\n $str[] = ' <div class=\"form-field-repeatable-item-control\">';\n $str[] = ' <button class=\"btn btn-link form-field-repeatable-add\" aria-label=\"' . JText::_('JGLOBAL_FIELD_ADD') . '\"><i class=\"icon icon-plus pull-right float-right\"></i></button>';\n $str[] = ' <button class=\"btn btn-link form-field-repeatable-remove\" aria-label=\"' . JText::_('JGLOBAL_FIELD_REMOVE') . '\"><i class=\"icon icon-trash pull-right float-right\"></i></button>';\n $str[] = ' </div>';\n\n $str[] = '</div>';\n }\n\n $str[] = '<input type=\"hidden\" name=\"' . $this->name . '\" value=\"' . htmlspecialchars($this->value) . '\" />';\n\n return implode(\"\", $str);\n }", "title": "" }, { "docid": "685d268ad9bfbfe0b5a0c714fa74969d", "score": "0.6073127", "text": "protected function loadForm(): void\n {\n // is the form submitted?\n if ($this->form->isSubmitted()) {\n $this->loadValuesOfDisabledFields();\n }\n\n // add page title elements into the form\n $this->form->addCheckbox(\n 'page_title_overwrite',\n isset($this->data['title_overwrite']) && $this->data['title_overwrite']\n );\n $this->form->addText('page_title', $this->data['title'] ?? null);\n\n // add meta description elements into the form\n $this->form->addCheckbox(\n 'meta_description_overwrite',\n isset($this->data['description_overwrite']) && $this->data['description_overwrite']\n );\n $this->form->addText(\n 'meta_description',\n $this->data['description'] ?? null\n );\n\n // add meta keywords elements into the form\n $this->form->addCheckbox(\n 'meta_keywords_overwrite',\n isset($this->data['keywords_overwrite']) && $this->data['keywords_overwrite']\n );\n $this->form->addText('meta_keywords', $this->data['keywords'] ?? null);\n\n // add URL elements into the form\n $this->form->addCheckbox(\n 'url_overwrite',\n isset($this->data['url_overwrite']) && $this->data['url_overwrite']\n );\n $this->form->addText('url', isset($this->data['url']) ? urldecode($this->data['url']) : null);\n\n // add canonical URL elements into the form\n $this->form->addCheckbox(\n 'canonical_url_overwrite',\n $this->getCanonicalUrlOverwrite()\n );\n $this->form->addText(\n 'canonical_url',\n $this->getCanonicalUrl()\n );\n\n // advanced SEO\n $indexValues = [\n ['value' => 'none', 'label' => BackendLanguage::getLabel('None')],\n ['value' => 'index', 'label' => 'index'],\n ['value' => 'noindex', 'label' => 'noindex'],\n ];\n $this->form->addRadiobutton(\n 'seo_index',\n $indexValues,\n $this->data['seo_index'] ?? 'none'\n );\n $followValues = [\n ['value' => 'none', 'label' => BackendLanguage::getLabel('None')],\n ['value' => 'follow', 'label' => 'follow'],\n ['value' => 'nofollow', 'label' => 'nofollow'],\n ];\n $this->form->addRadiobutton(\n 'seo_follow',\n $followValues,\n $this->data['seo_follow'] ?? 'none'\n );\n\n // should we add the meta-custom field\n if ($this->custom) {\n // add meta custom element into the form\n $this->form->addTextarea('meta_custom', $this->data['custom'] ?? null);\n }\n\n $this->form->addHidden('meta_id', $this->id);\n $this->form->addHidden('base_field_name', $this->baseFieldName);\n $this->form->addHidden('custom', $this->custom);\n $this->form->addHidden('class_name', $this->callback['class']);\n $this->form->addHidden('method_name', $this->callback['method']);\n $this->form->addHidden('parameters', \\SpoonFilter::htmlspecialchars(serialize($this->callback['parameters'])));\n }", "title": "" }, { "docid": "8d3bf5d8c14a1d41ad399c6c86095e80", "score": "0.6070231", "text": "public function registerform() {\n $this->setMethod('post');\n\t\t $this->addElement('text', 'name', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'Name',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Name cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t$this->addElement('text', 'emailaddress', array(\n 'required' => true,\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n\t\t\t'placeholder' => 'Email',\n 'class' => 'form-control',\n\t\t\t'field'=>'email',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Email field cannot be empty'\n )\n )),\n array('Regex',\n false,\n array('/^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+$/', 'messages'=>array(\n'regexNotMatch'=>'Email field has special characters.Please remove them and try again.')))\n \t\t\t\t\t\n ),\n ));\n\t\t $this->addElement('text', 'contactno', array(\n 'required' => true,\n\t\t\t'placeholder' => 'MobileNumber',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n\t\t\t'type'=>'number',\n 'filters' => array('StringTrim'),\n 'maxlength' => '20',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Contact field cannot be empty'\n )\n )), \n \t\t\t\t\n )\n ));\n\t\t$this->addElement('text', 'address', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Address',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'address field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Address field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('password', 'password', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'Password',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Password cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t\n\t\t$this->addElement('password', 'repeatpassword', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'Repeat Password',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Repeat Password cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Sign In',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors',)\n ));\t\t\n\t }", "title": "" }, { "docid": "8fbb267e406257fb232ddff1a53b20fd", "score": "0.606389", "text": "public function write() {\n\t\tforeach($this->formInfo['fields'] as $field) {\n\t\t\tswitch($field['type']) {\n\t\t\t\tcase 'checkbox':\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif($field['error']) {\n\t\t\t\t\t\t$this->form .= '<div class=\"has-error\">';\n\t\t\t\t\t}\n\t\t\t\t\t$this->form .= '<div class=\"'.$field['type'].'\"><label>';\n\t\t\t\t\t$this->form .= '<input type=\"'.$field['type'].'\" id=\"'.$field['id'].'\" name=\"'.$field['id'].'\" /> '.$field['label'];\n\t\t\t\t\t$this->form .= '</label></div>';\n\t\t\t\t\tif($field['error']) {\n\t\t\t\t\t\t$this->form .= '</div>';\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\t$this->form .= '<div class=\"form-group'.(($field['error']) ? ' has-error': '').'\">';\n\t\t\t\t\t$this->form .= '<label for=\"'.$field['id'].'\">'.$field['label'].'</label>';\n\t\t\t\t\t$this->form .= '<select id=\"'.$field['id'].'\" name=\"'.$field['id'].'\" class=\"form-control\">';\n\t\t\t\t\tforeach($field['options'] as $val => $option) {\n\t\t\t\t\t\t$this->form .= '<option value=\"'.$val.'\">'.$option.'</option>';\t\n\t\t\t\t\t}\n\t\t\t\t\t$this->form .= '</select>';\n\t\t\t\t\tif(!empty($field['helptext'])) {\n\t\t\t\t\t\t$this->form .= '<p class=\"help-block\" id=\"'.$field['id'].'\">'.$field['helptext'].'</p>';\t\n\t\t\t\t\t}\n\t\t\t\t\t$this->form .= '</div>';\n\t\t\t\tbreak;\n\t\t\t\tcase 'hidden':\n\t\t\t\t\t$this->form .= '<input type=\"hidden\" id=\"'.$field['id'].'\" name=\"'.$field['id'].'\" value=\"'.$field['value'].'\" />';\n\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t$this->form .= '<div class=\"form-group'.(($field['error']) ? ' has-error': '').'\">';\n\t\t\t\t\t$this->form .= '<label for=\"'.$field['id'].'\">'.$field['label'].'</label>';\n\t\t\t\t\t$this->form .= '<textarea id=\"'.$field['id'].'\" name=\"'.$field['id'].'\" class=\"form-control\" rows=\"'.$field['rows'].'\"></textarea>';\n\t\t\t\t\tif(!empty($field['helptext'])) {\n\t\t\t\t\t\t$this->form .= '<p class=\"help-block\" id=\"'.$field['id'].'\">'.$field['helptext'].'</p>';\t\n\t\t\t\t\t}\n\t\t\t\t\t$this->form .= '</div>';\n\t\t\t\tbreak;\n\t\t\t\tcase 'submit':\n\t\t\t\t\t$this->form .= '<button type=\"submit\" class=\"btn btd-default\">'.$field['label'].'</button>';\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->form .= '<div class=\"form-group'.(($field['error']) ? ' has-error': '').'\">';\n\t\t\t\t\t$this->form .= '<label for=\"'.$field['id'].'\">'.$field['label'].'</label>';\n\t\t\t\t\t$this->form .= '<input type=\"'.$field['type'].'\" id=\"'.$field['id'].'\" name=\"'.$field['id'].'\"';\n\t\t\t\t\tif($field['type'] != 'file') {\n\t\t\t\t\t\t$this->form .= ' class=\"form-control\" placeholder=\"'.$field['placeholder'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif(isset($field['value']) && !empty($field['value'])) {\n\t\t\t\t\t\t$this->form .= ' value=\"'.$field['value'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->form .= ' />';\n\t\t\t\t\tif(!empty($field['helptext'])) {\n\t\t\t\t\t\t$this->form .= '<p class=\"help-block\" id=\"'.$field['id'].'\">'.$field['helptext'].'</p>';\t\n\t\t\t\t\t}\n\t\t\t\t\t$this->form .= '</div>';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\techo $this->form.'</form>';\n\t}", "title": "" }, { "docid": "8be74d948e3d9f87d03d36ebde918e03", "score": "0.6025745", "text": "public function buildFormLayout(): void\n {\n $this->addColumn(12, function (FormLayoutColumn $column) {\n $column->withFields('first_name|6','name|6', 'email|6', 'pseudo|6', 'role_id|6');\n });\n }", "title": "" }, { "docid": "e9c1f69a0116c5b21568453f196438e6", "score": "0.6014444", "text": "public function buildForm()\n {\n $this->addSelect('code', $this->getCodeList('GeographicLocationClass', 'Activity'), trans('elementForm.code'), $this->addHelpText('Activity_Location_LocationClass-code'), null, true);\n }", "title": "" }, { "docid": "0bc09a99351555b6b501a7d8c70bffae", "score": "0.6014339", "text": "public function nikhilpghomeform() {\n\t \n $this->setMethod('post');\n\t\t\n\t\t$this->addElement('text', 'name', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'PG Name',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'name cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'location', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'location',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'location cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'rooms', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rooms',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n\t\t\t'type'=>'number',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Room field cannot be empty'\n )\n )), \n \t\t\t\t\n )\n ));\n\t\t\n\t\t$this->addElement('text', 'rent', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rent',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Rent field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Rent field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'address', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Address',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'address field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Address field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'balcony', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'balcony',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t\n\t\t$this->addElement('text', 'electricity', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'electricity',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'parking', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'parking',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'security', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'security',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'fireexit', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'fireexit',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'airconditioned', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'AC',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Sign In',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors',)\n ));\t\t\n\t }", "title": "" }, { "docid": "e489e9ca5a95d9297b72de0df328a9ed", "score": "0.60028756", "text": "public function init()\n {\n \t$this->setMethod('post');\n \t\n \t// Add the id hidden element\n \t//$element = new Zend_Form_Element_Hidden('audio_job_id');\n \t//$elements[] = $element;\n \t\n \t// Add the id hidden element\n \t$element = new Zend_Form_Element_Hidden('id');\n \t$elements[] = $element;\n \t\n// \t// Add a typist element\n// \t$userMapper = new Application_Model_UserMapper();\n// \t$users = $userMapper->fetchAllForDropdown(2);\n// \tarray_unshift($users, array('key' => '0', 'value' => '-- Not assigned --'));\n \t\n// \t$typistId = new Zend_Form_Element_Select('user_id');\n// \t$typistId->setRequired(true)\n// \t->addMultiOptions($users);\n// \t$elements[] = $typistId;\n \t\n \t// Add a due date element\n// \t$element = new Zend_Form_Element_Text('due_date');\n// \t$element->setRequired(true)\n// \t->addFilter('StripTags')\n// \t->addFilter('StringTrim');\n// \t$elements[] = $element;\n \t\n \tforeach ($elements as $element) {\n \t\t$element->removeDecorator('label')\n \t\t->removeDecorator('htmlTag')\n \t\t->removeDecorator('description');\n \t\t \n \t\t\t$element->setAttrib('class', 'text ui-widget-content ui-corner-all');\n \t}\n \t\n \t$this->addElements($elements);\n }", "title": "" }, { "docid": "279ccff1a20d9a23502fcddf775236c7", "score": "0.60024595", "text": "public function addForm()\n {\n require_once __DIR__ . '/../views/add.php';\n }", "title": "" }, { "docid": "9c064f782657ff18fd3835a2e7acf624", "score": "0.5998442", "text": "public function Kaushikapghomeform() {\n\t \n $this->setMethod('post');\n\t\t\n\t\t$this->addElement('text', 'name', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'PG Name',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'name cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'location', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'location',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'location cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'rooms', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rooms',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n\t\t\t'type'=>'number',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Room field cannot be empty'\n )\n )), \n \t\t\t\t\n )\n ));\n\t\t\n\t\t$this->addElement('text', 'rent', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rent',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Rent field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Rent field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'address', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Address',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'address field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Address field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'balcony', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'balcony',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t\n\t\t$this->addElement('text', 'electricity', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'electricity',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'parking', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'parking',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'security', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'security',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'fireexit', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'fireexit',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'airconditioned', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'AC',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Sign In',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors',)\n ));\t\t\n\t }", "title": "" }, { "docid": "d23a2b1fcc07eb2db985ca35d7345f05", "score": "0.5994125", "text": "public function setForm()\n {\n $this->form = collect([\n 'form' => [\n 'store' => [],\n 'update' => [],\n ],\n 'groups' => [\n 'main' => 'Main',\n ],\n 'fields' => [\n 'name' => [\n \"type\" => 'text',\n \"label\" => trans('channels::channel.label.name'),\n \"placeholder\" => trans('channels::channel.placeholder.name'),\n \"rules\" => '',\n \"group\" => \"main\",\n \"section\" => \"first\",\n \"attributes\" => [\n 'wrapper' => [],\n \"label\" => [],\n \"input\" => [],\n\n ],\n ],\n ]\n );\n\n }", "title": "" }, { "docid": "483c11cfcca973f0ee56a06f2368c455", "score": "0.5988555", "text": "public function init()\n {\n $this->addAttribs(array(\"class\" => \"form-horizontal\"))\n ->setDecorators(array(\n 'FormElements',\n 'Form'\n )); \n $this->addElement('hidden','idconfig'); \n \n $name = $this->createElement('text','name');\n $name->setLabel(\"Name :\")\n ->setRequired()\n ->setAttribs(array(\"readonly\"=>\"true\",\"class\"=>\"small\"))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($name); \n \n\t\t$value = $this->createElement('textarea','value');\n $value->setLabel(\"Nội dung chi tiết :\")\n ->setAttribs(array(\"class\"=>\"maxlarge ckeditor\",\"rows\"=>40))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($value); \n \n $submit = $this->createElement(\"submit\",\"submit\");\n $submit->setLabel(\"Cập Nhật\"); \n $this->addElement($submit); \n }", "title": "" }, { "docid": "8f4251ff22af0d040d965dfc93c9db59", "score": "0.59710205", "text": "protected function init() : void\n {\n $this->initAdapter();\n\n $name = $this->createElement(\n HtmlElement::class,\n HtmlElement::HTML_ELEMENT_INPUT_TEXT,\n 'name',\n 'Application name'\n );\n\n $title = $this->createElement(\n HtmlElement::class,\n HtmlElement::HTML_ELEMENT_INPUT_TEXT,\n 'title',\n 'Display name (title)'\n );\n\n $description = $this->createElement(\n HtmlElement::class,\n HtmlElement::HTML_ELEMENT_TEXTAREA,\n 'description',\n 'Description'\n );\n\n $enabled = $this->createElement(\n HtmlElement::class,\n HtmlElement::HTML_ELEMENT_INPUT_CHECKBOX,\n 'is_enabled',\n 'Activated ?'\n );\n\n $submit = $this->createElement(\n HtmlElement::class,\n HtmlElement::HTML_ELEMENT_SUBMIT,\n 'submit',\n 'Save'\n );\n\n $this->formAdapter->addElement($name)\n ->addElement($title)\n ->addElement($description)\n ->addElement($enabled)\n ->addElement($submit);\n }", "title": "" }, { "docid": "393916ad16b0ab625cc5175099729135", "score": "0.59649104", "text": "public function initializeFormElement()\n {\n }", "title": "" }, { "docid": "393916ad16b0ab625cc5175099729135", "score": "0.59649104", "text": "public function initializeFormElement()\n {\n }", "title": "" }, { "docid": "2a79465833da9399dbda4c88ed0c6be1", "score": "0.59619886", "text": "function search_plus_form_element($variables) {\n $element = &$variables['element'];\n $element += array(\n '#title_display' => 'before',\n );\n // REMOVED WRAPPER DIV AND ALL form- CLASSES\n $output = '';\n // If #title is not set, we don't display any label or required marker.\n if (!isset($element['#title'])) {\n $element['#title_display'] = 'none';\n }\n $prefix = isset($element['#field_prefix']) ? '<span class=\"field-prefix\">' . $element['#field_prefix'] . '</span> ' : '';\n $suffix = isset($element['#field_suffix']) ? ' <span class=\"field-suffix\">' . $element['#field_suffix'] . '</span>' : '';\n\n switch ($element['#title_display']) {\n case 'before':\n case 'invisible':\n $output .= ' ' . theme('form_element_label', $variables);\n $output .= ' ' . $prefix . $element['#children'] . $suffix . \"\\n\";\n break;\n case 'after':\n $output .= ' ' . $prefix . $element['#children'] . $suffix;\n $output .= ' ' . theme('form_element_label', $variables) . \"\\n\";\n break;\n case 'none':\n case 'attribute':\n // Output no label and no required marker, only the children.\n $output .= ' ' . $prefix . $element['#children'] . $suffix . \"\\n\";\n break;\n }\n if (!empty($element['#description'])) {\n $output .= '<div class=\"description\">' . $element['#description'] . \"</div>\\n\";\n }\n // REMOVED WRAPPER DIV\n return $output;\n}", "title": "" }, { "docid": "d7959b95d0d51d111b3105b529eba477", "score": "0.5961504", "text": "public function init()\r\n {\r\n $id = new Zend_Form_Element_Hidden(\"id\");\r\n \r\n $name = new Zend_Form_Element_Text(\"name\");\r\n $name->setRequired();\r\n $name->setlabel(\"Site Name:\");\r\n $name->setAttrib(\"class\",\"form-control\");\r\n $name->setAttrib(\"placeholder\",\"Enter site name\");\r\n\r\n $description= new Zend_Form_Element_Textarea(\"description\");\r\n $description->setRequired();\r\n $description->setlabel(\"Description:\");\r\n $description->setAttrib(\"class\",\"form-control\");\r\n $description->setAttrib(\"placeholder\",\"Enter Description\");\r\n \r\n \r\n $url = new Zend_Form_Element_Text(\"url\");\r\n $url->setRequired();\r\n $url->setlabel(\"Site URL:\");\r\n $url->setAttrib(\"class\",\"form-control\");\r\n $url->setAttrib(\"placeholder\",\"Enter a valid URL\");\r\n \r\n $submit = new Zend_Form_Element_Submit('submit');\r\n \r\n $this->addElements(array($id , $name , $description , $url , $submit ));\r\n }", "title": "" }, { "docid": "1fdea55ee00d2683ecf5a72565f2ebf4", "score": "0.59598416", "text": "public function init()\n {\n $this->addAttribs(array(\"class\" => \"form-horizontal\"))\n ->setDecorators(array(\n 'FormElements',\n 'Form'\n )); \n $this->addElement('hidden','bill_id'); \n \n $bill_xname = $this->createElement('text','bill_xname');\n $bill_xname->setLabel(\"Tên KH nhận hàng :\")\n ->setRequired()\n ->setAttrib(\"class\",\"xlarge\")\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($bill_xname);\n\n\t$product_qty = $this->createElement('text','product_qty');\n $product_qty->setLabel(\"Số lượng trong kho :\")\n ->setRequired()\n ->setAttrib(\"class\",\"xlarge\")\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($product_qty);\n \n $product_price = $this->createElement('text','product_price');\n $product_price->setLabel(\"Giá sản phẩm :\")\n ->setRequired()\n ->setAttrib(\"class\",\"xlarge\")\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($product_price);\n \n $idcate = $this->createElement('multiselect','idcate');\n $idcate->setLabel(\"Hiển thị ở mục :\")\n ->setAttribs(array(\"class\"=>\"xlarge\",\"rows\"=>20))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n ));\n $model1 = new Application_Model_DbTable_Pcates();\n $cates = $model1->arrayChosen(); \n foreach($cates as $cate){\n $idcate->addMultiOption($cate['key'],$cate['value']);\n }\n //$idcate->setValue(1); \n $this->addElement($idcate);\n \n $product_image = $this->createElement('file','product_image');\n $product_image->setLabel(\"Hình ảnh :\")\n ->addValidators(array(\n 'Size'=>array('min'=>512,'max'=>10*1024*1024),\n 'Extension' =>array('jpg,jpeg,png,gif')\n ))\n ->setDestination(APPLICATION_PATH.\"/../public/upload/\") \n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($product_image); \n \n $product_description = $this->createElement('textarea','product_description');\n $product_description->setLabel(\"Mô tả :\")\n ->setAttribs(array(\"class\"=>\"maxlarge ckeditor\",\"rows\"=>40))\n ->addDecorators(array(\n array(\"Label\",array(\"tag\"=>\"div\",\"tagClass\"=>\"label-dt\")),\n array(\"HtmlTag\",array(\"tag\"=>\"div\", \"class\"=>\"input\" ))\n )); \n $this->addElement($product_description); \n \n $submit = $this->createElement(\"submit\",\"submit\");\n $submit->setLabel(\"Thêm\"); \n $this->addElement($submit); \n }", "title": "" }, { "docid": "5aed79d574aa938716f6273186592654", "score": "0.59570104", "text": "function addForm($form) {\n\t\t\tif(!$this->initialized) // only add if it hasnt been initalized\n\t\t\t\tarray_push($this->forms, serialize($form));\n\t\t}", "title": "" }, { "docid": "8b7cffb26e368718f5cd503d4c5ac552", "score": "0.5949032", "text": "abstract protected function addManifestform();", "title": "" }, { "docid": "89f8a55ce2d41ef904196393eaf8f641", "score": "0.59358585", "text": "public function init()\n {\n $this->setMethod('post');\n \n //nome\n \n $this->addElement('text', 'nome', array(\n \t\t'label' => 'Seu Nome:',\n 'decorators' => $this->elementDecorators,\n \t\t'required' => true\n ));\n \n //email\n $this->addElement('text', 'from', array(\n \t\t'label' => 'Seu e-mail:',\n \t\t'required' => true,\n 'decorators' => $this->elementDecorators,\n \t\t'filters' => array('StringTrim'),\n \t\t'validators' => array(\n \t\t\t\t'EmailAddress',\n \t\t)\n ));\n\n\t//nome\n\t\t \n\n //email\n $this->addElement('text', 'to', array(\n \t\t'label' => 'Enviar para:',\n \t\t'required' => true,\n \t\t'filters' => array('StringTrim'),\n 'decorators' => $this->elementDecorators,\n \t\t'validators' => array(\n \t\t\t\t'EmailAddress',\n \t\t)\n ));\n \n //enviar\n $this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Enviar',\n 'decorators' => $this->buttonDecorators\n ));\n\n // And finally add some CSRF protection\n //$this->addElement('hash', 'csrf', array(\n // 'ignore' => true,\n //));\n \n echo '</section>';\n }", "title": "" }, { "docid": "627f6ebdcb84c334d05440c0f0d11e32", "score": "0.59357995", "text": "public function renderAdd()\n {\n $this->template->title = \"Přidat dokumenty\";\n $form = $this->getComponent('docsForm');\n $form['save']->caption = 'Přidat';\n $this->template->form = $form;\n }", "title": "" }, { "docid": "9749e8a7ed4eb0971d7a2647ba84cddd", "score": "0.59287673", "text": "function formAdd(){\n\t\tglobal $locate,$config;\n\t\t\t\t\n\t\t$pin = astercrm::generateUniquePin(intval($config['system']['pin_len']));\n\t\t$html = '\n\t\t\t<!-- No edit the next line -->\n\t\t\t<form method=\"post\" name=\"f\" id=\"f\">\n\t\t\t\n\t\t\t<table border=\"1\" width=\"100%\" class=\"adminlist\">\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">'.$locate->Translate(\"Pin\").'*</td>\n\t\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"pin\" name=\"pin\" size=\"25\" maxlength=\"30\" value=\"'.$pin.'\" readonly><input type=\"hidden\" id=\"pin\" name=\"pin\" value=\"'.$pin.'\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">'.$locate->Translate(\"First name\").'</td>\n\t\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"first_name\" name=\"first_name\" size=\"25\" maxlength=\"50\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">'.$locate->Translate(\"Last name\").'</td>\n\t\t\t\t\t<td align=\"left\"><input type=\"text\" id=\"last_name\" name=\"last_name\" size=\"25\" maxlength=\"50\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td nowrap align=\"left\">'.$locate->Translate(\"Discount\").'</td>\n\t\t\t\t\t<td align=\"left\"><input type=\"radio\" id=\"discount_type\" name=\"discount_type\" value=\"0\" onclick=\"selectDiscountType(this.value);\" checked>'.$locate->Translate(\"Dynamic\").'<input type=\"radio\" id=\"discount_type\" name=\"discount_type\" value=\"1\" onclick=\"selectDiscountType(this.value);\">'.$locate->Translate(\"Static\").'&nbsp;<input type=\"text\" id=\"discount\" name=\"discount\" size=\"15\" maxlength=\"10\" disabled></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\" align=\"center\"><button id=\"submitButton\" onClick=\\'xajax_save(xajax.getFormValues(\"f\"));return false;\\'>'.$locate->Translate(\"continue\").'</button></td>\n\t\t\t\t</tr>\n\n\t\t\t </table>\n\t\t\t';\n\n\t\t$html .='\n\t\t\t</form>\n\t\t\t*'.$locate->Translate(\"obligatory_fields\").'\n\t\t\t';\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "fd6696c85a4ba1969d43ca7b3e0c7e20", "score": "0.5925391", "text": "public function addDoohForm()\n {\n $this->getState()->template = 'applications-form-add-dooh';\n $this->getState()->setData([\n 'help' => $this->getHelp()->link('Services', 'Register')\n ]);\n }", "title": "" }, { "docid": "63c2251e2c8ffecbcf633974128e866e", "score": "0.5915607", "text": "public function toFormElements(): array\n {\n return [];\n }", "title": "" }, { "docid": "b6f6168e9b34ec0dc3c51b54ec5c8910", "score": "0.5912984", "text": "public function dakshpghomeform() {\n\t \n $this->setMethod('post');\n\t\t\n\t\t$this->addElement('text', 'name', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'PG Name',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'name cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'location', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'location',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators' => array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'location cannot be empty'\n )\n ))\n\t\t\t)\t\t\t\n\t\t));\n\t\t $this->addElement('text', 'rooms', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rooms',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n\t\t\t'type'=>'number',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Room field cannot be empty'\n )\n )), \n \t\t\t\t\n )\n ));\n\t\t\n\t\t$this->addElement('text', 'rent', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Rent',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'Rent field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Rent field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'address', array(\n 'required' => true,\n\t\t\t'placeholder' => 'Address',\n 'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'class' => 'form-control',\n 'filters' => array('StringTrim'),\n 'maxlength' => '200',\n 'decorators' => array('ViewHelper'),\n 'validators' => array(\n array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'address field cannot be empty'\n )\n )),\n array('Regex', false, array(\n '/^[a-zA-Z0-9~!#$*_:?()@., \\/\\- ]{0,}$/i', \n 'messages' => array(\n 'regexNotMatch'=>'Address field has special characters.Please remove them and try again.'\n )\n ))\t\t\t\t\t\n ),\n\t\t\t\n ));\n\t\t$this->addElement('text', 'balcony', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n 'placeholder' => 'balcony',\n\t\t\t'class' => 'form-control',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t\n\t\t$this->addElement('text', 'electricity', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'electricity',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'parking', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'parking',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'security', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'security',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'fireexit', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'fireexit',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('text', 'airconditioned', array(\n 'label' => '',\n\t\t\t'autocomplete' => 'off',\n\t\t\t'style' => array('width:240px'),\n 'required' => true,\n\t\t\t'class' => 'form-control',\n 'placeholder' => 'AC',\n 'filters' => array('StringTrim'),\n\t\t\t'decorators'=> array('ViewHelper','Errors'),\n 'validators' => array(\n\t\t\t array('notEmpty', true, array(\n 'messages' => array(\n 'isEmpty' => 'field cannot be empty'\n )\n ))\n\t\t\t)\n ));\n\t\t$this->addElement('submit', 'submit', array(\n 'ignore' => true,\n 'label' => 'Sign In',\n\t\t\t'decorators'=>Array(\n\t\t\t'ViewHelper','Errors',)\n ));\t\t\n\t }", "title": "" }, { "docid": "86c082d014046022302c7131e52b4e6c", "score": "0.5902082", "text": "function add_inputs($data) {\n if (is_null($this->_inputs)) {\n $this->_inputs = $data;\n } else {\n $this->_inputs .= $data;\n }\n }", "title": "" }, { "docid": "42876e99ba4d8142d123fc02b5e3d4a9", "score": "0.5902019", "text": "public function register_tabbed_form() {\n\t\t$validater = ( isset( $this->form['validate'] ) ) ? $this->form['validate'] : $this->validate;\n\t\tforeach( $this->form as $key => $section ) {\n\t\t\tif ( ! ( (array)$section === $section ) )\n\t\t\t\tcontinue; // skip string variables\n\t\t\tif ( ! ( $section['option'] === $this->current ) )\n\t\t\t\tcontinue; // skip all but current screen\n\t\t\t$validate = ( isset( $section['validate'] ) ) ? $section['validate'] : $validater;\n\t\t\t$current = ( isset( $this->form[ $key ]['option'] ) ) ? $this->form[ $key ]['option'] : $this->prefix . $key;\n\t\t\tregister_setting( $current, $current, [ $this, $validate ] );\n\t\t\t$title = ( isset( $section['title'] ) ) ? $section['title'] : '';\n\t\t\t$describe = ( isset( $section['describe'] ) ) ? $section['describe'] : 'description';\n\t\t\t$describe = ( is_array( $describe ) ) ? $describe : [ $this, $describe ];\n\t\t\tadd_settings_section( $current, $title, $describe, $current );\n\t\t\tforeach( $section['layout'] as $item => $data ) {\n\t\t\t\t$this->register_field( $current, $key, $item, $data );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9c485ea20d556d0714592ed48900ad80", "score": "0.59019953", "text": "public function init()\r\n\t{\r\n\t\t$this->setMethod('post');\r\n\t\t$this->setAttrib('class', 'inline-form');\r\n\r\n\t\t// Add an email address element\r\n\t\t$this->addElement('text', 'email', array(\r\n\t\t\t'label'\t\t\t=> 'Email address:',\r\n\t\t\t'required'\t\t=> true,\r\n\t\t\t'filters'\t\t=> array('StringTrim'),\r\n\t\t\t'validators' \t=> array(\r\n\t\t\t\t'EmailAddress',\r\n\t\t\t)\r\n\t\t));\r\n\t\t\r\n\t\t// Add an first name element\r\n\t\t$this->addElement('text', 'first_name', array(\r\n\t\t\t'label'\t\t\t=> 'First Name:',\r\n\t\t\t'required'\t\t=> true,\r\n\t\t\t'filters'\t\t=> array('StringTrim'),\r\n\t\t\t'validators' \t=> array()\r\n\t\t));\r\n\t\t\r\n\t\t// Add an last name element\r\n\t\t$this->addElement('text', 'last_name', array(\r\n\t\t\t'label'\t\t\t=> 'Last Name:',\r\n\t\t\t'required'\t\t=> true,\r\n\t\t\t'filters'\t\t=> array('StringTrim'),\r\n\t\t\t'validators' \t=> array()\r\n\t\t));\r\n\r\n\t\t$this->addElement('select', 'role', array(\r\n\t\t\t'label'\t\t\t=> 'Role:',\r\n\t\t\t'filters'\t\t=> array('StringTrim'),\r\n\t\t\t'required'\t\t=> true,\r\n\t\t));\r\n\t\t\r\n\t\t$element = $this->getElement('role');\r\n\t\t\r\n\t\t$client = Infra_ClientHelper::getClient();\r\n\t\t$filter = new Kaltura_Client_Type_UserRoleFilter();\r\n\t\t$filter->tagsMultiLikeAnd = 'admin_console';\r\n\t\t$userRoles = $client->userRole->listAction($filter);\r\n\t\tif ($userRoles && isset($userRoles->objects)) {\r\n\t\t\t$userRoles = $userRoles->objects;\r\n\t\t\tforeach($userRoles as $role) {\r\n\t\t\t\t$element->addMultiOption($role->id, $role->name);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->addDisplayGroup(array('email', 'first_name', 'last_name', 'submit', 'role'), 'user_info', array(\r\n\t\t\t'decorators' => array(\r\n\t\t\t\t'Description', \r\n\t\t\t\t'FormElements', \r\n\t\t\t\tarray('Fieldset'),\r\n\t\t\t)\r\n\t\t));\r\n\t\t\r\n\t\t\r\n\t\t// Add the submit button\r\n\t\t$this->addElement('button', 'submit', array(\r\n\t\t\t'type' => 'submit',\r\n\t\t\t'ignore'\t=> true,\r\n\t\t\t'label'\t\t=> 'Create',\r\n\t\t\t'decorators' => array('ViewHelper')\r\n\t\t));\r\n\t\t\r\n\t\t$this->addDisplayGroup(array('submit'), 'buttons1', array(\r\n\t\t\t'decorators' => array(\r\n\t\t\t\t'FormElements', \r\n\t\t\t\tarray('HtmlTag', array('tag' => 'div', 'class' => 'buttons')),\r\n\t\t\t)\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "747b384db535a4c31e2cb0e9cf0938cc", "score": "0.59009117", "text": "function add()\n {\n $this->_add_edit('add');\n }", "title": "" }, { "docid": "9f45c6f652c0dbc8ef6a2adca32cc9c3", "score": "0.5899962", "text": "public function prepare_form()\n {\n $this->form->set_action\n (\n midgardmvc_core::get_instance()->dispatcher->generate_url\n (\n 'rating_create', array\n (\n 'to' => $this->data['parent']->guid\n ),\n $this->request\n )\n );\n\n if ($this->request->is_subrequest())\n {\n // rating posting form is in a dynamic_load, set parent URL for redirects\n $root_request = midgardmvc_core::get_instance()->context->get_request(0);\n $field = $this->form->add_field('relocate', 'text', false);\n $field->set_value($root_request->get_path());\n $field->set_widget('hidden');\n }\n\n // Basic element information\n $field = $this->form->add_field('rating', 'integer');\n\n // Default rating is 0\n $field->set_value(0);\n\n if ($this->object->rating > 0)\n {\n $field->set_value($this->object->rating);\n }\n\n $widget = $field->set_widget('eu_urho_widgets_starrating');\n // @todo: get the rating options from configuration\n $widget->add_option('Very bad', 1);\n $widget->add_option('Poor', 2);\n $widget->add_option('Average', 3);\n $widget->add_option('Good', 4);\n $widget->add_option('Excellent', 5);\n\n $field = $this->form->add_field('comment', 'text');\n $field->set_value('');\n $widget = $field->set_widget('textarea');\n }", "title": "" }, { "docid": "82224ebb15bd09554efddd327b13c95f", "score": "0.5899477", "text": "public function build()\n {\n // build each field in the form definition\n foreach ($this->config->getFields() as $name => $field) {\n if ($fieldObj = FieldFactory::make($name, $field, $this->getValue($name))) {\n $this->fields[] = $fieldObj;\n }\n }\n }", "title": "" }, { "docid": "f24be4790553460155e3c083abf4adb9", "score": "0.5899085", "text": "public function __construct($options){\r\n $form_open_tag = $this->create_elements(\"form\",FALSE,$options);\r\n echo $form_open_tag.\"\\n\";\r\n }", "title": "" }, { "docid": "c12fd882af36956807e09620c305ea2c", "score": "0.5896974", "text": "public function add_settings(&$mform);", "title": "" }, { "docid": "e80229c82d038892cb6d943c23456a02", "score": "0.58947444", "text": "function buildForm()\n {\n $this->buildTabs();\n // tab caption\n $this->addElement('header', null, 'Error and Warning messages');\n\n // Get all warnings and errors.\n if (PEAR_PackageFileManager_Frontend::hasErrors() ) {\n $warn = PEAR_PackageFileManager_Frontend::getErrors(true);\n $messages = '<ol>';\n foreach($warn as $warning) {\n $messages .= '<li>' . $warning['message'] . '</li>';\n }\n $messages .= '</ol>';\n } else {\n $messages = 'Stack Empty';\n }\n\n // We need a simple static html area for ordering messages list.\n $div = '<div class=\"autoscroll\">' . $messages . '</div>';\n $this->addElement('static', 'errors', '', $div);\n\n // Buttons of the wizard to do the job\n $this->buildButtons(array('reset','commit'));\n }", "title": "" }, { "docid": "45d43b7a8a601dea01d67fab8c6b51d0", "score": "0.5891502", "text": "public function add()\n\t{\n\t\t$form = array();\n\n\t\t$form['validation']['params'] = array('title','content','emaillist');\n\t\t\n\t\t$form['submit'] = function($params)\n\t\t{\n\t\t\t// Lay input\n\t\t\t$data = $this->_get_input();\n\t\t\t\n\t\t\t// Cap nhat vao data\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data, $id);\n\n\t\t\t// cap nhap vao email to\n\t\t\tmodel('emailsend_to')->setData($id, $this->getEmailList());\n\t\t\t\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url(__CLASS__);\n\t\t};\n\t\t\n\t\t$form['form'] = function()\n\t\t{\n\t\t\t$this->_create_view_data();\n\t\t\t\n\t\t\t$this->_display('form');\n\t\t};\n\t\t\n\t\t$this->_form($form);\n\t}", "title": "" }, { "docid": "0bc471e6bc3e591fa8cc96a10265a16d", "score": "0.5888176", "text": "function addPollForm() {\r\n\techo \"<h3>Add Poll Form</h3>\";\r\n\techo \"<form action='index.php?op=save' method='post'>\";\r\n\techo \"<label for='qtitle'>Question</label>\";\r\n\techo \"<input class='input-large' type='text' name='qtitle' value='' placeholder='type your poll question here...'/>\";\r\n\techo \"<label for='option1'>Option 1</label>\";\r\n\techo \"<input type='text' name='options[]' value='' id='option1' placeholder='... add option 1 ...' />\";\r\n\techo \"<label for='option2'>Option 2</label>\";\r\n\techo \"<input type='text' name='options[]' value='' id='option2' placeholder='... add option 2 ...' />\";\r\n\techo \"<label for='option3'>Option 3</label>\";\r\n\techo \"<input type='text' name='options[]' value='' id='option3' placeholder='... add option 3 ...' />\";\r\n\techo \"<label for='option4'>Option 4</label>\";\r\n\techo \"<input type='text' name='options[]' value='' id='option4' placeholder='... add option 4 ...' />\";\r\n\t\r\n\techo \"<input class='btn btn-primary input-block-level' type='submit' value='Add' />\";\r\n\techo \"</form>\";\r\n}", "title": "" }, { "docid": "6c291a1ebd7900178e96edf4721f8356", "score": "0.5886126", "text": "public function init(){\n $this->setMethod('post');\n $this->setAttrib('enctype', Zend_Form::ENCTYPE_MULTIPART);\n //'multipart/form-data'\n $this->addPrefixPath('PAP_Form_Element_', 'PAP/Form/Element/', 'Element');\n $this->addDecorators(array('FormElements', 'Form'));\n \n $decorators = array(\n array('ViewHelper'),\n array('Label', array(\n 'class' => 'leftalign ui-button-text'\n )),\n array('HtmlTag', array('tag' => 'div')),\n );\n $allowWhiteSpace = new Zend_Validate_Alnum(array('allowWhiteSpace' => true));\n $decoratorsButton = array(\n array('ViewHelper'),\n array('HtmlTag', array('tag' => 'div')),\n );\n \n $this->addElement('text', 'name', array(\n 'label' => 'Nombre',\n 'size' => 40,\n 'required' => true,\n 'filters' => array('StringTrim'),\n ));\n $this->name->addValidator($allowWhiteSpace, true)\n ->setDecorators($decorators)\n ->addDecorator('HtmlTag', array('tag' => 'div'));\n \n $this->addElement('text', 'street', array(\n 'label' => 'Calle',\n 'size' => 50,\n 'maxlength' => 50,\n 'required' => true,\n 'filters' => array('StringTrim', 'StringToUpper'),\n ));\n $this->street->setDecorators($decorators)\n ->addValidator($allowWhiteSpace, true)\n ->setAttrib('onChange', 'clearCoord();');\n \n $this->addElement('text', 'number', array(\n 'label' => 'Número',\n 'required' => true,\n 'size' => 5,\n 'maxlength' => 5,\n 'filters' => array('Digits'),\n 'validators' => array(\n 'Digits',\n ),\n ));\n $this->number->setDecorators($decorators)\n ->setAttrib('onChange', 'clearCoord();');\n \n $this->addElement('text', 'local', array(\n 'label' => 'Local',\n 'size' => 30,\n 'maxlength' => 50,\n 'required' => false,\n 'filters' => array('StringTrim'),\n ));\n $this->local->setDecorators($decorators);\n \n $this->addElement('text', 'phone', array(\n 'label' => 'Teléfono',\n 'required' => false,\n 'size' => 12, \n 'maxlength' => 50,\n 'filters' => array('StringTrim'),\n ));\n $this->phone->setDecorators($decorators);\n \n /*$website = $this->createElement('text', 'website');\n $website->setLabel('Sitio Web');\n $website->addValidator(new PAP_Validate_Uri());\n $website->addDecorators($decorators);\n $this->addElement($website);*/\n \n $this->addElement('text', 'website', array(\n 'label' => 'Sitio Web:',\n 'required' => false,\n 'filters' => array('StringTrim'),\n 'size' => 40,\n 'maxlength' => 100,\n ));\n $this->website->addValidator(new PAP_Validate_Uri());\n $this->website->setDecorators($decorators);\n \n // Add an email element\n $this->addElement('text', 'email', array(\n 'label' => 'Email contacto:',\n 'required' => true,\n 'filters' => array('StringTrim'),\n 'size' => 30,\n 'maxlength' => 100,\n 'validators' => array(\n 'EmailAddress', \n )\n ));\n $this->email->setDecorators($decorators);\n \n $this->addElement('select', 'province', array(\n 'label' => 'Provincia',\n 'required' => true,\n ));\n $this->province->setRegisterInArrayValidator(false)\n ->setDecorators($decorators);\n \n $this->addElement('select', 'city', array(\n 'label' => 'Ciudad',\n 'required' => true,\n ));\n $this->city->setRegisterInArrayValidator(false)\n ->setDecorators($decorators)\n ->setAttrib('onChange', 'clearCoord();');\n \n $this->addElement('text', 'zipcode', array(\n 'label' => 'CP',\n 'required' => false,\n 'size' => 8,\n 'filters' => array('StringTrim'),\n 'validators' => array(\n 'alnum',\n ),\n ));\n $this->zipcode->setDecorators($decorators);\n \n $this->addElement('text', 'lat', array(\n 'label' => 'Lat.',\n 'size' => 12,\n 'required' => true,\n //'validators' => array(\n // 'Float',\n //),\n ));\n $this->lat->setDecorators($decorators)\n ->setAttribs(array('readonly' => 'true',));\n \n $this->addElement('text', 'lng', array(\n 'label' => 'Long.',\n 'size' => 12,\n 'required' => true,\n //'validators' => array(\n // 'Float',\n //),\n ));\n $this->lng->setDecorators($decorators)\n ->setAttribs(array('readonly' => 'true',));\n \n $this->addElement('button', 'localization', array(\n 'ignore' => true,\n 'label' => 'Localizarme',\n ));\n $this->localization->setDecorators($decoratorsButton)\n ->setAttrib('class', 'buttons')\n ->setAttrib(\"onClick\", \"ShowGoogleLocalizator();\");\n \n $this->addElement('img', 'logo', array(\n 'ignore' => true,\n 'width' => '75', \n 'height' => '75',\n 'src' => '/images/backend/img-comercio.png',\n ));\n \n $file = new Zend_Form_Element_File('filebranch');\n $this->addElement($file);\n $this->filebranch->setLabel('Cambiar Logo')\n ->setDestination(PUBLIC_PATH.'/images/tmp')\n ->setRequired(true)\n ->setValueDisabled(true)\n ->addValidator('Count', false, 1)// ensure only one file\n ->addValidator('Size', false, 1048576)// max 2MB\n ->setMaxFileSize(1048576)\n //->setDecorators($decoratorsButton)\n ->setDecorators(array(\n 'File',\n 'Errors',\n array('HtmlTag', array('tag'=>'div','style'=>'height:0px; width:0px; overflow:hidden;')),\n ))\n ->setAttrib('onChange', 'sub(this)')\n ->addValidator('Extension', false, 'jpg,png,gif');// only JPEG, PNG, or GIF\n \n $this->addElement('button', 'fakefile', array(\n 'ignore' => true,\n 'label' => 'Cargar Imagen',\n ));\n $this->fakefile->setAttrib('class', 'buttons')\n ->setAttrib(\"onClick\", \"clickFile();\");\n \n $this->addElement('submit', 'save', array(\n 'ignore' => true,\n 'label' => 'Guardar',\n ));\n $this->save->setDecorators($decoratorsButton)\n ->setAttrib('class', 'buttons');\n \n $this->addElement('submit', 'cancel', array(\n 'ignore' => true,\n 'label' => 'Cancelar',\n ));\n $this->cancel->setDecorators($decoratorsButton)\n ->setAttrib('class', 'buttons');\n \n $this->addElement('hidden', 'user');\n $this->user->setDecorators(array('ViewHelper'));\n $this->addElement('hidden', 'branch_id', array('ignore' => true,));\n $this->branch_id->setDecorators(array('ViewHelper'));\n $this->addElement('hidden', 'branch_order', array('ignore' => true,));\n $this->branch_order->setDecorators(array('ViewHelper'));\n $this->addElement('hidden', 'latitude', array('disableLoadDefaultDecorators' => true));\n $this->latitude->setDecorators(array('ViewHelper'));\n $this->addElement('hidden', 'longitude', array('disableLoadDefaultDecorators' => true));\n $this->longitude->setDecorators(array('ViewHelper'));\n \n $this->addDisplayGroup(array(\n 'name',\n 'street',\n 'number',\n 'local',\n 'phone',\n 'city',\n 'province',\n 'zipcode',\n 'user'\n ),'branch_contact',array('legend' => 'Información del Comercio', 'disableDefaultDecorators' => true));\n $contact = $this->getDisplayGroup('branch_contact');\n $contact->setDecorators(array(\n 'FormElements',\n 'Fieldset',\n array('HtmlTag',array('tag'=>'div','style'=>'width:50%;float:left;')),\n //array(array('fstag'=>'HtmlTag'),'options'=>array('tag'=>'fieldset','openOnly'=>true)),\n ));\n \n $this->addDisplayGroup(array(\n 'filebranch',\n 'logo',\n 'fakefile'\n ),'branch_picture',array('legend' => 'Imagen del Comercio', 'disableDefaultDecorators' => true));\n $contact = $this->getDisplayGroup('branch_picture');\n $contact->setDecorators(array(\n 'FormElements',\n 'Fieldset',\n array('HtmlTag',array('tag'=>'div','style'=>'width:45%;;float:right;')),\n array(array('fstag'=>'HtmlTag'),'options'=>array('tag'=>'fieldset')),\n ));\n \n $this->addDisplayGroup(array(\n 'lat',\n 'lng',\n 'localization',\n 'latitude',\n 'longitude'\n ),'branch_location',array('legend' => 'Localización geográfica', 'disableDefaultDecorators' => true,));\n $contact = $this->getDisplayGroup('branch_location');\n $contact->setDecorators(array(\n 'FormElements',\n 'Fieldset',\n array('HtmlTag',array('tag'=>'div','style'=>'width:50%;;float:left;')),\n //array(array('fstag'=>'HtmlTag'),'options'=>array('tag'=>'fieldset','closeOnly'=>true)),\n ));\n }", "title": "" }, { "docid": "7f0dccc0d586a8a841c1dbb389ead4a7", "score": "0.58818287", "text": "private function buildForm() {\n\n $widget = new VTCore_Bootstrap_Form_BsInstance(array(\n 'type' => false,\n ));\n\n $widget\n ->addChildren(new VTCore_Bootstrap_Form_BsText(array(\n 'text' => __('Title', 'victheme_core'),\n 'name' => $this->get_field_name('title'),\n 'id' => $this->get_field_id('title'),\n 'value' => $this->instance['title'],\n )))\n ->addChildren(new VTCore_Bootstrap_Form_BsTextarea(array(\n 'text' => __('Description', 'victheme_core'),\n 'name' => $this->get_field_name('description'),\n 'id' => $this->get_field_id('description'),\n 'value' => $this->instance['description'],\n )))\n ->addChildren(new VTCore_Bootstrap_Form_BsSelect(array(\n 'text' => __('Alignment', 'victheme_core'),\n 'name' => $this->get_field_name('align'),\n 'id' => $this->get_field_id('align'),\n 'value' => $this->instance['align'],\n 'options' => array(\n 'text-left' => __('Left', 'victheme_core'),\n 'text-right' => __('Right', 'victheme_core'),\n 'text-center' => __('Center', 'victheme_core'),\n ),\n )))\n ->addChildren(new VTCore_Bootstrap_Element_BsElement(array(\n 'type' => 'div',\n 'attributes' => array(\n 'class' => array('table-manager'),\n ),\n )))\n ->lastChild()\n ->addChildren(new VTCore_Html_Table(array(\n 'headers' => array(\n ' ',\n __('Content', 'victheme_core'),\n ' ',\n ),\n 'rows' => $this->buildRows(),\n 'attributes' => array(\n 'data-filter' => 2,\n ),\n )))\n ->addChildren(new VTCore_Form_Button(array(\n 'text' => __('Add New Entry', 'victheme_core'),\n 'attributes' => array(\n 'data-tablemanager-type' => 'addrow',\n 'class' => array('button', 'button-large', 'button-primary'),\n ),\n )));\n\n return $widget;\n }", "title": "" }, { "docid": "2c8ac139cce080902a6dd62b1d9cecee", "score": "0.58812493", "text": "public function addElement(FormElement $element) {\n $this->elements[] = $element;\n }", "title": "" }, { "docid": "777e25d472994e2ef24de998f4d999a1", "score": "0.58807576", "text": "public function _add_to_submit()\n\t{\n\t\t\t$view = new View('reportstinymce/reportstinymce_js');\n\t\t\t$view->width = \"420\";\n\t\t\t$view->render(true);\n\t}", "title": "" }, { "docid": "6f23b720052ba45953670e0710f984ed", "score": "0.58765215", "text": "public static function replyToAddFormElements($oAdminPage) ;", "title": "" } ]
3c97210fa146e00b7efc6f9bd797ef19
get food item details
[ { "docid": "b4dd50b7b9cf9043ec855c24e9fabfa9", "score": "0.7255568", "text": "public function getFoodItemDetails(Request $request){\n $food_id = $request->input('food_id');\n // executing query into menu_items table using food_id for food details\n $result = MenuItemsModel::where('id', $food_id)->get();\n return response()->json($result);\n }", "title": "" } ]
[ { "docid": "23e3a1b071ced7250f67532b4e84750c", "score": "0.7190272", "text": "function item_get(){\n $id = $this->get('id');\n if(!$id)\n $result = $this->supplies->all();\n else\n $result = $this->supplies->get($id);\n \n\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Ingredient not found!'), 404); \n }", "title": "" }, { "docid": "82737264ec985c2bb0531648d9702d8c", "score": "0.6808874", "text": "public function getFoodDetails($id){\n $obj = Foodtype::find($id);\n return $obj;\n }", "title": "" }, { "docid": "b2b698dca4bc591b63d5b97b32970152", "score": "0.66843367", "text": "public function show_food()\n\t{\n\t $data = array();\n\t \n\t /**\n\t * van a telephely kivalasztva\n\t *\n\t * @author\n\t */\n $this->checkSessionForSelectedBreedersite();\n \n\t $date = date('Y-m-d', $this->uri->segment(3));\n\t \n\t $data = $this->getProductionDataForAllStock($date);\n\t \n\t $this->template->build('egg/show_food', $data);\n\t}", "title": "" }, { "docid": "55991bb7e5ce6ac0e6890698f60ed876", "score": "0.65944314", "text": "function item_get() {\n if($this->session->userdata('is_logged_in')) {\n if($this->get('id')){\n $itemid = $this->get('id');\n $item = $this->im->get_item($itemid);\n if ($item) {\n $this->response($item, 200); // 200 being the HTTP response code\n } else {\n $this->response('Ooops! We cant find that item', 404); // Not authorized\n }\n } else {\n $this->response('Bad Request!', 400);\n }\n } else {\n $this->response('Access denied please login!', 401);\n }\n }", "title": "" }, { "docid": "1d75b6676a2afe4e3625fb78f717c3f9", "score": "0.65634793", "text": "public function show(Food $food)\n {\n //\n }", "title": "" }, { "docid": "1d75b6676a2afe4e3625fb78f717c3f9", "score": "0.65634793", "text": "public function show(Food $food)\n {\n //\n }", "title": "" }, { "docid": "1d75b6676a2afe4e3625fb78f717c3f9", "score": "0.65634793", "text": "public function show(Food $food)\n {\n //\n }", "title": "" }, { "docid": "6a7e18571e88f24779cac7d5d05c9ad8", "score": "0.64515543", "text": "protected function processFoodItems() {\n }", "title": "" }, { "docid": "8e4fba0ec92896ad16f2ed4a7659544c", "score": "0.64143896", "text": "public function show($id) {\n $foodingredient = DB::table('foodingredients')\n ->join('fooditems', 'foodingredients.IID', '=', 'fooditems.id')\n ->select('foodingredients.*', 'fooditems.Name as foodingredientName')\n ->where('foodingredients.FID','=',$id)\n ->get();\n // $foodingredient = DB::table('foodingredients')\n // ->join('fooditems', 'foodingredients.FID', '=', 'fooditems.id')\n // ->join('fooditems as fooditems2', 'foodingredients.IID', '=', 'fooditems2.id')\n // ->select('foodingredients.*', 'fooditems.Name as fooditemname', 'fooditems2.Name as foodingredientName')\n // ->where('foodingredients.FID','=',$id)\n // ->get();\n\n return $foodingredient;\n }", "title": "" }, { "docid": "fb01bd5ffeb769bf802970e013b2efa0", "score": "0.6407102", "text": "public function show(Foodie $foodie)\n {\n //\n }", "title": "" }, { "docid": "fbfeab6fa816b734ae9296f04035c4ab", "score": "0.62811196", "text": "public function show($id)\n {\n return Food::find($id);\n }", "title": "" }, { "docid": "488f89337a8cebc6c4aef9b057daddeb", "score": "0.6279534", "text": "public function actionFooditems(){\n $id = $_POST['foodid'];\n $models = FoodItems::model()->findAllByAttributes(array('food_typeid'=>$id));\n if($models){\n $out = array();\n foreach($models as $model){\n $content .= '<li><a href=\"#\" food=\"'.$model->id.'\" foodtypeid=\"'.$model->food_typeid.'\" class=\"fooditem\" id=\"fooditem_'.$model->id.'\">'.$model->item.'</li>';\n }\n echo $content;\n }\n \n\t\t\tYii::app()->end();\n }", "title": "" }, { "docid": "8631b931f6b2b4320c2d8a7b5f433ce1", "score": "0.626567", "text": "public function getEatFoodsList(){\n return $this->_get(5);\n }", "title": "" }, { "docid": "80a389f407ea8f23f688bf5722e647a1", "score": "0.62368923", "text": "function get_item($id)\n{\n\t$sql = \"select id, summary, details from item where id = ?\";\n\t$items = DB::select($sql, array($id));\n\n\t// If we get more than one item or no items display an error\n\tif (count($items) != 1) \n\t{\n die(\"Invalid query or result: $query\\n\");\n }\n\n\t// Extract the first item (which should be the only item)\n $item = $items[0];\n\treturn $item;\n}", "title": "" }, { "docid": "386798b9c7b37190d790b643b6297158", "score": "0.6230138", "text": "public function retrieveItem()\n\t{\n\t}", "title": "" }, { "docid": "eed4fb855ed01feca73586c301572ae3", "score": "0.6228318", "text": "public function details()\n {\n return $this->join('item_detail', 'items.id', '=', 'item_detail.item_id')->where('')->get();\n }", "title": "" }, { "docid": "e49a84a8ea8f3f6e77dc9053c5337a06", "score": "0.61940664", "text": "public function getAllFoods(){\n $result = MenuItemsModel::all();\n return response()->json($result);\n }", "title": "" }, { "docid": "02f1a99f82d025246f969bcbb23f5496", "score": "0.61887574", "text": "public function getFoodByID($id)\n {\n $food = Food::where('id', $id)->first();\n\n if ($food === null) {\n return response()->json([\n 'message' => 'Item not found',\n ], 404);\n }\n\n return $food->toJson();\n }", "title": "" }, { "docid": "8aebbb8056aec2ac5cb9af0ecb6fcc34", "score": "0.6145685", "text": "function get_item_info ( $city_id, &$items ) \n\t{\n\t\tif ( !empty( $items )) {\n\t\t\tforeach ( $items as &$item ) {\n\n\t\t\t\t// get item images\n\t\t\t\t$item->images = $this->image->get_all_by_type( $item->id, 'item' )->result();\n\n\t\t\t\t// get like count\n\t\t\t\t$item->like_count = $this->like->count_all( $city_id, $item->id );\n\n\t\t\t\t// get review count\n\t\t\t\t$item->review_count = $this->review->count_all( $city_id, $item->id );\n\n\t\t\t\t// get favourite count\n\t\t\t\t$item->fav_count = $this->favourite->count_all( $city_id, $item->id );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fc458fef227004233be36e8643e49627", "score": "0.61261594", "text": "function onhand_get(){\n $id = $this->get('id');\n $result = $this->supplies->getOnHand($id);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Ingredient not found!'), 404); \n }", "title": "" }, { "docid": "9539ffc0568ae3a84358424ac5d546b6", "score": "0.6108956", "text": "public function getItemDetails()\n {\n \treturn $this->items;\n }", "title": "" }, { "docid": "9354c36726876ab90accca0aefeb74d9", "score": "0.61083174", "text": "public function show($item_id) {\n if (!Auth::check()) {\n \t return response()->json(['error' => '', 'message' => 'Unauthorized login'], 401);\n } else {\n $item = Items::with('category', 'status', 'owner.user', 'location', 'site', 'supplier', 'photo', 'pat')->where(array('id' => $item_id, 'active' => 1))->get()->toarray();\n\n if (!empty($item)) {\n \treturn response()->json(['error' =>'', 'message' => '','data'=>$item],200);\n \n } else {\n return response()->json(['error' =>'', 'message' => 'Item not found'],400);\n }\n }\n }", "title": "" }, { "docid": "a9772896b3cdd749b09f4255e3fc6231", "score": "0.6090872", "text": "public function get_foods(){\n\t\t$name = $_SESSION['username'];\n\t\t$query = $this->db->query(\"SELECT * FROM nutricion_program where customer_name = '$name'\");\n\t\t$row = $query->row();\n\t\tif (empty($query->result())){\n\t\t\techo 'you are unlucky . You do not have program';\n\t\t}else{\n\t\t\techo 'yeah';\n\t\t}\n\n\t\t// foreach ($query->result() as $row) {\n\t\t// \techo $row->foodname;\n\t\t// }\n\n\t\t//using the row() function to return a single result row\n\t\t//$fai = $query->row();\n\t\t// from object $fai echo the foodname \n\t\t//echo $fai->foodname;\n\n\t\t //$data = $fai->foodname;\n\n\t\t return $query;\n\t}", "title": "" }, { "docid": "df3fc3e454244832a5d2078f2b9acfb4", "score": "0.6082072", "text": "public function actionFoddies(){\n $q = $_GET['term'];\n $id = Yii::app()->user->id;\n\t\tif (isset($q)) {\n\t\t $criteria = new CDbCriteria;\n $criteria->condition='status = 1 AND item LIKE \"%'.trim($q).'%\"';\n $criteria->distinct = true;\n $criteria->group = 'item';\n\t\t $criteria->limit = 10;\n\t\t $services = FoodItems::model()->findAll($criteria);\n \n\t\t if (!empty($services)) {\n\t\t\t$out = array();\n\t\t\tforeach ($services as $c) {\n\t\t\t $out[] = array(\n\t\t\t\t'label' => $c->item, \n\t\t\t\t'value' => $c->item,\n\t\t\t\t'id' => $c->id,\n 'typeid'=>$c->food_typeid,\n \n\t\t\t );\n\t\t\t}\n\t\t\techo CJSON::encode($out);\n\t\t\tYii::app()->end();\n\t\t }\n\t\t}\n }", "title": "" }, { "docid": "d67b7cee644af5800bfd34d2678ac942", "score": "0.6081971", "text": "public function readItem()\n {\n $query = \"SELECT\n name, description, price, category_id\n FROM\n {$this->tableName}\n WHERE\n id = ?\n LIMIT\n 0,1\";\n $stmt = $this->connection->prepare($query);\n $stmt->bindParam(1, $this->id);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->name = $row['name'];\n $this->description = $row['description'];\n $this->price = $row['price'];\n $this->category_id = $row['category_id'];\n }", "title": "" }, { "docid": "46cf5d9c8281dad25ca2d74d63db89b3", "score": "0.6048489", "text": "public function getItemAction() {\n $id = Arr::get($this->post, 'id', 0);\n $item = DB::select('catalog.id', 'catalog.name', 'catalog.cost', 'catalog.image', ['brands.id', 'brand_id'], ['brands.name', 'brand_name'])\n ->from('catalog')\n ->join('brands', 'LEFT')->on('brands.alias', '=', 'catalog.brand_alias')\n ->where('catalog.id', '=', $id)\n ->find();\n die(json_encode([\n 'success' => true,\n 'item' => [\n 'id' => $item->id,\n 'link' => HTML::link('wezom/items/edit/'.$item->id),\n 'brand_link' => HTML::link('wezom/brands/edit/'.$item->brand_id),\n 'name' => $item->name,\n 'cost' => $item->cost,\n 'brand_id' => $item->brand_id,\n 'brand_name' => $item->brand_name,\n 'image' => is_file(HOST.HTML::media('images/catalog/medium/'.$item->image)) ? HTML::media('images/catalog/medium/'.$item->image) : NULL,\n 'image_big' => is_file(HOST.HTML::media('images/catalog/medium/'.$item->image)) ? HTML::media('images/catalog/big/'.$item->image) : NULL,\n ],\n ]));\n }", "title": "" }, { "docid": "0c701c25078af4736b483544ea6c090c", "score": "0.60339695", "text": "public function _get_item($request = array())\n\t{\n\t\treturn $this->items->get($request);\n\t}", "title": "" }, { "docid": "1ec5b7a1e631afc8e82b7ebbbe0a8a7b", "score": "0.6031969", "text": "public function get_details();", "title": "" }, { "docid": "d994d2473ed9f2c4aeed864dca23507e", "score": "0.6029337", "text": "public static function showItemById($id){\n $item = DB::table('items')->where('id',$id)->first();\n return $item;\n }", "title": "" }, { "docid": "f6391ffd2a60de268c0e3d601073b7ea", "score": "0.60135263", "text": "private function getFoodBySearch()\n { \n $query = $_GET['q'];\n \n $food = Food::where('name', 'LIKE', '%' . $query . '%')->paginate(15);\n\n if ($food === null) {\n return response()->json([\n 'message' => 'Item not found',\n ], 404);\n }\n\n return $food->toJson();\n }", "title": "" }, { "docid": "622f50faa6e7b58b934644dc4275e208", "score": "0.5992035", "text": "public function fetchUnit(Request $request){ \n $fooditem =$request->get('query'); \n $unit = FoodItem::where('itemName','=',$fooditem)->value('unit'); \n echo $unit;\n }", "title": "" }, { "docid": "188b7d387440f44cf2c40f8f19f7eefb", "score": "0.5987587", "text": "public function it_lists_all_food_units_and_includes_calories_for_a_specific_food()\n {\n $this->markTestIncomplete();\n $this->logInUser();\n\n $response = $this->apiCall('GET', '/api/foodUnits?includeCaloriesForSpecificFood=true&food_id=2');\n $content = json_decode($response->getContent(), true);\n// dd($content);\n\n $this->checkFoodUnitKeysExist($content[0]);\n $food = $content[1];\n\n $this->assertEquals(6, $food['id']);\n $this->assertEquals('grams', $food['name']);\n $this->assertEquals('food', $food['for']);\n $this->assertNull($food['calories']);\n $this->assertEquals('5.00', $content[1]['calories']);\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "title": "" }, { "docid": "f0a244d609b53a19c4914e5a35730a33", "score": "0.59694743", "text": "function allitems_get() {\n if($this->session->userdata('is_logged_in')) {\n if($this->get('userid')){\n $userid = $this->get('userid');\n $items = $this->im->get_items($userid);\n if ($items) {\n $this->response($items, 200); // 200 being the HTTP response code\n } else {\n // Todo show error !\n $this->response('Ooops! We cant find that item', 404); // Not authorized\n }\n } else {\n $this->response('Bad Request!', 400);\n }\n } else {\n $this->response('Access denied please login!', 401);\n }\n }", "title": "" }, { "docid": "99dfec8ad6025c4da90ce23df1c18a1b", "score": "0.5969158", "text": "public function index($id = null) {\n if ($id == null) {\n \t$foodingredient = DB::table('foodingredients')\n ->join('fooditems', 'foodingredients.FID', '=', 'fooditems.id')\n ->join('fooditems as fooditems2', 'foodingredients.IID', '=', 'fooditems2.id')\n ->select('foodingredients.*', 'fooditems.Name as fooditemname', 'fooditems2.Name as foodingredientName')\n ->get();\n return $foodingredient;\n\n\n } else {\n return $this->show($id);\n }\n }", "title": "" }, { "docid": "190766a36de18b8524acb4a14bbc4910", "score": "0.59574765", "text": "function get_items();", "title": "" }, { "docid": "ea472747709496ebbd2b2dade366a125", "score": "0.58878285", "text": "public function show($id)\n {\n /*$item = Item::find($id);\n\n if (is_null($item)) {\n return response()->json(['message' => 'item no encontrado']);\n }\n\n return response()->json($item, 200);*/\n\n\n $items = DB::table('items')\n ->select('item_superiors.nomitemSup','items.id','items.descrip','items.nomitem')\n ->join('item_superiors', 'items.item_general_id', '=', 'item_superiors.id')\n ->where('items.id',$id )->get();\n return response()->json($items ,201);\n }", "title": "" }, { "docid": "0244ac8aeebfadd4e6c9a825e118e8a2", "score": "0.5887004", "text": "function foodpress_get_menu_item(){\r\n\t\t\tglobal $foodpress;\r\n\r\n\t\t\t$item_id = (int)($_POST['menuitem_id']);\r\n\t\t\t$content = $foodpress->foodpress_menus->get_detailed_menu_item_content($item_id, '',$_POST['args']);\r\n\t\t\t//$popup_frame = $foodpress->foodpress_menus->get_popup_info_html();\r\n\r\n\t\t\t$return = array(\r\n\t\t\t\t//'popupframe'=>$popup_frame,\r\n\t\t\t\t'content'=>$content\r\n\t\t\t);\r\n\r\n\t\t\techo json_encode($return);\r\n\t\t\texit;\r\n\t\t}", "title": "" }, { "docid": "af462b3ea824e5f0d9d83e3582763406", "score": "0.5860858", "text": "public function get_item()\n {\n return $this->item;\n }", "title": "" }, { "docid": "22a889f49499a4671863d6be343ad86c", "score": "0.58553946", "text": "public function orderItemModal(Request $request){\r\n\r\n if(Auth::user()==null) {\r\n return response()->json([\r\n 'status' => false,\r\n 'msg'=>'Please! Login'\r\n ]);\r\n }\r\n $user_id = Auth::user()->id;\r\n $food_id =(int)$request->item['food_id'];\r\n\r\n $res =collect(DB::select('select r.id from foods f, typeoffoods t, restaurants r where f.typeoffood_id = t.id and t.restaurant_id = r.id and f.id ='.$food_id))->first();\r\n if($res ==null)return response()->json(['status'=>false,'msg'=>'Food does not exists']);\r\n $restaurant_id = $res->id;\r\n $order = Order::where(['restaurant_id'=>$restaurant_id,'user_id'=>$user_id,'status'=>1])->first();\r\n $restaurant = Restaurant::find($restaurant_id);\r\n if($restaurant ==null) return response()->json(['status'=>false,'msg'=>'Restaurant does not exists']);\r\n if($order ==null){\r\n $order = new Order();\r\n $order->restaurant_id= $restaurant_id;\r\n $order->user_id =$user_id;\r\n $order->price =0;\r\n $order->trans_fee = $restaurant->trans_fee or 0;\r\n $order->sum_price=0;\r\n }\r\n $order->status=1;\r\n $order->save();\r\n\r\n //\r\n $food = Food::find($food_id);\r\n\r\n if($food ==null) {\r\n return response()->json(['status'=>false,'msg'=>'Food does not exists']);\r\n }\r\n $orderDetail = OrderDetail::where(['food_id'=>$food_id,'order_id'=>$order->id])->first();\r\n if($orderDetail == null){\r\n $orderDetail = new OrderDetail();\r\n $orderDetail->order_id = $order->id;\r\n $orderDetail->food_id =$food_id;\r\n }else{\r\n $order->price = $order->price - $orderDetail->price;\r\n if($order->price <0) $order->price =0;\r\n }\r\n\r\n $orderDetail->name = '<b>'.$food->name.'</b>';\r\n\r\n if($food->description1 !=null && $food->description1 !=''){\r\n $orderDetail->name= $orderDetail->name.' - '.$food->description1;\r\n }\r\n if($food->description2 !=null && $food->description2 !=''){\r\n $orderDetail->name=$orderDetail->name.' - '.$food->description2;\r\n }\r\n\r\n $orderDetail->quality = (int)$request->item['item'];\r\n $orderDetail->price =(double)$request->item['total'];\r\n\r\n $order->price =$order->price + $orderDetail->price;\r\n $order->sum_price=$order->price + $order->trans_fee;\r\n $orderDetail->save();\r\n $order->save();\r\n\r\n $results = $request->item['data'];\r\n $arrayID =[];\r\n\r\n foreach ($results as $result){\r\n $item = OrderOptionDetail::where(['order_detail_id'=>$orderDetail->id,'option_id'=>$result[\"food_option\"],'sub_option_id'=>$result[\"sub_option\"]])->first();\r\n if($item ==null){\r\n $item = new OrderOptionDetail();\r\n $item->order_detail_id = $orderDetail->id;\r\n $item->option_id =$result[\"food_option\"];\r\n $foption = FoodOption::find($item->option_id);\r\n $item->option_name = $foption->name;\r\n $item->sub_option_id =$result[\"sub_option\"];\r\n $suboption = SubOption::find($item->sub_option_id);\r\n $item->sub_option_name =$suboption->name;\r\n }\r\n $item->quality =1;\r\n $item->price =$result[\"price\"];\r\n $item->save();\r\n array_push($arrayID, $item->id);\r\n }\r\n $orderOptions = OrderOptionDetail::whereNotIn('id',$arrayID)->get();\r\n foreach ($orderOptions as $orderOption){\r\n $orderOption->delete();\r\n }\r\n\r\n if($orderDetail->price ==0){\r\n $orderOptions = OrderOptionDetail::where('order_detail_id',$orderDetail->id)->get();\r\n foreach ($orderOptions as $orderOption){\r\n $orderOption->delete();\r\n }\r\n $orderDetail->delete();\r\n }\r\n\r\n return response()->json([\r\n 'status' => true,\r\n 'msg'=>'updated',\r\n 'restaurant_id'=>$order->restaurant_id\r\n ]);\r\n }", "title": "" }, { "docid": "de6bc4bf16bcbe37b8457b7c83b26e94", "score": "0.58426625", "text": "public function show($id)\n {\n //return \"你購買的是第\" . $id . \"個商品\";\n\n //用主鍵id查詢資料\n //$item = Item::find($id);\n\n //用主鍵id查詢資料,找不到就報錯\n //$item = Item::findOrFail($id);\n\n //下條件查詢,id欄位是$id,找出第一筆\n //$item = Item::where('id',$id)->first();\n\n return $item;\n }", "title": "" }, { "docid": "448ed30923794a62c1379a7ac11b80cb", "score": "0.5836364", "text": "function get_item()\n{\n\tif ( ! isset($_GET['id']) || empty($_GET['id']) ) {\n\t\treturn false;\n\t}\n\n\tglobal $database;\n\n\t$item = $database->get(\"items\", \"text\", [\n\t\t\"id\" => $_GET['id']\n\t]);\n\n\tif ( ! $item ) {\n\t\treturn false;\n\t}\n\n\treturn $item;\n}", "title": "" }, { "docid": "2df03c33498f4448ec5953381f795b6b", "score": "0.58238727", "text": "public function getItem();", "title": "" }, { "docid": "2df03c33498f4448ec5953381f795b6b", "score": "0.58238727", "text": "public function getItem();", "title": "" }, { "docid": "dde13b952cb4afbecd057dd5096b7296", "score": "0.5816852", "text": "public function food() {\n return $this->hasOne('Modules\\Admin\\Models\\Food', 'id', 'food_id');\n }", "title": "" }, { "docid": "8312aafc67d66562acdb7d3f335606f4", "score": "0.58130014", "text": "function getSmallDetails($item){\n if(isset($item->small_detail))\n return $item->small_detail;\n elseif(isset($item->large_detail))\n return $item->large_detail;\n else \n return \"NO DESCRIPTION AVAILABLE\";\n}", "title": "" }, { "docid": "15d2a5d2531bc0142778f50bcbba51c3", "score": "0.58097714", "text": "public function viewOtherItems(){\n \n $this->load->model('PizzaModel'); \n $otheritemdetails = array('otheritemList' => $this ->PizzaModel->getSidesDetails());\n $this->load->view('otheritems', $otheritemdetails);\n }", "title": "" }, { "docid": "180e52a3bc82108ab3f19f4f8f1b1e7e", "score": "0.5804942", "text": "public static function getItems() {\n \n }", "title": "" }, { "docid": "65b0f0f9a310bf925ba51b76a42c0b49", "score": "0.5792244", "text": "function perbox_get(){\n $id = $this->get('id');\n $result = $this->supplies->getPerBox($id);\n if ($result != null)\n $this->response($result, 200);\n else\n $this->response(array('error' => 'Ingredient not found!'), 404); \n }", "title": "" }, { "docid": "43f91e8a1f2b24056370629f7b39fc4e", "score": "0.57357407", "text": "public function getSelectedMenuFoods(Request $request){\n $menu_id = $request->input('menu_id');\n // executing query into menu_items table using menu_id\n $result = MenuItemsModel::where('menu_id', $menu_id)->get();\n return response()->json($result);\n }", "title": "" }, { "docid": "72d54b9918cfc839c45e1f0e485c3152", "score": "0.5730041", "text": "function get_info($item_id) {\n\t\t$this->db->from('items');\n\t\t$this->db->where('item_id',$item_id);\n\t\t\n\t\t$query = $this->db->get();\n\n\t\tif($query->num_rows()==1) {\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t\t//Get empty base parent object, as $item_id is NOT an item\n\t\t\t$item_obj=new stdClass();\n\n\t\t\t//Get all the fields from items table\n\t\t\t$fields = $this->db->list_fields('items');\n\n\t\t\tforeach ($fields as $field)\t{\n\t\t\t\t$item_obj->$field='';\n\t\t\t}\n\n\t\t\treturn $item_obj;\n\t\t}\n\t}", "title": "" }, { "docid": "68a0036a22ee69977e8f5c6c55edfe78", "score": "0.57296944", "text": "public function getinfoAction() {\n\t\t$_product = $this->_get_product();\n\t\t$_count = $this->_get_items_count();\n\t\t$_cart = Mage::app()->getLayout()->getBlockSingleton('checkout/cart_sidebar')->setTemplate(\"checkout/cart/sidebar.phtml\")->toHtml();\n\t\t\n\t\t$_data = array(\n\t\t\t'product' => $_product['id'],\n\t\t\t'name' => $_product['name'],\n\t\t\t'count' => $_count,\n\t\t\t'toplink' => $this->_get_top_link($_count),\n\t\t\t'sidebar' => $_cart,\n\t\t\t'thumbnail' => $_product['thumbnail'],\n\t\t);\n\n\t\t$this->getResponse()->setBody(json_encode(\n\t\t\t$this->_prepare_message_array(true, '', $_data)\n\t\t));\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.57230103", "text": "public function getItems();", "title": "" }, { "docid": "b97775c3f7e119adb601cbbdb4ce47c4", "score": "0.5703242", "text": "public function getSaleableItem();", "title": "" }, { "docid": "c69f2cc3e99c4e4bae06e9396e67c1e6", "score": "0.5702273", "text": "function getItem($userid, $listid, $itemid){\n global $response;\n global $dbase;\n $sql = \"SELECT * FROM \". ITEMS .\" WHERE user_id=$userid AND list_id=$listid AND item_id=$itemid\";\n $dbase->query($sql);\n $result = $dbase->getResults();\n $response[\"item\"] = $result;\n }", "title": "" }, { "docid": "290ede672093fa221fefee5bf6590f13", "score": "0.56922656", "text": "public function index()\n {\n // $foods = FoodItem::latest()->withCount('comments')->get();\n $foods = FoodItem::latest()->get();\n\n return view('admin.food.items.index',compact('foods'));\n }", "title": "" }, { "docid": "c4eadba692bcc42b2bdfc62552a9cfa5", "score": "0.56866187", "text": "public function getItemDetail()\n {\n $value = $this->get(self::item_detail);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "e656c7004ca436d66d88ffe5b45613bb", "score": "0.5669315", "text": "public function item($id)\n {\n return Holiday::where('id', $id)->first();\n }", "title": "" }, { "docid": "4ca00b52d8ec6a8d16c35cb28ae6574d", "score": "0.5667089", "text": "public function show(FoodItem $foodItem)\n {\n // $foodItem = FoodItem::withCount('comments')->find($foodItem->id);\n\n return view('admin.food.items.show',compact('foodItem'));\n }", "title": "" }, { "docid": "2f6fdc4c978afa3b2a2ddf2cbff50aa0", "score": "0.56644154", "text": "public function getDelEatFoodsList(){\n return $this->_get(6);\n }", "title": "" }, { "docid": "09acd188f3042180b470807eba81b2e1", "score": "0.56539035", "text": "public function item($id) {\n $this->data['pagebody'] = 'justone';\n $source = $this->inventory->get($id);\n\n // pull data from quotes data\n $this->data['date'] = $source['date'];\n $this->data['what'] = $source['what'];\n $this->data['mug'] = $source['mug'];\n $this->data['CA'] = $source['CA'];\n\n $this->render();\n }", "title": "" }, { "docid": "4a5873900cf2071eeba32ffb5ed8e92a", "score": "0.5644812", "text": "public function getAllFoods()\n {\n return FoodLibraryResource::collection(FoodLibrary::all());\n }", "title": "" }, { "docid": "b4c9837eb856e97269e787807b314b17", "score": "0.5636476", "text": "public function get_item_info()\n{\n\t$this->db->select('*');\n $this->db->from('Items');\n $query = $this->db->get();\n return $result = $query->result();\n}", "title": "" }, { "docid": "f61481eafdab95a801e127803f5556bb", "score": "0.5632485", "text": "public function show($id)\n {\n $items = Items::find($id);\n $itemdetails = Items::find($id)->itemdetail;\n $borrows = Borrow::all();\n $title = 'Viewing Equipment';\n\n return View('inventory/showitem')->with('title',$title)->with('items', $items)->with('borrows', $borrows)->with('itemdetails',$itemdetails);\n\n }", "title": "" }, { "docid": "5975a0e23d8e52b6207f0d010570e43f", "score": "0.56174964", "text": "public function getAllFoodsForCurrentUser()\r\n {\r\n $this->load->model('food_model'); \r\n\r\n if($this->getUserType() == '1')\r\n {\r\n $allFoodsDetails = $this->food_model->getSuperAdminFoodDetails();\r\n\r\n if(null != $allFoodsDetails && $allFoodsDetails != \"\")\r\n {\r\n return $allFoodsDetails;\r\n } \r\n }\r\n else\r\n {\r\n $userId = $this->getUserId();\r\n $allFoodDetails = $this->food_model->selectaFoodForUser($userId);\r\n\r\n if(null != $allFoodDetails && $allFoodDetails != \"\")\r\n {\r\n return $allFoodDetails;\r\n } \r\n }\r\n }", "title": "" }, { "docid": "1ccefffc3c58568fe42065d69ebe5257", "score": "0.5600878", "text": "abstract protected function doGetItemData();", "title": "" }, { "docid": "4f3b94b8c8bd637c15dfe2b37b8e0db6", "score": "0.5589", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "99c4611ff8217dd62c1b772f74176553", "score": "0.558343", "text": "public function getSecondItem();", "title": "" }, { "docid": "f0b682041aad9bd1e6fa127ec2fca9b5", "score": "0.55831045", "text": "public function view($id = null) {\n\n // allowing this simplifies putting cash in item lists\n if ($id === 'cash' || strval($id) === '0') {\n $this->redirect(array('controller' => 'PaypalOrders', 'action' => 'addfunds'));\n return;\n }\n\n $itemData = $this->Item->getWithFeatures($id);\n\n if (empty($itemData)) {\n throw new NotFoundException(__('Invalid item'));\n }\n\n $item = $itemData['Item'];\n $item_id = $item['item_id'];\n\n $this->loadModel('Server');\n $servers = $this->Server->getAllByItemId($item_id);\n\n $parsedown = new Parsedown();\n $item['description'] = $parsedown->text($item['description']);\n\n $topBuyers = $this->Item->getTopBuyers($item_id);\n $this->addPlayers(array_keys($topBuyers));\n\n $topHoarders = $this->Item->getTopHoarders($item_id);\n $this->addPlayers(array_keys($topHoarders));\n\n // show logged-in user's rating\n $user_id = $this->Auth->user('user_id');\n if ($user_id) {\n $this->set('userRating', $this->Item->getUserRating($item_id, $user_id));\n }\n\n $this->set(array(\n 'item' => $item,\n 'stock' => $this->Item->getStock($item_id),\n 'servers' => $servers,\n 'topBuyers' => $topBuyers,\n 'topHoarders' => $topHoarders,\n 'ratings' => $this->Item->getRating($item_id),\n 'features' => $itemData['Feature']\n ));\n\n $this->loadItems();\n $this->loadShoutbox();\n\n $this->reviews($item, false);\n $this->activity($item, false);\n }", "title": "" }, { "docid": "79c17caa1dfb79d391d3228562af1114", "score": "0.5580186", "text": "public function item()\n\t{\n\t\t$fmodel = $this->fmodel;\n\t\treturn $fmodel::find($this->fid);\n\t}", "title": "" }, { "docid": "329cc5670aa127c00fd713fab600405b", "score": "0.5574394", "text": "public function getItemForId($id){\r\n \t\t$res = AWSHelper::makeAWSRequest(array(\r\n \t\t\t\t\t\t\t\t\t\t 'Operation' => 'ItemLookup',\r\n\t\t\t\t\t\t\t\t\t \t 'MerchantId' => 'All',\r\n\t\t\t\t\t\t\t\t\t \t 'Condition' => 'New',\r\n\t\t\t\t\t\t\t\t\t \t 'ResponseGroup' => 'Medium,Offers,Reviews',\r\n\t\t\t\t\t\t\t\t\t \t 'ItemId' => $id\r\n\t\t\t\t\t\t\t\t\t\t));\r\n\t\treturn new Item($res->Items->Item);\r\n \t}", "title": "" }, { "docid": "11bd8cabf873598524479e53cb98ae5b", "score": "0.5568449", "text": "abstract public function getDetails();", "title": "" }, { "docid": "eea98ddbccc472ab4d4c04063d162f3c", "score": "0.5568285", "text": "public function show(Food $food)\n {\n abort_if(! Auth::user()->can('food-show'), 403);\n \n return view('backend.crud.food.show',compact('food'));\n }", "title": "" }, { "docid": "b12731f22b1a0276cc7648f766e04180", "score": "0.5554451", "text": "function get_fraud_items($order) {\n\n $data = array();\n $items = $order->get_items();\n\n foreach ($items as $item) {\n $product = new WC_Product($item['product_id']);\n if (isset($item['variation_id'])) {\n $name = $product->get_title();\n $product = new WC_Product($item['variation_id']);\n } else {\n $name = $product->get_title();\n }\n\n $data[] = array(\n 'product_code' => (string)$product->id,\n 'sku' => $product->sku,\n 'description' => $name,\n 'qty' => $item['qty'],\n 'cost' => $product->get_price(),\n 'line_total' => $order->get_line_subtotal($item)\n );\n }\n\n return $data;\n }", "title": "" }, { "docid": "b3f3c4ffae83b72921ecf224cc4810cd", "score": "0.5542343", "text": "private function getDetails(){\n\n\t}", "title": "" }, { "docid": "feca9fbdeb155db2a5398ecbdb289c89", "score": "0.55417323", "text": "public function getItem()\n {\n return $this->get(self::REQUEST_ITEM);\n }", "title": "" }, { "docid": "2ac005b8f838169207b5135732b0a345", "score": "0.55366284", "text": "public function show(Item $item) {\n //\n }", "title": "" }, { "docid": "efe72e32e2006ec449edfc6f2b8ba12e", "score": "0.5533141", "text": "public function getItem($itemName);", "title": "" }, { "docid": "8d784a592a0e49199fd7ff62fe7ca5d7", "score": "0.5527874", "text": "public function show($id)\n {\n //\n return Item::find($id);\n }", "title": "" }, { "docid": "19eaa7c0eaa7a881dd2143a65a0b599e", "score": "0.55264044", "text": "public function show(Meal $meal)\n {\n //\n }", "title": "" }, { "docid": "19eaa7c0eaa7a881dd2143a65a0b599e", "score": "0.55264044", "text": "public function show(Meal $meal)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.5509627", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.5509627", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.5509627", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.5509627", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "bab37b75410eade81a9e76f581f808c6", "score": "0.5509627", "text": "public function show(Item $item)\n {\n //\n }", "title": "" }, { "docid": "30fb4504eafddb64012b7904cb91fc74", "score": "0.5509138", "text": "public function getInfoMedidor()\n {\n return Producto::where('idproducto', 1)->get();\n }", "title": "" }, { "docid": "cdf4cbc8e0a317dc4550ea01a4314a69", "score": "0.55048275", "text": "public function index()\n {\n $type = Db::name('type')->where('sts','>',0)->select();\n $list = Db::name('foods')\n ->alias('f')\n ->field('f.id,f.name,f.insert_time,t.name as type')\n ->join('eo_type t','f.t_id = t.id','LEFT')\n ->where('t.sts','>',0)\n ->where('f.sts','>',0)\n ->paginate(20);\n $page = $list->render();\n return $this->fetch('foods/index',array('active'=>'food','page'=>$page,'list'=>$list,'type'=>$type));\n }", "title": "" }, { "docid": "b1d229d838a368355bf133097982f2d0", "score": "0.54909754", "text": "public function show($id) {\n\n $foodPanelsRaw = FoodPanel::find($id);\n //record insertion\n if($foodPanelsRaw->Type == \"Non-Categorized\")\n {\n $foodPanel = $foodPanelsRaw;\n\n $foodpanelfooditemsRAW = DB::table('foodpanelfooditems')\n ->where('foodpanelfooditems.PID', $foodPanelsRaw->id)\n ->orderBy('foodpanelfooditems.Order', 'asc')\n ->get();\n $foodPanelItmesRAW = [];\n for ($i=0; $i < sizeof($foodpanelfooditemsRAW); $i++)\n {\n if(is_numeric( $foodpanelfooditemsRAW[$i]->FID ))\n {\n $foodPanelItmesRAW[$i] = DB::table('foodpanelfooditems')\n ->leftjoin('fooditems', 'foodpanelfooditems.FID', '=', 'fooditems.id')\n // ->leftjoin('foodaka', 'foodpanelfooditems.FID', '=', 'foodaka.id')\n ->select('foodpanelfooditems.id','foodpanelfooditems.PID','foodpanelfooditems.CatID','foodpanelfooditems.FID','foodpanelfooditems.Order','foodpanelfooditems.Name','fooditems.Name as associatedFood')\n // ->where('foodpanelfooditems.PID', $foodPanelsRaw->id)\n ->where('foodpanelfooditems.FID', $foodpanelfooditemsRAW[$i]->FID)\n ->orderBy('foodpanelfooditems.Order', 'asc')\n ->first();\n }\n else\n {\n // $intID = preg_split('#(?<=\\d)(?=[a-z])#i', $foodpanelfooditemsRAW[$i]->FID);\n // $intID = filter_var($foodpanelfooditemsRAW[$i]->FID, FILTER_SANITIZE_NUMBER_INT);\n preg_match_all('!\\d+!', $foodpanelfooditemsRAW[$i]->FID, $intID);\n $foodPanelItmesRAW[$i] = DB::table('foodpanelfooditems')\n // ->leftjoin('fooditems', 'foodpanelfooditems.FID', '=', 'fooditems.id')\n // ->join('foodaka', 'foodpanelfooditems.FID', '=', 'foodaka.id')\n ->select('foodpanelfooditems.id','foodpanelfooditems.PID','foodpanelfooditems.CatID','foodpanelfooditems.FID','foodpanelfooditems.Order','foodpanelfooditems.Name')\n // ->where('foodpanelfooditems.PID', $foodPanelsRaw->id)\n ->where('foodpanelfooditems.FID', $foodpanelfooditemsRAW[$i]->FID)\n // ->where('foodaka.id', $intID[0])\n ->orderBy('foodpanelfooditems.Order', 'asc')\n ->first();\n\n $associatedFood = DB::table('foodaka')\n // ->leftjoin('fooditems', 'foodpanelfooditems.FID', '=', 'fooditems.id')\n // ->join('foodaka', 'foodpanelfooditems.FID', '=', 'foodaka.id')\n ->select('foodaka.Name as associatedFood')\n // ->where('foodpanelfooditems.PID', $foodPanelsRaw->id)\n // ->where('foodpanelfooditems.FID', $foodpanelfooditemsRAW[$i]->FID)\n ->where('foodaka.id', $intID[0][0])\n // ->orderBy('foodpanelfooditems.Order', 'asc')\n ->first();\n $foodPanelItmesRAW[$i]->associatedFood = $associatedFood->associatedFood;\n // return $associatedFood->associatedFood;\n }\n }\n\n $foodPanel['fooditems'] = $foodPanelItmesRAW;\n\n\n }\n elseif ($foodPanelsRaw->Type == \"Categorized\")\n {\n $foodPanel = $foodPanelsRaw;\n\n $foodPanelsCatRaw = DB::table('foodpanelcategory')\n ->where('foodpanelcategory.PID', $id)\n ->orderBy('foodpanelcategory.Order', 'asc')\n ->get();\n\n $foodPanelsCats = [];\n for ($j = 0; $j < sizeof($foodPanelsCatRaw); $j++)\n {\n $foodPanelsCats[$j] = $foodPanelsCatRaw[$j];\n\n // $foodPanelsCats[$j]->fooditems = DB::table('foodpanelfooditems')\n // ->join('fooditems', 'foodpanelfooditems.FID', '=', 'fooditems.id')\n // ->where('foodpanelfooditems.PID', $foodPanelsRaw->id)\n // ->where('foodpanelfooditems.CatID', $foodPanelsCatRaw[$j]->id)\n // ->get(['foodpanelfooditems.id','foodpanelfooditems.PID','foodpanelfooditems.CatID','foodpanelfooditems.FID','foodpanelfooditems.Name','fooditems.Name as associatedFood']);\n $foodpanelfooditemsRAW = DB::table('foodpanelfooditems')\n ->where('foodpanelfooditems.PID', $foodPanelsRaw->id)\n ->where('foodpanelfooditems.CatID', $foodPanelsCatRaw[$j]->id)\n ->get(['foodpanelfooditems.id','foodpanelfooditems.PID','foodpanelfooditems.CatID','foodpanelfooditems.FID','foodpanelfooditems.Name']);\n // return sizeof($foodpanelfooditemsRAW);\n for ($k=0; $k < sizeof($foodpanelfooditemsRAW); $k++)\n {\n if(is_numeric( $foodpanelfooditemsRAW[$k]->FID ))\n {\n $associatedFood = DB::table('fooditems')\n ->select('fooditems.Name as associatedFood')\n ->where('id', $foodpanelfooditemsRAW[$k]->FID)\n ->first();\n $foodpanelfooditemsRAW[$k]->associatedFood = $associatedFood->associatedFood;\n }\n else if($foodpanelfooditemsRAW[$k]->FID != 'undefined')\n {\n preg_match_all('!\\d+!', $foodpanelfooditemsRAW[$k]->FID, $intID);\n $associatedFood = DB::table('foodaka')\n ->select('foodaka.Name as associatedFood')\n ->where('foodaka.id', $intID[0][0])\n ->first();\n\n $foodpanelfooditemsRAW[$k]->associatedFood = $associatedFood->associatedFood;\n }\n }\n $foodPanelsCats[$j]->fooditems = $foodpanelfooditemsRAW;\n $foodPanel['categories'] = $foodPanelsCats;\n }\n }\n return $foodPanel;\n }", "title": "" }, { "docid": "a481e164eabe6bc62798db9d882c7bf1", "score": "0.54766387", "text": "public function listFood(){\n $foods=Food::orderBy('name','ASC')->paginate(10);\n\n return view('back.page.food.listFood',compact('foods'));\n }", "title": "" } ]
39a082fcd98a7d62072e76981efb5728
Selected Un Read the specified resource from storage.
[ { "docid": "289b8c64c98ba478b3fb3857df4dd0a2", "score": "0.0", "text": "public function selectedUnread(Request $request)\n {\n DB::table('mail_inboxes')\n ->whereIn('id', $request->ids)\n ->update(['read_at' => null]);\n\n return response()->json();\n }", "title": "" } ]
[ { "docid": "6f6cd93fc05e76993ef09e7e4fb7b8a6", "score": "0.6138642", "text": "public function unRead()\n {\n $this->isRead = false;\n }", "title": "" }, { "docid": "0b20fdf57aef3a2bd7143b5fdaea43fb", "score": "0.5244679", "text": "public function storage(StorageSelection $selection);", "title": "" }, { "docid": "1f0ae97e9392ebbd34dbb790b6658cb9", "score": "0.5208161", "text": "public function restore(){\n $this->deleted = false;\n }", "title": "" }, { "docid": "bba6f7dd71df7c28de9f15f37ef8a182", "score": "0.4821497", "text": "public function getSelected() {}", "title": "" }, { "docid": "9e662148243144ff4842f5fa9569343d", "score": "0.481164", "text": "public function DELETE() {\r\n // load the resource, then delete it\r\n $this->bind($this->getStorage()->delete($this->getID()));\r\n // mark changed\r\n $this->changed();\r\n // return\r\n return $this;\r\n }", "title": "" }, { "docid": "340853f285af1b8d16f181eec5e03f27", "score": "0.47969282", "text": "public function uncheck()\n {\n $this->con->executeStep(sprintf('_sahi._uncheck(%s)', $this->getAccessor()));\n }", "title": "" }, { "docid": "340853f285af1b8d16f181eec5e03f27", "score": "0.47969282", "text": "public function uncheck()\n {\n $this->con->executeStep(sprintf('_sahi._uncheck(%s)', $this->getAccessor()));\n }", "title": "" }, { "docid": "0f79a1c7674d36b7e044793c3bf474b2", "score": "0.4793979", "text": "protected function deSelectItem()\n {\n if ($this->getActive() == true)\n return;\n\n// console('Selecting item '.$this->subSection->getId().' ('.$this->subSection->getUsername().')');\n\n $this->setActive(true);\n $this->getCurObject()->setBold(false);\n $this->subSection->setActive(false);\n }", "title": "" }, { "docid": "259453c95fb669ca8fec9843a68db809", "score": "0.47099423", "text": "public function detach() {\n $resource = $this->_resource;\n $this->_resource = null;\n return $resource;\n }", "title": "" }, { "docid": "2f642becf8e97faa3cec1dd78cff5c3a", "score": "0.463495", "text": "public function restore() {\n $this->setFieldValue('removed', self::STATUS_RESTORED);\n\n return $this->saveRemovementFlag();\n }", "title": "" }, { "docid": "fe190128481ad715338d6a5781b20b44", "score": "0.45750028", "text": "public function deleteresource($resource_id){\n\t\t$user_type = $this->session->userdata('user_type');\n\t\tif($user_type == 'admin'){\n\t\t\t$permission=$this->check_permission_modules_core(\"Stories\",\"all\");\n\t\t\t$this->panels_check_permission($permission);\n\t\t}\n\t\t\n\t\tif(!empty($resource_id)){\n\t\t\t$allowed_user_types=array(\n\t\t\t1=>'super_user',\n\t\t\t2=>'admin',\n\t\t\t);\n\t\t//\t$user_types=$this->check_usertype_modules_core($allowed_user_types);\n\t\t\t$CI =& get_instance();\n\t\t\t\n\t\t\t$this -> load -> helper('stories_content/stories_content');\n\t\t\t$this -> load -> model('stories_content/stories_content_model');\n\t\t\t\n\t\t\t$result=$this->stories_content_model->deletResourceById($resource_id);\n\t\t\t$data['result']=$result;\n\t\t\techo json_encode($data);\n\t\t}\n\t}", "title": "" }, { "docid": "57c4c4cffe6df611663565c63c6cc9b3", "score": "0.45433378", "text": "public function uncheck()\n {\n return $this;\n }", "title": "" }, { "docid": "71db3726597d2c3b8a257a381a2ca45e", "score": "0.4520107", "text": "public function delistResource(/*XAResourceInterface*/ $xaRes, $flag);", "title": "" }, { "docid": "2812093cf0027461b3d147225fc3ac00", "score": "0.44337773", "text": "public function restore(){ }", "title": "" }, { "docid": "fbd27d021de8faa96219f5fe01e7ad39", "score": "0.44308355", "text": "public function detach()\n {\n $this->reader->close();\n }", "title": "" }, { "docid": "df36ab7094792cf3388f0ebb81e02d51", "score": "0.44155112", "text": "public function restore($resource)\n {\n $resource = Resource::withTrashed()\n ->find($resource)\n ->restore();\n\n if ($resource) {\n return Reply::success('File has been restored successfully');\n }\n\n return Reply::error('Something went wrong');\n }", "title": "" }, { "docid": "70c39e7cfb4c9b945b61943b03d30ec4", "score": "0.43966803", "text": "public function pop()\n {\n try {\n $result = $this->collection->lookupIn(\n $this->id,\n [new LookupGetSpec(\"[-1]\", false)],\n $this->options->lookupInOptions()\n );\n if (!$result->exists(0)) {\n return null;\n }\n $value = $result->content(0);\n $options = clone $this->options->mutateInOptions();\n $options->cas($result->cas());\n $this->collection->mutateIn(\n $this->id,\n [new MutateRemoveSpec(\"[-1]\", false)],\n $options\n );\n return $value;\n } catch (DocumentNotFoundException | PathNotFoundException $ex) {\n return null;\n }\n }", "title": "" }, { "docid": "ccdc09d60b1000f8f699470d07971b28", "score": "0.43803692", "text": "static function unstore( $uri ) {\r\n $dir = c::get( 'root.index', c::get( 'root.web' ) . '/index' );\r\n $uri = new StringExtensions($uri);\r\n $file = $dir . '/' . $uri->replace( '/', '|' ) . '.txt';\r\n $success = File::remove($file);\r\n }", "title": "" }, { "docid": "7ee0c297f1b30a504ef218d8e9ae8662", "score": "0.43782315", "text": "public function deactivate()\n {\n $resource = $this->findQuery()->update(['is_active' => 0]);\n return $this->setData((new $this->resource($resource))->{$this->collect}())->responder();\n }", "title": "" }, { "docid": "4aabc4e8018895d344665e31157fe984", "score": "0.43776852", "text": "public function uncheck()\n {\n $this->getDriver()->uncheck($this->getXpath());\n }", "title": "" }, { "docid": "a57d3edd621cf8de2c2f00d7aebecdd9", "score": "0.43690717", "text": "public function restore(): void;", "title": "" }, { "docid": "f14a3b1a86ac75065284acbaeb795867", "score": "0.4366077", "text": "public function removeToReadLater()\n {\n $this->layout = 'empty';\n if (!isset($_POST['user_id']) || !isset($_POST['book_id'])) {\n return false;\n }\n\n $this->Book->removeReadLater($_POST['user_id'], $_POST['book_id']);\n }", "title": "" }, { "docid": "5a2ec7111abbf4ca435a09b1ca498bfd", "score": "0.43540594", "text": "#[Delete('{slug}/favorite', middleware: 'auth')]\n #[Operation(tags: ['Favorites'], security: 'BearerToken')]\n #[Response(factory: SingleArticleResponse::class, statusCode: 200)]\n public function unfavorite(Article $slug): SingleArticleResource\n {\n $slug->favoritedBy()->detach(Auth::id());\n\n return new SingleArticleResource($slug->loadCount('favoritedBy'));\n }", "title": "" }, { "docid": "48138c3e3ca95114b3fde48bea6561ae", "score": "0.43449396", "text": "public function pop()\n {\n if (empty($this->itemsArr)) {\n return null;\n } else {\n $keys = array_keys($this->itemsArr);\n if ($this->selectedId == $keys[count($this->itemsArr)-1]) {\n $this->clearSelectedId();\n }\n return array_pop($this->itemsArr);\n }\n }", "title": "" }, { "docid": "394c8c252c19d39de338bd89a2af98f6", "score": "0.43153805", "text": "public function restore();", "title": "" }, { "docid": "f816a0f9c55634303c1727ad28d540d6", "score": "0.43066677", "text": "public function read()\n\t{\n\t\tif ($this->storage !== null)\n\t\t{\n\t\t\treturn $this->storage->read();\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "430811a4fd3a9f3ca9cf50af75df0700", "score": "0.42994654", "text": "function action_drop_selected() {\r\n\r\n $ids = $this->request->post('ids');\r\n\r\n if (empty($ids)) {\r\n $this->_ajax_answer(false, $this->i18n->T('No items selected'));\r\n }\r\n\r\n $this->collection->clear()->set_where(\r\n 'id IN (%s)', join(',', $ids)\r\n )->load();\r\n\r\n $count = $this->collection->count();\r\n\r\n $this->collection->remove_all();\r\n\r\n if (is_callable(array($this, 'action_drop_all_after')))\r\n $this->action_drop_all_after($ids);\r\n\r\n $this->_ajax_answer(true, $this->i18n->T('Items deleted') . ' (' . $count . ')');\r\n }", "title": "" }, { "docid": "0b88dce05f635dad4e2816dc3b036bc9", "score": "0.42956245", "text": "public function desactivarSonidoDVDGrab() {\n\n self::$mesaMezclas->apagar(MesaMezclas::$CANAL1,\"grabadorL\");\n self::$mesaMezclas->apagar(MesaMezclas::$CANAL1,\"grabadorR\");\n\n }", "title": "" }, { "docid": "6b3ecf5992530499d84281855bfcae1f", "score": "0.42906007", "text": "public function restore($identifier);", "title": "" }, { "docid": "a24c8d7d53a169115831a2d5831adecd", "score": "0.4274014", "text": "public function confirmpurgeselected() {\n\n // use actual method shared with \"purge\" feature\n $this->_doConfirmPurge( 'selected');\n\n }", "title": "" }, { "docid": "4b12086df9bbda54b96cdbc869f0983c", "score": "0.42228442", "text": "public function retrieveDeleted()\n\t{\n\t\tif(Request::ajax()){\n\t\t\treturn User::onlyTrashed()->get();\n\t\t}\n\n\t\t$user = User::onlyTrashed()->get();\n\t\treturn view('account.restore')\n\t\t\t->with('user',$user);\n\n\t}", "title": "" }, { "docid": "741db8e247e3f9470085262594e8c958", "score": "0.42109692", "text": "public function read() {\n\t\tif ((bool) $this->_resource) return mysql_fetch_array($this->_resource);\n\t\telse return false;\n\t}", "title": "" }, { "docid": "71512d85a3ae185ee4e1b8e9e72e21dc", "score": "0.42045438", "text": "protected function deleteSelection() {\n\t\tforeach ($this->selection as $key => &$data) {\n\t\t\t$sParentSKU = $data['submit']['ParentSKU'];\n\t\t\t$this->badItems[] = magnaSKU2pID($sParentSKU, true);\n\t\t}\n\t\t$this->badItems = array_merge(\n\t\t\t$this->badItems,\n\t\t\t$this->disabledItems\n\t\t);\n\t\tif (!empty($this->badItems)) {\n\t\t\tMagnaDB::gi()->delete(\n\t\t\t\tTABLE_MAGNA_SELECTION,\n\t\t\t\tarray(\n\t\t\t\t\t'mpID' => $this->mpID,\n\t\t\t\t\t'selectionname' => $this->settings['selectionName'],\n\t\t\t\t\t'session_id' => session_id()\n\t\t\t\t),\n\t\t\t\t'AND pID IN ('.implode(', ', $this->badItems).')'\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "8dd692bb4639d1bcdc7b3e65ef1740f1", "score": "0.41913563", "text": "public function select()\n {\n return $this->_getResource()->select();\n }", "title": "" }, { "docid": "c3d92f79067e2410155b5c0a356a30fe", "score": "0.41728756", "text": "function readDeleteds();", "title": "" }, { "docid": "f3eb0b5b4145f9a8fe019f7cf80d9020", "score": "0.41700947", "text": "public function clearSelectedId()\n {\n unset($this->selectedId);\n }", "title": "" }, { "docid": "2b6b9ef1eeed130548d2f8feb84394cc", "score": "0.41631284", "text": "public function softDelete($resourceId)\n\t{\n\t\ttry {\n\t\t\t$refField = array('id'=>$this->make_safe($resourceId));\n\n\t\t\t$res = $this->update(array('status'=>self::RESOURCE_INACTIVE), array('id'=>$resourceId));\n\t\t\t//pr('Soft deleted resource id: '.$resourceId.' with result: '.$res);\n\t\t} catch(Exception $e) {\n\t\t\tdie('Error soft deleting resource: '.$e->getMessage());\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "dda8eb008b6dd683d8a6d910da413069", "score": "0.41558594", "text": "public function show(Resource $resource)\n {\n return Storage::download($resource->file);\n }", "title": "" }, { "docid": "07b25c6e5923696674edc580066969c1", "score": "0.41542014", "text": "protected function readAfter()\n {\n $this->instance = $this->instance->load('roles');\n }", "title": "" }, { "docid": "bb15c64bb87820c580fd5a926a90a290", "score": "0.41525102", "text": "public function load($resource);", "title": "" }, { "docid": "8f60916ef37637128f9ca2a15d18b119", "score": "0.41508466", "text": "public function resource()\n {\n return tap($this->store->getResource(), function ($resource) {\n abort_if(is_null($resource), 404);\n });\n }", "title": "" }, { "docid": "762cb4fc08e4ffc11cfea27af59213e3", "score": "0.41494617", "text": "protected function _removeDeletedFromLoaded()\n {\n // unset currently associated\n if ($this->isLoaded()) {\n $getObjects = array();\n foreach ($this->getObjects() as $key=>$object) {\n if (!in_array($object->id, $this->_deleteIds)) {\n $getObjects[] = $object;\n }\n }\n $this->_loaded['getObjects'] = $getObjects;\n\n } elseif ($this->areIdsLoaded()) {\n $getObjectIds = array();\n foreach ($this->getObjectIds() as $key=>$pk) {\n if (!in_array($pk, $this->_deleteIds)) {\n $getObjectIds[] = $pk;\n }\n }\n $this->_loaded['getObjectIds'] = $getObjectIds;\n }\n }", "title": "" }, { "docid": "a6c8f47d54e82ed63e764a77b9d29f83", "score": "0.4146672", "text": "public function getSelected()\n {\n return $this->selected;\n }", "title": "" }, { "docid": "d47f809c2c68cc7193b62608bf8f92aa", "score": "0.41445416", "text": "public function doSelect($name, $selected)\n {\n $xpath = $this->getResponseDomXpath();\n\n if ($element = $xpath->query(sprintf('//input[(@type=\"radio\" or @type=\"checkbox\") and (.=\"%s\" or @id=\"%s\" or @name=\"%s\")]', $name, $name, $name))->item(0))\n {\n if ($selected)\n {\n if ($element->getAttribute('type') == 'radio')\n {\n //we need to deselect all other radio buttons with the same name\n foreach ($xpath->query(sprintf('//input[@type=\"radio\" and @name=\"%s\"]', $element->getAttribute('name'))) as $radio)\n {\n $radio->removeAttribute('checked');\n }\n }\n $element->setAttribute('checked', 'checked');\n }\n else\n {\n if ($element->getAttribute('type') == 'radio')\n {\n throw new InvalidArgumentException('Radiobutton cannot be deselected - Select another radiobutton to deselect the current.');\n }\n $element->removeAttribute('checked');\n }\n }\n else\n {\n throw new InvalidArgumentException(sprintf('Cannot find the \"%s\" checkbox or radiobutton.', $name));\n }\n }", "title": "" }, { "docid": "27ea8f713134546304b4f833340a6c3f", "score": "0.41432866", "text": "abstract public function Read($Id, $OldId=null);", "title": "" }, { "docid": "c03fca241a3fc4e68405fd2f5710ba18", "score": "0.4136872", "text": "protected function readIdAfter()\n {\n $this->instance = $this->instance->load('roles');\n }", "title": "" }, { "docid": "a103c26bff96f6d6147270b3c88f551f", "score": "0.4135054", "text": "protected function get_resource() {\n\t\t$resource = null;\n\t\tif (isset($_GET[$this->parent_name]))\n\t\t\t$resource = $this->sql->select($this->request);\n\t\telse\n\t\t\t$resource = $this->sql->get_variants($this->config->relation_id['name'], $this->request);\n\t\treturn $resource;\n\t}", "title": "" }, { "docid": "a103c26bff96f6d6147270b3c88f551f", "score": "0.4135054", "text": "protected function get_resource() {\n\t\t$resource = null;\n\t\tif (isset($_GET[$this->parent_name]))\n\t\t\t$resource = $this->sql->select($this->request);\n\t\telse\n\t\t\t$resource = $this->sql->get_variants($this->config->relation_id['name'], $this->request);\n\t\treturn $resource;\n\t}", "title": "" }, { "docid": "9b4634ac8237905c2ba5aedc48f151fc", "score": "0.41290858", "text": "public function destroy($id)\n {\n $menu = Menu::find($id);\n\n foreach (json_decode($menu->photo) as $oldphoto){\n if(\\File::exists(public_path($oldphoto))){\n \\File::delete(public_path($oldphoto));\n }\n }\n\n $menu->delete();\n return redirect()->route('menu.index');\n }", "title": "" }, { "docid": "28be2e75d4493a98b67caaa23de76f2c", "score": "0.41218472", "text": "abstract public function read($guid);", "title": "" }, { "docid": "2e605fcf660bf84fa43b68362bd62c32", "score": "0.41198108", "text": "public function restored(InternetMedia $internet_media)\n {\n //\n }", "title": "" }, { "docid": "b94e76a2830f719dc6bdf6b711a9767b", "score": "0.41154185", "text": "public function deletePickup()\n {\n return $this->process('SwiftPickup')->delete();\n }", "title": "" }, { "docid": "7234d0e7c4cdb58f3aa3442098f15d74", "score": "0.41145813", "text": "public function pop() {\n\t\tend($this->data);\n\t\t$key = key($this->data);\n\t\t$item = array_pop($this->data); \n\t\tif(is_null($item)) return $item;\n\t\t$this->trackChange('pop', $item, null);\n\t\t$this->trackRemove($item, $key); \n\t\treturn $item; \n\t}", "title": "" }, { "docid": "caedd2707a074ceb757c54714214b502", "score": "0.4109375", "text": "public function remove()\n {\n return Storage::disk($this->disk)->delete($this->path);\n }", "title": "" }, { "docid": "36fca9014628766d70076dfd0648e4bc", "score": "0.41006035", "text": "public function read ( $id );", "title": "" }, { "docid": "62f096052af0ddb6f7e06345fdabbe94", "score": "0.40988255", "text": "public function restore($id)\n { \n $this->authorize('restore', $resource = $this->model()->withTrashed()->find($id));\n\n $this->event('restoring', $resource); \n\n $resource->restore();\n\n $this->event('restored', $resource); \n\n return $resource;\n }", "title": "" }, { "docid": "071a55ea50891f27d951ba3d937aa3f4", "score": "0.40944982", "text": "public function destroy($id)\n {\n $book = Book::findOrFail($id);\n \n if(file_exists(storage_path('app/public/'.$book->cover))){\n Storage::delete('public/'.$book->cover);\n }\n $book->delete();\n return redirect()->route('book.index')->with('status','data berhasil dihapus');\n }", "title": "" }, { "docid": "bb98464a78d82ad66b1d2039d6ddc6d9", "score": "0.40936717", "text": "public function restore(): void {\n if ($this->markedAsDeleted) {\n QueryBuilder::table(static::$table)\n ->set([\n static::$deleted => null\n ])\n ->addFilter([\n QueryFilter::Filter(QueryFilter::Equal, static::$primaryKey, $this->getPrimaryKey())\n ])\n ->update();\n $this->markedAsDeleted = false;\n return;\n }\n }", "title": "" }, { "docid": "50b30962947d6598a3fff11894354a1e", "score": "0.40928087", "text": "public function reload()\n {\n if ($this->format && $this->resource) {\n return $this->load($this->resource, $this->format);\n }\n }", "title": "" }, { "docid": "2750d515cf5a4daa66007217fae0bbe9", "score": "0.4091011", "text": "public function deactivate()\n {\n $this->active = false;\n return $this->save();\n }", "title": "" }, { "docid": "75039fae4786213a958bbfbc575f449a", "score": "0.40786794", "text": "function delete($resource_id){\n\t\t\t\t$book_index = array_search($resource_id, $this->books);\n\t\t\t\tif ($book_index === false){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tunset($this->books[$book_index]);\n\t\t\t\tarray_values($this->books);\n\t\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "ff111378502eee876d3210183282f1de", "score": "0.40725207", "text": "function unset_slider_image(){\n\t\t$attachment = ( isset($_POST['attachment']) ) ? $_POST['attachment'] : false;\n\t\tdelete_post_meta($attachment['id'], '_main_slider');\n\t\techo json_encode($attachment);\n\t}", "title": "" }, { "docid": "e7118a8aa75c28e16898a37fd4659189", "score": "0.40700135", "text": "protected function unget() {\n\t\t$this->cursor--;\n\t}", "title": "" }, { "docid": "84a77e40d7a9bcf2a3dc5a460a0a22c7", "score": "0.40675667", "text": "public function restore($id) {\n if ($this->withTrashed) {\n\t\t\t$data = $this->entity::withTrashed()->find($id);\n\t\t} else {\n\t\t\t$data = $this->entity::find($id);\n\t\t}\n\n\t\t$can = $this->can('restore',$data);\n\t\tif ($can !== true) {\n\t\t\treturn $can;\n\t\t}\n\n\n\n\t\t// Check Record is exist\n\t\tif (is_null($data)) {\n\t\t\treturn lynx()\n\t\t\t\t->status(404)\n\t\t\t\t->message(__('lynx.not_found'))\n\t\t\t\t->response();\n\t\t}\n\t\t$this->beforeRestore($data);\n\t\t$data->restore();\n\t\t$this->afterRestore($data);\n\n\t\treturn lynx()->data($this->FullJsonInDestroy?$data:['id' => $data->id])\n\t\t->status(200)\n\t\t->message(__('lynx.restored'))\n\t\t->response();\n\t}", "title": "" }, { "docid": "fcea324f71ce30e0f364fa063b636b66", "score": "0.40628472", "text": "public function unload(){\n $path = $this->directory.$this->name;\n if(!$this->deleted){\n if($this->modified)\n {\n if(file_exists($path) && !is_file($path))\n {\n throw new Exception(\"Unable to write the file $path : It's not a file !\");\n }\n file_put_contents($path, serialize($this->content));\n }\n } else {\n\t\t\tif(file_exists($path))\n\t\t\t\tunlink($path);\n }\n $this->content = [];\n $this->loaded = false;\n }", "title": "" }, { "docid": "ffe958ad56369c2acb5a81a640926a71", "score": "0.40626687", "text": "public function deselectPopUp()\r\n {\r\n $this->doCommand(\"deselectPopUp\", array());\r\n }", "title": "" }, { "docid": "b442756638ace89212dd4ef99bbffb9b", "score": "0.40602377", "text": "public static function restore()\n {\n self::backend()->restore();\n }", "title": "" }, { "docid": "a7de64474ce32e608c8ecb49ab9288b6", "score": "0.40599623", "text": "public function updatedSelected(): void\n {\n $this->selectAll = false;\n $this->selectPage = false;\n }", "title": "" }, { "docid": "775d4af7f411fde9d2b005ae05770d95", "score": "0.40571788", "text": "public function disassociate()\n {\n $this->files()->update(['fileable_type' => NULL, 'fileable_id' => NULL]);\n }", "title": "" }, { "docid": "4336218da3c7bae7167a143f3ca55da0", "score": "0.40523836", "text": "public function destroy($id)\n {\n $oldData = Product::find($id);\n // old image delete\n if(file_exists($oldData->image)) {\n File::delete($oldData->image);\n }\n $oldData->delete();\n\n return redirect()->back();\n\n}", "title": "" }, { "docid": "25a28ec2377d900473b41a3eb07a611d", "score": "0.40443218", "text": "public function delete()\n {\n $path = $this->_media->getOriginal('path');\n if ($this->_media->driver) {\n Storage::disk($this->_media->driver)->delete($path);\n } else {\n Storage::delete($path);\n }\n }", "title": "" }, { "docid": "23fa4570f645dfb863963e374f03b0ca", "score": "0.4044095", "text": "public function read(){\n\t\t$this->_getDAO(false);\n\t\tif($array = $this->dao->read($this->id)){\n\t\t\t$this->_setFromArray($array);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "adee80acbd2e15adb1bbc9b7fd0fdf4e", "score": "0.40421367", "text": "protected function removed($hard=false)\r\n\t{\r\n\t\tif ($this->getValue(\"file_id\"))\r\n\t\t{\r\n\t\t\t$antfs = new AntFs($this->dbh, $this->user);\r\n\t\t\t$file = $antfs->openFileById($this->getValue(\"file_id\"));\r\n\r\n\t\t\tif ($file)\r\n\t\t\t{\r\n\t\t\t\tif ($hard)\r\n\t\t\t\t\t$file->removeHard();\r\n\t\t\t\telse\r\n\t\t\t\t\t$file->remove();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9d9d827f903fbced4ae09fa2945075ce", "score": "0.4041298", "text": "public function unload()\n /* unload the loaded account\n *\n */\n {\n \t$this->_debug_start();\n \tif ($this->mode($mode) === false) return $this->_return(false, 'Invalid mode');\n \tif (!$this->{$mode.'_loaded'}) return $this->_return(true);\n \t$this->{$mode}->clear();\n \t$this->{$mode.'_loaded'} = false;\n \treturn $this->_return(true, 'account unloaded');\n }", "title": "" }, { "docid": "cc5d43ce41b59bbc0ec9559b09c571f7", "score": "0.40353468", "text": "public function read() :? string\n\t{\n\t\t$_ret = current($this->items);\n\t\tnext($this->items);\n\t\treturn $_ret === false? null : $_ret;\n\t}", "title": "" }, { "docid": "c2521b8dd761720f1146e7348fd7c99e", "score": "0.40336534", "text": "public function destroy(Resource $resource)\n {\n $Name = $resource->displayname; $resource->status = \"INACTIVE\"; $resource->save();\n\t\t\t\treturn redirect()->route(\"resource.index\")->with([\"info\"=>true,\"type\"=>\"info\",\"text\"=>\"The Resource: \" . $Name . \", deleted successfully\"]);\n }", "title": "" }, { "docid": "49240f8bef9f9a7796305aba0e37ae32", "score": "0.40330836", "text": "public function deactivate() {\n $s3 = new S3(awsAccessKey, awsSecretKey);\n\n $id = $_POST['id'];\n\n $data = array(\n 'status' => '0'\n );\n\n $update = $this->common->update_data($data, 'business_profile', 'user_id', $id);\n }", "title": "" }, { "docid": "ce4cd48156ad485367d3ea3877d4dbec", "score": "0.40215415", "text": "public function restored(Photo $photo){\n //\n }", "title": "" }, { "docid": "e4267b62312b78bd637fda33f022ed29", "score": "0.40187404", "text": "public function clearSelection()\n {\n $this->selectedRows = array();\n }", "title": "" }, { "docid": "cc81757fef5ed7d86856f515179fd3d6", "score": "0.4016439", "text": "public function restore($id = false)\n\t{\n\t\tif ($id) {\n\t\t\t$this->{$this->model}->restore($id);\n\t\t\t$this->template->json(['success' => 1]);\n\t\t} else {\n\t\t\tif ($this->input->method() == 'post') {\n $response = ['success' => false, 'message' => translate('couldnt_restore_message',true)];\n\t\t\t\tif ($this->input->post('selected')) {\n\t\t\t\t\tforeach ($this->input->post('selected') as $id) {\n\t\t\t\t\t\t$this->{$this->model}->restore($id);\n }\n $response = ['success' => true, 'message' => translate('successfully_restore_message',true)];\n\t\t\t\t}\n\t\t\t\t$this->template->json($response);\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "59ff827b9a8d38c6195bfca362fc65cf", "score": "0.40131634", "text": "public function restore($filepath);", "title": "" }, { "docid": "cc9548bac0f486dd299812f5446647ed", "score": "0.4011255", "text": "public static function delete_custom_choice() {\r\n\t\trequire_once( GFCommon::get_base_path() . '/form_detail.php' );\r\n\t\tGFFormDetail::delete_custom_choice();\r\n\t}", "title": "" }, { "docid": "25404946cb5f668bdacab05b15019797", "score": "0.401029", "text": "public function destroy($label)\n {\n $produit = Produit::where('label', $label)->firstOrFail();\n \n //$file = Storage::disk('public')->exists($produit->photo)->get($produit->photo);\n\n $file = Storage::disk('public')->delete($produit->photo); \n \n if($produit->disponible){\n\n $this->produitRepository->destroy($produit);\n return redirect('/admin/produit/disponible')\n ->withSuccess('Le produit '. $produit->nom_produit .'à bien été supprimé !');\n }\n $this->produitRepository->destroy($produit);\n return redirect('/admin/produit/indisponible')->withSuccess('Le produit '. $produit->nom_produit .'à bien été supprimé !');\n }", "title": "" }, { "docid": "5a3855d4d7f67c5d4b2b6498cff7dbe6", "score": "0.40096113", "text": "public function reset()\n {\n $this->values[self::RESOURCE] = array();\n }", "title": "" }, { "docid": "61cbf98ac4972ef65ac3c1c021669c8b", "score": "0.40072343", "text": "public function delete()\n {\n // Delete menu record from DB\n $recordToDelete = DBService::getRecordByFileName(self::TABLE, self::$theme, $this->fileName, null);\n DBService::deleteRecord(self::TABLE, $recordToDelete->id);\n }", "title": "" }, { "docid": "a01e8e08718c9c7a3ac358bd3e74c9d0", "score": "0.400651", "text": "protected function readStorage()\n {\n if (!$this->fs->exists($this->file)) {\n $this->accounts = array();\n $this->defaultAccount = '';\n $this->writeFile();\n }\n\n $contents = json_decode(file_get_contents($this->file), true);\n $this->accounts = isset($contents['accounts']) ? $contents['accounts'] : array();\n $this->defaultAccount = isset($contents['default_account']) ? $contents['default_account'] : '';\n }", "title": "" }, { "docid": "a092d02500d06220fbe37d8d511b8a50", "score": "0.40064034", "text": "public function restore_item($id = FALSE)\n {\n $data = array(\n 'visible' => 1\n );\n\n $this->db->where('id', $id);\n return $this->db->update('items', $data);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.40022904", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.40022904", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.40022904", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.40022904", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.40022904", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "6e3e75e26ff2fea95ee8c7cbcc9f29f3", "score": "0.40011775", "text": "public function restore($identifier)\n {\n if (! $this->storedCartWithIdentifierExists($identifier)) {\n return;\n }\n\n $stored = $this->getConnection()->table($this->getTableName())\n ->where('identifier', $identifier)->first();\n\n $storedContent = unserialize($stored->content);\n\n $currentInstance = $this->currentInstance();\n\n $this->instance($stored->instance);\n\n $content = $this->getContent();\n\n foreach ($storedContent as $cartItem) {\n $content->put($cartItem->rowId, $cartItem);\n }\n\n $this->events->fire('cart.restored');\n\n $this->session->put($this->instance, $content);\n\n $this->instance($currentInstance);\n\n $this->getConnection()->table($this->getTableName())\n ->where('identifier', $identifier)->delete();\n }", "title": "" }, { "docid": "ab638e535e816865876a427e80e45722", "score": "0.40011352", "text": "public function restored(Qualification $qualification)\n {\n //\n }", "title": "" }, { "docid": "04d67d68af284b1a53bb1118ce877480", "score": "0.3994102", "text": "public function unselectOption($select, $option) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('unselectOption', func_get_args()));\n }", "title": "" }, { "docid": "4b2ab6bae2fbf90fc2286f8b843447f1", "score": "0.39926454", "text": "static public function unstash(string $hash)/* : mixed */\n {\n $row = Db::execute(\"SELECT json FROM tokens85df2 WHERE hash = :hash AND NOW() < expirationdatetime\", [\":hash\" => $hash])->fetch();\n if (empty($row)) {\n throw new ResourceNotFoundException(\"Invalid or expired token or link\", 401);\n }\n // remove the token from the database and remove expired tokens\n if (Db::execute(\"DELETE FROM tokens85df2 WHERE hash = :hash OR NOW() > expirationdatetime\", [\":hash\" => $hash])->rowCount() == 0) {\n throw new Exception;\n }\n return json_decode($row->json);\n }", "title": "" }, { "docid": "26094db712b29782fc6a828a69fe7465", "score": "0.39924487", "text": "public function restore($id)\n {\n if (! Gate::allows('product_part_delete')) {\n return abort(401);\n }\n $product_part = ProductPart::onlyTrashed()->findOrFail($id);\n $product_part->restore();\n\n return redirect()->route('admin.product_parts.index');\n }", "title": "" }, { "docid": "7d24b1eb62ac271c486d33681045f8aa", "score": "0.39824602", "text": "public function destroy($id)\n {\n $conduct = DB::transaction(function () use ($id) {\n return DB::table('conduta')->where('id',$id)->first();\n });\n\n $conductWord = str_replace(\"storage\",\"public\",$conduct->caminho);\n\n Storage::delete($conductWord);\n\n DB::transaction(function () use ($id) {\n DB::table('conduta')->where('id','=',$id)->delete();\n });\n\n return redirect()->route('listConduct');\n }", "title": "" }, { "docid": "f7cfd596fb89d9ac9a130c7112198baf", "score": "0.39795604", "text": "protected function removeCurrent()\n {\n $meta = \\wp_get_attachment_metadata( $this->post_id );\n $backup_sizes = get_post_meta( $this->post_id, '_wp_attachment_backup_sizes', true );\n\n // this must be -scaled if that exists, since wp_delete_attachment_files checks for original_files but doesn't recheck if scaled is included since that the one 'that exists' in WP . $this->source_file replaces original image, not the -scaled one.\n $file = get_attached_file($this->post_id);\n $result = \\wp_delete_attachment_files($this->post_id, $meta, $backup_sizes, $file );\n\n }", "title": "" }, { "docid": "90a92fa9ace3fa9eed656def9ef2caad", "score": "0.3979426", "text": "public function restoreAction($id = null)\n\t{\n\t\tif (!isset($id)) {\n\t\t\tdie(\"Missing id\");\n\t\t}\n\t \n\t\t$question = $this->question->find($id);\n\t\t\n\t\tif (($this->userInfo['id'] != $question->userID) && empty($this->userInfo['admin'])) {\n\t\t\tdie('You can only edit your own questions.');\n\t\t}\n\t \n\t\t$question->deleted = null;\n\t\t$question->save();\n\t \n\t\t$this->redirectTo('question/view/' . $question->id);\n\t}", "title": "" }, { "docid": "5f75801cc36d330ddf1fbcf4bd75119f", "score": "0.3978617", "text": "public function desactivarSonidoDVD() {\n\n self::$mesaMezclas->apagar(MesaMezclas::$CANAL1,\"dvdL\");\n\n }", "title": "" } ]
d01723bf272821476e9f3277983e3c0e
Returns HTTP Response headers
[ { "docid": "4256fd3a6fcde148733003cec618e624", "score": "0.74205357", "text": "public function getHeaders() {\n return $this->headers;\n }", "title": "" } ]
[ { "docid": "517439460851a0196d49a2d726c72253", "score": "0.87092555", "text": "public function getResponseHeaders();", "title": "" }, { "docid": "d3be37a405e0706def8b27b31d0fcf03", "score": "0.8634461", "text": "private function headers()\n\t{\n\t\treturn $this->response->getHeaders();\n\t}", "title": "" }, { "docid": "b30bd59e9f180cd30d5c307af9a63d3a", "score": "0.8376225", "text": "public function getHeaders()\n\t{\n\t\treturn $this->response->headers;\n\t}", "title": "" }, { "docid": "20453d0043624348e7848fa628b9594a", "score": "0.8372491", "text": "public function getHeaders()\n {\n return $this->response->getHeaders();\n }", "title": "" }, { "docid": "7a5031107aa6a521966e521521aced89", "score": "0.8217209", "text": "public function getHeaders()\n {\n return $this->responseHeaders;\n }", "title": "" }, { "docid": "7a5031107aa6a521966e521521aced89", "score": "0.8217209", "text": "public function getHeaders()\n {\n return $this->responseHeaders;\n }", "title": "" }, { "docid": "1ee0c63426bf2dd81b1ddbab341c31fc", "score": "0.8131242", "text": "public function GetResponseHeaders()\n {\n return $this->httpResponseHeaders;\n }", "title": "" }, { "docid": "2c819fd25375c1d275134c6012a767ec", "score": "0.8115159", "text": "public function getResponseHeader();", "title": "" }, { "docid": "a46f4ec152c23f2c7781de01d5728996", "score": "0.81142306", "text": "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "title": "" }, { "docid": "a46f4ec152c23f2c7781de01d5728996", "score": "0.81142306", "text": "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "title": "" }, { "docid": "a46f4ec152c23f2c7781de01d5728996", "score": "0.81142306", "text": "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "title": "" }, { "docid": "a46f4ec152c23f2c7781de01d5728996", "score": "0.81142306", "text": "public function getResponseHeaders()\n {\n return $this->responseHeaders;\n }", "title": "" }, { "docid": "a4462db18042555318e822b2c131b6f6", "score": "0.80431384", "text": "public function getResponseHeaders()\n {\n $headers = array();\n\n $header_text = substr($this->result, 0, $this->headerSize);\n\n foreach (explode(\"\\r\\n\", $header_text) as $i => $line)\n if (strlen($line) > 4 && substr($line, 0, 4) === \"HTTP\") {\n $headers['http_code'] = $line;\n } else {\n list ($key, $value) = array_pad(explode(': ', $line, 2), 2, null);\n $headers[$key] = $value;\n }\n\n return $headers;\n }", "title": "" }, { "docid": "1c0bd5f97165bd31c098b9e6033e41b1", "score": "0.7995475", "text": "function getHeaders() {\n $rv[] = 'Content-Type: ' . $this->getContentType();\n if($this->isGzipBody()) {\n $rv[] = 'Content-Encoding: gzip';\n }\n $rv[] = 'Content-Length: ' . strLen($this->getBody());\n return $rv;\n }", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.79006135", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.79006135", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.79006135", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.79006135", "text": "public function getHeaders();", "title": "" }, { "docid": "11a21212910c854487a0fc5ef6efc488", "score": "0.781077", "text": "public function headers() {\n\t\t\t// Get the stored header array\n\t\t\t$headers = $this->_headers;\n\t\t\t// Let's include the status header\n\t\t\tarray_unshift( $headers, sprintf( \"HTTP/1.0 %d %s\", $this->_status, http_translate_code( $this->_status ) ) );\n\t\t\t// Return the complete array\n\t\t\treturn $headers;\n\t\t}", "title": "" }, { "docid": "37b9ce78b0c9a96e9d2cc9813cab170d", "score": "0.77695876", "text": "public function getResponseHeaders()\n {\n if ($this->response === null) {\n return array();\n }\n return $this->response->getHeaders();\n }", "title": "" }, { "docid": "8d3e23b29a8f187e245753d99b23c44d", "score": "0.77211416", "text": "public function get_headers() {\n\n\t\treturn WP::is_json( $this->headers ) ? $this->headers : '[]';\n\t}", "title": "" }, { "docid": "a0002bf6854733987f34474a0af73411", "score": "0.7670363", "text": "public function get_headers() {\n return $this->headers;\n }", "title": "" }, { "docid": "aeacd9ff01f4297bf027c744ee314c95", "score": "0.76537263", "text": "public static function headers()\n {\n return headers_list();\n }", "title": "" }, { "docid": "bab4ec30848120b1003dc9fc35fedfef", "score": "0.7652453", "text": "public function getHttpHeaders()\n {\n return $this->httpHeaders;\n }", "title": "" }, { "docid": "3b73d4894afff31da3dba5ad6a276539", "score": "0.76088315", "text": "public function getHeaders()\n {\n }", "title": "" }, { "docid": "3b73d4894afff31da3dba5ad6a276539", "score": "0.76088315", "text": "public function getHeaders()\n {\n }", "title": "" }, { "docid": "3b73d4894afff31da3dba5ad6a276539", "score": "0.76088315", "text": "public function getHeaders()\n {\n }", "title": "" }, { "docid": "993ea927b2acba5ab4c3ad48e8fa43b1", "score": "0.7605218", "text": "public function headers()\r\n {\r\n return $this->headers;\r\n }", "title": "" }, { "docid": "0555855cf7ed577def3b40de95f39128", "score": "0.7583834", "text": "public function getHeaders(): string\r\n {\r\n return $this->headers;\r\n }", "title": "" }, { "docid": "89e32ab83943606b7b0e925c0a85eba1", "score": "0.756353", "text": "private static function getResponseHeaders()\n {\n $arh = array();\n\n // headers_list don't return associative array\n $headers = headers_list();\n foreach ($headers as $header) {\n $header = explode(':', $header);\n $arh[array_shift($header)] = trim(implode(':', $header));\n }\n\n return $arh;\n }", "title": "" }, { "docid": "de397ac80e4cf5c2cb3950a22394b0b5", "score": "0.7559676", "text": "function headers() {\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "83c5b12b2c332f10e395bc0d4a74f75d", "score": "0.7554029", "text": "public function getResponseHeaderHttpMessage();", "title": "" }, { "docid": "22c8c0d989dd71a4dcbb61e9ffedf1a2", "score": "0.754737", "text": "public function headers()\n\t{\n\t\treturn $this->_headers;\n\t}", "title": "" }, { "docid": "5cff37e77657e9cca57233c849a0f958", "score": "0.75440717", "text": "public function getHeader()\n {\n return $this->responseHeader;\n }", "title": "" }, { "docid": "95c95ad4a770fa496b6f373737cf66dd", "score": "0.7538804", "text": "public function retrieveHeaders(): array\n {\n $this->setHeader('Connection', 'close');\n $this->setHeader('Accept', '');\n $this->setHeader('Accept-Language', '');\n $this->setHeader('User-Agent', '');\n \n $savedProto = $this->protocol;\n $this->protocol = 'HTTP/1.0';\n $this->request('HEAD');\n $this->protocol = $savedProto;\n \n return $this->getHeaders();\n }", "title": "" }, { "docid": "8a4f5c553051c04f203c2365b492f9d7", "score": "0.75357836", "text": "public function getHeaders() \n\t{\n\t\treturn apache_request_headers();\n\t}", "title": "" }, { "docid": "31f624a003c7a2282f731384d0c2e19b", "score": "0.7533445", "text": "function headers()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "3e794a0c8902e93000ee74769fb765d5", "score": "0.7517052", "text": "public function headers()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "82b387d08427dd2dc7fa6ad91623b70a", "score": "0.75129586", "text": "public function headers();", "title": "" }, { "docid": "82b387d08427dd2dc7fa6ad91623b70a", "score": "0.75129586", "text": "public function headers();", "title": "" }, { "docid": "10f63a4f4d86d10a04f039b6fef8ccd9", "score": "0.7507046", "text": "public function headers() {\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "8ebb26b1602a233eacbf035c51c42c21", "score": "0.7459011", "text": "public function getHeaders(){\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "21ebdc8af4b523fe46fab527d2e951f0", "score": "0.7446344", "text": "function http_get_request_headers() {\n\treturn HTTP::instance()->getRequestHeaders();\n}", "title": "" }, { "docid": "9aa5bba89b60027a5b2b430348f0f8c6", "score": "0.7438483", "text": "public static function getHeaders() {\n\t\treturn getallheaders();\n\t}", "title": "" }, { "docid": "ab19c01881145759fec2fcb4e658ba6e", "score": "0.74320084", "text": "public function getRawResponseHeaders() {\n\t\treturn $this->_apiResponseHeaders;\n\t}", "title": "" }, { "docid": "79e97a66daeb5ad7820c8a975b2d96bb", "score": "0.74305046", "text": "public function getHeaders() {\n\t\treturn $this->getLastHop()->headers;\n\t}", "title": "" }, { "docid": "82b0892246abd42fcdd8d1e5e9df69b9", "score": "0.74137807", "text": "public function getHeaders()\n\t{\n\t\treturn $this->header;\n\t}", "title": "" }, { "docid": "842ac2780a36a388306d0e0a0950b706", "score": "0.74008113", "text": "private function getHeaders()\n {\n $headers = [\n 'Accept' => 'application/json',\n 'Content-Type' => 'application/json'\n ];\n return $headers;\n }", "title": "" }, { "docid": "4a0c5c4dbfa184544129847aefb2ee01", "score": "0.7388766", "text": "function http_get_headers($response, $header)\n{\n preg_match_all('/'.$header.':\\s*(.+)/', $response['header'], $matches, PREG_PATTERN_ORDER);\n return $matches[1];\n}", "title": "" }, { "docid": "de464bdd9b72c1d3dc1148acc34ecb94", "score": "0.73874086", "text": "public function getHeaders(){\n return $this->_headers;\n }", "title": "" }, { "docid": "23ed32e5b8d44fa37f1942a5cf068774", "score": "0.7382785", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "3ca676e341e6f5ff3f41bf4b2eb02c9d", "score": "0.73619777", "text": "public function getHeaders()\n {\n return $this->headers->all();\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "ff486ce43df69eef9a088c48673f6753", "score": "0.7355867", "text": "public function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "faaf8316ee4720de38c2c0800c9b9b41", "score": "0.73518497", "text": "public function getHeaders()\n\t{\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "faaf8316ee4720de38c2c0800c9b9b41", "score": "0.73518497", "text": "public function getHeaders()\n\t{\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.73411316", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.73411316", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.73411316", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "b8b02cd19a1475c3f17a84b22e987989", "score": "0.7340177", "text": "public function getResponseHeaderHttpCode();", "title": "" }, { "docid": "fcbf4d664f2dbe3cf4f26b435d8165d7", "score": "0.7331684", "text": "private function getHeaders()\n {\n return self::$headers;\n }", "title": "" }, { "docid": "04aa0d60c7c35717105eed556fbdc04a", "score": "0.73305655", "text": "public function getHeaders() {\n switch ($this->getCode()) {\n case self::BAD_PARAMS:\n return HttpResponse::STATUS_BAD_REQUEST; break;\n case self::NOT_LOGGED:\n return HttpResponse::STATUS_UNAUTHORIZED; break;\n case self::NO_ACCESS:\n return HttpResponse::STATUS_FORBIDDEN; break;\n case self::NOT_FOUND:\n return HttpResponse::STATUS_NOT_FOUND; break;\n }\n return null;\n }", "title": "" }, { "docid": "363a92dbb282f740929230002e8c84bb", "score": "0.7314831", "text": "public function getHeaders() {\n\t\t$output = array();\n\t\tif($this->proxy_age!==null) {\n\t\t\t$output[\"Age\"] = $this->proxy_age;\n\t\t}\n\t\tif($this->etag) {\n\t\t\t$output[\"ETag\"] = '\"'.$this->etag.'\"';\n\t\t}\n\t\tif($this->date_expired) {\n\t\t\t$output[\"Expires\"] = $this->date_expired;\n\t\t}\n\t\tif($this->last_modified_date) {\n\t\t\t$output[\"Last-Modified\"] = $this->last_modified_date;\n\t\t}\n\t\tif($this->vary) {\n\t\t\t$output[\"Vary\"] = $this->vary;\n\t\t}\n\t\t\n\t\t$cache_control = array();\n\t\tif($this->public) {\n\t\t\t$cache_control[]=\"public\";\n\t\t}\n\t\tif($this->private) {\n\t\t\t$cache_control[]=\"private\";\n\t\t}\n\t\tif($this->no_cache) {\n\t\t\t$cache_control[]=\"no-cache\";\n\t\t}\n\t\tif($this->no_store) {\n\t\t\t$cache_control[]=\"no-store\";\n\t\t}\n\t\tif($this->no_transform) {\n\t\t\t$cache_control[]=\"no-transform\";\n\t\t}\n\t\tif($this->must_revalidate) {\n\t\t\t$cache_control[]=\"must-revalidate\";\n\t\t}\n\t\tif($this->proxy_revalidate) {\n\t\t\t$cache_control[]=\"proxy-revalidate\";\n\t\t}\n\t\tif($this->max_age) {\n\t\t\t$cache_control[]=\"max-age=\".$this->max_age;\n\t\t}\n\t\tif($this->proxy_max_age) {\n\t\t\t$cache_control[]=\"s-maxage=\".$this->proxy_max_age;\n\t\t}\n\t\t\n\t\tif(!empty($cache_control)) {\n\t\t\t$output[\"Cache-Control\"] = implode(\",\",$cache_control);\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "f8d4c9a0d7303801b3f5b4e7e4f6951b", "score": "0.7314819", "text": "function getHeaders() : array;", "title": "" }, { "docid": "d4a5ec247ba02b2f362c019b16675e9d", "score": "0.731291", "text": "public static function getHeaders() {\n return self::$headers;\n }", "title": "" }, { "docid": "b0ae1c16525821875fe5ea803133109c", "score": "0.73037267", "text": "private final function getHeaders() {\n\t\t\treturn $this->headers;\n\t\t}", "title": "" }, { "docid": "12306f5bfc7cbad95853f92a7dc3dac2", "score": "0.72932154", "text": "public static function getHeaders()\n\t{\n\t\treturn self::$headers;\n\t}", "title": "" }, { "docid": "db58206e795c62a9652ce3610abdca48", "score": "0.72824126", "text": "public function getHeaders() {\n return $this->headers;\n }", "title": "" }, { "docid": "db58206e795c62a9652ce3610abdca48", "score": "0.72824126", "text": "public function getHeaders() {\n return $this->headers;\n }", "title": "" }, { "docid": "a38c7152bda951f54a676c53cc3f3c9d", "score": "0.7278947", "text": "public function headers()\n {\n return $this->foundation()->headers;\n }", "title": "" }, { "docid": "a5ddbbc148428eec13ef23588a8e892f", "score": "0.7276085", "text": "protected function getHeaders()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "c2b0188ce947453dcd2c39de3a881c50", "score": "0.727531", "text": "function httpHeaders()\n {\n header($this->page_array['http_header_status']);\n // the encoding should also be set\n }", "title": "" }, { "docid": "c4c27ef26b49ee53ce696b05ec9a9f7e", "score": "0.7271276", "text": "public function getHeaders()\n {\n return $this->_headers;\n }", "title": "" }, { "docid": "c4c27ef26b49ee53ce696b05ec9a9f7e", "score": "0.7271276", "text": "public function getHeaders()\n {\n return $this->_headers;\n }", "title": "" }, { "docid": "5530d118bedacebd9b8a1a7fe0e0d240", "score": "0.72660136", "text": "public function getHeaders() {\n $headers = $this->headers;\n\n if (!is_null($this->contenttype)) {\n $ct = $this->contenttype;\n if (!is_null($this->charset)) {\n $ct .= '; charset=' . $this->charset;\n }\n $headers['Content-Type'] = $ct;\n }\n\n return $headers;\n }", "title": "" }, { "docid": "6dfbe6e2c44a3ebe539f782699f404c0", "score": "0.72538126", "text": "public function getHeaders()\n\t{\n\t\treturn $this->_headers;\n\t}", "title": "" }, { "docid": "6dfbe6e2c44a3ebe539f782699f404c0", "score": "0.72538126", "text": "public function getHeaders()\n\t{\n\t\treturn $this->_headers;\n\t}", "title": "" }, { "docid": "6dfbe6e2c44a3ebe539f782699f404c0", "score": "0.72538126", "text": "public function getHeaders()\n\t{\n\t\treturn $this->_headers;\n\t}", "title": "" } ]
fd221c7486623bc71e4fe5f0207e9d02
/ create a comment
[ { "docid": "5c0af4c07a2c149f9e1fd5d8d3ac0680", "score": "0.6789914", "text": "function create_comment($content,$event_id,$user_id){\n\t\t\n\n\t\t$posttime = date('Y-m-d H:i:s');\n\t\t\n\t\t$link = mysql_connect(DB_SERVER,DB_USER,DB_PASSWORD) or die('connect to sql fail');\n \tmysql_select_db('freefood') or die('Select DB freefood fail.'); \n \t\n\t echo $link;\n\t try {\n\t \t\n\t $query_insert = \"INSERT INTO comment (content, create_time, user_id, event_id) VALUES ('\" . addslashes(htmlentities($content)) . \"', '\" . $posttime . \"','\" . $user_id . \"','\" . $event_id . \"')\" or die('insert fail');\n \tmysql_query($query_insert) or die('Insert to messages failed');\n \n\n\t } catch (Exception $e) {\n\t echo \"Data could not be insert into the database.\";\n\t exit;\n\t }\n\t \n\n\t}", "title": "" } ]
[ { "docid": "06498289bbcace62ca9a7b3f4181cf04", "score": "0.7952415", "text": "public function creates_comment()\n {\n $this->blogpost_model->insert_comment( array(\n 'type' => $this->input->post('new_comment'),\n 'comment_id' => $this->input->post('comment_id'),\n 'comments' => $this->input->post('comments'),\n ));\n }", "title": "" }, { "docid": "e815568fb24f88cb89ea17c5c4de3d82", "score": "0.76424086", "text": "public function create()\n {\n $this->validation['body']['format'][] = $this->body;\n if (!$this->validate()) {\n throw new ValidationException('invalid comment');\n }\n $db = DB::conn();\n $params = array(\n 'thread_id' => $this->thread_id, \n 'user_id' => $this->user_id, \n 'body' => $this->body,\n 'updated' => date('Y-m-d H:i:s') \n );\n $db->insert('comments', $params);\n }", "title": "" }, { "docid": "bfe90f49706bb07f14881230402c795b", "score": "0.75745225", "text": "public function comment();", "title": "" }, { "docid": "66aae69e137591e07fc69cc53365289b", "score": "0.72614324", "text": "function create(){\n $this->init(new Note_Comment());\n \n if(isset($_POST)&&isset($_POST['comment'])){\n if($this->model->create($_POST)){\n // Notification::create_notification();\n }\n }\n }", "title": "" }, { "docid": "21664ecd45715f97889ee581f16236e1", "score": "0.7242123", "text": "public function createComment() {\n $username = htmlspecialchars($_POST['username']);\n $commentBody = htmlspecialchars($_POST['comment_body']);\n $parentId = (int) htmlspecialchars($_POST['parent']);\n \n $JsonDb = new JSONDB('../db');\n \n $Comment = new Comment($JsonDb);\n $response = $Comment->addComment($username, $commentBody, $parentId);\n \n return json_encode($response);\n }", "title": "" }, { "docid": "520c077c40ef14deface25f62565ded4", "score": "0.7198679", "text": "function createComments(){\n return join(\"\",array(\n \"insert into comments(description, created_at, user_id, post_id) values(\",\n \"'{$this->description}',\",\n \"'{$this->created_at}',\",\n \"{$this->user_id},\",\n \"{$this->post_id}\",\n \")\"\n ));\n\n }", "title": "" }, { "docid": "1a4693b3027734409137d0ea22524e55", "score": "0.7183633", "text": "public function addComment()\n\t{\n\t\t$postId = $this->request->getParameter(\"id\");\n\t\t$userId = $this->request->getSession()->getAttribute(\"userId\");\n $content = $this->request->getParameter(\"content\");\n \n // Création d'un nouvel objet Comment\n\t\t$comment = new Comment(array('content' => $content, 'dateCreation' => date('Y-m-d H:i:s'), 'userId' => $userId, 'postId' => $postId));\n\t\t// Ajout de l'objet Comment dans la base de données\n $this->commentsManager->add($comment);\n // Exécution de l'action par défaut pour réafficher la liste des billets\n $this->successMessage = 'Commentaire envoyé avec succès ! Il sera visible dès qu\\'il sera validé par un admin.';\n $this->executeAction(\"index\");\n\t}", "title": "" }, { "docid": "e3c2040bbe60c31c0ad693d92c183b3a", "score": "0.70722383", "text": "private function Add_Comment()\n\t{\n\t\trequire_once(SERVER_CODE_DIR . 'comment.class.php');\n\n\t\tif(trim($this->request->comment) != '')\n\t\t{\n\t\t\t// Set the type of comment\n\t\t\t// REQUIRED\n\t\t\tswitch( $this->request->action )\n\t\t\t{\n\t\t\tcase 'add_follow_up':\n\t\t\t\t$this->request->comment_type = 'followup';\n\t\t\t\tbreak;\n\t\t\tcase 'change_status':\n\t\t\t\tswitch( $this->request->submit_button )\n\t\t\t\t{\n\t\t\t\tcase 'Deny':\n\t\t\t\t\t$this->request->comment_type = 'deny';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Withdraw':\n\t\t\t\t\t$this->request->comment_type = 'withdraw';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Reverify':\n\t\t\t\t\t$this->request->comment_type = 'reverify';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Watch':\n\t\t\t\t\t$this->request->comment_type = 'watch';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->request->comment_type = 'standard';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'add_comment':\n\t\t\tdefault:\n\t\t\t\t$this->request->comment_type = 'standard';\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$comment = new Comment();\n\t\t\t$comment->Add_Comment($this->server->company_id, $this->request->application_id, $this->server->agent_id,\n\t\t\t\t $this->request->comment, $this->request->comment_type);\n\t\t}\n\t}", "title": "" }, { "docid": "e547dcb75af8fce512c9a2d405f767cb", "score": "0.7059098", "text": "public function comment(){\n\n if (!User_model::is_logged()){\n return $this->response_error(CI_Core::RESPONSE_GENERIC_NEED_AUTH);\n }\n\n $post_id = App::get_ci()->input->post('postId');\n $comment_text = App::get_ci()->input->post('commentText');\n $replay_to = App::get_ci()->input->post('replay_to');\n\n if (empty($post_id) || empty($comment_text)){\n return $this->response_error(CI_Core::RESPONSE_GENERIC_WRONG_PARAMS);\n }\n\n if(!$replay_to) $replay_to = null;\n\n try\n {\n $inserted_comment_id = Comment_model::create([\n 'user_id' => User_model::get_session_id(),\n 'assign_id' => $post_id,\n 'text' => $comment_text,\n 'reply_id' => $replay_to,\n ]);\n\n } catch (EmeraldModelNoDataException $ex){\n return $this->response_error(CI_Core::RESPONSE_GENERIC_NO_DATA);\n }\n\n return $this->response_success(['comment_id' => $inserted_comment_id]);\n }", "title": "" }, { "docid": "e486f9901d59356032a140063f76ce7d", "score": "0.70177937", "text": "public function create()\n {\n $comment = Input::get('comment');\n\n $dbComment = new Comment(array(\n 'user_id' => $comment['userId'],\n 'message_id' => $comment['messageId'],\n 'text' => $comment['text']\n ));\n $dbComment->save();\n\n $comment['id'] = $dbComment->id;\n $out = array('comment' => $comment);\n return $out;\n\n }", "title": "" }, { "docid": "85b30472a7144eeb903a2ea5f9fe4db4", "score": "0.7009434", "text": "public function save() {\n if($this->validate()) {\n \n \n $comment = new Comment();\n $comment->text = $this->text;\n //created_at заполняем в основной модели Comment с помошью TimestampBehavior\n //$comment->created_at = time();\n $comment->parent_id = $this->parent_id;\n $comment->user_id = $this->user->getId();\n $comment->post_id = $this->post_id;\n \n //Если пост успешно сохранен:\n if ($comment->save(false)) {//false - Валидация в модели Comment не требуется\n //Перед вызовом события публикации поста EVENT_COMMENT_CREATED:\n \n //Объект для передачи данных о новом сохраненном комментарии в сервис нотификационной ленты вместе с событием публикации\n $event = new CommentCreatedEvent();\n //Прикрепляем данные для создания ленты новостей:\n //Пользователь, создающий комментарий\n $event->user = $this->user;\n $event->comment = $comment;\n \n //Передаем $event вместе с событием в компонент уведомления о комментариях Yii::$app->commentNotifyService addToComment()\n //т.е. - вызываем событие публикации нового комментария под постом пользователя\n //начинает работу подписанный на это событие Yii::$app->commentNotifyService, 'addToComment'\n $this->trigger(self::EVENT_COMMENT_CREATED, $event);\n return true;\n }\n \n }\n return false;\n }", "title": "" }, { "docid": "0d41f3da1cca080a560a874e828e4f3f", "score": "0.6998519", "text": "public function test_comment_create()\n {\n $user = factory(User::class)->create();\n $event = factory(Event::class)->create();\n\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)->visit('/event')\n ->clickLink(\"詳細\")\n ->type('#content','参加します')\n ->press('コメントする')\n ->assertSee('詳細画面');\n });\n }", "title": "" }, { "docid": "7b1eb3d1cdc9ff630b99f68230157462", "score": "0.6974787", "text": "public function createComment($request){\n $this->content = $request->content;\n $this->evaluation = $request->evaluation;\n $this->save();\n }", "title": "" }, { "docid": "8ad18fb8ad7a56c58e7dfc8cb3aff12e", "score": "0.6969272", "text": "static function create( $paramarray )\n\t{\n\t\t$comment = new Comment( $paramarray );\n\t\t$comment->insert();\n\t\treturn $comment;\n\t}", "title": "" }, { "docid": "1bd209588fcdbd6ccab250d4ca1d4df0", "score": "0.6966682", "text": "public function makeComment($parent_id, $post_id, $content) {\n //Create new Entity for comment\n $entity = new Entity;\n $entity->entity_type = 'comment';\n $entity->save();\n\n $this->id = $entity->id;\n $this->parent_id = $parent_id;\n $this->user_id = auth()->user()->id;\n $this->post_id = $post_id;\n $this->body = $content;\n $this->save();\n }", "title": "" }, { "docid": "335cbf262f33d75b7675ddd6d1bb787a", "score": "0.695875", "text": "public function testCreateComment()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "67e3f249469eafbd769525d9d4ac3e4f", "score": "0.6909099", "text": "function add_new_comment($userIDcomm, $commentRating, $commentText, $commentDate){\n\tglobal $db;\n $query = \"INSERT INTO comments\n (userIDcomm, commentRating, commentText, postID, commentDate)\n VALUES\n ('$userIDcomm', '$commentRating', '$commentText', 0, '$commentDate')\";\n $db->exec($query);\n}", "title": "" }, { "docid": "05e1d8450e3ee4a45bf53e85b24b119c", "score": "0.6907254", "text": "public function the_comment() {}", "title": "" }, { "docid": "6b28ecdeea04008e10f1dc9ed129cc9e", "score": "0.6899336", "text": "private function createComment($cmt)\n {\n $bdd = $this->bdd;\n $req = $bdd->prepare(\"INSERT INTO comments(parent_id, depth, cmt_body, cmt_date, flag, thumb_up, thumb_down, cmt_status,members_id, chapters_id) VALUES (:parent_id,:depth,:cmt_body,NOW(),:flag,:thumb_up,:thumb_down,:cmt_status,:members_id,:chapters_id)\");\n\n $req->execute(array('cmt_body' => $cmt->getCmtBody(),\n 'parent_id' => 0,\n 'depth' => 1,\n 'flag' => 0,\n 'thumb_up' => 0,\n 'thumb_down' => 0,\n 'cmt_status' => \"show\",\n 'members_id' => $cmt->getMembersId(),\n 'chapters_id' => $cmt->getChaptersId()\n ));\n $_SESSION['flash'] = \"Merci pour votre commentaire \".$_SESSION['surname'];\n }", "title": "" }, { "docid": "d84df9f24252de7c5eefdf7a394e7503", "score": "0.68964154", "text": "public function createComment($comment_username, $comment_post_id, $comment_text, $comment_date)\n {\n $query = \"INSERT INTO comments VALUES (NULL,:commentUsername,:commentPostId,:commentText,:commentDate)\";\n $result = $this->_dbHandler->prepare($query);\n $result->bindValue('commentUsername', $comment_username);\n $result->bindValue('commentPostId', $comment_post_id);\n $result->bindValue('commentText', $comment_text);\n $result->bindValue('commentDate', $comment_date);\n $result->execute();\n }", "title": "" }, { "docid": "fd6d2085bcb79451761901139aa219b2", "score": "0.6876356", "text": "function add_comment($postid)\n {\n $this->db = ORM::factory('comment');\n $this->db->username = strip_tags($_POST['username']);\n $this->db->url = $_POST['url'];\n $this->db->text = strip_tags($_POST['text']);\n $this->db->postid = $postid;\n $this->db->save();\n }", "title": "" }, { "docid": "bfd818a8b4bf09026231a0bbcecbda21", "score": "0.6858688", "text": "function add_comment($comment) {\n\t\t\t$this->buffer[] = array('comment', $comment) ; \n\t\t}", "title": "" }, { "docid": "1f22697a773326c55b96ee2f7301b34b", "score": "0.68548834", "text": "function create_comment($post_id, $body){\n $result = mysql_query(\"INSERT INTO comments (post_id, body) VALUES ($post_id, \\\"$body\\\")\");\n return $result;\n}", "title": "" }, { "docid": "a253682c8fe7a68be50ae6c97272081e", "score": "0.6851353", "text": "public function createcomment()\n {\n $id_item = $this->request->getParameter(\"id\");\n if (!empty($_POST['content']) && !empty($_POST['author'])) {\n\n if (isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])) {\n $secretKey = RECAPTCHA_SECRET_KEY;\n $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $secretKey . '&response=' . $_POST['g-recaptcha-response']);\n $responseData = json_decode($verifyResponse);\n $author = $this->request->getParameter(\"author\");\n $content = $this->request->getParameter(\"content\");\n\n if ($responseData->success) {\n $this->comment->insertComment($id_item, $author, $content);\n $this->message->commentCreated($id_item);\n } else {\n $errors['errors'] = 'La vérification a échoué. Merci de re-essayer plus tard.';\n if (!empty($errors)) {\n $_SESSION['errors'] = $errors;\n header('Location: ' . BASE_URL . 'extendedcard/' . $id_item . '/1/#addcomment');\n exit;\n }\n }\n } else {\n $errors['errors'] = 'Merci de cocher la case reCAPTCHA.';\n $_SESSION['errors'] = $errors;\n header('Location: ' . BASE_URL . 'extendedcard/' . $id_item . '/1/#addcomment');\n exit;\n }\n } else {\n $errors['errors'] = 'Merci de renseigner tous les champs';\n $_SESSION['errors'] = $errors;\n header('Location: ' . BASE_URL . 'extendedcard/' . $id_item . '/1/#addcomment');\n exit;\n }\n }", "title": "" }, { "docid": "a94ac5103a8f078ebd21126b747dac32", "score": "0.68436164", "text": "public function _create($comment) {\r\n $item = ORM::factory(\"item\", $this->input->post(\"item_id\"));\r\n access::required(\"view\", $item);\r\n\r\n $form = comment_3nids::get_add_form($item);\r\n $valid = $form->validate();\r\n if ($valid) {\r\n if (user::active()->guest && !$form->add_comment->inputs[\"name\"]->value) {\r\n $form->add_comment->inputs[\"name\"]->add_error(\"missing\", 1);\r\n $valid = false;\r\n }\r\n\r\n if (!$form->add_comment->text->value) {\r\n $form->add_comment->text->add_error(\"missing\", 1);\r\n $valid = false;\r\n }\r\n }\r\n\r\n if ($valid) {\r\n $comment = comment::create(\r\n $item, user::active(),\r\n $form->add_comment->text->value,\r\n $form->add_comment->inputs[\"name\"]->value,\r\n $form->add_comment->email->value,\r\n $form->add_comment->url->value);\r\n\r\n $active = user::active();\r\n if ($active->guest) {\r\n $form->add_comment->inputs[\"name\"]->value(\"\");\r\n $form->add_comment->email->value(\"\");\r\n $form->add_comment->url->value(\"\");\r\n } else {\r\n $form->add_comment->inputs[\"name\"]->value($active->full_name);\r\n $form->add_comment->email->value($active->email);\r\n $form->add_comment->url->value($active->url);\r\n }\r\n }\r\n url::redirect(url::site(\"comments_3nids?item_id=\".$item->id));\r\n}", "title": "" }, { "docid": "50ddde03502d62119c1492998c843049", "score": "0.68113047", "text": "function create_comment($post)\n\t{\n\t\t$query = (\"INSERT INTO comments (comment, created_at, updated_at, user_id, post_id) VALUES ('{$post['comment']}', NOW(), NOW(), '{$_SESSION['user']['id']}', '{$post['post_id']}')\");\n\t\trun_mysql_query($query);\n\t\t//run the function get_posts so it will update the success page with new info\n\t\tget_posts();\n\t\t//redirect to success page\n\t\theader('location: success.php');\n\t\tdie();\n\t}", "title": "" }, { "docid": "8b9ceca2b54ef8dce2a82829cd3713f3", "score": "0.6786102", "text": "public function createComment(Request $request, \\App\\Event $event){\n $request->validate([\n 'text'=>'required',\n 'user_id'=>'required|numeric|exists:users,id'\n ]);\n\n $comment = $event->comments()->create([\n 'text' => $request->text,\n 'user_id' => $request->user_id\n ]);\n\n $user = \\App\\User::find($request->user_id);\n\n // notify the group that a comment has been posted\n $event->group->notify(new EventCommentCreated($user, $event, $request->text));\n \n $event->loadMissing('comments.user');\n return response()->json($event->comments);\n }", "title": "" }, { "docid": "29b6039e64e924019c3f574814e60007", "score": "0.6765721", "text": "public function actionCreatec()\n {\n $model = new Comments();\n $model->task_id=Yii::$app->request->get('id');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['/task/card', 'id' => $model->task_id]);\n }\n\n return $this->render('createcomment', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "8a3b136558875e7d7d4bfada52dbd9bd", "score": "0.67633224", "text": "function createComment($eventID,$message){\n\t\t$authentication = new FacebookAuthentication();\n\t\t$currentToken = $authentication->getUserToken();\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, 'https://graph.facebook.com/'.$eventID.'/feed/?access_token='.$currentToken);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, 'message='.$message); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_exec($ch);\n\t\tcurl_close($ch);\t\n\t}", "title": "" }, { "docid": "b40fb6893869ad9472f5041b9d5ac754", "score": "0.67487764", "text": "function createComment($webcast_id, $title, $description, $author, $type, $auth_key_id = null, $auth_key = null, $publish_time = null, $insert_time = null, $speaker_viewing = null)\n\t{\n\t $v = array();\n $v[\"entry\"] = array();\n $v[\"entry\"][\"content\"] = array();\n $v[\"entry\"][\"content\"][\"params\"] = array();\n $v[\"entry\"][\"content\"][\"params\"][\"title\"] = $title;\n $v[\"entry\"][\"content\"][\"params\"][\"description\"] = $description;\n $v[\"entry\"][\"content\"][\"params\"][\"author\"] = $author;\n $v[\"entry\"][\"content\"][\"params\"][\"type\"] = $type;\n if ($publish_time) {\n $v[\"entry\"][\"content\"][\"params\"][\"publish_time\"] = $publish_time;\n }\n if ($insert_time) {\n $v[\"entry\"][\"content\"][\"params\"][\"insert_time\"] = $insert_time;\n }\n if ($speaker_viewing) {\n $v[\"entry\"][\"content\"][\"params\"][\"speaker_viewing\"] = $speaker_viewing;\n }\n\n $v[\"entry\"][\"auth\"] = array();\n $v[\"entry\"][\"auth\"][\"key_id\"] = $auth_key_id;\n $timestamp = time();\n $v[\"entry\"][\"auth\"][\"timestamp\"] = $timestamp;\n $v[\"entry\"][\"auth\"][\"hmac\"] = md5($auth_key.$timestamp);\n \n\t $uri = \"/comments/\" . $this->username . \"/\" . $webcast_id . \"/\";\n return $this->json_client->POST($uri, $v);\n\t}", "title": "" }, { "docid": "41cc05aac1121ebff64eb2b4b6b1da78", "score": "0.67428315", "text": "function addComment($episodeId, $author, $comment)\n {\n require('config/connect.php');\n $req = $bdd->prepare('INSERT INTO comments(episodeId? author, comment, date) VALUES\n (?, ?, ?, NOW())');\n $req->execute(array($episodeId, $author, $comment));\n $rreq->closeCursor();\n }", "title": "" }, { "docid": "479b2f05b75ad4ffcba60aa38e6d409b", "score": "0.67342025", "text": "function addComment($comment)\n\t\t{\n\t\t\t$this->crontabs[] = \"# $comment\\n\";\n\t\t\t$this->linetypes[] = CRON_COMMENT;\n\t\t}", "title": "" }, { "docid": "6d9f83935a1e99e85bc2919bc8d9f51d", "score": "0.6718154", "text": "public function create()\n {\n return view('back/createnewscomment');\n }", "title": "" }, { "docid": "116f0d753d8db7de65cd987c150761b5", "score": "0.6714988", "text": "function addComment($bookID, $comment) {\n doSql(\"INSERT INTO comments VALUES (0, '$bookID', '$comment', '')\");\n }", "title": "" }, { "docid": "fda5fa9da9ba56ae7950f60443111056", "score": "0.6713003", "text": "function makeComment($user_id,$text){\r\n//returns the styled html of the comment\r\n\t\t$html = '';\r\n\t\t$start = '<div id=\"a-reply\">';\r\n\t\t$end = '</div>';\r\n\t\t$text = \"<b>$text</b>\";\r\n\t\t$userStart = '<div id=\"title\">';\r\n\t\t$userEnd = ' replied:</div>';\r\n\t\tif ($user_id == 0){\r\n\t\t\t$username = 'Someone';\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$username = getUsername($user_id);\r\n\t\t\t$username = \"<a href='$username' alt='$username - tell them your favorite thing about them'>$username</a>\";\r\n\t\t}\r\n\t\t$html = $start.$userStart.$username.$userEnd.$text.$end;\r\n\t\treturn $html;\r\n}", "title": "" }, { "docid": "3710d04dd07a2ec3bc95a13c26179638", "score": "0.67085004", "text": "public function testCreateProductComment()\n {\n\n }", "title": "" }, { "docid": "134c8d6720927133a8d7cef62a5e5d1f", "score": "0.66996694", "text": "function add_comment_reply($userIDcomm, $postID, $commentText, $commentDate){\n\tglobal $db;\n $query = \"INSERT INTO comments\n (userIDcomm, commentText, postID, commentDate)\n VALUES\n ('$userIDcomm', '$commentText', $postID , '$commentDate')\";\n $db->exec($query);\t\n}", "title": "" }, { "docid": "0f6b0336c20183a274ef34d13411a575", "score": "0.66975117", "text": "private function addComment() {\n\t\t$currentUser = new \\common\\model\\User($this->loginModel->getSessionUser(), \"\");\n\t\t$dbUser = $this->userDAL->findUser($currentUser);\n\t\t$comment = $this->view->getUsersComment($dbUser);\n\n\t\ttry {\n\t\t\t$this->commentDAL->addComment($comment);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->view->commentFailed();\n\t\t}\n\t}", "title": "" }, { "docid": "67e92954e7f6eabb00b65d0696b00531", "score": "0.6695183", "text": "function add_comment($post_id, $name, $comment) \n{\n $sql = \"insert into comments(post_ID, comment_name, comment) values (?, ?, ?)\";\n\n DB::insert($sql, array($post_id, $name, $comment));\n}", "title": "" }, { "docid": "88a8fdf85d4a974bd24d2a4ef8e49a79", "score": "0.6635764", "text": "public function createComment($sale_id, $sale_comment, $cc_vendor=0, $cc_customer=0){\n $params['sale_id'] = $sale_id;\n $params['sale_comment'] = $sale_comment;\n $params['cc_vendor'] = $cc_vendor;\n $params['cc_customer'] = $cc_customer;\n\n return $this->update('create_comment', $params);\n }", "title": "" }, { "docid": "6987019e0765c1e174e2e6207040a739", "score": "0.66304815", "text": "public function xhrcreate()\n {\n // on recupere les donnees du formulaire HTML\n $data = $_REQUEST;\n $data[\"comment_date\"] = (new \\DateTime())->format(\"Y-m-d H:i:s\");\n // on enregistre le commentaire en BDD\n $comment = new Comment();\n $comment_id = $comment->save($data);\n echo \"Votre commentaire a bien été pris en compte\";\n }", "title": "" }, { "docid": "357d35e259fa73ae4633a8af019de651", "score": "0.6621253", "text": "public function createComment( CommentFormRequest $request ){\n $userContent = $request->get('content');\n $contentStep = str_replace('<p>','<br/>',$userContent);\n $content = str_replace('</p>','',$contentStep);\n\n $comment = new Comment(array(\n 'ticket_id'=>$request->get('ticket_id'),\n 'content'=>$content,\n 'user_id'=>Auth::user()->id,\n ));\n $comment->save();\n\n if(Auth::user()->user_role == 1){\n $status ='Pending';\n }else{\n $status ='Answered';\n }\n Ticket::whereId($request->get('ticket_id'))->update(array('status'=>$status));\n\n //Sending notification to Ticket creator\n $ticketOwner = User::find(Ticket::find($request->get('ticket_id'))->user_id);\n $selectedTicket = Ticket::find($request->get('ticket_id'));\n $ticketSlug = $selectedTicket->slug;\n $ticketTime = now()->timestamp;\n $details = [\n 'msg'=>'A new reply has been added to ticket #'.$ticketSlug,\n 'replyOwnerId'=>Auth::user()->id,\n 'avatar'=>Auth::user()->avatar,\n 'ticketSlug'=>$ticketSlug,\n 'time'=>$ticketTime,\n\n ];\n $ticketOwner->notify(new newreply($details));\n //\n return redirect()->back()->with('status','Your reply to ticket has been added');\n\n }", "title": "" }, { "docid": "73c94ee4d6b1c0ae2f52966697af8fbd", "score": "0.66179085", "text": "public function create($request)\n {\n $comment = new Comment();\n $comment->body = $request->body;\n $comment->post_id = $request->post_id;\n $comment->user_id = Auth::user()->id;\n $this->commentRepo->create($comment);\n }", "title": "" }, { "docid": "7865516cda30ddb4d57f923c257da592", "score": "0.66126287", "text": "protected function add_comment($text, context $context) {\n $args = new stdClass;\n $args->context = $context;\n $args->area = 'page_comments';\n $args->itemid = 0;\n $args->component = 'block_comments';\n $args->linktext = get_string('showcomments');\n $args->notoggle = true;\n $args->autostart = true;\n $args->displaycancel = false;\n $comment = new comment($args);\n\n $comment->add($text);\n }", "title": "" }, { "docid": "5c4e976f5bc77532791130bfa6a5f7f2", "score": "0.65921426", "text": "public function createAdComment(): string\n {\n $html = '';\n\n // If the form have been submitted :\n if (!empty($_POST['idannonce']) &&\n !empty($_POST['author']) &&\n !empty($_POST['comment'])) {\n // Create the ad comment :\n $adCommentsService = new AdCommentsService();\n $isOk = $adCommentsService->setAdComment(\n null,\n $_POST['idannonce'],\n $_POST['author'],\n $_POST['comment']\n );\n if ($isOk) {\n $html = 'Votre commentaire a été ajouté avec succès.';\n } else {\n $html = 'Erreur lors de la création du commentaire.';\n }\n } else {\n $html = 'Veuillez remplir tous les champs du formulaire';\n }\n\n\n return $html;\n }", "title": "" }, { "docid": "bdd1a97383961bc81d2bef095259dbc8", "score": "0.65865034", "text": "public function create() {\n return view('backend.comment.create');\n }", "title": "" }, { "docid": "c85fe0a86903b326d8efa54c987071c7", "score": "0.6571389", "text": "function InsertComment($answer_to, $content, $title, $resources, $geodata_link, $user_id, $taglist, $pointx, $pointy) {\n // GeoDatabase already existis\n if(GeoDataLinkExists($geodata_link)) {\n $id=GetSelectField(\"SELECT * FROM geodata WHERE url='$geodata_link'\", \"id\");\n echo trim(GetSelectField(\"SELECT * FROM comments WHERE geodata_id=$id\", \"permalink\"));\n return;\n }\n \n // Check for anonym comment\n if($user_id==\"anonym\") {\n $user_id=0;\n \n // Add random Number and save\n $rand=rand(99999, 999999);\n if($_COOKIE['anonymrand']!=\"\") $rand=$_COOKIE['anonymrand'];\n $user_id.=$rand;\n setcookie('anonymrand', $rand, strtotime(\"+1 month\"));\n } \n \n // Convert TagNameString to TagIDString,\n $taglist=TagsNameToId($taglist);\n\n // Permalink from title\n $permalink=StrToPermalink($title, \"comments\");\n\n // Convert geodata_link to id\n $geodata_id=GeoLinkToId($geodata_link);\n\n \n // Finally insert new comment\n $sql = \"INSERT INTO comments (answer_to, content, title, resources, geodata_id, user_id, tags_ids, permalink, positionx, positiony) \"\n . \"VALUES ('\".$answer_to.\"','\".$content.\"','\".$title.\"','\".\n $resources.\"','\".$geodata_id.\"','\".$user_id.\"','\".$taglist.\"','\".$permalink.\n \"','\".$pointx.\"','\".$pointy.\"');\";\n\n //GeomFromText( 'POINT(\".$pointx.\" \".$pointy.\")' )\n \n RequestInsert($sql);\n echo \"1\";\n }", "title": "" }, { "docid": "866ad3f7a673b0903145d77672b7de6d", "score": "0.65704745", "text": "public function comment()\n {\n $good_result = CommentModel::addNewComment();\n\n if ($good_result) {\n header(\"location:index.php?c=post&a=detail&post_id=\" . $_POST[\"post-id\"]);\n } else {\n header(\"location:index.php?c=post&a=detail&post_id=\" . $_POST[\"post-id\"]);\n }\n }", "title": "" }, { "docid": "945222471293b32b34aefbcdd037ac75", "score": "0.65672624", "text": "public function create()\n {\n $comment = new Comment();\n \n return view('admin.comment.create')->with([\n 'comment' => $comment\n ]);\n }", "title": "" }, { "docid": "fc274c2c80c908a791a66fd14ca1d1b3", "score": "0.65629184", "text": "public function comment() {\n\tglobal $controllers;\n\n\ttry {\n\t if ($this->get_request_method() != \"POST\") {\n\t\t$this->response(array('status' => $controllers['NOPOSTREQUEST']), 405);\n\t } elseif (!isset($_SESSION['currentUser'])) {\n\t\t$this->response(array('status' => $controllers['USERNOSES']), 403);\n\t } elseif (!isset($this->request['comment'])) {\n\t\t$this->response(array('status' => $controllers['NOCOMMENT']), 400);\n\t } elseif (!isset($this->request['toUser'])) {\n\t\t$this->response(array('status' => $controllers['NOTOUSER']), 403);\n\t } elseif (!isset($this->request['objectId'])) {\n\t\t$this->response(array('status' => $controllers['NOOBJECTID']), 403);\n\t } elseif (!isset($this->request['classType'])) {\n\t\t$this->response(array('status' => $controllers['NOCLASSTYPE']), 403);\n\t }\n\t $fromUser = $_SESSION['currentUser'];\n\t $toUserObjectId = $this->request['toUser'];\n\t $comment = $this->request['comment'];\n\t $classType = $this->request['classType'];\n\t $objectId = $this->request['objectId'];\n\t if (strlen($comment) < $this->config->minCommentSize) {\n\t\t$this->response(array('status' => $controllers['SHORTCOMMENT'] . strlen($comment)), 406);\n\t } elseif (strlen($comment) > $this->config->maxCommentSize) {\n\t\t$this->response(array('status' => $controllers['LONGCOMMENT'] . strlen($comment)), 406);\n\t }\n\t require_once CLASSES_DIR . 'activity.class.php';\n\t require_once CLASSES_DIR . 'activityParse.class.php';\n\t require_once CLASSES_DIR . 'comment.class.php';\n\t require_once CLASSES_DIR . 'commentParse.class.php';\n\t $cmt = new Comment();\n\t $cmt->setActive(true);\n\t $cmt->setCommentCounter(0);\n\t $cmt->setFromUser($fromUser->getObjectId());\n\t $cmt->setLocation(null);\n\t $cmt->setLoveCounter(0);\n\t $cmt->setLovers(array());\n\t $cmt->setShareCounter(0);\n\t $cmt->setTags(array());\n\t $cmt->setTitle(null);\n\t $cmt->setText($comment);\n\t $cmt->setToUser($toUserObjectId);\n\t $cmt->setType('C');\n\t $cmt->setVote(null);\n\t $activity = new Activity();\n\t $activity->setActive(true);\n\t $activity->setCounter(0);\n\t $activity->setFromUser($fromUser->getObjectId());\n\t $activity->setPlaylist(null);\n\t $activity->setQuestion(null);\n\t $activity->setRead(false);\n\t $activity->setStatus('A');\n\t $activity->setToUser($toUserObjectId);\n\t switch ($classType) {\n\t\tcase 'Album':\n\t\t require_once CLASSES_DIR . 'albumParse.class.php';\n\t\t $albumParse = new AlbumParse();\n\t\t $res = $albumParse->incrementAlbum($objectId, 'commentCounter', 1);\n\t\t $cmt->setAlbum($objectId);\n\t\t $activity->setAlbum($objectId);\n\t\t $activity->setType('COMMENTEDONALBUM');\n\t\t break;\n\t\tcase 'Comment':\n\t\t require_once CLASSES_DIR . 'commentParse.class.php';\n\t\t $commentParse = new CommentParse();\n\t\t $comment = $commentParse->getComment($objectId);\n\t\t if ($comment instanceOf Error) {\n\t\t\t$this->response(array('status' => $comment->getErrorMessage()), 503);\n\t\t }\n\t\t $res = $commentParse->incrementComment($objectId, 'commentCounter', 1);\n\t\t $cmt->setComment($objectId);\n\t\t $activity->setComment($objectId);\n\t\t switch ($comment->getType()) {\n\t\t\tcase 'P':\n\t\t\t $activity->setType('COMMENTEDONPOST');\n\t\t\t break;\n\t\t\tcase 'RE':\n\t\t\t $activity->setType('COMMENTEDONEVENTREVIEW');\n\t\t\t break;\n\t\t\tcase 'RR':\n\t\t\t $activity->setType('COMMENTEDONRECORDREVIEW');\n\t\t\t break;\n\t\t }\n\t\t break;\n\t\tcase 'Event':\n\t\t require_once CLASSES_DIR . 'eventParse.class.php';\n\t\t $eventParse = new EventParse();\n\t\t $res = $eventParse->incrementEvent($objectId, 'commentCounter', 1);\n\t\t $cmt->setEvent($objectId);\n\t\t $activity->setEvent($objectId);\n\t\t $activity->setType('COMMENTEDONEVENT');\n\t\t break;\n\t\tcase 'Image':\n\t\t require_once CLASSES_DIR . 'imageParse.class.php';\n\t\t $imageParse = new ImageParse();\n\t\t $res = $imageParse->incrementImage($objectId, 'commentCounter', 1);\n\t\t $cmt->setImage($objectId);\n\t\t $activity->setImage($objectId);\n\t\t $activity->setType('COMMENTEDONIMAGE');\n\t\t break;\n\t\tcase 'Record':\n\t\t require_once CLASSES_DIR . 'recordParse.class.php';\n\t\t $recordParse = new RecordParse();\n\t\t $res = $recordParse->incrementRecord($objectId, 'commentCounter', 1);\n\t\t $cmt->setRecord($objectId);\n\t\t $activity->setRecord($objectId);\n\t\t $activity->setType('COMMENTEDONRECORD');\n\t\t break;\n\t\tcase 'Video':\n\t\t require_once CLASSES_DIR . 'videoParse.class.php';\n\t\t $videoParse = new VideoParse();\n\t\t $res = $videoParse->incrementVideo($objectId, 'commentCounter', 1);\n\t\t $cmt->setVideo($objectId);\n\t\t $activity->setVideo($objectId);\n\t\t $activity->setType('COMMENTEDONVIDEO');\n\t\t break;\n\t }\n\t $commentParse = new CommentParse();\n\t $resCmt = $commentParse->saveComment($cmt);\n\t if ($resCmt instanceof Error) {\n\t\t$this->response(array('status' => $resCmt->getErrorMessage()), 503);\n\t } else {\n\t\t$activityParse = new ActivityParse();\n\t\t$resActivity = $activityParse->saveActivity($activity);\n\t\tif ($resActivity instanceof Error || $res instanceof Error) {\n\t\t require_once CONTROLLERS_DIR . 'rollBackUtils.php';\n\t\t $message = rollbackCommentController($objectId, $classType);\n\t\t $this->response(array('status' => $message), 503);\n\t\t}\n\t }\n\t global $mail_files;\n\t require_once CLASSES_DIR . 'userParse.class.php';\n\t $userParse = new UserParse();\n\t $user = $userParse->getUser($toUserObjectId);\n\t $address = $user->getEmail();\n\t $subject = $controllers['SBJCOMMENT'];\n\t $html = $mail_files['COMMENTEMAIL'];\n\t sendMailForNotification($address, $subject, $html);\n\t $this->response(array('status' => $res), 200);\n\t} catch (Exception $e) {\n\t $this->response(array('status' => $e->getErrorMessage()), 503);\n\t}\n }", "title": "" }, { "docid": "f7f7c17a7b32977e2cc0d5884c394fb3", "score": "0.65589863", "text": "function createAdminComment($webcast_id, $title, $description, $author, $type, $publish_time = null, $insert_time = null, $speaker_viewing = null)\n\t{\n\t $v = array();\n $v[\"entry\"] = array();\n $v[\"entry\"][\"content\"] = array();\n $v[\"entry\"][\"content\"][\"params\"] = array();\n $v[\"entry\"][\"content\"][\"params\"][\"title\"] = $title;\n $v[\"entry\"][\"content\"][\"params\"][\"description\"] = $description;\n $v[\"entry\"][\"content\"][\"params\"][\"author\"] = $author;\n $v[\"entry\"][\"content\"][\"params\"][\"type\"] = $type;\n $v[\"entry\"][\"content\"][\"params\"][\"auto_publish\"] = 1;\n if ($publish_time) {\n $v[\"entry\"][\"content\"][\"params\"][\"publish_time\"] = $publish_time;\n }\n if ($insert_time) {\n $v[\"entry\"][\"content\"][\"params\"][\"insert_time\"] = $insert_time;\n }\n if ($speaker_viewing) {\n $v[\"entry\"][\"content\"][\"params\"][\"speaker_viewing\"] = $speaker_viewing;\n }\n \n\t $uri = \"/comments/\" . $this->username . \"/\" . $webcast_id . \"/\";\n return $this->json_client->POST($uri, $v);\n\t}", "title": "" }, { "docid": "701a51ddfcca90396ccbd378f3cc77ad", "score": "0.65584594", "text": "public function create_comment($article_id, $user, $message)\n {\n $this->article_id = $article_id;\n $this->name = $user;\n $this->message=$message;\n $this->create();\n \n }", "title": "" }, { "docid": "09d54c5445a1d1a3ad4f8258311d15cb", "score": "0.65461403", "text": "function InsertCommentGeodata($answer_to, $content, $title, $resources, $geodata_link, $user_id, $taglist, $pointx, $pointy, $datestamp, $boundingbox, $spatialexp) {\n InsertComment($answer_to, $content, $title, $resources, $geodata_link, $user_id, $taglist,$pointx, $pointy);\n SetGeodataDetails($geodata_link, $datestamp, $boundingbox, $spatialexp);\n }", "title": "" }, { "docid": "d092a0decc4951f5f31135dd5ac165bf", "score": "0.6542843", "text": "private function commentCreate(array $entityData): CommentInterface {\n $comment = Comment::create($entityData);\n $comment->save();\n $this->entities[$comment->getEntityTypeId()][] = $comment;\n return $comment;\n }", "title": "" }, { "docid": "9e0899eb347b2a30d7eedbfc110c114e", "score": "0.65377367", "text": "function setComments($commentSubmit, $uid, $date, $message, $recipe){\r\n\t\t\t$sql = \"INSERT INTO comments (uid, recipe, date, message) VALUES ('$uid', '$recipe', '$date', '$message')\";\r\n\t\t\t$result = mysqli_query($this->conn, $sql);\r\n\t}", "title": "" }, { "docid": "44002d04d8229519812c96a2470738d0", "score": "0.653742", "text": "public function createComment($user, $content) {\n\t\treturn parent::create([\n\t\t\t\"topic_id\"\t=> $this->getID(),\n\t\t\t\"user_id\"\t=> $user->id,\n\t\t\t\"content\"\t=> $content\n\t\t]);\n\t}", "title": "" }, { "docid": "101d25aa4015c33a673cd851980e19df", "score": "0.6518413", "text": "protected static function createComment(Request $request){\n \t$projectId = InputSanitise::inputInt($request->get('project_id'));\n \t$userComment = $request->get('comment');\n\n \t$comment = new static;\n \t$comment->body = $userComment;\n \t$comment->vkit_project_id = $projectId;\n \t$comment->user_id = \\Auth::user()->id;\n \t$comment->save();\n \treturn $comment;\n }", "title": "" }, { "docid": "ec8324509220fc9ed4898f3c26032b1a", "score": "0.6512428", "text": "public function p_comment($poem_id) {\n\t\t#Associate this comment with the logged in user\n\t\t$_POST['user_id'] = $this->user->user_id;\n\t\t\n\t\t#Associate this comment with the poem its about\n\t\t$_POST['poem_id'] = $poem_id;\n\t\t\n\t\t#Unix timestamp of when this comment was created/modified\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\t\t\n\t\t#Insert\n\t\tDB::instance(DB_NAME)->insert('comments', $_POST);\n\t}", "title": "" }, { "docid": "b291f699cdf604a83745fe391b077948", "score": "0.64980453", "text": "public function actionCreate()\n {\n $model = new comments();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "4d81c28b3840638935878739a621f829", "score": "0.6492246", "text": "function custom_comment_create_callback($nid, $parent_id, $subject, $comment_body, $comment_author, $comment_status) {\n module_load_include('inc', 'custom', 'custom');\n return custom_comment_create($nid, $parent_id, $subject, $comment_body, $comment_author, $comment_status);\n}", "title": "" }, { "docid": "55038959bbf983c121a31ae3c79fbaef", "score": "0.6487655", "text": "public static function createComment($actor_id, $post_id, $message){\n\t\t$db = &get_instance()->db;\n\t\t$db->insert('post_comment', array(\n\t\t\t'post_id' => $post_id,\n\t\t\t'user_id' => $actor_id,\n\t\t\t'message' => $message,\n\t\t));\n\t\treturn $db->insert_id();\n\t}", "title": "" }, { "docid": "b656059b9b4c2e3a9a90f988e6c9646a", "score": "0.64855224", "text": "public function add(Comment $comment)\r\n {\r\n $request = $this->_db->prepare(\"INSERT INTO comment(text_comment, \r\n date_comment, fk_user, fk_lieu) \r\n VALUES (:text, :date, :user, :lieu)\");\r\n\r\n // tableau -> execute la requette \r\n $request->execute(array(\r\n 'text' => $comment->text_comment(),\r\n 'date' => $comment->date_comment(),\r\n 'user' => $comment->fk_user(),\r\n 'lieu' => $comment->fk_lieu(),\r\n ));\r\n // On hydrate l'objet afin que son id deviennt l'id qui vient \r\n //d'être créé\r\n $comment->hydrate(array(\r\n 'id_comment' => $this->_db->lastInsertId()\r\n ));\r\n}", "title": "" }, { "docid": "e5f97c2d0dcec21c8e76c5d31ed959b0", "score": "0.64735496", "text": "public function created(Comments $comments)\n {\n echo 'Comments created';\n }", "title": "" }, { "docid": "c67f7ca24a49b385aaad359d79a9946c", "score": "0.6467637", "text": "function comment($id, $post, $date, $comment)\n\t{\n\t\tglobal $conn;\n\t\t$sql = 'INSERT INTO commentstable (userID, postID, commentDate, commentText) VALUES (:id, :post, :date, :comment)';\n\t\t$statement = $conn->prepare($sql);\n\t\t$statement->bindValue(':id', $id);\n\t\t$statement->bindValue(':post', $post);\n\t\t$statement->bindValue(':date', $date);\n\t\t$statement->bindValue(':comment', $comment);\n\t\t$result=$statement->execute();\n\t\t$statement->closeCursor();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "95d1f729d3b6792e9e0809447dc4db98", "score": "0.6466739", "text": "abstract protected function getComment();", "title": "" }, { "docid": "241196035f0806025fafaee9e7cc4ae1", "score": "0.64596766", "text": "protected function sendNewComment(){\n if($this->testComment()){\n $this->newComment();\n header('location: index.php?action=article&number='.$this->getNumber().'&online=wait');\n }\n else {\n $this->createComment();\n }\n }", "title": "" }, { "docid": "7723c84efd0ab0b7a693e08c98d93daf", "score": "0.64593184", "text": "function the_comment() {}", "title": "" }, { "docid": "779182ec07a7bbacdc0d91daab7551d7", "score": "0.645286", "text": "public function add() {\n // @todo if entry belongs to a group, make sure\n // the user is subscribed to that group\n \n $identity_id = Context::loggedInIdentityId();\n $entry_id = $this->data['Comment']['entry_id'];\n \n if($identity_id && $entry_id &&\n $this->RequestHandler->isPost()) {\n \n $this->ensureSecurityToken();\n \n if(!$this->data['Comment']['text']) {\n $this->flashMessage('alert', __('You forgot to write something.', true));\n } else {\n $this->flashMessage('success', __('Comment added.', true));\n\n $data = array(\n 'entry_id' => $entry_id,\n 'identity_id' => $identity_id,\n 'content' => $this->data['Comment']['text'],\n 'published_on' => date('Y-m-d H:i:s')\n );\n $this->Comment->createForAll($data);\n $this->data = array();\n\n $this->Comment->Entry->addComment($identity_id, $entry_id);\n }\n }\n \n $this->redirect($this->referer());\n }", "title": "" }, { "docid": "05c3944a4ebd20483634cf894d9d0d34", "score": "0.64494705", "text": "public function create()\n {\n return view('comment::create');\n }", "title": "" }, { "docid": "bf31053fdaf1b17296ae6d135e69c32b", "score": "0.64429027", "text": "public function newComment($commentContent, $post_id)\n {\n try\n {$stmt = $this->db->prepare(\"INSERT INTO comments(comment_content,date,user_id,post_id) \n VALUES(:comment_content,NOW(),:user_id,:post_id)\");\n \n $stmt->bindParam(\":comment_content\", $commentContent);\n $stmt->bindParam(\":user_id\", $_SESSION['user_session']);\n $stmt->bindParam(\":post_id\", $post_id); \n $stmt->execute();\n \n return $stmt; \n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n } \n }", "title": "" }, { "docid": "fe07ae680d7b08178cb700aba61e1012", "score": "0.64371026", "text": "public function the_comment()\n {\n }", "title": "" }, { "docid": "bf71d990599bd3b97ed7198a4c7c611e", "score": "0.64333075", "text": "function add_comment($bug_id,$comment){\n \n \t$bugzilla = new BugzillaXML(\"Bug.add_comment\");\n \t$paramArr[\"comment\"] = $comment;\n \t$paramArr[\"id\"] = $bug_id;\n \n \n \tforeach ($paramArr as $k => $v) {\n \t\tif ($k == 'ids' || $k == 'limit') {\n \t\t\t$type = 'int';\n \t\t} else if ($k == \"description\") {\n \t\t\t$type = \"special\";\n \t\t} else {\n \t\t\t$type = 'string';\n \t\t}\n \t\t$bugzilla->addMember($k, $v, $type);\n \t}//end foreach\n \n \t//Then submit\n \t$return = $bugzilla->submit(true);\n \treturn $return;\n \t\t\n }", "title": "" }, { "docid": "5e9119548ec708ba17f670e5e7297da9", "score": "0.64305997", "text": "function photos_comments_addComment($photo_id, $comment_text) {\n /* https://www.flickr.com/services/api/flickr.photos.comments.addComment.html */\n $this->request(\"flickr.photos.comments.addComment\", array(\"photo_id\" => $photo_id, \"comment_text\"=>$comment_text), TRUE);\n return $this->parsed_response ? $this->parsed_response['comment'] : false;\n }", "title": "" }, { "docid": "0a6a79837b09121047b7991b69ab8504", "score": "0.64302695", "text": "public function wp_newComment(/**\n * Fires after a new comment has been successfully created via XML-RPC.\n *\n * @since 3.4.0\n *\n * @param int $comment_ID ID of the new comment.\n * @param array $args An array of new comment arguments.\n */\n$args) {}", "title": "" }, { "docid": "910eafd1502187478d47e733fa029db9", "score": "0.64249295", "text": "public function create()\n {\n return view('comment.create');\n }", "title": "" }, { "docid": "b51ec00be0d951232b8a9afed736ba98", "score": "0.6424745", "text": "function action_comment()\n\t{\n\t\tif (isset($_POST['author']) && isset($_POST['filename'])\n\t\t\t&& isset($_POST['receiver']))\n\t\t{\n\t\t\t$comment = htmlspecialchars($_POST['comment']);\n\t\t\t$this->model->add_comment($_POST['author'], $comment, $_POST['filename'],\n\t\t\t$_POST['receiver']);\n\t\t}\n\t\techo \"\n\t\t\t<script>\n\t\t\t\twindow.location='/gallery';\n\t\t\t</script>\";\n\t}", "title": "" }, { "docid": "c10643480a67cc224c6cfd16d200e645", "score": "0.64219177", "text": "public function create()\n {\n $this->authorize('admin.comment.create');\n\n return view('admin.comment.create');\n }", "title": "" }, { "docid": "cea790030b3dfe8e04db96a92b1d4934", "score": "0.64203346", "text": "public function create()\n {\n return view('admin.comment.create');\n }", "title": "" }, { "docid": "e3efcc913757c23952f717b9aa02d8bc", "score": "0.64158493", "text": "public function createComment($comments, $is_user ){\n $bdd = $this->bdConnect();\n\n $req = $bdd->prepare('INSERT INTO guestbooks(comments, idguestbooksusers) VALUE (?, ?)');\n $req->execute(array($comments, $is_user));\n\n return $req;\n }", "title": "" }, { "docid": "fac9a2ec13a9eb63c82b97689634dbcd", "score": "0.6413088", "text": "function addComment($data) {\n //requires parent_comment, comment, date_stamp , user_id, resource_id to create a new one.\n $sql = \"INSERT INTO `Comments` (parent_comment, comment, date_stamp , user_id, resource_id) VALUES (:parent_comment, :comment, :dates, :user_id, :resource_id)\";\n $this->conn->query($sql);\n try {\n //bind parameters to query.\n foreach ($data as $k => $v) {\n $this->conn->bind(':' . $k, $v);\n }\n //get time stamp\n $date = date('Y-m-d H:i:s', strtotime('now'));\n //bind it.\n $this->conn->bind(':dates', $date);\n $this->conn->execute();\n //get comment id. \n $id = $this->conn->lastInsertId();\n $message = array('result' => 'Success', 'message' => 'Comment id ' . $id . ' has been posted.');\n return $message;\n } catch (\\PDOException $e) {\n $message = array('result' => 'Failure' , 'message' => $e->getMessage());\n $this->log->logError($message);\n return $message;\n }\n\n }", "title": "" }, { "docid": "16d6b8ffb94457d7f45260ba034889a9", "score": "0.6407021", "text": "public function add_comment($id = null)\n {\n\t\tinclude_once(ROOT . '/sys/inc/includes/add_comment.php');\n\t}", "title": "" }, { "docid": "53bb745328a0f73b9e27390ff2411e06", "score": "0.64069396", "text": "public function postComment($id_chapter, $author, $comment){\n $db = $this->dbConnect();\n $req = $db->prepare('INSERT INTO comments(id_comment,signalement,id_chapter,author,comment,dateComment) VALUES (NULL,0,?,?,?,NOW())');\n $req->execute(array($id_chapter,$author,$comment));\n return $req ;\n }", "title": "" }, { "docid": "c505292376ed2aa066d7c8123e769a54", "score": "0.63999116", "text": "public function createCommentAction($qid, $comment)\n {\n\t$question = $this->questionRepository->findByUid($qid);\n\tif ($question)\n\t{\n\t $uid = @$GLOBALS['TSFE']->fe_user->user['uid'];\n\t if ($uid)\n\t {\n\t\t$user = $this->frontendUserRepository->findByUid($uid);\n\t\tif ($user)\n\t\t{\n\t\t $flexformPid = intval($this->settings['flexform']['selectPid']);\n\t\t $c = $this->objectManager->get('Comnerds\\\\JpfaqComments\\\\Domain\\\\Model\\\\Comment');\n\t\t $c->setQuestion($question);\n\t\t $c->setComment($comment);\n\t\t $c->setUser($user);\n\t\t $c->setCommentdate(time());\n\t\t $c->setPid($flexformPid);\n\t\t $c->setHidden(true);\n\t\t // check if image was uploaded\n\t\t $filename = 'tx_jpfaqcomments_' . strtolower($this->request->getPluginName());\n\t\t $fileObject = null;\n\t\t if (@$_FILES[$filename]['error']['image'] == 0)\n\t\t {\n\t\t\t$name = $_FILES[$filename]['name']['image'];\n\t\t\t$tmp_name = $_FILES[$filename]['tmp_name']['image'];\n\t\t\t$storageRepository = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Resource\\\\StorageRepository');\n\t\t\t$storage = $storageRepository->findByUid(1);\n\t\t\t$fileObject = $storage->addFile($tmp_name, $storage->getRootLevelFolder(), $name);\n\t\t\t$c->setImage($fileObject->getUid());\n\t\t }\n\t\t $this->commentRepository->add($c);\n\t\t // TODO: Clear cache for all pages related to this question\n\t\t $this->cacheService->clearPageCache($GLOBALS['TSFE']->id);\n\t\t $this->sendMail($c, $fileObject);\n\t\t}\n\t }\n\t}\n\t$this->redirect(NULL);\n }", "title": "" }, { "docid": "ebdc758d17fc16aa2bac66c9d1e4218c", "score": "0.6398945", "text": "public function create()\n {\n return view(\"comments.create\");\n }", "title": "" }, { "docid": "7ff989d99e683d8358810e2c406399b1", "score": "0.6393912", "text": "function addComment($postId, $author, $comment)\n{\n $commentManager = new CommentManager();\n $affectedLines = $commentManager->postComment($postId, $author, $comment);\n\n if ($affectedLines === false) {\n throw new Exception('Impossible d\\'ajouter le commentaire !');\n } else {\n header('Location: index.php?action=post&id=' . $postId);\n }\n}", "title": "" }, { "docid": "6d9fbae099a16b24b5082a529548b96b", "score": "0.63896555", "text": "public function creating(comment $comment)\n {\n if (empty($comment->user_id)) {\n $comment->user_id = Auth()->id();\n }\n }", "title": "" }, { "docid": "d7069ee3696daafeb0cea3cf5d9a320d", "score": "0.6385582", "text": "public function comment_insert()\n\t{\n\n\t\t$this->form_validation->set_rules('comment_body', 'Commment', 'trim|required');\n\t\t\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\tredirect('career_advice/blog/'.$this->input->post('blog_id'));\t\n\t\t}else{\n\t\t\t$data = $this->career_model->get_comment_insert();\n\n\t\t\tredirect('career_advice/blog/'.$this->input->post('blog_id'));\t\n\t\t}\t\n\t}", "title": "" }, { "docid": "d20d189ad3553b8717dbe9bdc9c6e898", "score": "0.6376106", "text": "function insertComment($params = null) {\n // obtengo el body del request (json)\n $body = $this->getBody();\n var_dump($body);\n // TODO: VALIDACIONES -> 400 (Bad Request)\n \n $id = $this->commentModel->postComment($body->album,$body->user,$body->comment,$body->rating);\n var_dump($id);\n \n \n if ($id != 0) {\n $this->view->response(\"Comment was inserted with id:=$id\", 201);\n } else {\n $this->view->response(\"Comment could not be inserted\", 500);\n }\n }", "title": "" }, { "docid": "80b68d157eeff54154950c31ef25157e", "score": "0.6375432", "text": "public function actionCreate()\n {\n $model = new QComments();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "4440bd46cb9e158482ff0870a6a808d4", "score": "0.6369425", "text": "public function addComment()\n {\n\n if($this->validate()){\n $comment = new Comment;\n $comment->comment_writer = $this->comment_writer;\n $comment->comment_w_email = $this->comment_w_email;\n $comment->comment_w_phone = $this->comment_w_phone;\n $comment->comment_w_gender = $this->comment_w_gender;\n $comment->comment_country_id = $this->country;\n\n $comment->comment_subject = $this->comment_subject;\n $comment->comment_message = $this->comment_message;\n $comment->comment_date_created = time();\n\n $comment->save();\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "6b6d9ae65395395ccae83f4b5da17b1a", "score": "0.63687974", "text": "function comment_add ()\n{\n $file = fopen(\"comments.txt\", \"a+\") or die(\"File not fount\");\n $comment = serialize($_POST);\n fputs($file, $comment . PHP_EOL);\n fclose($file);\n}", "title": "" }, { "docid": "d41f97f0f55b3f509b6013c0b1841e7e", "score": "0.6362199", "text": "public static function make($photo_id,$author,$body){\n if(empty($photo_id)||empty($author)||empty($body))\n return null;//null and false are same\n $comment=new Comment();\n $comment->photograph_id=$photo_id;\n $comment->created=strftime(\"%Y-%m-%d %H:%M:%S\",time());\n $comment->author=$author;\n $comment->body=$body;\n return $comment;\n }", "title": "" }, { "docid": "9ea3944c5700ca68f468f95d9bead099", "score": "0.6361373", "text": "public function add_comment(){\r\n\r\n\t\t/* Require user */\r\n\t\tif (!$this->_requireUser('You must be logged in to post a comment')){ return false; }\r\n\t\t$user = BluApplication::getUser();\r\n\r\n\t\t/* Get giveaway data */\r\n\t\t$itemsModel = $this->getModel('items');\r\n\t\t$giveaway = $this->_giveaway = $itemsModel->getGiveaway();\r\n\r\n\t\t/* Build arguments */\r\n\t\t$args = array();\r\n\t\t$args['commentType'] = 'article';\r\n\t\t$args['commentTypeObjectId'] = $giveaway['articleId'];\r\n\t\t$args['commentOwner'] = $user->userid;\r\n\t\t$args['commentBody'] = Request::getString('body');\r\n\r\n\t\t/* Add comment */\r\n\t\t$commentsModel = $this->getModel('comments');\r\n\t\t$success = (bool) $commentsModel->addComment($args);\r\n\r\n\t\t/* Add message */\r\n\t\t$message = $success ? 'Thank you for commenting.' : 'Sorry, your comment could not be saved, please try again.';\r\n\t\t$messageType = $success ? 'info' : 'error';\r\n\r\n\t\t/* Redirect */\r\n\t\treturn $this->_redirect('/giveaways/', $message, $messageType);\r\n\r\n\t}", "title": "" }, { "docid": "704e18dda269d5cd77b2bb2519ae88a1", "score": "0.6351047", "text": "public function addComment($body) {\n\n //this post's comments => create a new one where 'body' is equal to what was passed in\n $this->comments()->create([\n 'body' => $body,\n 'user_id' => $this->user->id\n ]);\n //Long form way\n// Comment::create([\n// 'post_id' => $this->id,\n// 'body' => $body\n// ]);\n }", "title": "" }, { "docid": "3d87d3e048d4b675f1e62e4a96fe1475", "score": "0.63501346", "text": "public function create()\n {\n return view('#comment', ['comment' => $comment]);\n }", "title": "" }, { "docid": "b4117e8e0a52ba7baf4d21a4529f79fb", "score": "0.63412446", "text": "public function created( Comment $comment )\n {\n $comment->ip = \\Request::ip();\n $comment->user_agent = \\Request::userAgent();\n }", "title": "" }, { "docid": "404a10196cff1a555c7989dd81a9159e", "score": "0.63368493", "text": "public function isComment();", "title": "" }, { "docid": "5be24acb81f0898acf9cab0e1bc3a533", "score": "0.63344216", "text": "public function insertComment($params = null){\n //ponemos en una variable el body del request \n $body = $this->getData();\n\n $comment = $body->comment;\n $score = $body->score;\n $id_product = $body->id_product;\n $id_user = $body->id_user;\n //insertComment retorna el id del último comment insertado\n $idComment = $this->model->insertComment($comment,$score,$id_product,$id_user);\n if($idComment){\n //te devuelve el comment\n $this->view->response($this->model->getCommentById($idComment), 201);\n } else {\n $this->view->response(\"el comentario no se insertó\", 404);\n }\n }", "title": "" }, { "docid": "55fb62fa0f196564098c57278ff14b75", "score": "0.6332153", "text": "public function creating(Comment $comment)\n {\n if(!$comment){\n return back()->withInput()->with('errors', 'Error creating new Comment');\n }\n }", "title": "" }, { "docid": "95d0b929566ca7139219273991992282", "score": "0.6330614", "text": "protected function post_comment(\n string $comment, \n string $author, \n string $ticket_id,\n string $added_at,\n string $comment_id\n ) {\n $query = \"INSERT INTO {$this->db_table} \n SET\n comment = :comment,\n author = :author,\n ticket_id = :ticket_id,\n added_at = :added_at,\n comment_id = :comment_id\";\n $conn = parent::connect();\n $stmt = $conn->prepare($query);\n $stmt->bindValue(\":comment\", $comment);\n $stmt->bindValue(\":author\", $author);\n $stmt->bindValue(\":ticket_id\", $ticket_id);\n $stmt->bindValue(\":added_at\", $added_at);\n $stmt->bindValue(\":comment_id\", $comment_id);\n $stmt->execute();\n return $stmt;\n }", "title": "" } ]
5afc77b257454ad5b7af7a5c43eeb659
this up() migration is autogenerated, please modify it to your needs
[ { "docid": "db02d3a38b5d31922cdb69968b5e5ec1", "score": "0.0", "text": "public function up(Schema $schema): void\n {\n $this->addSql('CREATE TABLE news (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, short_description LONGTEXT NOT NULL, long_description LONGTEXT DEFAULT NULL, date DATE DEFAULT NULL, author VARCHAR(255) DEFAULT NULL, link_label VARCHAR(255) DEFAULT NULL, link_url VARCHAR(255) DEFAULT NULL, visible VARCHAR(255) DEFAULT NULL, image VARCHAR(255) NOT NULL, created_at INT NOT NULL, updated_at INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE projects (id INT AUTO_INCREMENT NOT NULL, program_name VARCHAR(255) NOT NULL, short_description VARCHAR(255) NOT NULL, long_description VARCHAR(255) NOT NULL, benefits VARCHAR(255) NOT NULL, address VARCHAR(255) DEFAULT NULL, city VARCHAR(255) NOT NULL, zipdcode VARCHAR(255) NOT NULL, latitude VARCHAR(255) DEFAULT NULL, longitude VARCHAR(255) DEFAULT NULL, project_developer VARCHAR(255) NOT NULL, architect VARCHAR(255) DEFAULT NULL, delivery VARCHAR(255) DEFAULT NULL, floor_area VARCHAR(255) DEFAULT NULL, nd_de_logements VARCHAR(255) DEFAULT NULL, images VARCHAR(255) DEFAULT NULL, brochure VARCHAR(255) DEFAULT NULL, document_label VARCHAR(255) DEFAULT NULL, description_label VARCHAR(255) DEFAULT NULL, film VARCHAR(255) DEFAULT NULL, visible VARCHAR(255) DEFAULT NULL, coming_soon VARCHAR(255) DEFAULT NULL, reference VARCHAR(255) DEFAULT NULL, salesman VARCHAR(255) DEFAULT NULL, link_label VARCHAR(255) DEFAULT NULL, link_url_saleman_site VARCHAR(255) DEFAULT NULL, created_at INT NOT NULL, updated_at INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n }", "title": "" } ]
[ { "docid": "dacd77429801b640bb247388f20f28e1", "score": "0.8078592", "text": "public function migrationUp()\n {\n // TODO: Implement migrationUp() method.\n }", "title": "" }, { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.79145443", "text": "abstract public function up();", "title": "" }, { "docid": "64a4ef051ab0eef01849dd2f215d2f95", "score": "0.76509356", "text": "public function up()\n {\n //$this->table('subscriptions_meta')\n // ->changeColumn('value', 'string', ['limit' => 2000])\n // ->update();\n }", "title": "" }, { "docid": "8e504d57a12dfe2649dbbf298fa76109", "score": "0.763147", "text": "public function safeUp()\n {\n $this->update('{{%role}}', [\"name\" => 'Руководитель'], ['id' => 5]);\n $this->update('{{%role}}', [\"name\" => 'Менеджер'], ['id' => 6]);\n $this->addColumn('{{%relation_supp_rest}}', 'vendor_manager_id', $this->integer()->null());\n }", "title": "" }, { "docid": "3797e0cc8af5153af5d1521ded8bda48", "score": "0.7552068", "text": "public function up()\n {\n// $this->addColumn('orders', 'subgroup', 'integer(5) default null AFTER group');\n// $this->addColumn('orders', 'group_unit', 'integer(5) default null AFTER subgroup');\n }", "title": "" }, { "docid": "ec61514d51701e063c7a5b6c1ace516f", "score": "0.750776", "text": "public function up(): void {\n if ($this->isSeeded()) {\n parent::up();\n }\n }", "title": "" }, { "docid": "ad10974cb672d641d349f2a458741ff7", "score": "0.7487684", "text": "public function up() : void\n {\n }", "title": "" }, { "docid": "2fa0949e377bf747bd3497c6c9391dc0", "score": "0.74825364", "text": "public function up()\n {\n $table = $this->table('events', ['id' => false, 'primary_key' => ['event_id']]);\n $table->addColumn('event_id', 'integer', [ 'autoIncrement' => true ])\n ->addColumn('data', 'date')\n ->addColumn('title', 'string')\n ->addColumn('comment', 'text', ['null' => true])\n ->addColumn('group', 'integer',)\n ->addColumn('user_id', 'integer',)\n ->addColumn('created', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])\n ->save(); \n }", "title": "" }, { "docid": "2f8b778ed818852877dc6073099bd65d", "score": "0.74784684", "text": "public function up()\r\n\t{\r\n\t}", "title": "" }, { "docid": "215437ad9df1766a257446397bb7e9c2", "score": "0.7468457", "text": "public function safeUp()\r\n {\r\n $this->createTable('tbl_social_links', [\r\n 'id' => $this->primaryKey(),\r\n 'facebook_url' => $this->string(),\r\n 'google_url' => $this->string(),\r\n 'twitter_url' => $this->string(),\r\n 'skype_url' => $this->string(),\r\n 'create_datetime' => $this->dateTime(),\r\n 'update_datetime' => $this->dateTime(),\r\n\r\n ]);\r\n }", "title": "" }, { "docid": "4c481856ea4f6318b11cf2a47a2623d6", "score": "0.7462304", "text": "public function safeUp()\n\t{\n $this->addColumn('activities', 'display_type', 'integer');\n $this->addColumn('activities', 'choice_id', 'integer');\n $this->addColumn('activities', 'target_user_id', 'integer');\n\t}", "title": "" }, { "docid": "f3616863abafd25f3a65c62362e22253", "score": "0.74428636", "text": "public function up()\r\n {\r\n $this->executeSQL(\"ALTER TABLE `esq_customers` ADD `skill_level` INT( 11 ) NOT NULL DEFAULT '0' AFTER `last_login`;\");\r\n }", "title": "" }, { "docid": "ee27578d6e9bede9325fd75843ff870d", "score": "0.74397576", "text": "public function up()\n {\n $this->addColumn('thuchi_tieu_chi', 'thoi_gian_bat_dau', $this->integer()->notNull());\n $this->addColumn('thuchi_tieu_chi', 'thoi_gian_ket_thuc', $this->integer()->notNull());\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "d40231fe1a96c7d7f436c7e39381877e", "score": "0.7417611", "text": "public function safeUp() {\n\n $this->createTable('language', [\n 'lang_id' => Schema::TYPE_PK,\n 'lang_name' => $this->string(100) . ' NOT NULL',\n 'lang_code' => $this->string(10) . ' NOT NULL',\n 'lang_is_enable' => $this->boolean() . ' NOT NULL',\n 'lang_is_rtl' => $this->boolean() . ' NOT NULL',\n 'lang_created_at' => $this->integer() . ' NOT NULL',\n 'lang_modified_at' => $this->integer() . ' NOT NULL',\n ]);\n\n // Create index of foreign key\n $this->createIndex('lang_id_idx', 'language', 'lang_id');\n\n // Create index of foreign key\n $this->createIndex('lang_code_idx', 'language', 'lang_code');\n \n }", "title": "" }, { "docid": "9a7b9230a4120260420511b74fc2c200", "score": "0.7414175", "text": "public function up()\n {\n // Add user Shark Tank columns\n $users = $this->table('users');\n $users->addColumn('in_shark_tank', 'enum', ['values' => ['false','true'], 'default' => 'false', 'after' => 'timestamp_score'])\n ->addColumn('timestamp_in_shark_tank', 'timestamp', ['default' => '0000-00-00 00:00:00'])\n ->addColumn('timestamp_out_shark_tank', 'timestamp', ['default' => '0000-00-00 00:00:00'])\n ->changeColumn('status', 'string', ['limit' => 100, 'default' => 'unassigned'])\n ->update();\n\n // Add Shark Tank Admin-Toggle Field\n $default_info = $this->table('default_info');\n $default_info->addColumn('shark_tank', 'enum', ['values' => ['false','true'], 'default' => 'false', 'after' => 'auto_optout_actions'])\n ->update();\n\n // Update \"Unassigned\" leads to use new status instead of (pending + agent=1)\n $this->execute(\"UPDATE `users` SET `status` = 'unassigned' WHERE `status` = 'pending' AND `agent` = '1';\");\n }", "title": "" }, { "docid": "b52a3330e0df832d8d9050fa47a8f3aa", "score": "0.7317466", "text": "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'event_id' => 'INT NOT NULL COMMENT \"Событие\"',\n\n\t\t\t\t'label' => 'VARCHAR(200) NULL DEFAULT NULL COMMENT \"Заголовок\"',\n\t\t\t\t'price' => 'FLOAT NOT NULL DEFAULT 0 COMMENT \"Цена\"',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t\t$this->addForeignKey('fk_event_ticket_type_2_event', $this->tableName, 'event_id', '{{event}}', 'id', 'CASCADE', 'CASCADE');\n\t}", "title": "" }, { "docid": "850e79636fba366a049efa35bf0af473", "score": "0.7317224", "text": "public function safeUp()\n {\n $this->createTable('tbl_order',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"created_at\" => \"timestamp DEFAULT CURRENT_TIMESTAMP\",\n \"tel\" => \"varchar(255)\",\n \"address\" => \"varchar(1024)\",\n \"comment\"=> \"varchar(1024)\",\n \"session_id\" => \"integer\",\n \"total\" => \"float(12,3)\",\n \"status\" => \"int(1) DEFAULT '1'\"\n ]\n );\n }", "title": "" }, { "docid": "da36c9625e9bb8c53234fde798830968", "score": "0.7307265", "text": "public function up()\n\t{\n $this->db->insert_batch($this->tableSettings, $this->data);\n\t}", "title": "" }, { "docid": "92c3d7a121f892ae3ef32ef944fb6912", "score": "0.73004293", "text": "public function up()\n {\n $this->alterColumn('ott_channel', 'image', 'varchar(255) not null default \"\"');\n $this->alterColumn('ott_channel', 'use_flag', \"char(1) not null default '1'\");\n }", "title": "" }, { "docid": "51e0dd725544e5f5f6f893f9880e617f", "score": "0.72989255", "text": "public function up()\n\t{\n\t\tDB::query(\"ALTER TABLE `haaletaja` CHANGE `Isikukood` `Fb_Id` varchar(20) COLLATE 'utf8_general_ci' NULL AFTER `Perekonnanimi`;\");\n\t}", "title": "" }, { "docid": "74d107decac6887787e622ecda3bd734", "score": "0.7292529", "text": "public function up()\n {\n $table = $this->table('ht_jobs');\n $table->removeColumn('other_value')\n ->removeColumn('other_category')\n ->renameColumn('designations', 'title')\n ->renameColumn('phone', 'work_phone')\n ->renameColumn('phone_extension', 'work_phone_extension')\n\n ->addColumn('country', 'string', array('after' => 'zip','limit' => 255,'default'=>null,'null' => true))\n ->addColumn('twitter', 'string', array('after' => 'skype','limit' => 255,'default'=>null,'null' => true))\n ->addColumn('home_phone', 'string', array('after' => 'cell_phone','limit' => 255,'default'=>null,'null' => true))\n ->addColumn('other_phone', 'string', array('after' => 'home_phone','limit' => 255,'default'=>null,'null' => true))\n ->save();\n }", "title": "" }, { "docid": "0415fa4a3a3096286fa340169ba11e41", "score": "0.72775835", "text": "public function up()\n {\n $profile = $this->table('tbl_master_profile', [\n 'id' => false,\n 'primary_key' => ['id']\n ]);\n $profile->addColumn('id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]) ->addPrimaryKey(['id'])\n ->addColumn('user_id', 'integer')\n ->addColumn('first_name', 'string', array('limit' => 50,'null' => true))\n ->addColumn('last_name', 'string', array('limit' => 50,'null' => true))\n ->addColumn('photo', 'string', array('limit' => 255,'null' => true,'default'=>null))\n ->addColumn('contact_number', 'string', array('limit' => 100,'null' => true,'default'=>null))\n ->addColumn('timezone', 'string',['null'=> true,'default'=> null])\n ->addColumn('birthday', 'datetime',['null'=> true,'default'=> null])\n ->addColumn('address', 'text', ['null'=> true,'default'=>null])\n ->addColumn('created', 'datetime',['default'=> \"CURRENT_TIMESTAMP\"])\n ->addColumn('modified', 'datetime', array('null' => true,'default'=>null))\n ->addForeignKey( 'user_id',\n 'tbl_master_users',\n 'id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE'\n ])\n ->save();\n\n }", "title": "" }, { "docid": "4c769e253bc9ec0fa0ecfc1368cbcca9", "score": "0.72758955", "text": "public function safeUp()\n {\n $this->createTable('news', [\n 'id' => 'pk',\n 'title' => Schema::TYPE_STRING . ' NOT NULL',\n 'content' => Schema::TYPE_TEXT,\n ]);\n\n $this->createTable('sub_user', [\n 'id' => 'pk',\n 'username' => Schema::TYPE_STRING . ' NOT NULL',\n 'email' => Schema::TYPE_TEXT,\n 'auth_key' => Schema::TYPE_TEXT,\n 'password' => Schema::TYPE_TEXT,\n ]);\n\n $this->createTable('admin_user', [\n 'id' => 'pk',\n 'username' => Schema::TYPE_STRING . ' NOT NULL',\n 'email' => Schema::TYPE_TEXT,\n 'auth_key' => Schema::TYPE_TEXT,\n 'password' => Schema::TYPE_TEXT,\n ]);\n $this->createTable('post', [\n 'id' => 'pk',\n 'post_code' => Schema::TYPE_STRING . ' NOT NULL',\n 'image' => Schema::TYPE_TEXT,\n 'title' => Schema::TYPE_TEXT,\n 'body' => Schema::TYPE_TEXT,\n 'url' => Schema::TYPE_TEXT,\n 'publish_start' => Schema::TYPE_DATETIME,\n 'publish_end' => Schema::TYPE_DATETIME,\n 'publish_visible' => Schema::TYPE_DATETIME,\n ]);\n }", "title": "" }, { "docid": "362460b471f2fc16fd9bca273e8ff491", "score": "0.72391117", "text": "protected function up() {\n $this->changeOrder(Grid::DIR_UP);\n }", "title": "" }, { "docid": "093eec14acd99bce407f5bf02244cca1", "score": "0.7232591", "text": "public function up()\n\t{\n\t\t// Add the language field to the users table\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\n\t\t// Add the site languages to the settings table\n\t\t$this->settings_field['value'] = serialize($this->languages);\n\t\t$this->db->insert($this->settings_table, $this->settings_field);\n\t}", "title": "" }, { "docid": "555d5292bf8f91a21f9c0977020bd1f6", "score": "0.72323465", "text": "public function migrate_up()\n\t{\n\t\tif (!empty($this->config['migration_version']))\n\t\t{\n\t\t\t$this->_migrate();\n\t\t}\n\t}", "title": "" }, { "docid": "7b0e0184d09447a2297967e060b2a4c5", "score": "0.7231532", "text": "public function up()\n {\n $table = $this->table('items');\n $table->changeColumn('list_price', 'float', [\n 'default' => null\n , 'null' => false\n ]);\n $table->changeColumn('lowest_price', 'float', [\n 'default' => null\n , 'null' => false\n ]);\n $table->changeColumn('lowest_used_price', 'float', [\n 'default' => null\n , 'null' => false\n ]);\n $table->changeColumn('lowest_collectible_price', 'float', [\n 'default' => null\n , 'null' => false\n ]);\n $table->changeColumn('offer_listing_price', 'float', [\n 'default' => null\n , 'null' => false\n ]);\n $table->changeColumn('offer_listing_saved_price', 'float', [\n 'default' => null\n , 'null' => false\n ]);\n $table->update();\n }", "title": "" }, { "docid": "027bab7c28b7d29904d7471d38370d62", "score": "0.72310126", "text": "public function safeUp()\n\t{\n\t\t$this->renameColumn('auto_translation', 'translation_used', 'translation_edited');\n\t}", "title": "" }, { "docid": "e550dfe27ce2488905c80e8a9d5f421c", "score": "0.7220116", "text": "public function safeUp()\n {\n $this->createTable('service',[\n 'id'=>Schema::TYPE_PK,\n 'title'=>Schema::TYPE_STRING,\n 'processor'=>Schema::TYPE_STRING,\n 'url'=>Schema::TYPE_TEXT,\n 'last_call'=>Schema::TYPE_DATETIME\n ]);\n }", "title": "" }, { "docid": "3a1e9d08d7e8b521df5fa2a1117691f6", "score": "0.72141856", "text": "public function up() {\n $this->dbforge->drop_table('attendances', TRUE); \n \n $this->dbforge->add_field(array(\n 'id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'auto_increment' => TRUE\n ),\n 'attd_dt' => array(\n 'type'=>'DATETIME'\n ),\n 'emp_id' => array(\n 'type' => 'INT',\n 'constraint' => 11\n ),\n 'attd_status_id' => array(\n 'type' => 'INT',\n 'constraint' => 11\n ),\n 'absence_reason' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 200\n ),\n 'date_updated' =>array(\n 'type'=>'DATETIME'\n ),\n 'date_created' => array(\n 'type'=>'DATETIME'\n ),\n 'updated_from_ip' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n ),\n 'created_from_ip' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n ) \n ));\n $this->dbforge->add_key('id', TRUE);\n $this->dbforge->create_table('attendances');\n }", "title": "" }, { "docid": "306edb76180ea583aa4b7e6d13b27c28", "score": "0.7211409", "text": "public function up()\n\t{\n\t\t$this->forge->addField([\n\t\t\t'kode_member' => [\n\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t'constraint' => 1,\n\t\t\t],\n\t\t\t'username' => [\n\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t'constraint' => '100',\n\t\t\t],\n\t\t\t'password' => [\n\t\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t\t'constraint' => '100',\n\t\t\t],\n\t\t\t'nama' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t],\n\t\t\t'email' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t],\n\t\t]);\n\t\t$this->forge->addKey('kode_member', true);\n\t\t$this->forge->createTable($this->table);\n\t}", "title": "" }, { "docid": "4f3a56ca99b42ba6e8810b175108cc77", "score": "0.71976185", "text": "public function up()\n\t{\n\t\t//Your schema to migrate\n Schema::getInstance(\n $this,\n function ($table) {\n //$table->tableName = 'users_console';\n\n $table->create(\n array(\n array('name'=> 'id', 'type' => 'int', 'length' => 11,\n 'increment' => true, 'key' => 'primary'),\n array('name'=> 'depth', 'type' => 'float', 'length' =>'10,2'),\n array('name'=> 'rise', 'type' => 'time'),\n array('name'=> 'time', 'type' => 'timestamp',\n 'length'=> \"DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP\"\n ),\n array(\n 'name'=> 'created_at',\n 'type' => 'datetime',\n 'length' =>\"DEFAULT '0000-00-00 00:00:00'\"\n ),\n array(\n 'name'=> 'updated_at',\n 'type' => 'datetime',\n 'length' =>\"DEFAULT '0000-00-00 00:00:00'\"\n ),\n ),\n 'InnoDB',\n 'latin1'\n )->run();\n }\n );\n\n\t\t\n\t}", "title": "" }, { "docid": "4323f048bafc8f0c76a0cdc549f22e3c", "score": "0.71918905", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL',\n 'article_id' => $this->integer(). ' UNSIGNED NOT NULL',\n 'content' => $this->text()->notNull(),\n 'status' => $this->smallInteger(1)->defaultValue(1),\n 'created' => $this->dateTime()->notNull(),\n 'modified' => $this->dateTime()->notNull()\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n\n $this->addForeignKey('fk_comment_article_id_to_blog_article_id', $this->tableName, 'article_id', '{{%blog_article}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('fk_comment_user_id_to_blog_article_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "title": "" }, { "docid": "e7974e8e24f042a94592cdcb36f7d97d", "score": "0.7188741", "text": "public function up(){\n \n //dbforge will notice you're adding a field called id, it will automatically be assigned as an INT(9) auto_incrementing Primary Key.\n $this->dbforge->add_field('id');\n \n $this->dbforge->add_field(\n array(\n 'user_id' => array(\n 'type' => 'INT',\n 'auto_increment' => FALSE,\n ),\n 'title_of_reward' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '40',\n ),\n 'ribbon_cost' => array(\n 'type' => 'INT',\n 'auto_increment' => FALSE,\n ),\n )\n );\n \n $this->dbforge->create_table('reward');\n \n //you can also use active records and standard queries to insert raw data (though it's inadvisable except for dummy data like the first login account). You may have to autoload the database library to have it ready\n \n }", "title": "" }, { "docid": "8bdda7305ea76fb4dd5f93ae735d188d", "score": "0.7168086", "text": "public function safeUp()\n {\n $this->createTable('subscription_period', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'period_begin' => 'datetime',\n 'period_end' => 'datetime',\n 'avg_link_price' => 'decimal(10,2)',\n ));\n }", "title": "" }, { "docid": "2d437ccd29f53b565d338baa1b4038f9", "score": "0.7164105", "text": "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "title": "" }, { "docid": "2d437ccd29f53b565d338baa1b4038f9", "score": "0.7164105", "text": "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "title": "" }, { "docid": "ebc16c56dd1c0c593eff91a00e753daa", "score": "0.7162684", "text": "public function safeUp()\n {\n $this->createTable('profile', [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(),\n 'avatar' => $this->string(),\n 'email' => $this->string(),\n 'first_name' => $this->string(),\n 'last_name' => $this->string(),\n 'phone_number' => $this->string()\n ]);\n }", "title": "" }, { "docid": "6677876cb497458febbd78cd20e816c1", "score": "0.7162195", "text": "public function up()\n {\n $this->dbforge->drop_table('feedback_user_map', TRUE);\n // Table structure for table 'diseases'\n $this->dbforge->add_field(array(\n 'id' => array(\n 'type' => 'INT',\n 'constraint' => '11',\n 'unsigned' => TRUE,\n 'auto_increment' => TRUE\n ),\n 'user_id' => array(\n 'type' => 'INT',\n 'constraint' => '11',\n 'null' => FALSE\n ),\n 'users' => array(\n 'type' => \"TEXT\",\n 'null' => FALSE\n )\n ));\n\n $this->dbforge->add_key('id', TRUE);\n $this->dbforge->create_table('feedback_user_map');\n }", "title": "" }, { "docid": "07a6786e5327f53132697f32a7a0a0af", "score": "0.716199", "text": "public function up()\n {\n $this\n ->table('role_types')\n ->addColumn('level', 'integer', [\n 'default' => 1,\n 'null' => false,\n ])\n ->save();\n\n $this\n ->table('capabilities')\n ->renameColumn('level', 'min_level')\n ->save();\n }", "title": "" }, { "docid": "cc0e27c6c466a3f6466d3e2ab2e5a388", "score": "0.71590745", "text": "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "title": "" }, { "docid": "566f8b05d7f0662d6ca8fedd6c294990", "score": "0.715872", "text": "public function up(){\n $table = $this->table('attachments', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('signed'=>false, 'identity'=>true));\n $table->addColumn('entry_id', 'integer', array('signed'=>false));\n $table->addColumn('attachment', 'string');\n $table->addColumn('ext', 'string', array('limit'=>10));\n $table->addIndex(array('entry_id'));\n $table->save();\n }", "title": "" }, { "docid": "eed8078592c4a57451389bc3e993feac", "score": "0.7157315", "text": "public function up() {\n\t\t$fields = array(\n 'profile' => array('type' => 'VARCHAR', 'constraint' => '256', 'null' => TRUE, 'after' => 'chat_theme')\n\t\t);\n\t\t$this->dbforge->add_column('users', $fields);\n\n\t\t// Table structure for table 'groups'\n\t\t$this->dbforge->add_field([\n\t\t\t'id' => [\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '11',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t],\n\t\t\t'version' => [\n\t\t\t\t'type' => 'FLOAT'\n\t\t\t]\n\t\t]);\n\t\t$this->dbforge->add_key('id', TRUE);\n\n\t\t$this->dbforge->create_table('updates');\n\n\t\t// Dumping data for table 'groups'\n\t\t$data = [\n\t\t\t[\n\t\t\t\t'version' => '1.0'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'version' => '1.1'\n\t\t\t]\n\t\t];\n\t\t$this->db->insert_batch('updates', $data);\n\t}", "title": "" }, { "docid": "1ad4d709f963f6b8a2c10e1eb6e452db", "score": "0.7156429", "text": "public function up()\n {\n $this->createTable('partner_category', [\n 'id' => $this->primaryKey(),\n 'slug' => $this->string(255)->notNull(),\n 'title' => $this->string(255)->notNull(),\n 'lang' => $this->string(2)->defaultValue(\"ru\"),\n 'published' => $this->smallInteger(1)->defaultValue(0),\n 'sort' => $this->integer()->notNull()->defaultValue(0),\n 'created_at' => $this->timestamp()->defaultValue(null),\n 'updated_at' => 'timestamp on update current_timestamp',\n ]);\n }", "title": "" }, { "docid": "4ed5fb63dd643018badaa4e4997c3c28", "score": "0.7155279", "text": "public function up()\n {\n Schema::connection('tenant')\n ->table('places_trips', function (Blueprint $table) {\n $table->string('type_in_string')->nullable()->after('type');\n\n });\n $checkpoints = Timeline::get();\n foreach ($checkpoints as $checkpoint) {\n $checkpoint->type_in_string = $checkpoint->type;\n $checkpoint->save();\n }\n\n Schema::table('places_trips', function (Blueprint $table) {\n $table->dropColumn('type');\n });\n\n Schema::table('places_trips', function (Blueprint $table) {\n $table->renameColumn('type_in_string','type');\n });\n }", "title": "" }, { "docid": "fdfcedb463cc1b56728ddd8b2602d79a", "score": "0.71535873", "text": "public function up() {\n $fields = array(\n 'user_social_id' => array(\n 'type' => 'INT',\n 'null' => TRUE,\n ),\n 'user_profile_pic' => array(\n 'type' => 'text',\n 'null' => TRUE,\n ),\n 'user_timezone' => array(\n 'type' => 'INT',\n 'null' => TRUE\n ),\n 'user_language' => array(\n 'type' => 'varchar',\n 'constraint' => '10',\n 'null' => TRUE,\n ),\n 'user_grnder' => array(\n 'type' => 'ENUM(\"male\",\"female\")',\n 'null' => TRUE,\n ),\n );\n\n $this->dbforge->add_column('users', $fields);\n }", "title": "" }, { "docid": "dadac24718a1b0a78ce49ca3252e9e80", "score": "0.7140481", "text": "public function up()\n {\n $this->createTable('user',[\n 'id'=>$this->PrimaryKey(),\n 'username'=>$this->string(32),\n 'password'=>$this->string(32),\n 'auth_key'=>$this->string(32),\n 'access_toke'=>$this->string(32)\n ]);\n $this->alterColumn('user','id',$this->smallInteger(8).'NOT NULL AUTO_INCREMENT');\n }", "title": "" }, { "docid": "5fa72e37b23754bf42fd5daab1da5738", "score": "0.71400046", "text": "public function up()\n {\n $table = $this->table('asins');\n $table->addColumn('ean', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->addColumn('isbn', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->addColumn('sku', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->addColumn('upc', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true,\n ]);\n $table->update();\n }", "title": "" }, { "docid": "fda34ef4a6d446a0d9282ad4871d2538", "score": "0.71399987", "text": "public function safeUp()\n {\n $this->createTable('settings', [\n 'id' => Schema::TYPE_PK,\n 'module_id' => Schema::TYPE_STRING . '(50) NOT NULL',\n 'code' => Schema::TYPE_STRING . '(50) NOT NULL',\n 'name' => Schema::TYPE_STRING . '(100) NOT NULL',\n 'value' => 'text NOT NULL',\n 'element' => \"enum('text','textarea','editor') NOT NULL\",\n 'hidden' => 'tinyint(1) NOT NULL DEFAULT 0',\n 'description' => Schema::TYPE_STRING . '(2550) NOT NULL DEFAULT 0',\n 'created_at' => Schema::TYPE_INTEGER . '(11) DEFAULT NULL',\n 'updated_at' => Schema::TYPE_INTEGER . '(11) DEFAULT NULL',\n ]);\n\n $this->createIndex('unique_code', 'settings', ['code'], true);\n $this->createIndex('unique_name', 'settings', ['name'], true); \n }", "title": "" }, { "docid": "853150982018ad0bd21c1eee2c15ad96", "score": "0.71375877", "text": "public function up(){\n $this->dbforge->add_field(array( //creacion del vector que contiene los campos de la tabla\n 'USRL_PK' => array( //columna USRL_PK tipo int, tamaño 10, auto icremental, solo positivos\n 'type' => 'INT',\n 'constraint' => 10,\n 'unsigned' => TRUE,\n 'auto_increment' => TRUE,\n ),\n 'USRL_FK_users' => array( //columna USRL_FK_users tipo int, tamaño 10, auto icremental, solo positivos\n 'type' => 'INT',\n 'constraint' => 10,\n 'unsigned' => TRUE,\n ),\n 'USRL_FK_roles' => array( //columna USRL_FK_roles tipo int, tamaño 10, auto icremental, solo positivos\n 'type' => 'INT',\n 'constraint' => 10,\n 'unsigned' => TRUE,\n ),\n ));\n $this->dbforge->add_key('USRL_PK', TRUE); //agregar atributo de llave primaria al campo USRL_PK \n $this->dbforge->create_table('users_roles'); //creacion de la tabla users_roles con los atributos y columnas\n $this->dbforge->add_column('users_roles',[\n 'CONSTRAINT USRL_FK_users FOREIGN KEY(USRL_FK_users) REFERENCES users(USER_PK)',\n ]); //creacion de relacion a la tabla users\n $this->dbforge->add_column('users_roles',[\n 'CONSTRAINT USRL_FK_roles FOREIGN KEY(USRL_FK_roles) REFERENCES roles(ROLE_PK)',\n ]); //creacion de relacion a la tabla roles\n }", "title": "" }, { "docid": "dfba03bef4ea6ca815d80d5cea96243b", "score": "0.7137099", "text": "public function up()\n {\n $this->addColumn('iptv_vodlink', 'during', \"varchar(20) not null default ''\");\n }", "title": "" }, { "docid": "72952597f1cec28b113ab745994b3fa9", "score": "0.7128975", "text": "public function up()\n {\n $this->alterColumn(\"filefly_hashmap\",\"path\",\"VARCHAR(255) NOT NULL\");\n if ($this->db->getDriverName() === 'mysql') {\n $this->execute(\"ALTER TABLE filefly_hashmap CONVERT TO CHARACTER SET utf8;\");\n } }", "title": "" }, { "docid": "404c81569f3de2728d54474432bd4727", "score": "0.71189535", "text": "public function up() {\n $table = $this->table('blends');\n $this->execute(\"START TRANSACTION\");\n $table->addColumn('view_count_cache','integer',['default' => 0]);\n $table->addColumn('download_count_cache','integer',['default' => 0]);\n $table->addIndex('view_count_cache');\n $table->addIndex('download_count_cache');\n $table->save();\n $this->execute(\"\n UPDATE `blends` SET `blends`.`view_count_cache` = IFNULL((SELECT COUNT(DISTINCT `ip`) FROM `accesses` WHERE `type`='view' AND `fileId`=`blends`.`id` GROUP BY `blends`.`id`),0)\n \");\n $this->execute(\"\n UPDATE `blends` SET `blends`.`download_count_cache` = IFNULL((SELECT COUNT(DISTINCT `ip`) FROM `accesses` WHERE `type`='download' AND `fileId`=`blends`.`id` GROUP BY `blends`.`id`),0)\n \");\n $this->execute(\"COMMIT\");\n }", "title": "" }, { "docid": "e9d0294f5fd0ac5d73f6c3d5d59fac0b", "score": "0.7116905", "text": "public function safeUp()\n\t{\n\t\t$tableName = 'assign_directors';\n\n\t\t$this->createTable($tableName, array(\n\t\t\t'manager_id' => 'int',\n\t\t\t'director_id' => 'int',\n\t\t\t'PRIMARY KEY(manager_id, director_id)',\n\t\t));\n\n\t\t$this->addForeignKey(\"fk_{$tableName}_managers\", $tableName, 'manager_id', 'users', 'id', 'CASCADE', 'CASCADE');\n\t\t$this->addForeignKey(\"fk_{$tableName}_directors\", $tableName, 'director_id', 'users', 'id', 'CASCADE', 'CASCADE');\n\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "d17be8d1bff09105c23e538bf180a6e7", "score": "0.7111645", "text": "public function up()\n {\n $table = $this->table('items');\n $table->changeColumn('item_height', 'float');\n $table->changeColumn('item_length', 'float');\n $table->changeColumn('item_weight', 'float');\n $table->changeColumn('item_width', 'float');\n $table->changeColumn('package_height', 'float');\n $table->changeColumn('package_length', 'float');\n $table->changeColumn('package_weight', 'float');\n $table->changeColumn('package_width', 'float');\n $table->changeColumn('is_eligible_prime', 'boolean', [\n 'null' => true\n ]);\n $table->changeColumn('is_eligible_for_supersaver_shipping', 'boolean', [\n 'null' => true\n ]);\n $table->changeColumn('list_price', 'float', [\n 'null' => true\n ]);\n $table->changeColumn('list_price_currency', 'string', [\n 'null' => true\n ]);\n $table->changeColumn('lowest_price', 'float', [\n 'null' => true\n ]);\n $table->changeColumn('lowest_price_currency', 'string', [\n 'null' => true\n ]);\n $table->changeColumn('lowest_used_price', 'float', [\n 'null' => true\n ]);\n $table->changeColumn('lowest_used_price_currency', 'string', [\n 'null' => true\n ]);\n $table->changeColumn('lowest_collectible_price', 'float', [\n 'null' => true\n ]);\n $table->changeColumn('lowest_collectible_price_currency', 'string', [\n 'null' => true\n ]);\n $table->changeColumn('offer_listing_price', 'float', [\n 'null' => true\n ]);\n $table->changeColumn('offer_listing_price_currency', 'string', [\n 'null' => true\n ]);\n $table->changeColumn('offer_listing_saved_price', 'float', [\n 'null' => true\n ]);\n $table->changeColumn('offer_listing_saved_price_currency', 'string', [\n 'null' => true\n ]);\n $table->changeColumn('sales_ranking', 'integer', [\n 'null' => true\n ]);\n $table->changeColumn('ean', 'string', [\n 'null' => true\n ]);\n $table->changeColumn('release_date_at', 'datetime', [\n 'null' => true\n ]);\n $table->changeColumn('publication_date_at', 'datetime', [\n 'null' => true\n ]);\n $table->changeColumn('original_release_date_at', 'datetime', [\n 'null' => true\n ]);\n $table->changeColumn('condition_status', 'string', [\n 'null' => true\n ]);\n $table->changeColumn('total_new', 'integer', [\n 'null' => true\n ]);\n $table->changeColumn('total_used', 'integer', [\n 'null' => true\n ]);\n $table->changeColumn('total_collectible', 'integer', [\n 'null' => true\n ]);\n $table->changeColumn('total_refurbished', 'integer', [\n 'null' => true\n ]);\n $table->changeColumn('customer_reviews_url', 'string', [\n 'null' => true\n ]);\n $table->update();\n }", "title": "" }, { "docid": "534f29e26ddcde1cfee5172dbe48a837", "score": "0.71096176", "text": "public function safeUp() {\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "d8323c7c720b7e184a91f723b797adc7", "score": "0.71095526", "text": "public function up()\n {\n $tableOptions = \"CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=innodb\";\n\n $this->createTable('log_ott_genre_tmp', [\n 'id' => $this->primaryKey(),\n 'mac' => $this->string(32),\n 'genre' => $this->string(30),\n 'code' => $this->integer()\n ], $tableOptions);\n\n $this->dropColumn('log_tmp_interface','data');\n }", "title": "" }, { "docid": "9bcb828d60c0916801bf6a3545606d99", "score": "0.71080834", "text": "public function up() {\n $this->dbforge->add_field(array(\n 'id' => array(\n 'type' => 'BIGINT',\n 'unsigned' => TRUE,\n 'auto_increment' => TRUE\n ),\n 'UUID' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '50',\n ),\n 'request' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255',\n ),\n 'method' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '15',\n ),\n 'csv_file' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255',\n ),\n 'status' => array(\n 'type' => 'MEDIUMINT',\n 'default' => 0\n ),\n 'updated_date' => array(\n 'type' => 'DATETIME',\n 'default' => NULL\n )\n ));\n $this->dbforge->add_field('created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP');\n\n $this->dbforge->add_key('id', TRUE);\n $this->dbforge->add_key('UUID', TRUE);\n $this->dbforge->create_table('requests');\n\n\n //Alter Table Images to handle which request_id is each image\n $fields = array(\n 'request_uuid' => array('type' => 'VARCHAR', 'constraint' => '50',)\n );\n $this->dbforge->add_column('images', $fields);\n }", "title": "" }, { "docid": "b8d8b0b30e8940a057fd3a6aee9b492a", "score": "0.71064293", "text": "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{missing_translations}}\")){\n\t\t\t$this->dropTable(\"{{missing_translations}}\");\n\t\t}\n\n\t\t$this->createTable(\"{{missing_translations}}\", array(\n\t\t\t\"id\" => \"int UNSIGNED AUTO_INCREMENT\",\n\t\t\t\"category\" => \"varchar(255) CHARACTER SET UTF8\",\n\t\t\t\"language\" => \"varchar(20) CHARACTER SET UTF8\",\n\t\t\t\"message\" => \"varchar(255) CHARACTER SET UTF8\",\n\t\t\t\"page\"\t\t=> \"varchar(255) CHARACTER SET UTF8\",\n\t\t\t\"PRIMARY KEY (id)\",\n\t\t\t\"KEY category (category)\",\n\t\t\t\"KEY language (language)\"\n\t\t\t));\n\t}", "title": "" }, { "docid": "88bc3d2126facff06cc40bf4834a49e5", "score": "0.7106196", "text": "public function up()\n {\n //Add column duration complete\n Schema::table('goal_car', function ($table) {\n $table->integer('duration_complete')->after('duration');\n });\n\n Schema::table('goal_home', function ($table) {\n $table->integer('duration_complete')->after('duration');\n $table->decimal('mth_saving', 18, 4)->after('duration_complete');\n });\n\n\n //Renaming stuff\n\n Schema::table('goal_travel', function ($table) {\n $table->renameColumn('periods', 'duration');\n $table->renameColumn('period_complete', 'duration_complete');\n });\n\n Schema::table('goal_general', function ($table) {\n $table->renameColumn('periods', 'duration');\n $table->renameColumn('period_complete', 'duration_complete');\n });\n\n }", "title": "" }, { "docid": "1fcaddfd6295d49fa0791b5cf57df357", "score": "0.7105957", "text": "public function up(){\n $this->dbforge->add_field(array( //creacion del vector que contiene los campos de la tabla\n 'USLE_PK' => array( //columna USLE_PK tipo int, tamaño 10, auto icremental, solo positivos\n 'type' => 'INT',\n 'constraint' => 10,\n 'unsigned' => TRUE,\n 'auto_increment' => TRUE,\n ),\n 'USLE_FK_users' => array( //columna USLE_FK_users tipo int, tamaño 10, solo positivos\n 'type' => 'INT',\n 'unsigned' => TRUE,\n ),\n 'USLE_FK_learning_units' => array( //columna USLE_FK_learning_units tipo int, tamaño 10, solo positivos\n 'type' => 'INT',\n 'unsigned' => TRUE,\n ),\n 'USLE_FK_roles' => array( //columna USLE_FK_roles tipo int, tamaño 10, solo positivos\n 'type' => 'INT',\n 'unsigned' => TRUE,\n ),\n \n 'USLE_date_create' => array( //columna USLE_date_create tipo DATETIME\n 'type' => 'DATETIME',\n ),\n 'USLE_date_update' => array( //columna USLE_date_update tipo DATETIME\n 'type' => 'DATETIME',\n ),\n 'USLE_PK_create' => array( //columna USLE_PK_create tipo INT\n 'type' => 'INT',\n ),\n 'USLE_PK_update' => array( //columna USLE_PK_update tipo INT\n 'type' => 'INT',\n ),\n ));\n $this->dbforge->add_key('USLE_PK', TRUE); //agregar atributo de llave primaria al campo USLE_PK\n $this->dbforge->create_table('users_learning_units'); //creacion de la tabla users con los atributos y columnas\n \n $this->dbforge->add_column('users_learning_units',[\n 'CONSTRAINT USLE_FK_users FOREIGN KEY(USLE_FK_users) REFERENCES users(USER_PK)',\n ]); //creacion de relacion a la tabla users\n $this->dbforge->add_column('users_learning_units',[\n 'CONSTRAINT USLE_FK_learning_units FOREIGN KEY(USLE_FK_learning_units) REFERENCES learning_units(LNUT_PK)',\n ]); //creacion de relacion a la tabla learning_units\n $this->dbforge->add_column('users_learning_units',[\n 'CONSTRAINT USLE_FK_roles FOREIGN KEY(USLE_FK_roles) REFERENCES roles(ROLE_PK)',\n ]); //creacion de relacion a la tabla roles\n }", "title": "" }, { "docid": "45b15cddf7035678cf1ca17ebb86c834", "score": "0.71036625", "text": "public function safeUp()\n {\n $this->createTable('position_period', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'period_begin' => 'datetime',\n 'period_end' => 'datetime',\n 'phrases' => 'text',\n 'sum' => 'decimal(10,2)',\n ));\n\n $this->addColumn('position_input', 'params', 'text');\n }", "title": "" }, { "docid": "3eadada94c14c421cafabcfe5240e584", "score": "0.7093455", "text": "public function up()\n\t{\n\t\t$this->execute(\"\n ALTER TABLE `fdda_dim_data` \n ADD COLUMN `fdda_sys_ccmp_id` INT UNSIGNED NULL AFTER `fdda_id`;\n ALTER TABLE `fdm1_dimension1` \n ADD COLUMN `fdm1_sys_ccmp_id` INT UNSIGNED NULL AFTER `fdm1_id`;\n ALTER TABLE `fdm2_dimension2` \n ADD COLUMN `fdm2_sys_ccmp_id` INT UNSIGNED NULL AFTER `fdm2_id`;\n ALTER TABLE `fdm3_dimension3` \n ADD COLUMN `fdm3_sys_ccmp_id` INT UNSIGNED NULL AFTER `fdm3_id`;\n ALTER TABLE `fddp_dim_data_period` \n ADD COLUMN `fddp_sys_ccmp_id` INT UNSIGNED NULL AFTER `fddp_id`;\n ALTER TABLE `fdsp_dimension_split` \n ADD COLUMN `fdsp_sys_ccmp_id` INT UNSIGNED NULL AFTER `fdsp_id`;\n ALTER TABLE `fdst_dim_split_type` \n ADD COLUMN `fdst_sys_ccmp_id` INT UNSIGNED NULL AFTER `fdst_id`;\n ALTER TABLE `fret_ref_type` \n ADD COLUMN `fret_sys_ccmp_id` INT UNSIGNED NULL AFTER `fret_id`;\n\n \n \");\n\t}", "title": "" }, { "docid": "4cadf444c8ce10a13763848322159b4a", "score": "0.7090505", "text": "public function up()\r\n {\r\n $this -> executeSQL(\"ALTER TABLE `esq_client_messages` ADD `submitted_by_ip` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `is_viewed`;\");\r\n }", "title": "" }, { "docid": "68b77e5ff009b16f997d5e74edb4b061", "score": "0.70860547", "text": "public function up()\n {\n $table = $this->table('items');\n $table->addColumn('total_new', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('total_used', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('total_collectible', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('total_refurbished', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('customer_reviews_url', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->update();\n }", "title": "" }, { "docid": "a447946bec206094d811f8a24ab516e8", "score": "0.7085671", "text": "public function up()\n {\n $this->addForeignKey(\n 'fk-student-user_id',\n '{{%student}}',\n 'user_id',\n '{{%user}}',\n 'id',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "3c045460134e4f2d4f0e5538574d1c5c", "score": "0.7082677", "text": "public function safeUp()\n\t{\n\t\t$this->createTable('periodo_evento', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'data_inicial' => 'timestamp',\n\t\t\t'data_final' => 'timestamp',\n\t\t\t'email' => 'varchar',\n\t\t\t'evento_id' => 'integer references evento (id)',\n\t\t\t'pesquisa_id' => 'integer references pesquisa (id)',\n\t\t));\n\t}", "title": "" }, { "docid": "3963f6bed2c1c418bdd31e3e0c64c60f", "score": "0.7073873", "text": "public function up(): void {\n\t\t// Build table.\n\t\trequire_once ABSPATH . 'wp-admin/includes/upgrade.php';\n\t\tdbDelta( $this->schema_provider() );\n\n\t\t// Seed all quotes to DB.\n\t\t$this->seed_quotes();\n\t}", "title": "" }, { "docid": "ba495dd64ceb4bd622b94c6cff8f5190", "score": "0.70667064", "text": "public function up()\n {\n // 添加创建总代帐号接口\n if(!$this->fetchAll(\"select * from api_port where id = 1008 and pid = 1\")){\n $this->execute(\"INSERT INTO api_port (id,pid,appname,status,router,flag) VALUES (10008,1, '创建总代',1, 'addUserZd',1) \");\n }\n $table = $this->table(\"api_admin_log\");\n if($table){\n if(!$table->hasColumn(\"update_time\")){\n $this->execute(\"alter table api_admin_log add column update_time int(11) not null default 0 ;\n\");\n }\n }\n }", "title": "" }, { "docid": "3735ead065d0108866bf3a3007b5b47f", "score": "0.70620203", "text": "public function up()\n\t{\n\t\t$this->alterColumn('tbl_email_queue', 'sent_date', \"DATETIME NULL DEFAULT NULL\");\n\t\t//Create tbl_user_google table\n\t\t$this->createTable('tbl_user_google', array(\n\t\t\t'user_id' => 'int(11) NOT NULL',\n\t\t\t'google_id' => 'VARCHAR(25) DEFAULT NULL',\n\t\t\t'google_name' => 'VARCHAR(256) DEFAULT NULL',\n\t\t\t'google_email'=> \"VARCHAR(256) DEFAULT NULL\",\n\t\t\t'google_access_token' => 'VARCHAR(128) DEFAULT NULL',\n\t\t\t'google_connected'=> \"TINYINT(1) DEFAULT '0' COMMENT '0: not connected; 1: connected'\",\n\t\t\t'google_link' => 'VARCHAR(256) DEFAULT NULL',\n\t\t\t'google_picture_link' => 'VARCHAR(256) DEFAULT NULL',\t\t\t\n\t\t\t'created_date' => 'DATETIME NOT NULL',\n\t\t\t'modified_date' => 'DATETIME DEFAULT NULL',\n\t\t\t'PRIMARY KEY (`user_id`)',\n\t\t\t'KEY `fk_google_user` (`user_id`)',\n\t\t\t'CONSTRAINT `fk_google_user` FOREIGN KEY (`user_id`) REFERENCES `tbl_user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION',\n\t\t));\n\t}", "title": "" }, { "docid": "41548bffc4300bef4be03e6a005cdf26", "score": "0.7060755", "text": "public function up()\n\t{\n\t\tSchema::table('jobtype_user', function($table)\n\t\t{\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_delete('cascade')->on_update('cascade');\n\t\t\t$table->foreign('jobtype_id')->references('id')->on('jobtypes')->on_delete('cascade')->on_update('cascade');\n\t\t});\n\t}", "title": "" }, { "docid": "e83591ea9629d8d04c1194f96ef1e18f", "score": "0.7059914", "text": "public function up()\n {\n $this->addColumn('products', 'payment', $this->text());\n $this->addColumn('products', 'delivery', $this->text());\n }", "title": "" }, { "docid": "b3d33f68858a3757664689e35cfb2329", "score": "0.705403", "text": "function up() {\n\n $this->execute( 'CREATE TABLE tst1 (\n id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8'\n , 'step1'\n );\n\n $this->execute( 'CREATE TABLE tst2 (\n id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8'\n , 'step2'\n );\n\n $this->execute( 'INSERT INTO tst1(id) VALUES (1)'\n , 'step3'\n );\n\n $this->execute('DROP TABLE tst1');\n\n $this->execute('DROP TABLE tst2');\n\n\n }", "title": "" }, { "docid": "35264ade89fc607371d9892365b3192b", "score": "0.70452315", "text": "public function up()\n\t{\n\t\t// create a 'users' table by using abstract types.\n\t\t$this->createTable('users', array(\n\t\t\t'id' => 'pk',\n\t\t\t'username' => 'string NOT NULL',\n\t\t\t'password' => 'string NOT NULL',\n\t\t\t'profile' => 'text',\n\t\t\t'employed' => 'boolean NOT NULL DEFAULT 0', // default values are recognized by CActiveRecord\n\t\t\t'company' => 'string',\n\t\t\t'created' => 'datetime NOT NULL',\n\t\t\t'updated' => 'datetime',\n\t\t));\n\t\t//$this->addColumn('users', 'employee', '...');\n\t}", "title": "" }, { "docid": "3abc943a836b4b6133a1e8f6090ce9e8", "score": "0.70419943", "text": "public function up()\n\t{\n\t\tDB::table('user_roles')->insert(array(\n\t\t\tarray('name' => 'admin'),\n\t\t\tarray('name' => 'instructor'),\n\t\t\tarray('name' => 'student'),\n\t\t));\n\t}", "title": "" }, { "docid": "ffd50d955f55567174e0c3a03d9e55fa", "score": "0.7041899", "text": "public function up()\n {\n $this->createTable('images', [\n 'id' => $this->primaryKey(),\n 'path' => 'VARCHAR(256)',\n 'object_id' => 'INT(19) DEFAULT 1', //FK\n 'position' => 'INT(19)'\n ]);\n }", "title": "" }, { "docid": "b0b0faab9fb6e7352d34f364b23fcf62", "score": "0.70381314", "text": "public function safeUp()\n {\n $this->createTable('site_range', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'valueMin' => 'int UNSIGNED',\n 'valueMax' => 'int UNSIGNED',\n 'price' => self::MYSQL_TYPE_UINT,\n ));\n $this->addForeignKey('site_range_site_id', 'site_range', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "title": "" }, { "docid": "68eb38cf73d1b36cd00f36d556b40660", "score": "0.70230025", "text": "public function up()\n\t{\n\t\tSchema::create('history', function($table)\n\t\t{\t\n\t\t\t$table->engine = 'InnoDB';\n\t\t\t\n\t\t\t$table->increments('id');\n\t\t\t$table->integer('ebook_id')->unsigned();\n\t\t\t$table->string('username');\n\t\t\t$table->timestamps();\n\t\t\t\n\t\t\t$table->foreign('ebook_id')->references('id')->on('ebooks');\n\t\t});\n\t}", "title": "" }, { "docid": "e5643b430d496d99983a6e500871964c", "score": "0.70216244", "text": "public function up()\n {\n //\n Schema::table('appSmsTransactions', function ($table) {\n $table->drop_foreign('appSmsTransactions_userId_foreign');\n });\n\n Schema::drop('appSmsTransactions');\n\n //adding new name and priority SMS Transaction Table\n Schema::table('smsTransactions', function ($table) {\n $table->string('name')->nullable();\n $table->integer('priority')->index()->default(1);\n });\n }", "title": "" }, { "docid": "5739f792d8328e729f86474c64c7c10c", "score": "0.70190126", "text": "public function up()\n\t{\n\t\t$this->forge->addColumn('beritaacaraseminarproposal', [\n\t\t\t'dosuji1_id'\t\t\t=> ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true, 'after' => 'jadwalSeminarProposal_id'],\n\t\t\t'dosuji2_id'\t\t\t=> ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true, 'after' => 'dosuji1_id'],\n\t\t\t'Berkas_saran_dosuji1'\t=> ['type' => 'varchar', 'constraint' => 255, 'null' => true, 'after' => 'dosuji2_id'],\n\t\t\t'Berkas_saran_dosuji2'\t=> ['type' => 'varchar', 'constraint' => 255, 'null' => true, 'after' => 'Berkas_saran_dosuji1'],\n\t\t\t'CONSTRAINT dosen_uji_1_id_proposal_foreign FOREIGN KEY(`dosuji1_id`) REFERENCES `dosen`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT',\n\t\t\t'CONSTRAINT dosen_uji_2_id_proposal_foreign FOREIGN KEY(`dosuji2_id`) REFERENCES `dosen`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT',\n\t\t]);\n\n\t\t// delete column nilai on berita acara seminar tugas akhir\n\t\t$this->forge->dropColumn('beritaacaraseminartugasakhir', 'nilai');\n\n\t\t// add dosen penguji on berita acara seminar tugas akhir\n\t\t$this->forge->addColumn('beritaacaraseminartugasakhir', [\n\t\t\t'dosuji1_id'\t\t\t=> ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true, 'after' => 'jadwalSeminarTugasAkhir_id'],\n\t\t\t'dosuji2_id'\t\t\t=> ['type' => 'int', 'constraint' => 11, 'unsigned' => true, 'null' => true, 'after' => 'dosuji1_id'],\n\t\t\t'Berkas_saran_dosuji1'\t=> ['type' => 'varchar', 'constraint' => 255, 'null' => true, 'after' => 'dosuji2_id'],\n\t\t\t'Berkas_saran_dosuji2'\t=> ['type' => 'varchar', 'constraint' => 255, 'null' => true, 'after' => 'Berkas_saran_dosuji1'],\n\t\t\t'dosuji1_nilai' \t\t=> ['type' => 'int', 'constraint' => 3, 'null' => true, 'after' => 'Berkas_saran_dosuji2'],\n\t\t\t'dosuji2_nilai' \t\t=> ['type' => 'int', 'constraint' => 3, 'null' => true, 'after' => 'dosuji1_nilai'],\n\t\t\t'CONSTRAINT dosen_uji_1_id_tugasakhir_foreign FOREIGN KEY(`dosuji1_id`) REFERENCES `dosen`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT',\n\t\t\t'CONSTRAINT dosen_uji_2_id_tugasakhir_foreign FOREIGN KEY(`dosuji2_id`) REFERENCES `dosen`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT',\n\t\t]);\n\t}", "title": "" }, { "docid": "78938c51667f8a3f497c19dc96135e15", "score": "0.70173186", "text": "public function up()\n\t{\n\t\t$this->forge->addField([\n\t\t\t'id' => [\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => 5,\n\t\t\t\t'unsigned' => true,\n\t\t\t\t'auto_increment' => true\n\t\t\t],\n\t\t\t'nama' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '255'\n\t\t\t],\n\t\t\t'jenis' => [\n\t\t\t\t'type' => 'ENUM',\n\t\t\t\t'constraint' => ['Cafe', 'Restaurant', 'Pasar Kaget']\n\t\t\t],\n\t\t\t'alamat' => [\n\t\t\t\t'type' => 'TEXT',\n\t\t\t],\n\t\t\t'telp' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '13'\n\t\t\t],\n\t\t\t'bintang' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '10'\n\t\t\t],\n\t\t\t'foto' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '255',\n\t\t\t\t'null'\t\t\t => true,\n\t\t\t],\n\t\t]);\n\n\t\t// membuat primary key\n\t\t$this->forge->addPrimaryKey('id', TRUE);\n\n\t\t// membuat table travels\n\t\t$this->forge->createTable('culinarys', TRUE);\n\t}", "title": "" }, { "docid": "c6517699e83af42e11d5d09d9c6390cf", "score": "0.70162135", "text": "public function up()\n {\n $fields = [\n 'van' => [\n 'type' => 'datetime',\n ],\n 'tot' => [\n 'type' => 'datetime',\n ],\n 'inschrijfdeadline' => [\n 'type' => 'datetime',\n ],\n 'afmelddeadline' => [\n 'type' => 'datetime',\n ],\n ];\n $this->dbforge->modify_column('agenda', $fields);\n }", "title": "" }, { "docid": "5da376b9cd73d910c5808cf5179e4e44", "score": "0.7013312", "text": "public function safeUp() {\n\t$this->createTable('Help', array(\n 'id'=>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'alias'=>\"varchar(25) NOT NULL\",\n \"PRIMARY KEY (`id`)\",\n \"KEY `alias` (`alias`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "title": "" }, { "docid": "6a7d49f8f400042f7390e7ccecad67fe", "score": "0.70114326", "text": "public static function databaseUp() {\n\n if (!Capsule::schema()->hasTable(Migrate::prefixedTableName(self::TABLENAME))) {\n Capsule::schema()->create(Migrate::prefixedTableName(self::TABLENAME), function($table) {\n $table->increments('id');\n $table->integer('category_id');\n $table->string('label', 30);\n $table->string('batch', 30);\n $table->string('user_name', 50);\n $table->string('user_email', 50);\n $table->string('user_ip', 32);\n $table->string('nominee_name', 50);\n $table->text('nomination_reason');\n $table->boolean('newsletter');\n });\n }\n }", "title": "" }, { "docid": "35603b41a39ca70d1d3c8f17af7753c7", "score": "0.70099926", "text": "public function up()\n {\n\t\t$fields=array(\"`blog_type` tinyint(2) DEFAULT NULL\");\n\t\t//Ìí¼ÓÒ»¸öblog_type×Ö¶Î\n\t\t$this->dbforge->add_column('blogs',$fields);\n\t\t\n }", "title": "" }, { "docid": "29c15e8a2a9b4bb7850e35801fcbe528", "score": "0.70095056", "text": "public function safeUp()\n\t{\n\t\t// Create the craft_seo_redirects table\n\t\tcraft()->db->createCommand()->createTable('seo_redirects', array(\n\t\t\t'uri' => array('required' => true),\n\t\t\t'to' => array('required' => true),\n\t\t\t'type' => array('values' => '301,302', 'column' => 'enum', 'required' => true),\n\t\t), null, true);\n\n\t\t// Create the craft_seo_sitemaps table\n\t\tcraft()->db->createCommand()->createTable('seo_sitemaps', array(\n\t\t\t'group' => array('values' => 'sections,categories,customUrls', 'column' => 'enum', 'required' => true),\n\t\t\t'url' => array('required' => true),\n\t\t\t'frequency' => array('values' => 'always,hourly,daily,weekly,monthly,yearly,never', 'column' => 'enum', 'required' => true),\n\t\t\t'priority' => array('maxLength' => 10, 'decimals' => 1, 'required' => true, 'unsigned' => false, 'length' => 11, 'column' => 'decimal'),\n\t\t), null, true);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f1e3a5b497f9b9111e86e45c420677c1", "score": "0.70057935", "text": "public function up()\n {\n $this->addColumn('{{%blog}}','date_create',$this->dateTime());\n $this->addColumn('{{%blog}}','date_update',$this->dateTime());\n }", "title": "" }, { "docid": "6e7c409f8428e0cd95b35829455e975d", "score": "0.7001278", "text": "public function up()\n {\n\t\t$this->dropForeignKey('fk_subscriber_1', '{{%subscriber}}');\n\t\t$this->addForeignKey(\n\t\t\t'fk_subscriber_1',\n\t\t\t'{{%subscriber}}',\n\t\t\t'sourceId',\n\t\t\t'{{%subscribe_source}}',\n\t\t\t'id',\n\t\t\t'CASCADE',\n\t\t\t'CASCADE'\n\t\t);\n }", "title": "" }, { "docid": "7169a892b9b19378a86f3148135c1185", "score": "0.70002115", "text": "public function safeUp()\n\t{\n\t\t$this->createTable('contrato', array(\n\t\t\t\t'id' => 'pk',\n\t\t\t\t'cliente_id' => 'INT NOT NULL',\n\t\t\t\t'facturacion' => 'INT(10) Default Null',\n\t\t\t\t'inicio' => 'date DEFAULT NULL',\n\t\t\t\t'fin' => 'date DEFAULT NULL',\n\t\t\t\t'codigo_moebius' => 'VARCHAR(20) Default Null',\n\t\t\t\t'titulo' => 'VARCHAR(100) DEFAULT NULL',\n\t\t));\n\t\t$this->addForeignKey('FK01_contrato_cliente', 'contrato', 'cliente_id', 'cliente', 'id', 'RESTRICT');\n\n\t\t$this->insert(\"contrato\", array(\n\t\t\t\t'cliente_id' => 1,\n\t\t\t\t'facturacion' => 400,\n\t\t\t\t'inicio' => '2010-01-01',\n\t\t\t\t'fin' => '2010-01-08',\n\t\t\t\t'codigo_moebius' => '1234',\n\t\t\t\t'titulo' => 'Hosting y Administración',\n\t\t));\n\t\t\n\t}", "title": "" }, { "docid": "03e03a060dd1f9b28f5763d1aa3124a1", "score": "0.699695", "text": "public function up()\n\t{\n\t\t// Creat Table\n\t\tSchema::create($this->name, function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('deleted')->default(0);\n\t\t\t$table->integer('discussion_id');\n\t\t\t$table->text('post');\n\t\t\t$table->integer('user_id');\n\t\t\t$table->timestamps();\n\t\t});\n\t}", "title": "" }, { "docid": "d1c187aa9f26102656ac0036e26e839e", "score": "0.699279", "text": "public function up()\n\t{\n\t\tSchema::table('users',function($table){\n\t\t\t$table->integer('course_id')->unsigned();\n\t\t\t$table->foreign('course_id')->references('id')->on('courses');\n\t\t});\n\t}", "title": "" }, { "docid": "40f4b67bfbda76ddecd8b0fa9e90657f", "score": "0.69819343", "text": "public function up() {\n\n $pdo = Doctrine_Manager::getInstance()->getCurrentConnection()->getDbh();\n foreach (array('campaign', 'contact', 'sf_guard_forgot_password', 'sf_guard_user') as $table) {\n $pdo->query('ALTER TABLE ' . $table . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci');\n $pdo->query('ALTER TABLE ' . $table . ' COLLATE=\\'utf8_general_ci\\'');\n }\n }", "title": "" }, { "docid": "d6ed2cfc05147044476a1da38b828010", "score": "0.69749796", "text": "public function up()\n {\n $sql = <<<XXX\nDROP TABLE IF EXISTS `bbs_ip`;\nCREATE TABLE `bbs_ip` (\n `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',\n `ip` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'IP地址',\n `article_id` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '文章id',\n PRIMARY KEY (`id`) USING BTREE\n) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '记录ip访问' ROW_FORMAT = Dynamic;\nXXX;\n $this->execute($sql);\n }", "title": "" }, { "docid": "755ec449f7de190a754765f457f6ee9b", "score": "0.696723", "text": "public function safeUp()\n {\n $this->update($this->tableName, ['url_code' => 'ua'], 'code = :code', [':code' => 'uk']);\n $this->update($this->tableName, ['url_code' => 'ua', 'code' => 'uk'], 'code = :code', [':code' => 'ua']);\n }", "title": "" }, { "docid": "eb1a3d02fb7b77ca02847cbcc097743a", "score": "0.6965571", "text": "public function up()\n\t{\n\t\t$this->load->library('session');\n\n\t\t// add administrators to module permissions\n\t\t$assign_role = $this->session->userdata('role_id') ? $this->session->userdata('role_id') : 1;\n\n\t\t$role_data = array();\n\t\tforeach ($this->permissions_data as $data)\n\t\t{\n\t\t\t$this->db->insert($this->permissions_table, $data);\n\t\t\t$role_data[] = array(\n\t\t\t\t'role_id' => $assign_role,\n\t\t\t\t'permission_id' => $this->db->insert_id(),\n\t\t\t);\n\t\t}\n\t\t$this->db->insert_batch($this->role_permissions_table, $role_data);\n\t}", "title": "" }, { "docid": "826d0ba3b18d4f42b5213528a11d0915", "score": "0.69646585", "text": "public function safeUp()\n {\n $this->dropColumn($this->tableName, 'href');\n $this->dropColumn('{{%sales_lang}}', 'href');\n $this->renameColumn($this->tableName, 'content', 'description');\n $this->addColumn('{{%sales_lang}}', 'description', Schema::TYPE_TEXT. ' NULL DEFAULT NULL');\n $this->addColumn($this->tableName, 'alias', Schema::TYPE_STRING. ' NOT NULL COMMENT \"Ссылка\" AFTER `label`');\n $this->addColumn($this->tableName, 'content', Schema::TYPE_TEXT. ' DEFAULT NULL COMMENT \"Содержимое\" AFTER `description`');\n $this->addColumn($this->tableName, 'image_bottom_id', Schema::TYPE_INTEGER. ' UNSIGNED DEFAULT NULL AFTER `image_id`');\n }", "title": "" } ]
c7eaa0e1577f71a69888b0001bab9cfc
Displays a removal confirmation for the names provided.
[ { "docid": "58be259a663d2696a60f593da9c4a653", "score": "0.0", "text": "public function getRemove(array $getData)\n {\n if (!$this->checkForPermission('Administrator'))\n {\n return;\n }\n \n $entities = $this->crudRepository->getListByFriendlyNames($getData['entities'] ?? []);\n $this->viewService->renderView($this->getTemplateFolder() . '/removeList', [\n 'entities' => $entities,\n 'token' => $this->csrfService->getNewToken(),\n 'originalUrl' => $_SERVER['HTTP_REFERER'] ?? $this->getBaseUrl(),\n ]);\n }", "title": "" } ]
[ { "docid": "31848af045ebeba5ee8ef7d7bb1db245", "score": "0.6601196", "text": "public function confirmRemoveFromList()\n\t{\n\t\t// Only registered users allowed here\n\t\tFoundry::requireLogin();\n\n\t\t$ajax \t= Foundry::ajax();\n\n\t\t// Get the target id.\n\t\t$id \t= JRequest::getInt( 'id' );\n\n\t\tif( !$id )\n\t\t{\n\t\t\t// Throw error here.\n\t\t}\n\n\t\t$user \t= Foundry::user( $id );\n\n\t\t$theme \t= Foundry::themes();\n\t\t$theme->set( 'user' , $user );\n\n\t\t$contents\t= $theme->output( 'site/friends/dialog.delete.list.user' );\n\n\t\treturn $ajax->resolve( $contents );\n\t}", "title": "" }, { "docid": "a4455bbc36d12cb2f865002c45c6257f", "score": "0.62023354", "text": "public function confirm()\n\t{\n\t\t// Only super admins can delete member groups\n\t\tif ( ! ee()->cp->allowed_group('can_delete_member_groups'))\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'), 403);\n\t\t}\n\n\t\t$groups = ee()->input->post('selection');\n\n\t\t// You can't delete these groups\n\t\t$no_delete = array_intersect($groups, $this->no_delete);\n\n\t\tif ( ! empty($no_delete))\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'), 403);\n\t\t}\n\n\t\t$vars['groups'] = ee('Model')->get('MemberGroup', $groups)\n\t\t\t\t\t->all()\n\t\t\t\t\t->filter(function($group) {\n\t\t\t\t\t\treturn count($group->Members) > 0;\n\t\t\t\t\t});\n\n\t\t$vars['new_groups'] = ['delete' => lang('member_assignment_none')];\n\t\t$vars['new_groups'] += ee('Model')->get('MemberGroup')\n\t\t\t\t\t\t\t\t->filter('group_id', 'NOT IN', $groups)\n\t\t\t\t\t\t\t\t->all()\n\t\t\t\t\t\t\t\t->getDictionary('group_id', 'group_title');\n\n\t\tee()->view->cp_page_title = lang('delete_member_group');\n\t\tee()->cp->render('members/delete_member_group_conf', $vars);\n\t}", "title": "" }, { "docid": "7a6d706bb2fca98c3451c87643b8ab50", "score": "0.61882645", "text": "function confirmRemove()\n\t{\n\t\tglobal $ilAccess, $ilCtrl, $lng;\n\n\t\t$this->checkPermission(\"write\");\n\n\t\tif(!isset($_POST[\"id\"]))\n\t\t{\n\t\t\t$this->ilias->raiseError($this->lng->txt(\"no_checkbox\"),$this->ilias->error_obj->MESSAGE);\n\t\t}\n\t\t\n\t\t// display confirmation message\n\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\n\t\t$cgui = new ilConfirmationGUI();\n\t\t$cgui->setFormAction($this->ctrl->getFormAction($this));\n\t\t$cgui->setHeaderText($this->lng->txt(\"info_delete_sure\"));\n\t\t$cgui->setCancel($this->lng->txt(\"cancel\"), \"cancelRemove\");\n\t\t$cgui->setConfirm($this->lng->txt(\"confirm\"), \"remove\");\n\t\t\t\n\t\tforeach($_POST[\"id\"] as $obj_id)\n\t\t{\n\t\t\t$type = ilMediaPoolItem::lookupType($obj_id);\n\t\t\t$title = ilMediaPoolItem::lookupTitle($obj_id);\n\t\t\t\n\t\t\t// check whether page can be removed\n\t\t\t$add = \"\";\n\t\t\tif ($type == \"pg\")\n\t\t\t{\n\t\t\t\tinclude_once(\"./Services/COPage/classes/class.ilPageContentUsage.php\");\n\t\t\t\t$usages = ilPageContentUsage::getUsages(\"incl\", $obj_id, false);\n\t\t\t\tif (count($usages) > 0)\n\t\t\t\t{\n\t\t\t\t\tilUtil::sendFailure(sprintf($lng->txt(\"mep_content_snippet_in_use\"), $title), true);\n\t\t\t\t\t$ilCtrl->redirect($this, \"listMedia\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// check whether the snippet is used in older versions of pages\n\t\t\t\t\t$usages = ilPageContentUsage::getUsages(\"incl\", $obj_id, true);\n\t\t\t\t\tif (count($usages) > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$add = \"<div class='small'>\".$lng->txt(\"mep_content_snippet_used_in_older_versions\").\"</div>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$caption = ilUtil::getImageTagByType($type, $this->tpl->tplPath).\n\t\t\t\t\" \".$title.$add;\n\t\t\t\n\t\t\t$cgui->addItem(\"id[]\", $obj_id, $caption);\n\t\t}\n\n\t\t$this->tpl->setContent($cgui->getHTML());\n\t}", "title": "" }, { "docid": "4650f149c09aa3f9a5ded07ec443e41f", "score": "0.6018983", "text": "public function deleteAction(){\n $name = \"PHP Edit\";\n return view('index', 'delete', array('name' => $name));\n }", "title": "" }, { "docid": "b805a8f6c1fc7c6c9a059577c72e308f", "score": "0.5983063", "text": "public function confirmDeleteList()\n\t{\n\t\t// Only registered users allowed here\n\t\tFoundry::requireLogin();\n\n\t\t$ajax \t= Foundry::ajax();\n\n\t\t// Get the target id.\n\t\t$id \t= JRequest::getInt( 'id' );\n\n\t\tif( !$id )\n\t\t{\n\t\t\t// Throw error here.\n\t\t}\n\n\t\t$list \t= Foundry::table( 'List' );\n\t\t$list->load( $id );\n\n\t\t$theme \t= Foundry::themes();\n\t\t$theme->set( 'list' , $list );\n\n\t\t$contents\t= $theme->output( 'site/friends/dialog.delete.list' );\n\n\t\treturn $ajax->resolve( $contents );\n\t}", "title": "" }, { "docid": "d1997e1fb3fee12217c1bc3d21e5adae", "score": "0.5979981", "text": "public function remove($names);", "title": "" }, { "docid": "22ede4133055aab3e3a9957b1c85d84e", "score": "0.5971806", "text": "function delete_entries_confirm()\n {\n if ( ! Session::access('can_delete_self_entries') AND\n ! Session::access('can_delete_all_entries'))\n {\n return Cp::unauthorizedAccess();\n }\n\n if ( ! Request::has('toggle')){\n return $this->edit_entries();\n }\n\n $r = Cp::formOpen(['action' => 'C=edit'.AMP.'M=delete_entries']);\n\n $i = 0;\n foreach (Request::input('toggle') as $key => $val)\n {\n if (!empty($val))\n {\n $r .= Cp::input_hidden('delete[]', $val);\n $i++;\n }\n }\n\n $r .= Cp::quickDiv('alertHeading', __('publish.delete_confirm'));\n $r .= Cp::div('box');\n\n if ($i == 1) {\n $r .= Cp::quickDiv('defaultBold', __('publish.delete_entry_confirm'));\n }\n else{\n $r .= Cp::quickDiv('defaultBold', __('publish.delete_entries_confirm'));\n }\n\n // if it's just one entry, let's be kind and show a title\n if ($i == 1) {\n $query = DB::table('weblog_entry_data')\n ->where('entry_id', $_POST['toggle'][0])\n ->first(['title']);\n\n if ($query)\n {\n $r .= '<br>'.\n Cp::quickDiv(\n 'defaultBold',\n str_replace(\n '%title',\n $query->title,\n __('publish.entry_title_with_title')\n )\n );\n }\n }\n\n $r .= '<br>'.\n Cp::quickDiv('alert', __('publish.action_can_not_be_undone')).\n '<br>'.\n Cp::input_submit(__('cp.delete')).\n '</div>'.PHP_EOL.\n '</form>'.PHP_EOL;\n\n Cp::$title = __('publish.delete_confirm');\n Cp::$crumb = __('publish.delete_confirm');\n Cp::$body = $r;\n }", "title": "" }, { "docid": "6341d7e25dcf1b28ed4209ac49e39d04", "score": "0.58572817", "text": "function show_delhosttemplatedialog_buttons( $name ) {\n # ------------------------------------------------------------------------\n # Outputs a html form fragment to add a New Host\n\n print '<form id=\"delhosttemplateform\" '.\n 'name=\"delhosttemplateform\" method=\"get\"';\n print ' action=\"/nagrestconf/'.SCRIPTNAME.'?tab=5&delhosttemplate=1';\n print '\">';\n print '<h2>About to <b>DELETE</b> host template:</h2>';\n print '<h2 style=\"margin-left:60px;font-weight:bold;\">'.$name.'</h2>';\n print \"<h2>Click 'Delete Host Template' to confirm \".\n \"or 'Close' to cancel.</h2>\";\n print '<p>';\n print '<input type=\"hidden\" name=\"name\" value=\"';\n print $name;\n print '\"/>';\n print '</p>';\n print '</form>';\n print '<div class=\"flash notice\" style=\"display:none\"></div>';\n print '<div class=\"flash error\" style=\"display:none\"></div>';\n print '<script>'.\n '$(\".ui-button:contains(Close)\").focus()'.\n '</script>';\n\n exit( 0 );\n }", "title": "" }, { "docid": "5f10bb336750a13f48a5ed1186523540", "score": "0.58537185", "text": "public function delete_confirm()\n {\n $stack = ub_stack::get_instance();\n \n // determine if the user is allowed to delete articles of the passed category\n $sql_string = 'SELECT\n articles_container_descr\n FROM\n data_articles_container\n WHERE\n articles_container_id IN ('.implode(', ', $stack->get_stack('articles_container_id')).')';\n $result = $this->unibox->db->query($sql_string, 'failed to select data to confirm delete');\n if ($result->num_rows() > 0)\n {\n $msg = new ub_message(MSG_QUESTION);\n $msg->add_text('TRL_ARTICLE_DELETE_CONFIRM');\n $msg->add_newline(2);\n $msg->begin_list();\n while (list($descr) = $result->fetch_row())\n $msg->add_listentry($descr, array(), false);\n $msg->end_list();\n $msg->add_newline();\n $msg->begin_form('articles_delete', $this->unibox->identify_alias('articles_delete'));\n $msg->form->begin_buttonset(false);\n $msg->form->submit('TRL_YES');\n $msg->form->cancel('TRL_NO', $this->unibox->identify_alias('articles_delete'));\n $msg->form->end_buttonset();\n $msg->form->set_destructor('ub_stack', 'discard_all');\n $msg->end_form();\n }\n else\n {\n $msg = new ub_message(MSG_ERROR);\n $msg->add_text('TRL_ERR_INVALID_DATA_PASSED');\n }\n $msg->display();\n }", "title": "" }, { "docid": "438429273b2e6dd9a14ce2212669511d", "score": "0.58507735", "text": "public function deleteAction()\n {\n $user = filter_var($this->route_params['isbn'], FILTER_SANITIZE_STRING);\n $user = User::findByID($user);\n View::renderTemplate('Admin/Users/delete-confirm.html.twig',\n [\n 'user' => $user,\n ]);\n }", "title": "" }, { "docid": "bec3abdbe78563136dde3d76efa1f1df", "score": "0.58469546", "text": "public function displayDeleteScreen() {\n echo \"\n <div class='container'>\n <div class='span10 offset1'>\n <div class='row'>\n <h3>Delete Person</h3>\n </div>\n <div class='form-horizontal'>\n <p class='alert alert-error'>Are you sure you want to delete ?</p>\n <div class='form-actions'>\n <button id='submit' class='btn btn-danger' onClick='personsRequest(\\\"deleteRecord\\\", {$this->id});'>Yes</button>\n <a class='btn' onclick='personsRequest(\\\"displayList\\\")'>Back</a>\n </div>\n </div>\n </div>\n </div>\";\n }", "title": "" }, { "docid": "65c3d5dbe9b04d96d627449dd9b9ef6f", "score": "0.58442605", "text": "function ui_bulk_delete_message( $n ) {\n\t\treturn sprintf(\n\t\t\t_n(\n\t\t\t\t\"%1\\$d '%2\\$s' has been deleted\",\n\t\t\t\t\"%1\\$d '%2\\$s' have been deleted\",\n\t\t\t\t$n,\n\t\t\t\t'broken-link-checker'\n\t\t\t),\n\t\t\t$n,\n\t\t\t$this->container_type\n\t\t);\n\t}", "title": "" }, { "docid": "4a93a8300ab9bb515c4993aa6dfe935b", "score": "0.5795804", "text": "function confirmDelete()\n{\n\tglobal $config;\n\n\t#$sql = \"SELECT UserID, FirstName FROM ma_Users;\";\n\n\t$sql = \"\n\tSELECT CharID, UserID, CodeName, LastName, FirstName, MiddleName\n\tFROM ma_characters;\";\n\n\t$result = mysqli_query(IDB::conn(),$sql) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\n\tget_header();\n\n\t$result = mysqli_query(IDB::conn(),$sql) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));\n\tif (mysqli_num_rows($result) > 0)//at least one record!\n\t{//show results\n\n\t\t$myCharacterName ='';\n\t\t#get name(s) of character(s) to be deleted...\n\t\tif(trim(dbOut($row['CodeName'])) != ''){ #codename if set\n\t\t\t$myCharacterName = dbOut($row['CodeName']);\n\t\t}else{\t#use first/last name\n\t\t\t$myCharacterName = dbOut($row['FirstName']) . ' ' . dbOut($row['LastName']);\n\t\t}\n\n\t\techo $myCharacterName;\n\t\tdie;\n\n\n\t\techo '<form method=\"post\" action=\"' . THIS_PAGE . '\">\n\t\t\t<table class=\"table table-striped\" >';\n\n\t\t\techo '<tr>\n\t\t\t\t<th>Character To Delete</th>\n\t\t\t\t<th>Handler</th>\n\t\t\t</tr>';\n\n\t\t\t#lets make our checkie boxes...\n\n\t\t\twhile ($row = mysqli_fetch_assoc($result))\n\t\t\t{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db\n\n\t\t\t\t#show characters to select for deletion...\n\t\t\t\t$myCharacterName ='';\n\t\t\t\t#get character name...\n\t\t\t\tif(trim(dbOut($row['CodeName'])) != ''){ #codename if set\n\t\t\t\t\t$myCharacterName = dbOut($row['CodeName']);\n\t\t\t\t}else{\t#use first/last name\n\t\t\t\t\t$myCharacterName = dbOut($row['FirstName']) . ' ' . dbOut($row['LastName']);\n\t\t\t\t}\n\n\t\t\t\techo '<tr>\n\t\t\t\t\t<td> &nbsp;\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"CharID\"\n\t\t\t\t\t\t\tvalue=\"' . (int)$row['CharID'] . '\"> &nbsp; ' . $myCharacterName . ' has been submitted for deletion.\n\t\t\t\t\t\t</input>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t';\n\n\t\t\t\t}\n\t\t\techo '</table>\n\t\t\t<input type=\"hidden\" name=\"act\" value=\"delete\" />\n\t\t\t<input class=\"pull-right\" type=\"submit\" name=\"CharID\" value=\"Confrim Delete\"/>\n\t\t</form>';\n\n\t}else{//no records\n\t\techo '<div align=\"center\"><h3>No Characters were submitted for deletion.</h3></div>';\n\t}\n\t#echo '<div class=\"pull-left\"><a href=\"' . THIS_PAGE . '?act=delete\">DELETE CHARACTERS</a></div>';\n\techo '<div align=\"center\"><a href=\"' . THIS_PAGE . '\">Exit Without Add</a></div>\n\t';\n\n\tget_footer();\n}", "title": "" }, { "docid": "b542c99ec637df5caea83b2d60a5b918", "score": "0.57294893", "text": "public function confirmdestroy($id)\n {\n $lab = Lab::whereId($id)->first();\n\n $page = 'Delete Investigation';\n\n return view('core.pages.delete-lab', compact('page', 'lab'));\n }", "title": "" }, { "docid": "e4a6ba3849c4a8f9cfcbb771a3466331", "score": "0.57151157", "text": "public function friendRemoved()\n\t{\n\t\t// Only registered users allowed here\n\t\tFoundry::requireLogin();\n\n\t\t$ajax \t= Foundry::ajax();\n\n\t\t// Get the target id.\n\t\t$id \t= JRequest::getInt( 'id' );\n\n\t\tif( !$id )\n\t\t{\n\t\t\t// Throw error here.\n\t\t}\n\n\t\t$user \t= Foundry::user( $id );\n\n\t\t$theme \t= Foundry::themes();\n\t\t$theme->set( 'user' , $user );\n\n\t\t$contents\t= $theme->output( 'site/friends/dialog.removed' );\n\n\t\treturn $ajax->resolve( $contents );\n\t}", "title": "" }, { "docid": "e2ac25cb8d2ed3785f6aaf0bddfb9378", "score": "0.56996065", "text": "public function destroy(Staffs $staffs)\n {\n return 'data terhapus';\n }", "title": "" }, { "docid": "a7d5e57cae4c488bcdbdf76471a02be2", "score": "0.5679542", "text": "public function wishlistDelete()\n {\n # return message.\n return 'Wishlist Deleted Successfully';\n }", "title": "" }, { "docid": "0450a737730b94855bc028de6874a4bf", "score": "0.56481075", "text": "public function confirmDelete()\n\t{\n\t\tglobal $tpl;\n\t\t\n\t\tif(!isset($_POST['apps']))\n\t\t{\n\t\t\tilUtil::sendFailure($this->lng->txt('select_one'));\n\t\t\treturn $this->appointmentList();\n\t\t}\n\n\t\tinclude_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');\n\n\t\t$this->ctrl->saveParameter($this,array('seed','app_id','dt'));\n\n\t\t$confirm = new ilConfirmationGUI();\n\t\t$confirm->setFormAction($this->ctrl->getFormAction($this));\n\t\t$confirm->setHeaderText($this->lng->txt('cal_delete_app_sure'));\n\t\t$confirm->setCancel($this->lng->txt('cancel'),'cancel');\n\n\t\tinclude_once 'Services/Calendar/classes/class.ilCalendarEntry.php';\n\t\tforeach($_POST['apps'] as $entry_id)\n\t\t{\n\t\t\t$entry = new ilCalendarEntry($entry_id);\n\t\t\t$confirm->addItem('apps[]', $entry_id, ilDatePresentation::formatDate($entry->getStart()).', '.$entry->getTitle());\n\t\t}\n\n\t\t$confirm->setConfirm($this->lng->txt('delete'),'delete');\n\t\t$confirm->setCancel($this->lng->txt('cancel'),'appointmentList');\n\t\t\n\t\t$tpl->setContent($confirm->getHTML());\n\t}", "title": "" }, { "docid": "7b42b9e45e0146871f2036a8e5fce0f2", "score": "0.56290656", "text": "public function executeDelete()\n {\n if($this->hasRequestParameter('ids')){\n $precincts = PrecinctPeer::retrieveByPKs(json_decode($this->getRequestParameter('ids')));\n\n foreach($precincts as $precinct){\n\t$precinct->delete();\n }\n\n }elseif($this->hasRequestParameter('id')){\n $precinct = PrecinctPeer::retrieveByPk($this->getRequestParameter('id'));\n $precinct->delete();\n }\n\n $this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Recinto borrado.\"));\n return $this->renderComponent('precincts', 'list');\n }", "title": "" }, { "docid": "f8e84b5e6091f97cdc36fb274341d511", "score": "0.56233174", "text": "function show_delsvctemplatedialog_buttons( $name ) {\n # ------------------------------------------------------------------------\n # Outputs a html form fragment to add a New Host\n\n print '<form id=\"delsvctemplateform\" '.\n 'name=\"delsvctemplateform\" method=\"get\"';\n print ' action=\"/nagrestconf/'.SCRIPTNAME.'?tab=5&delsvctemplate=1';\n print '\">';\n print '<h2>About to <b>DELETE</b> svc template:</h2>';\n print '<h2 style=\"margin-left:60px;font-weight:bold;\">'.$name.'</h2>';\n print \"<h2>Click 'Delete Host Template' to confirm \".\n \"or 'Close' to cancel.</h2>\";\n print '<p>';\n print '<input type=\"hidden\" name=\"name\" value=\"';\n print $name;\n print '\"/>';\n print '</p>';\n print '</form>';\n print '<div class=\"flash notice\" style=\"display:none\"></div>';\n print '<div class=\"flash error\" style=\"display:none\"></div>';\n print '<script>'.\n '$(\".ui-button:contains(Close)\").focus()'.\n '</script>';\n\n exit( 0 );\n }", "title": "" }, { "docid": "d18e914ddd495893c5049d2a991db388", "score": "0.56228286", "text": "public function actionRemove()\n {\n $am = Yii::$app->getAuthManager();\n $success = $failure = [];\n\n foreach (Yii::$app->getRequest()->post('names') as $name) {\n if ($am->remove($am->getRole($name))) {\n $success[] = $name;\n } else {\n $failure[] = $name;\n }\n }\n\n if (!empty($success)) {\n Yii::$app->session->addFlash('success', Yii::t(\n 'rbam',\n 'Roles removed: {success}',\n ['success' => join(', ', $success)]\n ));\n }\n\n if (!empty($failure)) {\n Yii::$app->session->addFlash('failure', Yii::t(\n 'rbam',\n 'Roles not removed: {failure}',\n ['failure' => join(', ', $failure)]\n ));\n }\n\n return $this->redirect(['rbam/index']);\n }", "title": "" }, { "docid": "c80dcf99e1be9c607abfc0cdf9992b48", "score": "0.56190354", "text": "function ui_bulk_trash_message( $n ) {\n\t\treturn $this->ui_bulk_delete_message( $n );\n\t}", "title": "" }, { "docid": "1a07a331b738f701943f6221ea21397a", "score": "0.55901635", "text": "static public function ctrEliminarNomina(){\n\n\t\tif(isset($_GET[\"idNomina\"])){\n\n\t\t\t$tabla =\"nominas\";\n\t\t\t$datos = $_GET[\"idNomina\"];\n\n\t\t\t$respuesta = ModeloNominas::mdlEliminarNomina($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El empleado ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"nominas\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "97d1a9506439af4996620b7266de76cd", "score": "0.55865794", "text": "public function confirmUnfriend()\n\t{\n\t\t// Only registered users allowed here\n\t\tFoundry::requireLogin();\n\n\t\t$ajax \t= Foundry::ajax();\n\n\t\t// Get the target id.\n\t\t$id \t= JRequest::getInt( 'id' );\n\n\t\tif( !$id )\n\t\t{\n\t\t\t// Throw error here.\n\t\t}\n\n\t\t$user \t= Foundry::user( $id );\n\n\t\t$theme \t= Foundry::themes();\n\t\t$theme->set( 'user' , $user );\n\n\t\t$contents\t= $theme->output( 'site/friends/dialog.unfriend' );\n\n\t\treturn $ajax->resolve( $contents );\n\t}", "title": "" }, { "docid": "c657376dd048d16ba2cf45c14042ed78", "score": "0.55816025", "text": "function ui_output_PromptDelete($title,$message,$target,$items) {\n\tglobal $gSession,$Auth;\n\t$db_connectionLayout = new DB_Sql(); \n\n\t## prepare the template file\n\t$select_template = new Template(INTERFACE_DIR);\n\t$select_template->set_templatefile(array(\"body\" => \"dialog_twooptions.tpl\"));\n\t\n\t$select_template->set_var(\"yesIMG\",\"lang/\".$Auth->auth[\"language\"].\"_button_ja.gif\");\n\t$select_template->set_var(\"noIMG\",\"lang/\".$Auth->auth[\"language\"].\"_button_nein.gif\");\n\t$select_template->set_var('language_deletepage',$title);\n\t$select_template->set_var('language_doyouwant',$message);\n\t$select_template->set_var('site',SITE);\n\n\t$actionURL = $gSession->url($target);\n\t$select_template->set_var('actionURL',$actionURL);\n\n\t$hidden = '';\n\tforeach($items as $current_item) {\n\t\t$hidden .= '<input type=\"hidden\" name=\"rows_to_delete[]\" value=\"'.$current_item.'\">';\n\t}\n\t\n\t$select_template->set_var('hiddenfields',$hidden);\n\n\n\t$select_template->pfill_block(\"body\");\n}", "title": "" }, { "docid": "704135b4e5e2b2d0879cb61660019781", "score": "0.55803174", "text": "protected function mcp_modal_confirm($options)\n\t{\n\t\t// -------------------------------------\n\t\t//\toptions\n\t\t// -------------------------------------\n\n\t\t$defaults = array(\n\t\t\t'form_url'\t\t=> '',\n\t\t\t'name'\t\t\t=> '',\n\t\t\t'kind'\t\t\t=> '',\n\t\t\t'plural'\t\t=> '',\n\t\t\t'modal_vars'\t=> array('desc' => '')\n\t\t);\n\n\t\tforeach ($defaults as $key => $value)\n\t\t{\n\t\t\t$$key = isset($options[$key]) ? $options[$key] : $value;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t//\tVars\n\t\t// -------------------------------------\n\n\t\t$modal_vars = array_merge(array(\n\t\t\t'name'\t\t=> 'modal-confirm-remove',\n\t\t\t'form_url'\t=> $form_url,\n\t\t\t'checklist' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'kind' => $kind,\n\t\t\t\t)\n\t\t\t)\n\t\t), $modal_vars);\n\n\t\t// -------------------------------------\n\t\t//\tadd modal\n\t\t// -------------------------------------\n\n\t\tee('CP/Modal')->addModal(\n\t\t\t$name,\n\t\t\tee('View')->make('_shared/modal_confirm_remove')->render($modal_vars)\n\t\t);\n\n\t\tee()->javascript->set_global(\n\t\t\t'lang.remove_confirm',\n\t\t\t$kind . ': <b>### ' . $plural . '</b>'\n\t\t);\n\n\t\t// -------------------------------------\n\t\t//\tload JS\n\t\t// -------------------------------------\n\n\t\tee()->cp->add_js_script(array(\n\t\t\t'file' => array('cp/confirm_remove'),\n\t\t));\n\t}", "title": "" }, { "docid": "e65c3c2db8d1c962daaa06f6311cef93", "score": "0.5578627", "text": "public function deleteAction()\n {\n $name = $this->_getParam('name');\n $account = $this->_getParam('account');\n $pop = new Modules_Communigate_Custom_RemotePop;\n $pop->deleteRemotePop($name, $account);\n\n $this->_status->addMessage('info', \"Remote POP $name was succesfully deleted!\");\n $params = array('account' => $account);\n $this->_helper->redirector('index', 'remote-Pop','', $params);\n }", "title": "" }, { "docid": "a2560ebf5e6954e572b0671f7cf38a4e", "score": "0.5572011", "text": "function del($dename) {\r\n global $folder;\r\n if (!$dename == \"\") {\r\n maintop(\"Delete\");\r\n echo \"<table border=\\\"0\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\">\\n\"\r\n .\"<font class=error>**WARNING: This will permanatly delete \".$folder.$dename.\". This action is irreversable.**</font><br><br>\\n\"\r\n .\"Are you sure you want to delete \".$folder.$dename.\"?<br><br>\\n\"\r\n .\"<a href=\\\"\".$adminfile.\"?op=delete&dename=\".$dename.\"&folder=$folder\\\">Yes</a> | \\n\"\r\n .\"<a href=\\\"\".$adminfile.\"?op=home\\\"> No </a>\\n\"\r\n .\"</table>\\n\";\r\n mainbottom();\r\n } else {\r\n home();\r\n }\r\n}", "title": "" }, { "docid": "6ef8976f2ca509be2cc6e40bf4e4c2a9", "score": "0.55626696", "text": "function remove(){\n JRequest::checkToken() or jexit( 'JInvalid_Token' );\t\n $model = $this->getModel('Publication', 'JResearchAdminModel');\n $n = $model->delete();\n $this->setRedirect('index.php?option=com_jresearch&controller=publications', \n JText::plural('JRESEARCH_N_ITEMS_SUCCESSFULLY_DELETED', $n));\n $errors = $model->getErrors();\n if(!empty($errors)){\n JError::raiseWarning(1, explode('<br />', $errors));\n } \n }", "title": "" }, { "docid": "1e1c6961f46e559ace287072c7864706", "score": "0.55512035", "text": "public function destroy()\n {\n \t$userThanks = UserThanks::findOrFail($id);\n \t$userThanks->delete();\n\n \t$usersThanks = UserThanks::all();\n \treturn view('app.user-thanks.list')->with('usersThanks', $usersThanks);\n }", "title": "" }, { "docid": "6e7f45ceb78aa048778756c1f7c80b31", "score": "0.55493903", "text": "public function renderConfirmClassDeletion() {\n\t\t$this->tabs->clearTargets();\n\t\t$this->tabs->setBackTarget($this->lng->txt(\"rep_robj_xrs_class_back\"), $this->ctrl->getLinkTarget($this, \"renderEditClassForm\"));\n\t\t$confirm_dialog = $this->createClassDeletionConfirmationDialog();\n\n\t\t$this->tpl->setContent($confirm_dialog->getHTML());\n\t}", "title": "" }, { "docid": "76a7dd22d318f4271287dd5aa0b39218", "score": "0.5543143", "text": "public function destroy(Request $request)\n {\n //\n $users = User::find($request->id)->delete();\n $mess = \"\";\n if ($users) {\n\n $mess = \"{{ __('success victory')}}\";\n }\n\n return redirect()->route('indexManage')->with('mess', $mess);\n }", "title": "" }, { "docid": "e3a461a113370273466c6637443ef8b4", "score": "0.5542227", "text": "public function confirmDeleteRecords() {\n\t\tglobal $ilCtrl, $lng, $tpl, $ilTabs;\n\t\t/** @var ilTabsGUI $ilTabs */\n\t\t$ilTabs->clearSubTabs();\n\t\t$conf = new ilConfirmationGUI();\n\t\t$conf->setFormAction($ilCtrl->getFormAction($this));\n\t\t$conf->setHeaderText($lng->txt('dcl_confirm_delete_records'));\n\t\t$record_ids = isset($_POST['record_ids']) ? $_POST['record_ids'] : array();\n\t\tforeach ($record_ids as $record_id) {\n\t\t\t/** @var ilDataCollectionRecord $record */\n\t\t\t$record = ilDataCollectionCache::getRecordCache($record_id);\n\t\t\tif ($record) {\n\t\t\t\t$conf->addItem('record_ids[]', $record->getId(), rtrim(implode(\", \", $record->getRecordFieldValues()), ', '));\n\t\t\t}\n\t\t}\n\t\t$conf->addHiddenItem('table_id', $this->table_id);\n\t\t$conf->setConfirm($lng->txt('dcl_delete_records'), 'deleteRecords');\n\t\t$conf->setCancel($lng->txt('cancel'), 'cancelDelete');\n\t\t$tpl->setContent($conf->getHTML());\n\t}", "title": "" }, { "docid": "65aa76ab85e85c060af5589f0dfed91b", "score": "0.55314916", "text": "function comment_remove_confirm($parameters){\r\n\t\t$identifier = $this->check_parameters($parameters,\"identifier\");\r\n\t\t$sql = \"delete from page_comments where comment_identifier=$identifier and comment_type = 0 and comment_client=$this->client_identifier\";\r\n\t\t$this->call_command(\"DB_QUERY\",array($sql));\r\n\t}", "title": "" }, { "docid": "6fabdd94d5eeb81ffafa11cac77a3aa3", "score": "0.5514325", "text": "public function confirmed()\n {\n\n $this->ablum->delete();\n $this->alert('success', 'Thanks! consider giving it a star on github.');\n }", "title": "" }, { "docid": "f0acecef8c92425a5de8568322fe8385", "score": "0.55062294", "text": "protected function confirm_add()\n\t{\n\t\t$msg =\n\t\t\t'<font color=\"green\">' .\n\t\t\t\t$this->fields['SchoolName'] . ' added to schools.' .\n\t\t\t'</font><br>'\n\t\t;\n\t\t\n\t\treturn $msg;\n\n\t}", "title": "" }, { "docid": "4f24faad4c3ffb0bf29d73996d66ebf6", "score": "0.54973453", "text": "public function showDestroy() {\n if (Auth::check()) {\n $data = array (\n 'title' => 'Delete Account');\n return View::make(\"users/destroy\")->with($data);\n } else {\n Session::flash(\"message\", \"You are not authorized to do this action.\");\n return Redirect::to(\"/users\");\n }\n }", "title": "" }, { "docid": "32b77efa9cbf265dfda4f84c62e50d1c", "score": "0.5470617", "text": "public static function add_perk_delete_confirmation_script() {\n ?>\n\n <script type=\"text/javascript\">\n (function($){\n\n var cancelButton = $('input[value=\"<?php _e( 'No, Return me to the plugin list' ); ?>\"]');\n var perksButton = $('<input value=\"<?php _e('No, Return to Manage Perks page', 'gravityperks'); ?>\" type=\"submit\" class=\"button\" />');\n perksButton.insertAfter(cancelButton);\n cancelButton.hide();\n\n })(jQuery);\n </script>\n\n <?php\n }", "title": "" }, { "docid": "6cf2b895370f4e0abd45b82466d7748f", "score": "0.54684055", "text": "public function remove(){\r\n $this->Brand_model->delete_by('name <> ');\r\n $this->Model_model->delete_by('name <> ');\r\n $this->Version_model->delete_by('name <> ');\r\n\r\n echo \"All the Fipe tables removed, Now click here to insert new base: <a href='\".base_url('fipe_insert').\"'> NEW BASE NOW </a>\";\r\n }", "title": "" }, { "docid": "967f76c46b5087664d7c88a016c3f35a", "score": "0.54564995", "text": "function show_delcontactgroupdialog_buttons( $name ) {\n # ------------------------------------------------------------------------\n # Outputs a html form fragment to add a New Host\n\n print '<form id=\"delcontactgroupform\" '.\n 'name=\"delcontactgroupform\" method=\"get\"';\n print ' action=\"/nagrestconf/'.SCRIPTNAME.'?tab=4&delcontactgroup=1';\n print '\">';\n print '<h2>About to <b>DELETE</b> contact group:</h2>';\n print '<h2 style=\"margin-left:60px;font-weight:bold;\">'.$name.'</h2>';\n print \"<h2>Click 'Delete Contact Group' to confirm \".\n \"or 'Close' to cancel.</h2>\";\n print '<p>';\n print '<input type=\"hidden\" name=\"name\" value=\"';\n print $name;\n print '\"/>';\n print '</p>';\n print '</form>';\n print '<div class=\"flash notice\" style=\"display:none\"></div>';\n print '<div class=\"flash error\" style=\"display:none\"></div>';\n print '<script>'.\n '$(\".ui-button:contains(Close)\").focus()'.\n '</script>';\n\n exit( 0 );\n }", "title": "" }, { "docid": "cbefcb3d602f0fae601cc85103e18e25", "score": "0.54359186", "text": "public function confirmDeleteWMOs()\n\t{\n\t\tglobal $ilCtrl, $tpl, $lng, $ilTabs;\n\n\t\t// check whether at least one item has been seleced\n\t\tif (!is_array($_POST[\"wmo_id\"]) || count($_POST[\"wmo_id\"]) == 0)\n\t\t{\n\t\t\tilUtil::sendFailure($lng->txt(\"no_checkbox\"), true);\n\t\t\t$ilCtrl->redirect($this, \"listWMOs\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ilTabs->setBackTarget($lng->txt(\"back\"),\n\t\t\t\t$ilCtrl->getLinkTarget($this, \"listWMOs\"));\n\n\t\t\t// display confirmation message\n\t\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\n\t\t\t$cgui = new ilConfirmationGUI();\n\t\t\t$cgui->setFormAction($ilCtrl->getFormAction($this));\n\t\t\t$cgui->setHeaderText($lng->txt(\"adn_sure_delete_wmos\"));\n\t\t\t$cgui->setCancel($lng->txt(\"cancel\"), \"listWMOs\");\n\t\t\t$cgui->setConfirm($lng->txt(\"delete\"), \"deleteWMOs\");\n\n\t\t\tinclude_once(\"./Services/ADN/MD/classes/class.adnWMO.php\");\n\n\t\t\t// list objects that should be deleted\n\t\t\tforeach ($_POST[\"wmo_id\"] as $i)\n\t\t\t{\n\t\t\t\t$cgui->addItem(\"wmo_id[]\", $i, adnWMO::lookupName($i));\n\t\t\t}\n\n\t\t\t$tpl->setContent($cgui->getHTML());\n\t\t}\n\t}", "title": "" }, { "docid": "d724a92f4ff3f7cb6a78535f276e0bbf", "score": "0.5423338", "text": "public function massDestroy()\n {\n if (Gate::allows('user_destroy')) {\n\n if (Input::has('selected_users')) {\n\n foreach (Input::get('selected_users') as $user) {\n $user = User::findOrFail($user);\n $user->delete();\n }\n\n }\n\n flash('All selected users successfully deleted!', 'success');\n return redirect()->route('admin.user.index');\n }\n return view('admin.errors.401');\n }", "title": "" }, { "docid": "2a3585a8e7e9964aac99367b29b14fac", "score": "0.54233074", "text": "public function delete_acces_courrier_debut()\n\t{\n\t\treturn '<a href=\"'.base_url().'index.php/courrier/supprimer_acces/';\n\t}", "title": "" }, { "docid": "a44f47cbdc6da86231946ae8838df617", "score": "0.54150856", "text": "public function delete()\n {\n self::view(\"$this->name.delete\", Request::fromParam());\n }", "title": "" }, { "docid": "ee52cfd1bfae6452f20e03c349f8b64d", "score": "0.54041916", "text": "function confirmRemoveHeadingObject()\n\t{\n\t\t$this->object->saveHeading(\"\", $_POST[\"removeheading\"]);\n\t\t$this->ctrl->redirect($this, \"questions\");\n\t}", "title": "" }, { "docid": "b6a66fa510739c5e79082aba13d3b5f3", "score": "0.54040045", "text": "public function deleted()\n {\n $songs = $this->song->deleted();\n\n $this->layout->content = View::make('songs.deleted', compact('songs'));\n }", "title": "" }, { "docid": "e92768d85dc45b304b293d8f5df10044", "score": "0.54034734", "text": "public function confirmDelete($id){\n \n //find the User name of the restaurant creator\n $created_by = $this->get_restaurant_creators_name($id);\n \n //if the user who is trying to delete the restaurant is not\n //the one who created it redirect back\n if(!$this->match_user_ids($id)){\n \\Session::flash('message', 'This Restaurant was created by ' . $created_by . \n '. You can only delete a Restaurant you have created.');\n return back();\n }\n\n //find the restaurant with the given id\n $restaurant = $this->restaurant->find($id); \n\n return view('/restaurants/delete', ['restaurant'=>$restaurant]);\n }", "title": "" }, { "docid": "c53659db8cb7ec8be0467ef943d3462c", "score": "0.5389848", "text": "public function confirmdelete()\n\t{\n\t\t$app = JFactory::getApplication();\n\n\t\t// find and store edited item id\n\t\t$cid = $app->input->getArray(\n\t\t\tarray('cid' => 'int')\n\t\t);\n\n\t\t// Set the view name and create the view object\n\t\t$viewName = 'confirm';\n\t\t$document = JFactory::getDocument();\n\t\t$viewType = $document->getType();\n\t\t$viewLayout = $app->input->getCmd('layout', $this->_defaultLayout);\n\n\t\t$view = $this->getView($viewName, $viewType, '', array('base_path' => $this->basePath));\n\n\t\t// push url id(s) into the view\n\t\t$view->cid = wbArrayGet($cid, 'cid', array());\n\n\t\t// tell it what to display\n\t\t$view->mainText = JText::sprintf('COM_SH404SEF_CONFIRM_PAGEID_DELETION', count($view->cid));\n\n\t\t// and who's gonna handle the request\n\t\t$view->actionController = $this->_defaultController;\n\n\t\t// and then what to do\n\t\t$view->task = 'confirmeddeletepageids';\n\n\t\t// Get/Create the model\n\t\tif ($model = $this->getModel($this->_defaultModel, 'Sh404sefModel'))\n\t\t{\n\t\t\t// store initial context in model\n\t\t\t$model->setContext($this->_context);\n\n\t\t\t// Push the model into the view (as default)\n\t\t\t$view->setModel($model, true);\n\t\t}\n\n\t\t// Set the layout\n\t\t$view->setLayout($viewLayout);\n\n\t\t// Display the view\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "d6139ce78ddd0d9ad202545afcacef98", "score": "0.53770125", "text": "function delBut($idinput) {\n return \"<a href='../functions/adminActionsProccessing.php?source=reservations&action=changeStatus&id=$idinput&newStatus=6&messageStatus=deleted' title='Delete Reservation'><span class='glyphicon glyphicon-remove' style='color:red;'></span></a>\";\n }", "title": "" }, { "docid": "ed3a1aeb4c2b178d8ae3462b975d3d1c", "score": "0.53760624", "text": "function confirmRemoveQuestionsObject()\n\t{\n\t\t$checked_questions = array();\n\t\t$checked_questionblocks = array();\n\t\t$checked_headings = array();\n\t\tforeach ($_POST as $key => $value) \n\t\t{\n\t\t\tif (preg_match(\"/id_(\\d+)/\", $key, $matches)) \n\t\t\t{\n\t\t\t\tarray_push($checked_questions, $matches[1]);\n\t\t\t}\n\t\t\tif (preg_match(\"/id_qb_(\\d+)/\", $key, $matches)) \n\t\t\t{\n\t\t\t\tarray_push($checked_questionblocks, $matches[1]);\n\t\t\t}\n\t\t\tif (preg_match(\"/id_tb_(\\d+)/\", $key, $matches))\n\t\t\t{\n\t\t\t\tarray_push($checked_headings, $matches[1]);\n\t\t\t}\n\t\t}\n\n\t\tif(sizeof($checked_questions) || sizeof($checked_questionblocks))\n\t\t{\n\t\t\t$this->object->removeQuestions($checked_questions, $checked_questionblocks);\n\t\t}\n\t\tif($checked_headings)\n\t\t{\n\t\t\tforeach($checked_headings as $q_id)\n\t\t\t{\n\t\t\t\t$this->object->saveHeading(\"\", $q_id);\n\t\t\t}\n\t\t}\n\t\t$this->object->saveCompletionStatus();\n\t\tilUtil::sendSuccess($this->lng->txt(\"questions_removed\"), true);\n\t\t$this->ctrl->redirect($this, \"questions\");\n\t}", "title": "" }, { "docid": "3c53bb7160862b97c9669f536b77c9d3", "score": "0.53756976", "text": "public function confirmDestroy($id)\n\t{\n\t\t$user = User::find( $id );\n\t\treturn View::make( 'useraccount.confirm-destroy', compact( 'user' ) );\n\t}", "title": "" }, { "docid": "6be1b5add58817a68a4bc8aaaa07c337", "score": "0.5356799", "text": "public function destroy(DeleteRequest $request, User $users)\n {\n if (Auth::user()->user_type == 'admin') {\n $courses = Courses::where('user_id', $users->id)\n ->delete();\n $lessons = Lessons::where('user_id', $users->id)\n ->delete();\n \n $users->delete();\n\n $delete = 'User';\n $name = $users->first_name;\n $messageInput = $request->description;\n Mail::to($users)->send(new Deleted($name, $delete, $messageInput));\n \n return redirect()->back()->with('message', 'Success! User '.$users->first_name . ' ' . $users->last_name . ' has been deleted!');\n }\n else\n {\n return redirect('/courses');\n }\n }", "title": "" }, { "docid": "363f821ab9347e1b6c5ff25723db2054", "score": "0.535344", "text": "public function all_submission_deletion_feedback() {\n global $OUTPUT;\n\n if ($this->confirm == SURVEYPRO_UNCONFIRMED) {\n // Ask for confirmation.\n $message = get_string('confirm_deleteallresponses', 'mod_surveypro');\n $optionbase = ['id' => $this->cm->id, 'act' => SURVEYPRO_DELETEALLRESPONSES];\n\n $optionsyes = $optionbase;\n $optionsyes['cnf'] = SURVEYPRO_CONFIRMED_YES;\n $urlyes = new \\moodle_url('/mod/surveypro/view_submissions.php', $optionsyes);\n $buttonyes = new \\single_button($urlyes, get_string('continue'));\n\n $optionsno = $optionbase;\n $optionsno['cnf'] = SURVEYPRO_CONFIRMED_NO;\n $urlno = new \\moodle_url('/mod/surveypro/view_submissions.php', $optionsno);\n $buttonno = new \\single_button($urlno, get_string('no'));\n echo $OUTPUT->confirm($message, $buttonyes, $buttonno);\n echo $OUTPUT->footer();\n die();\n }\n\n if ($this->confirm == SURVEYPRO_ACTION_EXECUTED) {\n $message = get_string('feedback_deleteallresponses', 'mod_surveypro');\n echo $OUTPUT->notification($message, 'notifymessage');\n }\n\n if ($this->confirm == SURVEYPRO_CONFIRMED_NO) {\n $message = get_string('usercanceled', 'mod_surveypro');\n echo $OUTPUT->notification($message, 'notifymessage');\n }\n }", "title": "" }, { "docid": "905b0b609a5e8c220fbee5e9e804ee96", "score": "0.53470224", "text": "function ui_bulk_delete_message( $n ) {\n\t\treturn sprintf(\n\t\t\t_n(\n\t\t\t\t'%d blogroll link deleted.',\n\t\t\t\t'%d blogroll links deleted.',\n\t\t\t\t$n,\n\t\t\t\t'broken-link-checker'\n\t\t\t),\n\t\t\t$n\n\t\t);\n\t}", "title": "" }, { "docid": "2b74e4193ef2d640a6c34f1a3157a624", "score": "0.5343281", "text": "protected function deleteConfirmationMessage($label, $linkDelete, $linkBack) {\n\t\tnew Message(\"L&ouml;schen?\", \"Wollen sie diesen Eintrag wirklich l&ouml;schen?\");\n\t\t$yes = new Link($linkDelete, strtoupper($label) . \" L&Ouml;SCHEN\");\n\t\t$yes->addIcon(\"remove\");\n\t\t$yes->write();\n\t\t$this->buttonSpace();\n\t\t\n\t\t$no = new Link($linkBack, \"Zur&uuml;ck\");\n\t\t$no->addIcon(\"arrow_left\");\n\t\t$no->write();\n\t}", "title": "" }, { "docid": "ef3d896eb0e86bce8d188f37155ec755", "score": "0.5342427", "text": "public function actionDelete(){\n \tif(!$this->isAuthor($_POST['e_name'])&&!$this->isAdmin()){\n\t\t\tthrow new CHttpException(403,'你沒有權限載入這個頁面');\n\t\t\treturn;\n\t\t}\n \t$criteria=new CDbCriteria;\n\t\t$criteria->select='*'; \n\t\t$criteria->condition='e_name=:n';\n\t\t$criteria->params=array(':n'=> $_POST['e_name']);\n\t\tif(MajorClubForm::model()->exists($criteria)){\n\t \t$picArr=scandir($this->upload_location.$_POST['e_name']);\n\t \t$path=$this->upload_location.$_POST['e_name'].\"/\".$_POST['picname'];\n\t \tif(in_array($_POST['picname'],$picArr)){\n\t \t\tunlink($path);\n\t \t\t$this->redirect('view/'.$_POST['e_name'].'.html');\n\t \t}else{\n\t \t\t$data=array(\n\t \t\t\t'error' => '刪除錯誤 5秒後回到上一頁',\n\t \t\t\t'returnUri'=>$this->createUrl('majorClub/view',array('select'=>$_POST['e_name']))\n\t \t\t);\n\t \t\t$this->render('error',$data);\n\t \t}\n \t}\n\n\n \t$data=array(\n\t \t\t\t'error' => '權限錯誤 5秒後回到上一頁',\n\t \t\t\t'returnUri'=>$this->createUrl('majorClub/index')\n\t \t\t);\n\t $this->render('error',$data);\n }", "title": "" }, { "docid": "4db23947ba7e73d4e814608114264760", "score": "0.53399223", "text": "public function massDestroy(Request $request)\n {\n if (! Gate::allows('credit_note_delete')) {\n return prepareBlockUserMessage();\n }\n\n if ( isDemo() ) {\n return prepareBlockUserMessage( 'info', 'crud_disabled' );\n }\n\n if ($request->input('ids')) {\n $entries = CreditNote::whereIn('id', $request->input('ids'))->get();\n\n foreach ($entries as $entry) {\n $entry->delete();\n }\n\n flashMessage( 'success', 'deletes' );\n }\n }", "title": "" }, { "docid": "438f20094193ce7d7eb62594c2263f05", "score": "0.53295636", "text": "public function deleted()\n {\n return view('users.index');\n }", "title": "" }, { "docid": "cc16d9043183816663f3514be62e16d0", "score": "0.5322975", "text": "function add_js_list_page_form_delete_confirm($form, &$form_state, $codes) {\n $form['codes']['#tree'] = TRUE;\n foreach ($codes as $cid) {\n $form['codes'][$cid] = array(\n '#type' => 'hidden',\n '#value' => $cid,\n );\n }\n $form['#submit'][] = 'add_js_list_page_form_delete_confirm_submit';\n $confirm_question = format_plural(count($codes), 'Are you sure you want to delete this item?', 'Are you sure you want to delete these items?');\n return confirm_form($form, $confirm_question, 'admin/config/content/add-js/list', t('This action cannot be undone.'), t('Delete'), t('Cancel'));\n}", "title": "" }, { "docid": "32e6618b5daf27e7e23ef3993eb87615", "score": "0.531597", "text": "public static function ViewDeletion ()\n {\n try {\n # Show index view\n return view('desk.profile.delete');\n \n } catch ( Exception $e ) {\n Log::error($e->getMessage());\n\n abort(404);\n }\n }", "title": "" }, { "docid": "df2a09cb5877788b12bfcb7ed49a75e9", "score": "0.5313322", "text": "public function destroy()\n {\n return view('administrator::administrator.destroy');\n }", "title": "" }, { "docid": "c0569b2ae9a6b22085d1dfb8336f2774", "score": "0.5313192", "text": "function deleteCharacteristicConfirmationObject()\n\t{\n\t\tglobal $ilCtrl, $tpl, $lng;\n\t\t\n//var_dump($_POST);\n\n\t\tif (!is_array($_POST[\"char\"]) || count($_POST[\"char\"]) == 0)\n\t\t{\n\t\t\tilUtil::sendInfo($lng->txt(\"no_checkbox\"), true);\n\t\t\t$ilCtrl->redirect($this, \"edit\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// check whether there are any core style classes included\n\t\t\t$core_styles = ilObjStyleSheet::_getCoreStyles();\n\t\t\tforeach ($_POST[\"char\"] as $char)\n\t\t\t{\n\t\t\t\tif (!empty($core_styles[$char]))\n\t\t\t\t{\n\t\t\t\t\t$this->deleteCoreCharMessage();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\n\t\t\t$cgui = new ilConfirmationGUI();\n\t\t\t$cgui->setFormAction($ilCtrl->getFormAction($this));\n\t\t\t$cgui->setHeaderText($lng->txt(\"sty_confirm_char_deletion\"));\n\t\t\t$cgui->setCancel($lng->txt(\"cancel\"), \"cancelCharacteristicDeletion\");\n\t\t\t$cgui->setConfirm($lng->txt(\"delete\"), \"deleteCharacteristic\");\n\t\t\t\n\t\t\tforeach ($_POST[\"char\"] as $char)\n\t\t\t{\n\t\t\t\t$char_comp = explode(\".\", $char);\n\t\t\t\t$cgui->addItem(\"char[]\", $char, $char_comp[2]);\n\t\t\t}\n\t\t\t\n\t\t\t$tpl->setContent($cgui->getHTML());\n\t\t}\n\t}", "title": "" }, { "docid": "e7734e86ff9c6f3f655ed80d017a8d0e", "score": "0.5307519", "text": "public function deletedialogAction()\n {\n $this->disableLayout();\n $userId = $this->getParam('userId');\n\n if (!$this->logged) {\n throw new Zend_Exception('Must be logged in');\n }\n if (!isset($userId)) {\n throw new Zend_Exception('Must set a userId parameter');\n }\n $user = $this->User->load($userId);\n if (!$user) {\n throw new Zend_Exception('Invalid user id');\n }\n if ($this->userSession->Dao->getKey() != $user->getKey()) {\n $this->requireAdminPrivileges();\n $this->view->deleteSelf = false;\n } else {\n $this->view->deleteSelf = true;\n }\n $this->view->user = $user;\n }", "title": "" }, { "docid": "7847cc83ae8fbd9ac5069913d341f195", "score": "0.53009886", "text": "function deleteTemplateConfirmationObject()\n\t{\n\t\tglobal $ilCtrl, $tpl, $lng;\n\t\t\n\t\tif (!is_array($_POST[\"tid\"]) || count($_POST[\"tid\"]) == 0)\n\t\t{\n\t\t\tilUtil::sendInfo($lng->txt(\"no_checkbox\"), true);\n\t\t\t$ilCtrl->redirect($this, \"listTemplates\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\n\t\t\t$cgui = new ilConfirmationGUI();\n\t\t\t$cgui->setFormAction($ilCtrl->getFormAction($this));\n\t\t\t$cgui->setHeaderText($lng->txt(\"sty_confirm_template_deletion\"));\n\t\t\t$cgui->setCancel($lng->txt(\"cancel\"), \"cancelTemplateDeletion\");\n\t\t\t$cgui->setConfirm($lng->txt(\"sty_del_template\"), \"deleteTemplate\");\n\t\t\t\n\t\t\tforeach ($_POST[\"tid\"] as $tid)\n\t\t\t{\n\t\t\t\t$classes = $this->object->getTemplateClasses($tid);\n\t\t\t\t$cl_str = \"\";\n\t\t\t\t$listed = array();\n\t\t\t\tforeach ($classes as $cl)\n\t\t\t\t{\n\t\t\t\t\tif ($cl != \"\" && !$listed[$cl])\n\t\t\t\t\t{\n\t\t\t\t\t\t$cl_str.= '<div>- '.\n\t\t\t\t\t\t\t$cl.\"</div>\";\n\t\t\t\t\t\t$listed[$cl] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($cl_str != \"\")\n\t\t\t\t{\n\t\t\t\t\t$cl_str = '<div style=\"padding-left:30px;\" class=\"small\">'.\n\t\t\t\t\t\t\"<div><i>\".$lng->txt(\"sty_style_class\").\"</i></div>\".$cl_str.\"</div>\";\n\t\t\t\t}\n\t\t\t\t$cgui->addItem(\"tid[]\", $tid, $this->object->lookupTemplateName($tid).$cl_str);\n\t\t\t}\n\t\t\t\n\t\t\t$cgui->addButton($lng->txt(\"sty_del_template_keep_classes\"), \"deleteTemplateKeepClasses\");\n\t\t\t\n\t\t\t$tpl->setContent($cgui->getHTML());\n\t\t}\n\t}", "title": "" }, { "docid": "90734dfe78b3ce31ef3e897472329cb3", "score": "0.52883697", "text": "public function actionConfirm()\n\t{\n\t\t$this->render('confirm');\n\t}", "title": "" }, { "docid": "a0901cb2a9473e543d795a08669bd2b3", "score": "0.52850825", "text": "public function adminRemove()\r\n\t{\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "c1c46d5e9a378f8979679572895e82a3", "score": "0.5282941", "text": "function deleteStudent($usernames) {\n $conn = $GLOBALS['conn'];\n for ($i = 0; $i < sizeof($usernames); $i++) {\n $username = $usernames[$i];\n $sql = sprintf(\"DELETE FROM Students WHERE userName = '%s'\", $username);\n try{\n $result = $conn->query($sql);\n } catch (PDOException $e) {\n echo $e->getMessage();\n die();\n }\n }\n }", "title": "" }, { "docid": "f926a7cfa150ab3969653c93694b6a26", "score": "0.5282718", "text": "function deletar() {\n $this->output->unset_template();\n $array_itens = explode(\",\", $this->input->post('ids_delete'));\n foreach ($array_itens as $index => $id) {\n if (is_numeric($id) && $id >= 1) {\n $this->mensagens_model->deletar($id);\n }\n }\n $error = \"Selected countries (id's: \" . $this->input->post('ids_delete') . \") deleted with success\";\n $this->output->set_header($this->config->item('ajax_header'));\n $this->output->set_output($error);\n }", "title": "" }, { "docid": "234483b496a891bde60bdfe56452b6dd", "score": "0.52807", "text": "function deletedata()\n\t{\n\t\t$data[\"adata\"] = $this->tabel->readinput();\n\t\t$data[\"hslquery\"] = $this->tabel->deleterec($data[\"adata\"]);\n\n\t\t$data[\"title\"] = \"Delete Data\";\n\t\t$data[\"message\"] = ($data[\"hslquery\"])?\"Berhasil didelete!\":\"Gagal didelete!\";\n\n\t\t$this->load->view(\"activerecord/crud_message\", $data);\n\t}", "title": "" }, { "docid": "1bad75e60daeb6df538af9d932d8371e", "score": "0.5279057", "text": "public function destroy(Request $request)\n {\n $user_id = Auth::id();\n\n if ($request->has('user_id')) {\n $usuario = User::findOrFail($user_id);\n\n $usuario->delete();\n\n return redirect('/');\n }\n\n return view('confirm_delete', compact('user_id'));\n }", "title": "" }, { "docid": "15c97f31932bf13acc1f258aebf85cd5", "score": "0.52788806", "text": "public function deletePrivileges() { \r\n $this->model->processPrivilegesDelete($_POST['deleteme']);\r\n echo 1;\r\n }", "title": "" }, { "docid": "d7422011a981befd4b8f8b7781d3189b", "score": "0.52769715", "text": "function allow_remove()\n {\n $reason = \"\";\n return $reason;\n }", "title": "" }, { "docid": "bc8ea0c3e7095b4e53d844936fa232a3", "score": "0.52768564", "text": "public function deleteAction()\n {\n try {\n // Get posted customers\n $emotions = $this->Request()->getParam('emotions', [['id' => $this->Request()->getParam('id')]]);\n\n // Iterate the customers and add the remove action\n foreach ($emotions as $emotion) {\n if (empty($emotion['id'])) {\n continue;\n }\n /** @var Emotion $entity */\n $entity = $this->getRepository()->find($emotion['id']);\n\n /** @var \\Shopware\\Models\\Emotion\\Element $element */\n foreach ($entity->getElements() as $element) {\n $this->getTranslation()->delete(null, 'emotionElement', $element->getId());\n }\n\n // Delete created previews\n $this->removePreview($entity->getId());\n\n Shopware()->Models()->remove($entity);\n }\n\n // Delete corresponding translations\n $this->deleteTranslations($emotions);\n\n Shopware()->Models()->flush();\n\n $this->View()->assign([\n 'data' => $this->Request()->getParams(),\n 'success' => true,\n ]);\n } catch (\\Doctrine\\ORM\\ORMException $e) {\n $this->View()->assign([\n 'data' => $this->Request()->getParams(),\n 'success' => false,\n 'message' => $e->getMessage(),\n ]);\n }\n }", "title": "" }, { "docid": "07d06993bcc52682980f82d24b7380a0", "score": "0.5274433", "text": "static public function ctrEliminarEquipo(){\n\n\t\tif(isset($_GET[\"idEquipo\"])){\n\n\t\t\t$tabla =\"equipos\";\n\t\t\t$datos = $_GET[\"idEquipo\"];\n\n\t\t\t$respuesta = ModeloEquipos::mdlEliminarEquipo($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El equipo ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"equipos\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "354347682843fa4274ad572b66715d75", "score": "0.52682024", "text": "static public function ctrEliminarGrupo(){\n\n\t\tif (isset($_GET[\"idGrupoEliminar\"])) {\n\t\t\n\t\t\t$tabla = \"grupos\";\n\n\t\t\t$datos = array('id' => $_GET[\"idGrupoEliminar\"]);\n\n\t\t\t$respuesta = ModeloGrupos::mdlEliminarGrupo($tabla, $datos);\n\n\t\t\tif ($respuesta == \"ok\") {\n\t\t\t\techo ' \n\t\t\t\t\t<script> \n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"!Correcto!\",\n\t\t\t\t\t\t\ttext: \"Grupo Eliminado con Exito\",\t\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseConfirmButton: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\twindow.location = \"grupos\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t</script>\n\t\t\t\t';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d2384ece6664db5da66300b19dc9ead7", "score": "0.52554816", "text": "function pickem_team_delete_confirm(&$form_state, $gameset, $team) {\n $form['#team'] = $team;\n $caption = '';\n $caption .= '<p>'. t('This action cannot be undone.') .'</p>';\n return confirm_form($form, t('Are you sure you want to delete the team %name from %gameset?', array('%name' => $team->tm_city .' '. $team->tm_name, '%gameset' => $gameset->gs_name)), 'admin/pickem/teams', $caption, t('Delete'));\n}", "title": "" }, { "docid": "1cdefb9c5bccd493875326ff133ce179", "score": "0.52530116", "text": "function delete() {\n\n $output = <<<_END\n <form action=\"{$this->path(\"destroy\")}\" method=\"post\">\n <input type=\"submit\" name=\"submit\" value=\"Delete\"/>\n </form>\n_END;\n\n $this->view->render(\"Delete Form\",$output);\n }", "title": "" }, { "docid": "5c77319ad6fa33d77a21f948f927b37e", "score": "0.5251974", "text": "public function deletesubscriptioinAction(){\r\n \r\n \t\t $this->loadLayout();\r\n \t\t $this->renderLayout();\t\r\n \t\r\n }", "title": "" }, { "docid": "101150959d05e796cf95e9f0e12570b1", "score": "0.525104", "text": "public function remove(string $name);", "title": "" }, { "docid": "e85d5bb0bff078ad6b4ab9ba4575e878", "score": "0.5248555", "text": "function deletedbyUser()\n\t {\n\t // This shows the module name user is accessing, as a tiltle in the browser. \n\t\t$data['title'] = \"Software Usage\";\n\t\t// This shows the module name you are accessing, as a header(tab name) in the browser. \n $data['header'] = \"Software Usage\";\n\t\t$user = $this->uri->segment(4);\n\t\t$from = $this->uri->segment(5);\n\t\t$to = $this->uri->segment(6);\n\t\t$data['results'] = $this->MUsage->getDeletedByUser($from,$to,$user);\n\t\t $data['page'] = $this->config->item('backendpro_template_admin') . \"admin_candidate_list\";\n\t $data['module'] = 'usage';\n\t $this->load->view($this->_container,$data);\n\t\t }", "title": "" }, { "docid": "037f64b6de7cf2c2f69415560e65277b", "score": "0.52425694", "text": "function DeleteFiles($projekti_nimi) {\n global $data_folder;\n global $thumb;\n global $img_extensions;\n global $cover_image;\n $data = '';\n $projekt_files = glob($data_folder.$projekti_nimi.'/*.*');\n \n foreach ($projekt_files as $f) {\n $file = pathinfo($f);\n // Kui on pilt\n if(in_array($file['extension'], $img_extensions))\n {\n // Kaanepilt\n if($file['basename'] == $cover_image){ $th = $f;}\n // Tavaline pilt\n else{ $th = $data_folder.$projekti_nimi.$thumb.'/th_'.$file['basename'];}\n $data .= '<tr>\n <th><img src=\"'.$th.'\" width=\"50px\"></th>\n <th class=\"th_middle\">'.$file['basename'].'</th>\n <th class=\"th_middle\"> \n <a href=\"#\" class=\"delButton\" name=\"'.$f.'\" title=\"Kustuta\" onclick=\"confirm(\\'xxx\\');\">\n <img src=\"app/images/Remove.png\" alt=\"Kustuta\">\n </a>\n </th>\n </tr>';\n }else{\n $data .= '<tr>\n <th>\n <img src=\"app/images/apple-touch-icon.png\" width=\"50px\">\n </th>\n <th class=\"th_middle\">'.$file['basename'].'</th>\n <th class=\"th_middle\">\n <a href=\"#\" class=\"delButton\" name=\"'.$f.'\" title=\"Kustuta\" >\n <img src=\"app/images/Remove.png\">\n </a>\n </th>\n </tr>';\n }\n } \n return $data;\n}", "title": "" }, { "docid": "842e9b500bca7822fb975054552ba6c6", "score": "0.523958", "text": "public function removeTemplate()\n\t{\n\t\t$template_ids = ee()->input->post('templates');\n\n\t\tif ( ! empty($template_ids) && ee()->input->post('bulk_action') == 'remove')\n\t\t{\n\t\t\t$template_ids = array_filter($template_ids, 'is_numeric');\n\n\t\t\tif ( ! empty($template_ids))\n\t\t\t{\n\t\t\t\tee('Model')->get('simple_commerce:EmailTemplate', $template_ids)->delete();\n\n\t\t\t\tee('CP/Alert')->makeInline('email-templates-table')\n\t\t\t\t\t->asSuccess()\n\t\t\t\t\t->withTitle(lang('email_templates_removed'))\n\t\t\t\t\t->addToBody(sprintf(lang('email_templates_removed_desc'), count($template_ids)))\n\t\t\t\t\t->defer();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'), 403);\n\t\t}\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_commerce/email-templates', ee()->cp->get_url_state()));\n\t}", "title": "" }, { "docid": "16e0bc876a7e2ca78c877fb85ed180bd", "score": "0.52346087", "text": "public function confirmationAction()\n {\n if($this->getParameter('fbeen_user.register.admin_approval')) {\n return $this->render('@FbeenUser/Register/confirmation.html.twig', [\n 'title' => 'confirmation.with_approval.title',\n 'header' => 'confirmation.with_approval.header',\n 'message' => 'confirmation.with_approval.message',\n ]);\n }\n \n return $this->render('@FbeenUser/Register/confirmation.html.twig', [\n 'title' => 'confirmation.without_approval.title',\n 'header' => 'confirmation.without_approval.header',\n 'message' => 'confirmation.without_approval.message',\n ]);\n }", "title": "" }, { "docid": "2fa5c8997a0fb0151eeb2805ffa5e332", "score": "0.5233578", "text": "public function confirmingDeletion()\n {\n $this->confirmingExpenseDeletion = true;\n }", "title": "" }, { "docid": "6db4d7904f9729a0c3001812a365e43f", "score": "0.52311057", "text": "function editDeleteForm(){\n\techo '\n\t\t<div class=\"titleEdit\" style=\"margin-top: 50px;\">Supprimer un étudiant</div>\n\t\t <div>\n <form class=\"formEdit\" action=\"edition_manager.php\" method=\"post\">\n <div class=\"fieldEdit\">\n <label for=\"targetname1\" class=\"labelEdit\">Nom :</label>\n <div>\n <input type=\"text\" id=\"targetname1\" class=\"inputEdit\" name=\"targetname\" placeholder=\"Nom de famille de l\\'utilisateur\" required><!-- NAME -->\n </div>\n </div>\n\n <div class=\"fieldEdit\">\n <label for=\"targetemail1\" class=\"labelEdit\">E-mail :</label>\n <div>\n <input type=\"email\" id=\"targetemail1\" class=\"inputEdit\" name=\"targetemail\" placeholder=\"Adresse email de l\\'utilisateur\" required> <!-- MAIL -->\n </div>\n </div>\n\n <div class=\"fieldEdit\">\n <label for=\"targetsurname\" class=\"labelEdit\">Réecrire :</label>\n <div>\n <input type=\"text\" id=\"conf1\" class=\"inputEdit\" name=\"conf\" placeholder=\"SUPPRIMER\" required><!-- confirmation -->\n </div>\n </div>\n \n <div class=\"butonDivEdit\">\n <button class=\"butonEdit\" type=\"submit\" name=\"validDeletion\">\n Supprimer\n </button>\n </div>\n </form></div>';\n}", "title": "" }, { "docid": "63635fede60d7d105a19bda120662f31", "score": "0.5216484", "text": "function show_users_for_cleanup(){\n\tglobal $conn;\n\t\n\t$query_user = \"SELECT * FROM users WHERE activated='0'\";\n\t$results_user = mysql_query($query_user,$conn);\n\tif (mysql_num_rows($results_user)==0){\n\t\techo \"There are inactive users to remove.\";\n\t}else{\n\t\techo \"<table cellpadding='5' cellspacing='5' class='centered'>\" ;\n\t\techo \"<tr> <th>Last Name</th> <th>First Name</th> <th>ΑΕΜ</th> <th>e-mail</th></tr>\";\n\t\twhile ($rows_user = mysql_fetch_array($results_user)){\n\t\t\techo \"<tr> <td>\".$rows_user['last_name'].\"</td> <td>\".$rows_user['first_name'].\"</td> <td>\".$rows_user['aem'].\"</td> <td>\".$rows_user['email'].\"</td></tr>\";\t\n\t\t}\n\t\techo \"</table><br/>\";\n\t}\n}", "title": "" }, { "docid": "2bd6414d9009045eb397eb043982e23b", "score": "0.52016675", "text": "public function destroy(Request $request)\n {\n Donation::destroy($request->items);\n\n return [\n 'message' => count($request->items) > 1\n ? 'Donations Deleted Successfully!'\n : 'Donation Deleted Successfully!'\n ];\n }", "title": "" }, { "docid": "f7ce6c8469ed1eae60b89b9bcc0c0fec", "score": "0.5200527", "text": "function delete_success($success, $msg) {\n\tif ($success == true) {\n\t\techo \"<script type='text/javascript'> alert ('Record Deleted');</script>\";\n\t} else {\n\t\techo \"<script type = 'text/javascript'> alert ('Unable to delete : \".$msg.\"');</script>\";\n\t}\n}", "title": "" }, { "docid": "76390dfe00f36ba9a1dfd210112fc970", "score": "0.5196543", "text": "public function actionConfirmDelete($id)\n {\n $model = $this->findModel($id);\n\n return $this->render('confirm-delete', [\"model\" => $model]);\n }", "title": "" }, { "docid": "06c2deea93cdddcaab2b2cbd367ee39f", "score": "0.5195472", "text": "public function massDestroy(Request $request)\n {\n if (! Gate::allows('name_delete')) {\n return abort(401);\n }\n if ($request->input('ids')) {\n $entries = Name::whereIn('id', $request->input('ids'))->get();\n\n foreach ($entries as $entry) {\n $entry->delete();\n }\n }\n }", "title": "" }, { "docid": "3fc12aefbd187106ef088bced6435e3e", "score": "0.5184791", "text": "public function deletedAction()\n {\n $threads = $this->getProvider()->getDeletedThreads();\n\n return $this->container->get('templating')->renderResponse('MessageBundle:Message:deleted.html.twig', array(\n 'threads' => $threads,\n ));\n }", "title": "" }, { "docid": "5640320fa6a24d47e7ce0557a6c9cfde", "score": "0.5181251", "text": "public function supprimerMessageAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n $messages=$request->get('chksup');\n foreach ($messages as $value) {\n $repositoryMP = $em->getRepository('SLPlateformBundle:Messages_personne');\n $leMsg=$repositoryMP->find($value);\n $em->remove($leMsg);\n }\n $em->flush();\n return $this->redirect($this->generateUrl('sl_dashbord_message'));\n }", "title": "" }, { "docid": "1ca5900ef797329499305cea78a2d61d", "score": "0.5177208", "text": "public function templates_delete()\n\t{\t\t\n\t // Get Posted Suggestions\n\t $templates = $this->EE->input->post('templates');\n\t\t\n\t\tif( $this->EE->input->post('confirm_delete') )\n\t\t{\n\t\t \n\t\t // Delete Suggestions\n\t\t foreach ( $templates as $template )\n\t\t {\n\t\t $this->EE->db->delete( 'invitee_templates', array(\n\t\t 'template_id' => $template,\n\t\t 'site_id' => $this->EE->config->item('site_id')\n\t\t ));\n\t\t }\n\t\t \n // Set Success Message and Redirect to List Page\n $this->EE->session->set_flashdata( 'message_success', lang( 'invitee_template' . ( count($templates) > 1 ? 's' : '' ) . '_deleted' ) );\n $this->EE->functions->redirect( INVITEE_BASE_URL . AMP . 'method=templates');\n\t\t}\n\t\t\n\t // Define View Data\n\t foreach ( $templates as $id )\n\t {\n \t $query = $this->EE->db->select( 'template_title' )->get_where( 'invitee_templates', array(\n \t 'template_id' => $id,\n \t 'site_id' => $this->EE->config->item('site_id')\n \t ));\n \t if( $query->num_rows() > 0 )\n \t {\n\t $this->_data['templates'][$id] = $query->row('template_title'); \n \t }\n\t }\n\t $this->_data['form_action'] = 'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module=' . INVITEE_NAME . AMP . 'method=templates_delete';\n\t \n\t // Load Page View\n return $this->EE->load->view( $this->_page . '/' . $this->_action, $this->_data, TRUE );\n\t}", "title": "" }, { "docid": "9b0e71cc69c27036455a5966568b1c7d", "score": "0.5176693", "text": "public function destroy(Request $request){\n\n\n $nombre = $request->nombre;\n $idContract = $request->id;\n\n\n $nombre = Contract::find($idContract)->delete();\n\n \n\n\n return redirect('adminTablas')->with([\"mensaje\"=>\"Contrato $nombre eliminado correctamente\"]);\n \n\n }", "title": "" }, { "docid": "57135056e36d0516c821f9a9dd8da244", "score": "0.51736164", "text": "public function showConfirmToRemoveQuiz(Quiz $quiz) {\n\t\treturn $html = \"\n\n\t\t</br>\n\t\t<a href='?\" . $this->showQuizLocation . \"&\" . $this->id . \"=\" . $quiz->getQuizId() . \"' name='returnToPage'>Tillbaka</a>\n\t\t</br>\n\t\t</br>\n\t\t<legend>Radera \" . $quiz->getName() . \"</legend>\n\n\t\t<form action='' method='post'>\n\t\t<input type='submit' class='btn btn-default' name='\" . $this->confirmRemoveQuizLocation . \"' value='Ta bort'>\n\t\t</form>\";\n\t}", "title": "" }, { "docid": "7f83502b2c576daaec9fc1a82cdd5fd8", "score": "0.5170539", "text": "function gameservers_admin_delete_form_submit($form, &$form_state) {\n gameservers_server_delete($form['#server']->id);\n drupal_set_message(t('The game server !name has been removed.', array('!name' => $form['#server']->name)));\n}", "title": "" }, { "docid": "e1b23bc584dfa4274b3f779f87b1bfc4", "score": "0.51685685", "text": "public function delete($remove){\n if($remove){\n $removeId = explode(\",\", $remove);\n Supplier::whereIn('id', $removeId)->delete();\n }\n return back()->with('success','Dữ liệu đã được update');\n\n }", "title": "" }, { "docid": "62051af3d09f0dee7c8f6c18c8f29a51", "score": "0.51662683", "text": "public function one_submission_deletion_feedback() {\n global $USER, $DB, $OUTPUT;\n\n if ($this->confirm == SURVEYPRO_UNCONFIRMED) {\n // Ask for confirmation.\n $submission = $DB->get_record('surveypro_submission', ['id' => $this->submissionid]);\n\n $a = new \\stdClass();\n $a->timecreated = userdate($submission->timecreated);\n $a->timemodified = userdate($submission->timemodified);\n if ($submission->userid != $USER->id) {\n $userfieldsapi = \\core_user\\fields::for_userpic();\n $namefields = $userfieldsapi->get_sql('', false, '', 'id', false)->selects;\n $user = $DB->get_record('user', ['id' => $submission->userid], $namefields);\n $a->fullname = fullname($user);\n if ($submission->timemodified == 0) {\n $message = get_string('confirm_deleteotherresponse_original', 'mod_surveypro', $a);\n } else {\n $message = get_string('confirm_deleteotherresponse_modified', 'mod_surveypro', $a);\n }\n } else {\n if ($submission->timemodified == 0) {\n $message = get_string('confirm_deletemyresponse_original', 'mod_surveypro', $a);\n } else {\n $message = get_string('confirm_deletemyresponse_modified', 'mod_surveypro', $a);\n }\n }\n\n $optionbase = ['id' => $this->cm->id, 'act' => SURVEYPRO_DELETERESPONSE];\n\n $optionsyes = $optionbase;\n $optionsyes['cnf'] = SURVEYPRO_CONFIRMED_YES;\n $optionsyes['submissionid'] = $this->submissionid;\n $urlyes = new \\moodle_url('/mod/surveypro/view_submissions.php', $optionsyes);\n $buttonyes = new \\single_button($urlyes, get_string('continue'));\n\n $optionsno = $optionbase;\n $optionsno['cnf'] = SURVEYPRO_CONFIRMED_NO;\n $urlno = new \\moodle_url('/mod/surveypro/view_submissions.php', $optionsno);\n $buttonno = new \\single_button($urlno, get_string('no'));\n\n echo $OUTPUT->confirm($message, $buttonyes, $buttonno);\n echo $OUTPUT->footer();\n die();\n }\n\n if ($this->confirm == SURVEYPRO_ACTION_EXECUTED) {\n $message = get_string('feedback_delete1response', 'mod_surveypro');\n echo $OUTPUT->notification($message, 'notifysuccess');\n }\n\n if ($this->confirm == SURVEYPRO_CONFIRMED_NO) {\n $message = get_string('usercanceled', 'mod_surveypro');\n echo $OUTPUT->notification($message, 'notifymessage');\n }\n }", "title": "" }, { "docid": "f0ad7b3b676f925e3a0cf73fd54182dd", "score": "0.51628876", "text": "function pickem_game_delete_confirm(&$form_state, $week, $game) {\n $form['#game'] = $game;\n $caption = '';\n $caption .= '<p>'. t('This action cannot be undone.') .'</p>';\n\n //return confirm_form($form, t('Are you sure you want to delete the team %name?', array('%name' => $league->name)), 'admin/pickem/leagues', $caption, t('Delete'));\n\n return confirm_form($form, t('Are you sure you want to delete this game?'), 'admin/pickem/games/'. $week->wid, $caption, t('Delete'));\n}", "title": "" }, { "docid": "cddf92eef815a6fa287ececb86eb87df", "score": "0.51624113", "text": "function deleteCoreCharMessage()\n\t{\n\t\tglobal $ilCtrl, $tpl, $lng;\n\t\t\n\t\tinclude_once(\"./Services/Utilities/classes/class.ilConfirmationGUI.php\");\n\t\t$cgui = new ilConfirmationGUI();\n\t\t$cgui->setFormAction($ilCtrl->getFormAction($this));\n\n\n\t\t$core_styles = ilObjStyleSheet::_getCoreStyles();\n\t\t$cnt = 0;\n\t\tforeach ($_POST[\"char\"] as $char)\n\t\t{\n\t\t\tif (!empty($core_styles[$char]))\n\t\t\t{\n\t\t\t\t$cnt++;\n\t\t\t\t$char_comp = explode(\".\", $char);\n\t\t\t\t$cgui->addItem(\"\", \"\", $char_comp[2]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cgui->addHiddenItem(\"char[]\", $char);\n\t\t\t}\n\t\t}\n\t\t$all_core_styles = ($cnt == count($_POST[\"char\"]))\n\t\t\t? true\n\t\t\t: false;\n\n\t\tif ($all_core_styles)\n\t\t{\n\t\t\t$cgui->setHeaderText($lng->txt(\"sty_all_styles_obligatory\"));\n\t\t\t$cgui->setCancel($lng->txt(\"back\"), \"cancelCharacteristicDeletion\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cgui->setHeaderText($lng->txt(\"sty_some_styles_obligatory_delete_rest\"));\n\t\t\t$cgui->setCancel($lng->txt(\"cancel\"), \"cancelCharacteristicDeletion\");\n\t\t\t$cgui->setConfirm($lng->txt(\"sty_delete_other_selected\"), \"deleteCharacteristicConfirmation\");\n\t\t}\n\n\t\t$tpl->setContent($cgui->getHTML());\n\t}", "title": "" }, { "docid": "cc5cc77b9ee93637df969a0f657f7fee", "score": "0.51580995", "text": "public function before_delete() {\n if ($this->id == 1) { //Para no eliminar la información del establecimiento\n Flash::warning('Lo sentimos, pero este impuesto no se puede eliminar.');\n return 'cancel';\n }\n }", "title": "" } ]
0d3fea1b68a25a53350b28ddbd181c69
HTML GENERATION FUNCTIONS FOR PAYMENT FORM
[ { "docid": "b21ea846894baf07fbe236673a973b59", "score": "0.73720926", "text": "function getPaymentHTML() {\n\t\t\n\t\t$grand = $this->_invoice->getVar('grand');\n\t\t\n\t\t$feepercentile = 0;\n\t\tif ($GLOBALS['xoopsModuleConfig']['feecomphensate']) {\n\t\t\t$invoice_transaction_handler = xoops_getmodulehandler('invoice_transactions', 'xpayment');\n\t\t\t$feepercentile = (($invoice_transaction_handler->getFeePercentile('ccbill', $grand)+$this->_gateway->_options['fee'])/2)/100;\n\t\t\t$html .= '<div>'._XPY_MF_FEE.number_format(($grand*$feepercentile),2).' '.$this->_invoice->getVar('currency').'</div>';\n\t\t\t$grand = $grand + ($grand*$feepercentile);\n\t\t}\n\t\t\n\t\t$depositpercentile =0; \n\t\tif ($GLOBALS['xoopsModuleConfig']['depositcomphensate']) {\n\t\t\t$invoice_transaction_handler = xoops_getmodulehandler('invoice_transactions', 'xpayment');\n\t\t\t$depositpercentile = (($invoice_transaction_handler->getDepositPercentile('ccbill', $grand)+$this->_gateway->_options['deposit'])/2)/100;\n\t\t\t$html .= '<div>'._XPY_MF_DEPOSIT.number_format(($grand*$depositpercentile),2).' '.$this->_invoice->getVar('currency').'</div>';\n\t\t\t$grand = $grand + ($grand*$depositpercentile);\n\t\t}\t\t\n\t\t\n\t\t$html .= '<div>'._XPY_MF_TOTAL.number_format($grand,2).' '.$this->_invoice->getVar('currency').'</div><br/>';\n\t\t\n\t\t$html .= '<form action=\"'.$this->_gateway->_options['url'].'\" name=\"gateway\" id=\"gateway\" method=\"post\">';\n\n\t\t$invoice_items_handler =& xoops_getmodulehandler('invoice_items', 'xpayment');\n\t\t$items = $invoice_items_handler->getObjects(new Criteria('iid', $this->_invoice->getVar('iid')));\n\t\t\n\t\tforeach($items as $iiid => $item) {\n\t\t\t$x = $iiid+1;\n\t\t\t$html .= '<input type=\"hidden\" name=\"c_prod_'.$x.'\" value=\"'.$item->getVar('cat').','.$item->getVar('quantity').'\" />';\n \t\t$html .= '<input type=\"hidden\" name=\"c_name_'.$x.'\" value=\"'.$item->getVar('name').'\" />';\n \t\t$html .= '<input type=\"hidden\" name=\"c_price_'.$x.'\" value=\"'.(($item->getVar('amount')+$item->getVar('shipping')+$item->getVar('handling'))+(($item->getVar('amount')+$item->getVar('shipping')+$item->getVar('handling'))*$feepercentile)+(($item->getVar('amount')+$item->getVar('shipping')+$item->getVar('handling')+(($item->getVar('amount')+$item->getVar('shipping')+$item->getVar('handling'))*$feepercentile))*$depositpercentile)).'\" />';\n \t\t$html .= '<input type=\"hidden\" name=\"c_description_'.$x.'\" value=\"'.$item->getVar('quantity').' x '.$item->getVar('cat').' - '.$item->getVar('name').'\" />';\t\t\t\n\t\t}\n \t\n\t\t$html .= '<input type=\"hidden\" name=\"currency\" value=\"'.$this->_invoice->getVar('currency').'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"merchant_order_id\" value=\"'.$this->_invoice->getVar('iid').'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"cart_order_id\" value=\"'.$this->_invoice->getVar('iid').'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"sid\" value=\"'.$this->_gateway->_options['vendor_id'].'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"id_type\" value=\"'.$this->_gateway->_options['id_type'].'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"total\" value=\"'.$grand.'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"x_Receipt_Link_URL\" value=\"'.XOOPS_URL.'/modules/xpayment/return.php\">';\n\t\t$html .= '<input type=\"hidden\" name=\"x_login\" value=\"'.$this->_gateway->_options['vendor_id'].'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"x_amount\" value=\"'.$this->_invoice->getVar('grand').'\">';\n\t\t$html .= '<input type=\"hidden\" name=\"x_invoice_num\" value=\"'.$this->_invoice->getVar('iid').'\">';\n\t\t$html .= '<input type=\"submit\" value=\"'.$this->_gateway->_options['paywith'].'\">';\n\t\t$html .= '</form>';\n\t\t\n\t\treturn $html;\n\t\t\n\t}", "title": "" } ]
[ { "docid": "7c35905e9ade647062dfa0e99f8dd451", "score": "0.71582156", "text": "function print_direct_payment_form($amount = 0, $description = '', $merchantid = '', $currency = '', $customencrypted = '', $returnurl = '', $vars = array(), $no_ship = 1)\n {\n global $ilpage, $ilconfig, $ilance;\n $pid = isset($vars['pid']) ? $vars['pid'] : '';\n $address = ($ilconfig['paypal_sandbox'] == '1') ? 'www.sandbox.paypal.com' : 'www.paypal.com';\n\t\t$languageiso = isset($ilance->language->cache[$_SESSION['ilancedata']['user']['languageid']]['languageiso']) ? $ilance->language->cache[$_SESSION['ilancedata']['user']['languageid']]['languageiso'] : 'EN';\n $html = '<form method=\"post\" action=\"https://' . $address . '/cgi-bin/webscr\" accept-charset=\"utf-8\" style=\"margin:0px\">\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />\n<input type=\"hidden\" name=\"business\" value=\"' . handle_input_keywords($merchantid) . '\" />\n<input type=\"hidden\" name=\"return\" value=\"' . $returnurl . '\" />\n<input type=\"hidden\" name=\"cancel_return\" value=\"' . $returnurl . '\" />\n<input type=\"hidden\" name=\"custom\" value=\"' . $customencrypted . '\" />\n<input type=\"hidden\" name=\"undefined_quantity\" value=\"0\" />\n<input type=\"hidden\" name=\"item_name\" value=\"' . $description . '\" />\n<input type=\"hidden\" name=\"charset\" value=\"utf-8\">\n<input type=\"hidden\" name=\"item_number\" value=\"' . $pid . '\">\n<input type=\"hidden\" name=\"amount\" value=\"' . $amount . '\" />\n<input type=\"hidden\" name=\"currency_code\" value=\"' . $currency . '\" />\n<input type=\"hidden\" name=\"no_shipping\" value=\"' . $no_ship . '\" />\n<input type=\"hidden\" name=\"no_note\" value=\"1\" />\n<input type=\"hidden\" name=\"address_override\" value=\"0\">\n<input type=\"hidden\" name=\"first_name\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['firstname']) . '\">\n<input type=\"hidden\" name=\"last_name\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['lastname']) . '\">\n<input type=\"hidden\" name=\"address1\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['address']) . '\">\n<input type=\"hidden\" name=\"address2\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['address2']) . '\">\n<input type=\"hidden\" name=\"city\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['city']) . '\">\n<input type=\"hidden\" name=\"state\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['state']) . '\">\n<input type=\"hidden\" name=\"zip\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['postalzip']) . '\">\n<input type=\"hidden\" name=\"country\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['countryshort']) . '\">\n<input type=\"hidden\" name=\"email\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['email']) . '\">\n<input type=\"hidden\" name=\"address_name\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['firstname'] . ' ' . $_SESSION['ilancedata']['user']['lastname']) . '\">\n<input type=\"hidden\" name=\"aaddress_street\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['address'] . ' ' . $_SESSION['ilancedata']['user']['address2']) . '\">\n<input type=\"hidden\" name=\"address_city\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['city']) . '\">\n<input type=\"hidden\" name=\"address_state\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['state']) . '\">\n<input type=\"hidden\" name=\"address_zip\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['postalzip']) . '\">\n<input type=\"hidden\" name=\"contact_phone\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['phone']) . '\">\n<input type=\"hidden\" name=\"address_country\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['country']) . '\">\n<input type=\"hidden\" name=\"address_country_code\" value=\"' . handle_input_keywords($_SESSION['ilancedata']['user']['countryshort']) . '\">\n<input type=\"hidden\" name=\"address_status\" value=\"confirmed\">\n<input type=\"hidden\" name=\"notify_url\" value=\"' . HTTPS_SERVER . $ilpage['payment'] . '?do=_paypal\" />';\n return $html; \n }", "title": "" }, { "docid": "33c722d9555a9eaa304afb5e2b5b6497", "score": "0.711132", "text": "function print_recurring_payment_form($startdate = '', $subscriptionid = 0, $roleid = 0, $amount = 0, $totaloccurrences = 9999, $trialamount = 0, $trialoccurrences = 0, $units = '', $length = 0, $description = '', $onsubmit = '', $ismodify = 0, $iscancel = 0)\n {\n global $ilance, $ilpage, $ilconfig, $show;\n $html = '<form name=\"ilform\" action=\"' . HTTPS_SERVER . $ilpage['payment'] . '\" method=\"post\" accept-charset=\"UTF-8\" onsubmit=\"' . $onsubmit . '\" style=\"margin:0px\">\n<input type=\"hidden\" name=\"do\" value=\"_bluepay\" />\n<input type=\"hidden\" name=\"subscriptionid\" value=\"' . $subscriptionid . '\" />\n<input type=\"hidden\" name=\"roleid\" value=\"' . $roleid . '\" />\n<input type=\"hidden\" name=\"name\" value=\"' . $description . '\" />\n<input type=\"hidden\" name=\"length\" value=\"' . $this->format_length($length, $units) . '\" />\n<input type=\"hidden\" name=\"unit\" value=\"' . $this->format_unit($length, $units) . '\" />\n<input type=\"hidden\" name=\"units\" value=\"' . $units . '\" />\n<input type=\"hidden\" name=\"startDate\" value=\"' . $startdate . '\" />\n<input type=\"hidden\" name=\"totalOccurrences\" value=\"' . $totaloccurrences . '\" />\n<input type=\"hidden\" name=\"trialOccurrences\" value=\"' . $trialoccurrences . '\" />\n<input type=\"hidden\" name=\"amount\" value=\"' . $amount . '\" />\n<input type=\"hidden\" name=\"trialAmount\" value=\"' . $trialamount . '\" />';\n if ($ismodify)\n {\n $html .= '<input type=\"hidden\" name=\"mode\" value=\"update\" /><input type=\"hidden\" name=\"subscriptionId\" value=\"' . $subscriptionid . '\" />';\n }\n else if ($iscancel)\n {\n $html .= '<input type=\"hidden\" name=\"mode\" value=\"cancel\" /><input type=\"hidden\" name=\"subscriptionId\" value=\"' . $subscriptionid . '\" />';\n }\n else\n {\n $html .= '<input type=\"hidden\" name=\"mode\" value=\"create\" />';\n }\n return $html;\n }", "title": "" }, { "docid": "d8c0fbbec49020305e32dda0f02f3079", "score": "0.7027098", "text": "function print_payment_form($userid = 0, $payer_email = '', $amount = 0, $invoiceid = 0, $subscriptionid = 0, $description = '', $merchantid = '', $currency = '', $passphrase = '', $customencrypted = '', $testmode = 0)\n {\n global $ilpage, $ilconfig;\n $address = ($ilconfig['paypal_sandbox'] == '1') ? 'www.sandbox.paypal.com' : 'www.paypal.com';\n $html = '<form method=\"post\" action=\"https://' . $address . '/cgi-bin/webscr\" accept-charset=\"UTF-8\" style=\"margin:0px\">\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />\n<input type=\"hidden\" name=\"business\" value=\"' . $merchantid . '\" />\n<input type=\"hidden\" name=\"return\" value=\"' . HTTPS_SERVER . $ilpage['invoicepayment'] . '?cmd=view&id=' . $invoiceid . '\" />\n<input type=\"hidden\" name=\"custom\" value=\"' . $customencrypted . '\" />\n<input type=\"hidden\" name=\"undefined_quantity\" value=\"0\" />\n<input type=\"hidden\" name=\"item_name\" value=\"' . $description . '\" />\n<input type=\"hidden\" name=\"charset\" value=\"utf-8\">\n<input type=\"hidden\" name=\"amount\" value=\"' . $amount . '\" />\n<input type=\"hidden\" name=\"currency_code\" value=\"' . $currency . '\" />\n<input type=\"hidden\" name=\"no_shipping\" value=\"1\" />\n<input type=\"hidden\" name=\"cancel_return\" value=\"' . HTTPS_SERVER . $ilpage['invoicepayment'] . '?cmd=view&id=' . $invoiceid . '\" />\n<input type=\"hidden\" name=\"no_note\" value=\"1\" />\n<input type=\"hidden\" name=\"notify_url\" value=\"' . HTTPS_SERVER . $ilpage['payment'] . '?do=_paypal\" />\n ' . ((isset($payer_email) AND !empty($payer_email)) ? '<input type=\"hidden\" name=\"payer_email\" value=\"' . handle_input_keywords($payer_email) . '\" />' : '');\n return $html; \n }", "title": "" }, { "docid": "9252ef442c805cab400c5f20d6c70e89", "score": "0.70226085", "text": "function getForm()\n {\n $order_id = isset($_SESSION['shop']['order_id']) ? $_SESSION['shop']['order_id'] : 0;\n $confirmURI = \"index.php?section=Shop\".MODULE_INDEX.\"&amp;cmd=success&amp;handler=dummy&amp;order_id=$order_id&amp;result=-1\";\n $failureURI = \"index.php?section=Shop\".MODULE_INDEX.\"&amp;cmd=success&amp;handler=dummy&amp;order_id=$order_id&amp;result=0\";\n $successURI = \"index.php?section=Shop\".MODULE_INDEX.\"&amp;cmd=success&amp;handler=dummy&amp;order_id=$order_id&amp;result=1\";\n $cancelURI = \"index.php?section=Shop\".MODULE_INDEX.\"&amp;cmd=success&amp;handler=dummy&amp;order_id=$order_id&amp;result=2\";\n return <<<_\nPlease choose one:\n<hr />\n<a href='$confirmURI'>Confirm payment (silent)</a>\n<br />\n<a href='$successURI'>Successful payment (show success page)</a>\n<br />\n<a href='$failureURI'>Failed payment</a>\n<br />\n<a href='$cancelURI'>Cancelled payment</a>\n<hr />\n\n_;\n }", "title": "" }, { "docid": "12abae67819c3fbe575ec667902aea9b", "score": "0.69606805", "text": "function render()\r\n {\r\n\t\t\t\r\n\t\t\t$module_handler =& xoops_gethandler('module');\r\n\t\t\t$xoModule = $module_handler->getByDirname('compounds');\r\n\t\t\t$config_handler =& xoops_gethandler('config');\r\n\t\t\t$xoConfigs = $config_handler->getConfigList($xoModule->getVar('mid'));\r\n\t\r\n\t\t\t$ret .= '<form action=\"https://www.paypal.com/cgi-bin/webscr\" target=\"paypal\" method=\"post\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"amount\" id=\"paypal\" value=\"' . $xoConfigs['paypalAmount'] . '\">';\r\n\t\t\t$ret .= '<select size=\"Yes\" name=\"os0\">';\r\n\t\t\t$ret .= '<option selected value=\"Yes\">Donation Name Yes</option>';\r\n\t\t\t$ret .= '<option value=\"No\">Donation Name No</option>';\r\n\t\t\t$ret .= '</select>';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"cmd\" value=\"_xclick\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"business\" value=\"' . $xoConfigs['paypalEmail'] . '\">';\r\n\t\t\t$ret .= ' <input type=\"hidden\" name=\"item_name\" value=\"Chemical Reaction Compound Register\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"item_number\" value=\"110\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"rm\" value=\"2\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"notify_url\" value=\"' . XOOPS_URL . '/modules/compounds/ipnppd.php\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"on0\" value=\"List your name? \">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"no_shipping\" value=\"0\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"currency_code\" value=\"USD\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"cn\" value=\"Comments\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"custom\" value=\"' . $GLOBALS['xoopsUser']->getVar('uname') . '\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"cancel_return\" value=\"' . XOOPS_URL . '/modules/compounds/index.php\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"return\" value=\"' . XOOPS_URL . '/modules/compounds/index.php\">';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"image_url\" value=\"' . XOOPS_URL . '/images/logo.png\">\"><br><br>';\r\n\t\t\t$ret .= '<input type=\"hidden\" name=\"XOOPS_TOKEN_REQUEST\" value=\"' . $GLOBALS['xoopsSecurity']->createToken() .'\" />';\r\n\t\t\t$ret .= '<input type=\"submit\" value=\"Submit Donation >>\" border=\"0\" name=\"I1\"></form>';\r\n\t\t\treturn $ret;\r\n\t\t}", "title": "" }, { "docid": "20c0799ed215bd19c84fd63c72453d72", "score": "0.69267434", "text": "function renderPayoutForm($payoutMethod, $paymentInfor){\r\n?>\r\n <div>\r\n <h2 id=\"payoutMethod\" class=\"ftitle\" <?php if($payoutMethod == null) echo 'style=\"display:none;\"'; ?> >Your payout method: <?php echo $payoutMethod ?>. <a href=\"javascript:void();\" onclick=\"showPayoutform(); return false;\">Change</a></h2>\r\n <div id=\"payoutForm\" <?php if($payoutMethod != null) echo 'style=\"display:none;\"'; ?>>\r\n <h2 class=\"ftitle\">Submit your financial information: </h2>\r\n\t\t\t<div>\r\n\t\t\t\t<?php \r\n\t\t\t\tif($paymentInfor == null){\r\n\t\t\t\t\t$payoutMethod = 'Wire transfer';\r\n\t\t\t\t\t$paymentInfor = CHelperFanProfile::getPaymentInfor($payoutMethod);\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t\t<table>\t\t\t\t\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td><h3 class=\"intro\" style=\"text-align:right;\">Payment method:</h3></td>\r\n\t\t\t\t\t\t<td style=\"width: 10px;\"></td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select onchange=\"onPaymentMethodChange();\" class=\"formInput\" name=\"pm\">\r\n\t\t\t\t\t\t\t\t<option <?php if($payoutMethod =='Paypal') echo 'selected=\"selected\"'; ?> value=\"Paypal\">Paypal</option>\r\n\t\t\t\t\t\t\t\t<option <?php if($payoutMethod =='Check') echo 'selected=\"selected\"'; ?> value=\"Check\">Check</option>\r\n\t\t\t\t\t\t\t\t<option <?php if($payoutMethod =='Wire transfer') echo 'selected=\"selected\"'; ?> value=\"Wire transfer\">Wire transfer</option>\r\n\t\t\t\t\t\t\t\t<option <?php if($payoutMethod =='Webmoney') echo 'selected=\"selected\"'; ?> value=\"Webmoney\">Webmoney</option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t</tr>\t\r\n\t\t\t\t\t<?php foreach($paymentInfor as $field) { \r\n\t\t\t\t\t\tif(!isset($field['value'])) $field['value'] = '';\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<tr valign=\"top\">\r\n\t\t\t\t\t\t<td valign=\"top\"><h3 class=\"intro\" style=\"text-align:right;\"><?php echo $field['field']; ?></h3></td>\r\n\t\t\t\t\t\t<td style=\"width: 10px;\"></td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<?php if($field['length'] > 255) { ?>\r\n\t\t\t\t\t\t\t<textarea style=\"height: 60px;\" title=\"<?php echo $field['field']; ?>\"><?php echo $field['value']; ?></textarea>\r\n\t\t\t\t\t\t<?php } else { ?>\r\n\t\t\t\t\t\t\t<input type=\"text\" name=\"\" value=\"<?php echo $field['value']; ?>\" title=\"<?php echo $field['field']; ?>\" />\r\n\t\t\t\t\t\t<?php } ?>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td><?php if($field['required'] === true || $field['required'] === 'true') { ?> <div style=\"padding-left: 10px; width: 80px; \"><span style=\"color:red;\">*</span> Required</div> <?php } ?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<?php } ?>\r\n\t\t\t\t</table>\r\n <div style=\"padding-left: 190px;\">\r\n <input type=\"button\" value=\"Update\" onclick=\"updatePayment();\" />\r\n </div>\r\n\t\t\t</div>\r\n </div>\r\n\t</div>\r\n <script>\r\n function showPayoutform() {\r\n $('#payoutMethod').css('display', 'none');\r\n $('#payoutForm').slideDown();\r\n }\r\n\r\n function updatePayment(){\r\n \tvar method = $('#payoutForm select[name=\"pm\"]').val();\r\n\t\t\tvar infor = allPayoutInfors[method];\r\n\r\n var data = {};\r\n $('#payoutForm input,#payoutForm textarea').each(function(index, ele){\r\n data[$(ele).attr('title')] = $(ele).val();\r\n });\r\n\r\n var err = false;\r\n for(i=0;i<infor.length;i++){\r\n field = infor[i];\r\n if(field.required && !data[field.field]){\r\n err = field.field + \" is required\";\r\n break;\r\n }\r\n else{\r\n field.value = data[field.field].substr(0, field.length);\t\t\t\t\t\r\n }\r\n }\r\n if(err){\r\n alert(err);\r\n return;\r\n }\r\n $.post('/fan/updatepayout', {'method':method, 'fields' : infor}, function(data){\r\n }, 'json')\r\n .success(function(data){\r\n $('#payoutForm').css('display', 'none');\r\n $('#payoutMethod').html('Your payout method: ' + method);\r\n $('#payoutMethod').slideDown();\r\n })\r\n .fail(function(data){\r\n });\r\n }\r\n\t\t\r\n\t\tfunction buildPaymentField(fields){\r\n\t\t\t$('#payoutForm table tr').each(function(index, ele){\r\n if(index>0) $(ele).remove();\r\n });\r\n \r\n for(i=0;i<fields.length;i++){\r\n var field = fields[i];\r\n var html = '<tr valign=\"top\">';\r\n html += '<td valign=\"top\"><h3 class=\"intro\" style=\"text-align:right;\">' + field['field'] + '</h3></td>';\r\n html += '<td style=\"width: 10px;\"></td>';\r\n if(field['length'] > 255){\r\n html += '<td><textarea style=\"height: 60px;\" title=\"' + field['field'] + '\"></textarea></td>';\r\n }\r\n else{\r\n html += '<td><input type=\"text\" name=\"\" value=\"\" title=\"' + field['field'] + '\" /></td>';\r\n }\r\n if(field['required']){\r\n html += '<td><div style=\"padding-left: 10px; width: 80px; \"><span style=\"color:red;\">*</span> Required</div></td>';\r\n }\r\n else{\r\n html += '<td></td>';\r\n }\r\n html += '</tr>';\r\n $(html).appendTo('#payoutForm table');\r\n }\r\n\t\t}\r\n\t\t\r\n\t\tvar allPayoutInfors = <?php echo json_encode(CHelperFanProfile::getAllPaymentMethodsInfor()); ?>;\r\n\r\n\t\r\n\t\tfunction onPaymentMethodChange(){\r\n\t\t\tvar method = $('#payoutForm select[name=\"pm\"]').val();\r\n\r\n\t\t\tvar infor = allPayoutInfors[method];\r\n if(infor == null) infor = allPayoutInfors['Wire transfer'];\r\n\r\n buildPaymentField(infor);\r\n\t\t}\r\n </script>\r\n<?php\r\n}", "title": "" }, { "docid": "19da6665625a367090606cf4660c789f", "score": "0.68726677", "text": "public function setup_form() {\n\t\t$paypal_currency = $this->get_currency_code();\n\t\t?>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<label for=\"wpsc-paypal-express-api-username\"><?php _e( 'API Username', 'wpsc' ); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input type=\"text\" name=\"<?php echo esc_attr( $this->setting->get_field_name( 'api_username' ) ); ?>\" value=\"<?php echo esc_attr( $this->setting->get( 'api_username' ) ); ?>\" id=\"wpsc-paypal-express-api-username\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<label for=\"wpsc-paypal-express-api-password\"><?php _e( 'API Password', 'wpsc' ); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input type=\"text\" name=\"<?php echo esc_attr( $this->setting->get_field_name( 'api_password' ) ); ?>\" value=\"<?php echo esc_attr( $this->setting->get( 'api_password' ) ); ?>\" id=\"wpsc-paypal-express-api-password\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<label for=\"wpsc-paypal-express-api-signature\"><?php _e( 'API Signature', 'wpsc' ); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input type=\"text\" name=\"<?php echo esc_attr( $this->setting->get_field_name( 'api_signature' ) ); ?>\" value=\"<?php echo esc_attr( $this->setting->get( 'api_signature' ) ); ?>\" id=\"wpsc-paypal-express-api-signature\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<label><?php _e( 'Sandbox Mode', 'wpsc' ); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<label><input <?php checked( $this->setting->get( 'sandbox_mode' ) ); ?> type=\"radio\" name=\"<?php echo esc_attr( $this->setting->get_field_name( 'sandbox_mode' ) ); ?>\" value=\"1\" /> <?php _e( 'Yes', 'wpsc' ); ?></label>&nbsp;&nbsp;&nbsp;\n\t\t\t\t<label><input <?php checked( (bool) $this->setting->get( 'sandbox_mode' ), false ); ?> type=\"radio\" name=\"<?php echo esc_attr( $this->setting->get_field_name( 'sandbox_mode' ) ); ?>\" value=\"0\" /> <?php _e( 'No', 'wpsc' ); ?></label>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<label><?php _e( 'IPN', 'wpsc' ); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<label><input <?php checked( $this->setting->get( 'ipn' ) ); ?> type=\"radio\" name=\"<?php echo esc_attr( $this->setting->get_field_name( 'ipn' ) ); ?>\" value=\"1\" /> <?php _e( 'Yes', 'wpsc' ); ?></label>&nbsp;&nbsp;&nbsp;\n\t\t\t\t<label><input <?php checked( (bool) $this->setting->get( 'ipn' ), false ); ?> type=\"radio\" name=\"<?php echo esc_attr( $this->setting->get_field_name( 'ipn' ) ); ?>\" value=\"0\" /> <?php _e( 'No', 'wpsc' ); ?></label>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php if ( ! $this->is_currency_supported() ): ?>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t<h4><?php _e( 'Currency Conversion', 'wpsc' ); ?></h4>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t<p><?php _e( 'Your base currency is currently not accepted by PayPal. As a result, before a payment request is sent to Paypal, WP e-Commerce has to convert the amounts into one of Paypal supported currencies. Please select your preferred currency below.', 'wpsc' ); ?></p>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<label for \"wpsc-paypal-express-currency\"><?php _e( 'Paypal Currency', 'wpsc' ); ?></label>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<select name=\"<?php echo esc_attr( $this->setting->get_field_name( 'currency' ) ); ?>\" id=\"wpsc-paypal-express-currency\">\n\t\t\t\t\t\t<?php foreach ($this->gateway->get_supported_currencies() as $currency): ?>\n\t\t\t\t\t\t\t<option <?php selected( $currency, $paypal_currency ); ?> value=\"<?php echo esc_attr( $currency ); ?>\"><?php echo esc_html( $currency ); ?></option>\n\t\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php endif ?>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "3346db1ddd419739ccf3dd58c7098a48", "score": "0.66983324", "text": "protected function _paymentform()\n {\n Mage::getSingleton('customer/session')->setIframeFlag(true);\n \n if ($this->_code == \"hyperpay_creditcard\")\n {\n Mage::getSingleton('customer/session')->setRedirectUrl(Mage::app()->getStore(Mage::getDesign()->getStore())->getUrl('hyperpay/response/renderCC/', array('_secure'=>true)));\n }\n else if ($this->_code == \"hyperpay_directdebit\")\n {\n Mage::getSingleton('customer/session')->setRedirectUrl(Mage::app()->getStore(Mage::getDesign()->getStore())->getUrl('hyperpay/response/renderDD/', array('_secure'=>true)));\n }\n else if ($this->_code == \"hyperpay_paypal\")\n {\n Mage::getSingleton('customer/session')->setRedirectUrl(Mage::app()->getStore(Mage::getDesign()->getStore())->getUrl('hyperpay/response/redirectPayPal/', array('_secure'=>true)));\n }\n else\n {\n Mage::getSingleton('customer/session')->setRedirectUrl(Mage::app()->getStore(Mage::getDesign()->getStore())->getUrl('hyperpay/response/renderCP/', array('_secure'=>true)));\n }\n }", "title": "" }, { "docid": "9b25d7a3c9dc6a8a222b352ce1d97def", "score": "0.6656281", "text": "function sponsor_form_payment_credit() {\n $total = $_SESSION['post-data']['hitch-post-quantity'] * 300 + $_SESSION['post-data']['corral-quantity'] * 2500;\n\t$output = ' \n\t<p>Your total is: &#160 &#160 <strong>$' . $total . '.00</strong</p>\n\t<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\n <input name=\"business\" type=\"hidden\" value=\"natasha@ylcnola.org\" />\n <input name=\"cmd\" type=\"hidden\" value=\"_donations\" />\n <input name=\"item_name\" type=\"hidden\" value=\"Where Ya\\' Rack? - New Sponsorship\" />\n <input name=\"item_number\" type=\"hidden\" value=\"Bike Racks\" />\n <input name=\"amount\" type=\"hidden\" value=\"' . $total . '\" />\n <input name=\"currency_code\" type=\"hidden\" value=\"USD\" />\n <input id=\"pay\" style=\"font-size: 20px;\" name=\"pay\" type=\"submit\" value=\"Pay Now\" /></br>\n <img src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" alt=\"\" width=\"1\" height=\"1\" /></form><img src=\"https://www.paypalobjects.com/webstatic/en_US/i/buttons/cc-badges-ppmcvdam.png\" alt=\"Buy now with PayPal\" />';\n\techo $output;\n\t// attach PDF and drawing file and send email\n\tinclude 'create-pdf.php';\n\tclear_form();\n\tclear_temp_files();\n}", "title": "" }, { "docid": "56c1ebaff1f01f0f184e7fff1f250dfc", "score": "0.66474944", "text": "public function getPaymentCode()\n\t{\n\t\t$code = '<form method=\"post\" action=\"' . rtrim(Request::root(), '/') . '/cart/test/pay\">';\n\t\t$code .= '<input type=\"hidden\" value=\"dodummypayment\" name=\"cmd\">';\n\n\t\tforeach ($this->buttonVars as $k => $v)\n\t\t{\n\t\t\t$code .= '<input type=\"hidden\" value=\"' . $v . '\" name=\"' . $k . '\">';\n\t\t}\n\n\t\t$code .= '<input type=\"submit\" value=\"PAY\">';\n\t\t$code .= '</form>';\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "be2361fa1ce6f0e0ec87da9627727bc5", "score": "0.6635246", "text": "public function payAdd(){\n\n\t\techo '\n\t\t<div class=\"rightForm col-md-6\">\n\t\t\t<h3>Payment Options</h3>\n\t\t\t<form method=\"get\">\n\t\t\t\t<button type=\"submit\" name=\"page\" value=\"pagePayment\">Add Payment Options</button>\n\t\t\t</form>\n\t\t</div>';\n\n\t}", "title": "" }, { "docid": "5d7c52f13432a6078e2736129e19d4a9", "score": "0.66271013", "text": "public function displayForm()\n {\n $return = $this->theme->renderView('Shop/PaymentMethods/OmnipayPaypalExpress/Views::checkout_form.php');\n\n return $return;\n }", "title": "" }, { "docid": "a477b2fe7ed48651f054b7a63cc4db57", "score": "0.6590163", "text": "function print_recurring_payment_form($payer_email = '', $subscriptionid = 0, $amount = 0, $units = '', $length = 0, $title = '', $description = '', $currency = '', $customencrypted = '', $onsubmit = '', $ismodify = 0)\n {\n global $ilance, $ilpage, $ilconfig, $show;\n $address = ($ilconfig['paypal_sandbox'] == '1') ? 'www.sandbox.paypal.com' : 'www.paypal.com';\n $html = '<form name=\"ilform\" action=\"https://' . $address . '/cgi-bin/webscr\" method=\"post\" accept-charset=\"UTF-8\" onsubmit=\"' . $onsubmit . '\" style=\"margin:0px\">\n<input type=\"hidden\" name=\"cmd\" value=\"_xclick-subscriptions\" />\n<input type=\"hidden\" name=\"business\" value=\"' . $payer_email . '\" />\n<input type=\"hidden\" name=\"item_name\" value=\"' . $description . '\" />\n<input type=\"hidden\" name=\"charset\" value=\"utf-8\">\n<input type=\"hidden\" name=\"item_number\" value=\"' . $subscriptionid . '\" />\n<input type=\"hidden\" name=\"currency_code\" value=\"' . mb_strtoupper($currency) . '\" />\n<input type=\"hidden\" name=\"a3\" value=\"' . $amount . '\" />\n<input type=\"hidden\" name=\"p3\" value=\"' . $length . '\" />\n<input type=\"hidden\" name=\"t3\" value=\"' . $units . '\" />\n<input type=\"hidden\" name=\"src\" value=\"1\" />\n<input type=\"hidden\" name=\"sra\" value=\"1\" />\n<input type=\"hidden\" name=\"no_shipping\" value=\"1\" />\n<input type=\"hidden\" name=\"shipping\" value=\"0.00\" />\n<input type=\"hidden\" name=\"return\" value=\"' . HTTP_SERVER . $ilpage['accounting'] . '\" />\n<input type=\"hidden\" name=\"cancel_return\" value=\"' . HTTP_SERVER . $ilpage['accounting'] . '\" />\n<input type=\"hidden\" name=\"notify_url\" value=\"' . HTTPS_SERVER . $ilpage['payment'] . '?do=_paypal\" />\n<input type=\"hidden\" name=\"custom\" value=\"' . $customencrypted . '\" />\n<input type=\"hidden\" name=\"no_note\" value=\"1\" />\n<input type=\"hidden\" name=\"undefined_quantity\" value=\"0\" />';\n if ($ismodify)\n {\n $html .= '<input type=\"hidden\" name=\"modify\" value=\"1\" />';\n $show['subscriptionmodify'] = 1;\n }\n else\n {\n $show['subscriptionmodify'] = 0;\n }\n return $html;\n }", "title": "" }, { "docid": "216e4796dfbd54730ebf586d52cc9af9", "score": "0.65771186", "text": "public function generate()\n\t{\n\t\t$form = $this->start();\n\t\t$form = $this->nest_str($this->body(), $form);\n\t\t$form = $this->nest_str($this->submit_btn(), $form);\n\t\t$form .= \"\\n\" . $this->end();\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "dd123c8867ecc7b828b1dfbe3d0328a5", "score": "0.65724313", "text": "protected function generateSpeiForm()\n {\n $this->context->smarty->assign([\n 'action' => $this->context->link->getModuleLink(\n $this->name,\n 'validation',\n [],\n true),\n 'type' => \"SPEI\",\n ]);\n\n return $this->display(\n __FILE__,\n './views/templates/hook/payment_spei.tpl'\n );\n }", "title": "" }, { "docid": "bdae9223815fa3aa911422653de09afd", "score": "0.6557041", "text": "function receipt_page($order) {\n\n echo '<p>' . __('Thank you for your order, please click the button below to pay with FirstTeam.', 'FirstTeam') . '</p>';\n\n echo $this->generate_FirstTeam_form($order);\n }", "title": "" }, { "docid": "482c05ad28941255b14f0515605cb85b", "score": "0.6547102", "text": "protected function show_payment_form()\n\t{\n\t\t$d = @db::select_row(\"select * from prospects where id='\".$this->prospect['id'].\"'\", 'ASSOC');\n\t\t\n\t\tif($d['payment_method']==\"credit\"){\n\t\t\n\t\t\t$cc_id = billing::get_prospect_cc_id($this->prospect['id']);\n\t\t\t$p = db::select_row(\"select * from eppctwo.ccs where id = '$cc_id'\", 'ASSOC');\n\t\t\t$cc_info = billing::cc_get_display($p['id']);\n\t\t\t$cc_number = $cc_info['cc_number'];\n\t\t\t$cc_code = $cc_info['cc_code'];\n\t\t\t\n\t\t} else{\n\t\t\t$p = @db::select_row(\"select * from checks where foreign_id='\".$this->prospect['id'].\"'\", 'ASSOC');\n\t\t\t$check_info = billing::check_get_actual($p['id']);\n\t\t\t$account_number = $check_info['account_number'];\n\t\t\t$routing_number = $check_info['routing_number'];\n\t\t}\n\t\t\n\t\t// month select for cc exp date (1999 is an arbitrary year)\n\t\t\t$month_options = array();\n\t\t\tfor ($i = 1; $i <= 12; ++$i)\n\t\t\t{\n\t\t\t\t$month_num = str_pad($i, 2, '0', STR_PAD_LEFT);\n\t\t\t\t$month_options[] = array('value' => $month_num, 'caption' => $month_num.' - '.date('M', strtotime('1999-'.$month_num.'-01')));\n\t\t\t}\n\t\t\t\n\t\t// year select for cc exp date\n\t\t\t$year_options = array();\n\t\t\tfor ($i = 0, $cur_year = date('Y'); $i < 10; ++$i, ++$cur_year)\n\t\t\t$year_options[] = array('value' => $cur_year, 'caption' => $cur_year);\n\t\t\n\t\t$states = db::select(\"\n\t\t\tselect short value, text caption\n\t\t\tfrom states\n\t\t\torder by caption asc\n\t\t\", 'ASSOC');\n\t\t\n\t\t$countries = db::select(\"\n\t\t\tselect a2 value, country caption\n\t\t\tfrom countries\n\t\t\torder by caption asc\n\t\t\", 'ASSOC');\n\t\t\n\t\t$country = (@array_key_exists('country', $p)) ? $p['country'] : 'US';\n\t\n\t\t?>\n \n\t\t<div id=\"payment\" onLoad=\"loader()\">\n <h2>Edit Payment Info</h2>\n <?php $this->print_header_links(); ?>\n \t<fieldset>\n <div>\n <label>Payment Method</label>\n <select id=\"payment_options\" name=\"payment_options\" onChange=\"checkPayment('payment_options')\">\n <option <?php if($d['payment_method']!=\"check\") echo \"selected\"; ?> value=\"credit\">Credit Card</option>\n <option <?php if($d['payment_method']==\"check\") echo \"selected\"; ?> value=\"check\">Check</option>\n </select>\n </div>\n \n <div id=\"payment_type\">\n <div id=\"credit_card\" class=\"method\">\n <div>\n <label>Credit Card Type</label>\n <select name=\"cc_type\">\n <option <?php if($p['cc_type']==\"visa\") echo \"selected\"; ?> value=\"visa\">Visa</option>\n <option <?php if($p['cc_type']==\"discover\") echo \"selected\"; ?> value=\"discover\">Discover</option>\n <option <?php if($p['cc_type']==\"amex\") echo \"selected\"; ?> value=\"amex\">AmEx</option>\n <option <?php if($p['cc_type']==\"mc\") echo \"selected\"; ?> value=\"mc\">MasterCard</option>\n </select>\n </div>\n\n <div>\n <label>Billing Name</label>\n <input type=\"text\" name=\"cc_name\" value=\"<?php echo $p['name']; ?>\" />\n </div>\n\n <div>\n <label>Zip</label>\n <input name=\"cc_zip\" type=\"text\" value=\"<?php echo $p['zip']; ?>\" />\n </div>\n \n <div>\n <label>Country</label>\n <?php echo html::select(html::options($countries, $country), array('name' => 'cc_country')); ?>\n </div>\n \n <div>\n <label>Credit Card Number</label>\n <input name=\"cc_number\" type=\"text\" value=\"<?php echo $cc_number; ?>\" maxlength=16 />\n </div>\n <div>\n <label>VCC</label>\n <input name=\"cc_code\" type=\"text\" value=\"<?php echo $cc_code; ?>\"/>\n </div>\n <div class=\"left\">\n <label>Expiration Date</label>\n <select name=\"cc_exp_month\">\n <?php \n\t\t\t\t\t\t\n\t\t\t\t\t\tfor($i=0;$i<count($month_options);$i++){\n\t\t\t\t\t\t\techo \"<option value=\\\"\".$month_options[$i]['value'].\"\\\" \";\n\t\t\t\t\t\t\tif($month_options[$i]['value']==$p['cc_exp_month']){\n\t\t\t\t\t\t\t\techo \"selected \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \">\".$month_options[$i]['caption'].\" </option>\";\n\t\t\t\t\t\t} \n\t\t\t\t\t?>\n </select>\n \t<select name=\"cc_exp_year\">\n <?php \n\t\t\t\t\t\tfor($i=0;$i<count($year_options);$i++){\n\t\t\t\t\t\t\techo \"<option value=\\\"\".$year_options[$i]['value'].\"\\\" \";\n\t\t\t\t\t\t\tif($year_options[$i]['value']==$p['cc_exp_year']){\n\t\t\t\t\t\t\t\techo \"selected \";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \">\".$year_options[$i]['caption'].\" </option>\";\n\t\t\t\t\t\t} \n\t\t\t\t\t?>\n </select>\n </div>\n \n </div>\n \n <div id=\"check\" class=\"method\">\n <div>\n <label>Name</label>\n <input type=\"text\" name=\"check_name\" value=\"<?php echo $p['name']; ?>\" />\n </div>\n <div class=\"left\">\n <label>Account Type</label>\n <select name=\"account_type\">\n <option value=\"checking\">Checking</option>\n <option value=\"savings\">Savings</option>\n </select>\n </div>\n <div class=\"left\">\n <label>Bank Routing Number</label>\n <input type=\"text\" value=\"<?php echo $routing_number; ?>\" name=\"routing_number\" />\n </div>\n <div class=\"left\">\n <label>Account Number</label>\n <input type=\"text\" value=\"<?php echo $account_number; ?>\" name=\"account_number\"/>\n </div>\n \n <div class=\"left\">\n <label>Check Number</label>\n <input type=\"text\" value=\"<?php echo $p['check_number']; ?>\" name=\"check_number\"/>\n </div>\n \n <div class=\"clear\"></div>\n \n <div>\n <label>Phone</label>\n <input type=\"text\" value=\"<?php echo $p['phone']; ?>\" name=\"phone\" />\n </div>\n \n <div class=\"left\">\n <label>Driver's License Number</label>\n <input type=\"text\" value=\"<?php echo $p['drivers_license']; ?>\" name=\"drivers_license\"/>\n </div>\n <div class=\"left\">\n <label>License State</label>\n <?php echo html::select(html::options($states, $p['drivers_license_state']), array('name' => 'drivers_license_state')); ?> \n </div>\n </div>\n </div>\n </fieldset>\n <fieldset>\n \t<input type=\"submit\" value=\"Submit\" a0=\"edit_payment_submit\" >\n </fieldset>\n </fieldset>\n <input type=\"hidden\" name=\"pid\" value=\"<?php echo $p['id']; ?>\" />\n </div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "691277b20196f47c3d1e2d87d09ebe3d", "score": "0.6545423", "text": "function generate_payneteasy_form( $order_id ) {\r\n\t\t$order = new WC_Order( $order_id );\r\n\r\n /**/\r\n\r\n // Log::debug($data);\r\n $payneteasy_args = $this->get_payneteasy_args( $order );\r\n $request = new SaleRequest($payneteasy_args,$this->protocol_version);\r\n $connector = new Connector();\r\n $connector->setRequest($request);\r\n $connector->call();\r\n $response = $connector->getResponse();\r\n\r\n $retval = $response->toArray();\r\n\r\n\r\n if(!empty($retval[\"redirect-url\"])){\r\n wc_enqueue_js( '\r\n \t\t\t$.blockUI({\r\n \t\t\t\t\tmessage: \"' . esc_js( __( 'Thank you for your order. We are now redirecting you to PaynetEasy to make payment.', 'woocommerce' ) ) . '\",\r\n \t\t\t\t\tbaseZ: 99999,\r\n \t\t\t\t\toverlayCSS:\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tbackground: \"#fff\",\r\n \t\t\t\t\t\topacity: 0.6\r\n \t\t\t\t\t},\r\n \t\t\t\t\tcss: {\r\n \t\t\t\t\t\tpadding: \"20px\",\r\n \t\t\t\t\t\tzindex: \"9999999\",\r\n \t\t\t\t\t\ttextAlign: \"center\",\r\n \t\t\t\t\t\tcolor: \"#555\",\r\n \t\t\t\t\t\tborder: \"3px solid #aaa\",\r\n \t\t\t\t\t\tbackgroundColor:\"#fff\",\r\n \t\t\t\t\t\tcursor: \"wait\",\r\n \t\t\t\t\t\tlineHeight:\t\t\"24px\",\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\tjQuery(\"#submit_payneteasy_payment_form\").click();\r\n \t\t' );\r\n \t\t$s_form = '<form action=\"' . esc_url( $retval[\"redirect-url\"] ) . '\" method=\"get\" id=\"payneteasy_payment_form\" target=\"_top\">\r\n \t\t\t\t<!-- Button Fallback -->\r\n \t\t\t\t<div class=\"payment_buttons\">\r\n \t\t\t\t\t<input type=\"submit\" class=\"button alt\" id=\"submit_payneteasy_payment_form\" value=\"' . __( 'Pay via PaynetEasy', 'woocommerce' ) . '\" /> <a class=\"button cancel\" href=\"' . esc_url( $order->get_cancel_order_url() ) . '\">' . __( 'Cancel order &amp; restore cart', 'woocommerce' ) . '</a>\r\n \t\t\t\t</div>\r\n \t\t\t\t<script type=\"text/javascript\">\r\n \t\t\t\t\t//jQuery(\".payment_buttons\").hide();\r\n \t\t\t\t</script>\r\n \t\t\t</form>';\r\n }\r\n else print_r($retval);\r\n return $s_form;\r\n\t}", "title": "" }, { "docid": "511e233ef09c711809b78a6e568b4687", "score": "0.65085185", "text": "public static function generate_form_html() {\n\t\tself::instance()->maybe_save_settings();\n\t\t?>\n\t\t\t<form method=\"post\" action=\"\" id=\"bookings_settings\">\n\t\t\t\t<?php self::instance()->admin_options(); ?>\n\t\t\t\t<p class=\"submit\">\n\t\t\t\t\t<input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', 'woocommerce-bookings' ); ?>\" />\n\t\t\t\t\t<?php wp_nonce_field( self::NONCE_ACTION, self::NONCE_NAME ); ?>\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t<?php\n\t}", "title": "" }, { "docid": "d5e75d924c55305301763c1ade752c1e", "score": "0.6505392", "text": "public function displayForm()\n {\n $return = $this->theme->renderView('Shop/PaymentMethods/CCAvenue/Views::checkout_form.php');\n\n return $return;\n }", "title": "" }, { "docid": "cf6733120e3e445e0a98e623fc926797", "score": "0.649623", "text": "function receipt_page( $order ) {\r\n\t\techo '<p>' . __( 'Thank you - your order is now pending payment. You should be automatically redirected to PaynetEasy to make payment.', 'woocommerce' ) . '</p>';\r\n\t\techo $this->generate_payneteasy_form( $order );\r\n\t}", "title": "" }, { "docid": "084aee3f5b69b9a5f3c93aa1eccd9e19", "score": "0.6495553", "text": "private function _displayForm() {\n\t$this->_html .= '\n <fieldset><legend><img src=\"../modules/' . $this->name.'/logo.gif\" alt=\"\" /> ' . $this->l('MOLPay Module Guide') . '</legend>\n <h4>' . $this->l('Please follow instruction below to configure this MOLPay module :') . '</h4>\n - <b>' . $this->l('MOLPay Merchant ID : ') . '</b>Put your Merchant ID provided by MOLPay.<br><br>\n - <b>' . $this->l('MOLPay Verify Key : ') . '</b>Provide your Verify Key. It makes the transaction more secure.<br><br>\n </fieldset><br />\n <form action=\"' . Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']) . '\" method=\"post\">\n <fieldset class=\"width2\">\n <legend><img src=\"../img/admin/contact.gif\" alt=\"\" />' . $this->l('Settings') . '</legend>\n <label for=\"mp_merchant\">' . $this->l('MOLPay Merchant ID') . '</label>\n <div class=\"margin-form\"><input type=\"text\" size=\"20\" id=\"mp_merchant\" name=\"mp_merchant\" value=\"' . Configuration::get('MOLPAY_MERCHANT') . '\" /></div>\n <label for=\"mp_vkey\">' . $this->l('MOLPay Verify Key') . '</label>\n <div class=\"margin-form\"><input type=\"text\" size=\"20\" id=\"mp_vkey\" name=\"mp_vkey\" value=\"' . Configuration::get('MOLPAY_VKEY') . '\" /></div>\n <br /><center><input type=\"submit\" name=\"submitModule\" value=\"' . $this->l('Update settings') . '\" class=\"button\" /></center>\n </fieldset>\n </form>'; \n }", "title": "" }, { "docid": "de9bc31261a7ce33f60f24525d84d54a", "score": "0.6490926", "text": "function generate_epn_form( $order_id ) {\n\t\tglobal $woocommerce;\n\n\t\t$order = new WC_Order( $order_id );\n\n\t\tif ( $this->testmode == 'yes' ):\n\t\t\t$epn_adr = $this->testurl . '?test_ipn=1&';\n\t\telse :\n\t\t\t$epn_adr = $this->liveurl . '?';\n\t\tendif;\n\n\t\t$epn_args = $this->get_epn_args( $order );\n\n\t\t$epn_args_array = array();\n\n\t\tforeach ($epn_args as $key => $value) {\n\t\t\t$epn_args_array[] = '<input type=\"hidden\" name=\"'.esc_attr( $key ).'\" value=\"'.esc_attr( $value ).'\" />';\n\t\t}\n\n\t\t$woocommerce->add_inline_js('\n\t\t\tjQuery(\"body\").block({\n\t\t\t\t\tmessage: \"<img src=\\\"' . esc_url( apply_filters( 'woocommerce_ajax_loader_url', $woocommerce->plugin_url() . '/assets/images/ajax-loader.gif' ) ) . '\\\" alt=\\\"Redirecting&hellip;\\\" style=\\\"float:left; margin-right: 10px;\\\" />'.__('Thank you for your order. We are now redirecting you to epn to make payment.', 'woocommerce').'\",\n\t\t\t\t\toverlayCSS:\n\t\t\t\t\t{\n\t\t\t\t\t\tbackground: \"#fff\",\n\t\t\t\t\t\topacity: 0.6\n\t\t\t\t\t},\n\t\t\t\t\tcss: {\n\t\t\t\t padding: 20,\n\t\t\t\t textAlign: \"center\",\n\t\t\t\t color: \"#555\",\n\t\t\t\t border: \"3px solid #aaa\",\n\t\t\t\t backgroundColor:\"#fff\",\n\t\t\t\t cursor: \"wait\",\n\t\t\t\t lineHeight:\t\t\"32px\"\n\t\t\t\t }\n\t\t\t\t});\n\t\t\tjQuery(\"#submit_epn_payment_form\").click();\n\t\t');\n\n\t\treturn '<form action=\"https://www.eProcessingNetwork.com/cgi-bin/dbe/order.pl\" method=\"post\" id=\"epn_payment_form\" target=\"_top\">\n\t\t\t\t<INPUT TYPE=\"HIDDEN\" NAME=\"ePNAccount\"\n VALUE=\"0712197\">\n <INPUT TYPE=\"HIDDEN\" NAME=\"Total\" VALUE=\"'.$order->order_total.'\">\n <INPUT TYPE=\"HIDDEN\" NAME=\"FirstName\" VALUE=\"'.$epn_args['FirstName'].'\">\n<INPUT TYPE=\"HIDDEN\" NAME=\"LastName\" VALUE=\"'.$epn_args['LastName'].'\">\n<INPUT TYPE=\"HIDDEN\" NAME=\"Address\" VALUE=\"'.$epn_args['Address'].'\">\n<input type=\"hidden\" name=\"Company\" value=\"'.$epn_args['Company'].'\" />\n<INPUT TYPE=\"HIDDEN\" NAME=\"Zip\" VALUE=\"'.$epn_args['Zip'].'\">\n<INPUT TYPE=\"HIDDEN\" NAME=\"City\" VALUE=\"'.$epn_args['City'].'\">\n<INPUT TYPE=\"HIDDEN\" NAME=\"Country\" VALUE=\"'.$epn_args['Country'].'\">\n<INPUT TYPE=\"HIDDEN\" NAME=\"EMail\" VALUE=\"'.$epn_args['EMail'].'\">\n<INPUT TYPE=\"HIDDEN\" NAME=\"ID\" VALUE=\"'.$order->id.'\">\n<INPUT TYPE=\"HIDDEN\" NAME=\"ReturnApprovedURL\"\n VALUE=\"'.$epn_args['ReturnApprovedURL'].'\">\n<INPUT TYPE=\"HIDDEN\" NAME=\"ReturnDeclinedURL\"\n VALUE=\"'.$epn_args['ReturnDeclinedURL'].'\">\n\t\t\t\t<input type=\"submit\" class=\"button-alt\" id=\"submit_epn_payment_form\" value=\"'.__('Pay via epn', 'woocommerce').'\" /> <a class=\"button cancel\" href=\"'.esc_url( $order->get_cancel_order_url() ).'\">'.__('Cancel order &amp; restore cart', 'woocommerce').'</a>\n\t\t\t</form>';\n\n\t}", "title": "" }, { "docid": "984f467dba23d32c0ab62014ba4d4fb8", "score": "0.64902157", "text": "function index()\n\t{\n\t// and also add <form method='POST' action='https://voguepay.com/pay/'>\n\t$form = $this->vgniter_lib->voguepay_start(1000,'','','','','','demo');\n\t\n\t// function to add item you want to sell to form including item name, item descriptio\n\t// and item price, it will automatically generate total for all items\n\t$form = $this->vgniter_lib->voguepay_add_item( &$form, 'Face Cap', 'beautiful facecap for use', 1000);\n\t$form = $this->vgniter_lib->voguepay_add_item( &$form, 'Laban T-shirt', $desc = 'Labeled T-shirts', 4500);\n\t$finalform = $this->vgniter_lib->vogniter_close( $form , true, 'make_payment' , 'blue');\n\t\n\t\techo $finalform;\n\t}", "title": "" }, { "docid": "029e423a8b6ab6b7e3d7bdd59af0dc9a", "score": "0.6467194", "text": "public function form()\n {\n// $this->textarea('rules', __('签到规则'));\n $this->number('integral', __('每日签签到获得积分'));\n $this->number('days', __('连续签到天数'));\n $this->number('days_integral', __('连续签到获得积分'));\n\n }", "title": "" }, { "docid": "0a70401ec55c81e9b2439082d21e49c4", "score": "0.6459129", "text": "function wpdev_bk_define_payment_form_sermepa($blank, $booking_id, $summ,$bk_title, $booking_days_count, $booking_type, $bkform, $wp_nonce, $is_deposit ){\n $output = '';\n if( (get_bk_option( 'booking_sermepa_is_active' ) == 'On') ) {\n // Need to set status of bookings\n // Pending, Aproved, Payed\n\n $form_fields = get_form_content ($bkform, $booking_type, '', array('booking_id'=> $booking_id ,\n 'resource_title'=> $bk_title ) );\n $form_fields = $form_fields['_all_'];\n\n $sermepa_is_active = get_bk_option( 'booking_sermepa_is_active' );\n if ($sermepa_is_active != 'On') return '';\n \n $sermepa_subject = get_bk_option( 'booking_sermepa_subject' );\n /*\n $sermepa_subject = apply_bk_filter('wpdev_check_for_active_language', $sermepa_subject );\n $sermepa_subject = str_replace('[bookingname]',$bk_title[0]->title,$sermepa_subject);\n $sermepa_subject = str_replace('[dates]',$booking_days_count,$sermepa_subject); //$paypal_subject .= ' Booking type: ' . $bk_title[0]->title . '. For period: ' . $booking_days_count;\n $my_d_c = explode(',', $booking_days_count);\n $my_d_c = count($my_d_c);\n $sermepa_subject = str_replace('[datescount]',$my_d_c,$sermepa_subject);\n*/\n $subject_payment = $sermepa_subject;\n \n\n\n $sermepa_test = get_bk_option( 'booking_sermepa_test' );\n $sermepa_order_successful = WPDEV_BK_PLUGIN_URL .'/inc/payments/wpbc-response.php?payed_booking=' . $booking_id .'&wp_nonce=' . $wp_nonce . '&pay_sys=sermepa&stats=OK' ; //get_bk_option( 'booking_sermepa_order_successful' );\n $sermepa_order_failed = WPDEV_BK_PLUGIN_URL .'/inc/payments/wpbc-response.php?payed_booking=' . $booking_id .'&wp_nonce=' . $wp_nonce . '&pay_sys=sermepa&stats=FAILED' ; //get_bk_option( 'booking_sermepa_order_failed' );\n //$sermepa_order_successful = site_url(). get_bk_option( 'booking_sermepa_order_successful' );\n //$sermepa_order_failed = site_url(). get_bk_option( 'booking_sermepa_order_failed ' );\n $sermepa_vendor_name = get_bk_option( 'booking_sermepa_vendor_name' );\n $sermepa_encryption_password = get_bk_option( 'booking_sermepa_encryption_password' );\n $sermepa_curency = get_bk_option( 'booking_sermepa_curency' );\n $sermepa_transaction_type = get_bk_option( 'booking_sermepa_transaction_type' );\n $sermepa_payment_button_title = get_bk_option( 'booking_sermepa_payment_button_title' );\n $sermepa_payment_button_title = apply_bk_filter('wpdev_check_for_active_language', $sermepa_payment_button_title );\n\n// if ( empty( $sermepa_test ) ) return '';\n// if ( empty( $sermepa_order_successful ) ) return '';\n// if ( empty( $sermepa_order_failed ) ) return '';\n// if ( empty( $sermepa_vendor_name ) ) return '';\n// if ( empty( $sermepa_encryption_password ) ) return '';\n// if ( empty( $sermepa_curency ) ) return '';\n// if ( empty( $sermepa_transaction_type ) ) return '';\n\n // Get all fields for biling info\n $sermepa_billing_customer_email = (string) trim(get_bk_option( 'booking_billing_customer_email' ) . $booking_type );\n $sermepa_billing_firstnames = (string) trim( get_bk_option( 'booking_billing_firstnames' ) . $booking_type );\n $sermepa_billing_surname = (string) trim( get_bk_option( 'booking_billing_surname' ) . $booking_type );\n $sermepa_billing_address1 = (string) trim( get_bk_option( 'booking_billing_address1' ) . $booking_type) ;\n $sermepa_billing_city = (string) trim( get_bk_option( 'booking_billing_city' ) . $booking_type );\n $sermepa_billing_country = (string) trim( get_bk_option( 'booking_billing_country' ) . $booking_type );\n $sermepa_billing_post_code = (string) trim( get_bk_option( 'booking_billing_post_code' ) . $booking_type );\n $sermepa_billing_state = (string) trim( get_bk_option( 'booking_billing_state' ) . $booking_type );\n\n // Check if all fields set, if no so then return empty\n// if ( isset($form_fields[$sermepa_billing_customer_email]) === false ) return '';\n// if ( isset($form_fields[$sermepa_billing_firstnames]) === false ) return '';\n// if ( isset($form_fields[$sermepa_billing_surname]) === false ) return '';\n// if ( isset($form_fields[$sermepa_billing_address1]) === false ) return '';\n// if ( isset($form_fields[$sermepa_billing_city]) === false ) return '';\n// if ( isset($form_fields[$sermepa_billing_country]) === false ) return '';\n// if ( isset($form_fields[$sermepa_billing_post_code]) === false ) return '';\n\n\n $strConnectTo=$sermepa_test; //Set to SIMULATOR for the Simulator expert system, TEST for the Test Server and LIVE in the live environment\n $orderSuccessful = $sermepa_order_successful;\n $orderFailed = $sermepa_order_failed ;\n $strYourSiteFQDN= site_url() . \"/\"; //\"http://wp/\"; // IMPORTANT. Set the strYourSiteFQDN value to the Fully Qualified Domain Name of your server. **** This should start http:// or https:// and should be the name by which our servers can call back to yours **** i.e. it MUST be resolvable externally, and have access granted to the Sermepa Pay servers **** examples would be https://www.mysite.com or http://212.111.32.22/ **** NOTE: You should leave the final / in place.\n\n\n $strVendorName=$sermepa_vendor_name; // Set this value to the Vendor Name assigned to you by Sermepa Pay or chosen when you applied **/\n $strEncryptionPassword=$sermepa_encryption_password; // Set this value to the XOR Encryption password assigned to you by Sermepa Pay **/\n $strCurrency=$sermepa_curency; // Set this to indicate the currency in which you wish to trade. You will need a merchant number in this currency **/\n $strTransactionType=$sermepa_transaction_type; // This can be DEFERRED or AUTHENTICATED if your Sermepa Pay account supports those payment types **/\n $strPartnerID=\"\"; // Optional setting. If you are a Sermepa Pay Partner and wish to flag the transactions with your unique partner id set it here. **/\n $bSendEMail=0; // Optional setting. ** 0 = Do not send either customer or vendor e-mails, ** 1 = Send customer and vendor e-mails if address(es) are provided(DEFAULT). ** 2 = Send Vendor Email but not Customer Email. If you do not supply this field, 1 is assumed and e-mails are sent if addresses are provided.\n $strVendorEMail=\"\"; // Optional setting. Set this to the mail address which will receive order confirmations and failures\n $strProtocol=\"2.23\";\n/**********************************MY STUFFFFFFFFF *************************************************************/\n if ($strConnectTo==\"LIVE\") $strPurchaseURL=\"https://sis-t.sermepa.es/sis/realizarPago\";\n elseif ($strConnectTo==\"TEST\") $strPurchaseURL=\"https://sis-t.sermepa.es:25443/sis/realizarPago\";\n else $strPurchaseURL=\"https://sis-t.sermepa.es:25443/sis/realizarPago\";\n \n if ($sermepa_transaction_type==\"AUTHORIZE\") \n $Ds_Merchant_TransactionType=\"0\";\n elseif ($sermepa_transaction_type==\"DEFERRED\") \n $Ds_Merchant_TransactionType=\"1\"; //1\n elseif ($sermepa_transaction_type==\"AUTHENTICATE\") \n $Ds_Merchant_TransactionType=\"O\"; // O\n if ($sermepa_curency==\"USD\") \n $Ds_Merchant_Currency=\"840\";\n elseif ($sermepa_curency==\"EUR\") \n $Ds_Merchant_Currency=\"978\";\n if ($sermepa_is_description_show == 'On')\n $Ds_Merchant_ProductDescription = $subject_payment; \n else \n $Ds_Merchant_ProductDescription = 'Bookingid: '.$booking_id;\n //$Ds_Merchant_Titular = get_bk_option( 'booking_sermepa_titular' );\n $Firstnames = $form_fields[$sermepa_billing_firstnames];\n $Surname = $form_fields[$sermepa_billing_surname];\n $Ds_Merchant_Titular = $Firstnames.' '.$Surname;\n if ($strConnectTo==\"TEST\") \n $Ds_Merchant_MerchantName = 'Pruebas';\n else \n $Ds_Merchant_MerchantName = 'moreryadom.net';\n $Ds_Merchant_Terminal = \"1\";\n $Ds_Merchant_MerchantURL = site_url();\n $Ds_Merchant_Amount = $summ*100;\n $Ds_Merchant_MerchantCode = $sermepa_vendor_name;\n\n$message = $Ds_Merchant_Amount.$booking_id.$Ds_Merchant_MerchantCode.$Ds_Merchant_Currency.$Ds_Merchant_TransactionType.$Ds_Merchant_MerchantURL.$sermepa_encryption_password;\n$signature = strtoupper(sha1($message));\n\n$output = '<div style=\"width:100%;clear:both;margin-top:20px;\"></div>';\n$output .= '<div class=\"sermepa_div wpbc-payment-form\" style=\"text-align:left;clear:both;\">';\n$output .= '<form action=\\\"'.$strPurchaseURL.'\\\" method=\\\"POST\\\" id=\\\"SermepaPayForm\\\" name=\\\"SermepaPayForm\\\" style=\\\"text-align:left;\\\" class=\\\"booking_SermepaPayForm\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_Amount\\\" value=\\\"'.$Ds_Merchant_Amount.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_Currency\\\" value=\\\"'.$Ds_Merchant_Currency.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_Order\\\" value=\\\"'.$booking_id.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_ProductDescription\\\" value=\\\"'.$Ds_Merchant_ProductDescription.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_Titular\\\" value=\\\"'.$Ds_Merchant_Titular.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_MerchantCode\\\" value=\\\"'.$Ds_Merchant_MerchantCode.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_Terminal\\\" value=\\\"'.$Ds_Merchant_Terminal.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_TransactionType\\\" value=\\\"'.$Ds_Merchant_TransactionType.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_MerchantURL\\\" value=\\\"'.$Ds_Merchant_MerchantURL.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_UrlOK\\\" value=\\\"'.$sermepa_order_successful.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_UrlKO\\\" value=\\\"'.$sermepa_order_failed.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_MerchantSignature\\\" value=\\\"'.$signature.'\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_ConsumerLanguage\\\" value=\"002\\\">';\n$output .= '<input type=\\\"hidden\\\" name=\\\"Ds_Merchant_MerchantName\\\" value=\\\"'.$Ds_Merchant_MerchantName.'\\\">';\n$output .= '<input type=\\\"submit\\\" name=\\\"submitsermepabutton\\\" value=\\\"'.$sermepa_payment_button_title.'\\\" class=\\\"btn\\\">';\n$output .= '</form></div>';\n }\n return $output;\n\n }", "title": "" }, { "docid": "7a0d54fc320d0b864a698b815edda078", "score": "0.64477074", "text": "private function renderForm()\n {\n global $objDatabase, $_ARRAYLANG, $_CORELANG;\n\n //check the payment service provider configuration\n $objSettingsGeneral = new SettingsGeneral($objDatabase);\n if (!$objSettingsGeneral->getEpaymentStatus()) {\n $this->arrStatusMessages['error'][] = $_ARRAYLANG['TXT_CHECKOUT_EPAYMENT_DEACTIVATED'];\n $this->objTemplate->hideblock('form');\n $this->objTemplate->hideblock('redirect');\n return;\n }\n\n //initialize variables\n $arrFieldValues = array();\n $arrFieldsToHighlight = array();\n $arrCssClasses = array();\n $cssHighlightingClass = 'highlight';\n $cssLabelClass = 'label';\n $htmlRequiredField = ' *';\n $arrSelectOptions[] = array();\n\n //validate submitted user data\n if (isset($_REQUEST['submit'])) {\n $arrFieldValues['invoice_number'] = !empty($_REQUEST['invoice_number']) && ($_REQUEST['invoice_number'] !== $_ARRAYLANG['TXT_CHECKOUT_INVOICE_NUMBER'].$htmlRequiredField) ? $_REQUEST['invoice_number'] : '';\n $arrFieldValues['invoice_currency'] = !empty($_REQUEST['invoice_currency']) ? $_REQUEST['invoice_currency'] : '';\n $arrFieldValues['invoice_amount'] = !empty($_REQUEST['invoice_amount']) && ($_REQUEST['invoice_amount'] !== $_ARRAYLANG['TXT_CHECKOUT_INVOICE_AMOUNT'].$htmlRequiredField) ? $_REQUEST['invoice_amount'] : '';\n $arrFieldValues['contact_title'] = !empty($_REQUEST['contact_title']) ? $_REQUEST['contact_title'] : '';\n $arrFieldValues['contact_forename'] = !empty($_REQUEST['contact_forename']) && ($_REQUEST['contact_forename'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_FORENAME'].$htmlRequiredField) ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_forename'])) : '';\n $arrFieldValues['contact_surname'] = !empty($_REQUEST['contact_surname']) && ($_REQUEST['contact_surname'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_SURNAME'].$htmlRequiredField) ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_surname'])) : '';\n $arrFieldValues['contact_company'] = !empty($_REQUEST['contact_company']) && ($_REQUEST['contact_company'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_COMPANY']) ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_company'])) : '';\n $arrFieldValues['contact_street'] = !empty($_REQUEST['contact_street']) && ($_REQUEST['contact_street'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_STREET'].$htmlRequiredField) ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_street'])) : '';\n $arrFieldValues['contact_postcode'] = !empty($_REQUEST['contact_postcode']) && ($_REQUEST['contact_postcode'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_POSTCODE'].$htmlRequiredField) ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_postcode'])) : '';\n $arrFieldValues['contact_place'] = !empty($_REQUEST['contact_place']) && ($_REQUEST['contact_place'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PLACE'].$htmlRequiredField) ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_place'])) : '';\n $arrFieldValues['contact_country'] = !empty($_REQUEST['contact_country']) ? $_REQUEST['contact_country'] : '';\n $arrFieldValues['contact_phone'] = !empty($_REQUEST['contact_phone']) && ($_REQUEST['contact_phone'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PHONE'].$htmlRequiredField) ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_phone'])) : '';\n $arrFieldValues['contact_email'] = !empty($_REQUEST['contact_email']) && ($_REQUEST['contact_email'] !== $_ARRAYLANG['TXT_CHECKOUT_CONTACT_EMAIL'].$htmlRequiredField) ? contrexx_input2raw(contrexx_strip_tags($_REQUEST['contact_email'])) : '';\n\n //get keys of passed data\n if (!isset($this->arrCurrencies[$invoiceCurrency]) && ($key = array_search(strtoupper($invoiceCurrency), $this->arrCurrencies))) {\n $invoiceCurrency = $key;\n }\n if ((strtolower($contactTitle) !== self::MISTER) && (strtolower($contactTitle) !== self::MISS)) {\n if (ucfirst(strtolower($contactTitle)) == $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISTER']) {\n $contactTitle = self::MISTER;\n } elseif (ucfirst(strtolower($contactTitle)) == $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISS']) {\n $contactTitle = self::MISS;\n }\n } else {\n $contactTitle = strtolower($contactTitle);\n }\n if (!isset($this->arrCountries[$contactCountry]) && ($key = array_search(ucfirst(strtolower($contactCountry)), $this->arrCountries))) {\n $contactCountry = $key;\n }\n\n $arrUserData['text']['invoice_number']['name'] = $_ARRAYLANG['TXT_CHECKOUT_INVOICE_NUMBER'];\n $arrUserData['text']['invoice_number']['value'] = $arrFieldValues['invoice_number'];\n $arrUserData['text']['invoice_number']['length'] = 255;\n $arrUserData['text']['invoice_number']['mandatory'] = 1;\n\n $arrUserData['selection']['invoice_currency']['name'] = $_ARRAYLANG['TXT_CHECKOUT_INVOICE_CURRENCY'];\n $arrUserData['selection']['invoice_currency']['value'] = $arrFieldValues['invoice_currency'];\n $arrUserData['selection']['invoice_currency']['options'] = $this->arrCurrencies;\n $arrUserData['selection']['invoice_currency']['mandatory'] = 1;\n\n $arrUserData['numeric']['invoice_amount']['name'] = $_ARRAYLANG['TXT_CHECKOUT_INVOICE_AMOUNT'];\n $arrUserData['numeric']['invoice_amount']['value'] = $arrFieldValues['invoice_amount'];\n $arrUserData['numeric']['invoice_amount']['length'] = 15;\n $arrUserData['numeric']['invoice_amount']['mandatory'] = 1;\n\n $arrUserData['selection']['contact_title']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE'];\n $arrUserData['selection']['contact_title']['value'] = $arrFieldValues['contact_title'];\n $arrUserData['selection']['contact_title']['options'] = array(self::MISTER => '', self::MISS => '');\n $arrUserData['selection']['contact_title']['mandatory'] = 1;\n\n $arrUserData['text']['contact_forename']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_FORENAME'];\n $arrUserData['text']['contact_forename']['value'] = $arrFieldValues['contact_forename'];\n $arrUserData['text']['contact_forename']['length'] = 255;\n $arrUserData['text']['contact_forename']['mandatory'] = 1;\n\n $arrUserData['text']['contact_surname']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_SURNAME'];\n $arrUserData['text']['contact_surname']['value'] = $arrFieldValues['contact_surname'];\n $arrUserData['text']['contact_surname']['length'] = 255;\n $arrUserData['text']['contact_surname']['mandatory'] = 1;\n\n $arrUserData['text']['contact_company']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_COMPANY'];\n $arrUserData['text']['contact_company']['value'] = $arrFieldValues['contact_company'];\n $arrUserData['text']['contact_company']['length'] = 255;\n $arrUserData['text']['contact_company']['mandatory'] = 0;\n\n $arrUserData['text']['contact_street']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_STREET'];\n $arrUserData['text']['contact_street']['value'] = $arrFieldValues['contact_street'];\n $arrUserData['text']['contact_street']['length'] = 255;\n $arrUserData['text']['contact_street']['mandatory'] = 1;\n\n $arrUserData['text']['contact_postcode']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_POSTCODE'];\n $arrUserData['text']['contact_postcode']['value'] = $arrFieldValues['contact_postcode'];\n $arrUserData['text']['contact_postcode']['length'] = 255;\n $arrUserData['text']['contact_postcode']['mandatory'] = 1;\n\n $arrUserData['text']['contact_place']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PLACE'];\n $arrUserData['text']['contact_place']['value'] = $arrFieldValues['contact_place'];\n $arrUserData['text']['contact_place']['length'] = 255;\n $arrUserData['text']['contact_place']['mandatory'] = 1;\n\n $arrUserData['selection']['contact_country']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_COUNTRY'];\n $arrUserData['selection']['contact_country']['value'] = $arrFieldValues['contact_country'];\n $arrUserData['selection']['contact_country']['options'] = $this->arrCountries;\n $arrUserData['selection']['contact_country']['mandatory'] = 1;\n\n $arrUserData['text']['contact_phone']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PHONE'];\n $arrUserData['text']['contact_phone']['value'] = $arrFieldValues['contact_phone'];\n $arrUserData['text']['contact_phone']['length'] = 255;\n $arrUserData['text']['contact_phone']['mandatory'] = 1;\n\n $arrUserData['email']['contact_email']['name'] = $_ARRAYLANG['TXT_CHECKOUT_CONTACT_EMAIL'];\n $arrUserData['email']['contact_email']['value'] = $arrFieldValues['contact_email'];\n $arrUserData['email']['contact_email']['length'] = 255;\n $arrUserData['email']['contact_email']['mandatory'] = 1;\n\n $arrFieldsToHighlight = $this->validateUserData($arrUserData);\n\n if (empty($arrFieldsToHighlight)) {\n //validation was successful. now add a new transaction.\n $id = $this->objTransaction->add(\n self::WAITING,\n $arrUserData['text']['invoice_number']['value'],\n $arrUserData['selection']['invoice_currency']['value'],\n $arrUserData['numeric']['invoice_amount']['value'],\n $arrUserData['selection']['contact_title']['value'],\n $arrUserData['text']['contact_forename']['value'],\n $arrUserData['text']['contact_surname']['value'],\n $arrUserData['text']['contact_company']['value'],\n $arrUserData['text']['contact_street']['value'],\n $arrUserData['text']['contact_postcode']['value'],\n $arrUserData['text']['contact_place']['value'],\n $arrUserData['selection']['contact_country']['value'],\n $arrUserData['text']['contact_phone']['value'],\n $arrUserData['email']['contact_email']['value']\n );\n if ($id) {\n $objSettingsYellowpay = new SettingsYellowpay($objDatabase);\n $arrYellowpay = $objSettingsYellowpay->get();\n \n $arrOrder = array(\n 'ORDERID' => $id,\n 'AMOUNT' => intval($arrFieldValues['invoice_amount'] * 100),\n 'CURRENCY' => $this->arrCurrencies[$arrFieldValues['invoice_currency']],\n 'PARAMPLUS' => 'section=Checkout',\n );\n\n $arrSettings['postfinance_shop_id']['value'] = $arrYellowpay['pspid'];\n $arrSettings['postfinance_hash_signature_in']['value'] = $arrYellowpay['sha_in'];\n $arrSettings['postfinance_authorization_type']['value'] = $arrYellowpay['operation'];\n $arrSettings['postfinance_use_testserver']['value'] = $arrYellowpay['testserver'];\n \n $landingPage = \\Env::get('em')->getRepository('Cx\\Core\\ContentManager\\Model\\Entity\\Page')->findOneByModuleCmdLang('Checkout', '', FRONTEND_LANG_ID);\n\n $this->objTemplate->setVariable('CHECKOUT_YELLOWPAY_FORM', \\Yellowpay::getForm($arrOrder, $_ARRAYLANG['TXT_CHECKOUT_START_PAYMENT'], false, $arrSettings, $landingPage));\n\n if (\\Yellowpay::$arrError) {\n $this->arrStatusMessages['error'][] = $_ARRAYLANG['TXT_CHECKOUT_FAILED_TO_INITIALISE_YELLOWPAY'];\n } else {\n $this->arrStatusMessages['ok'][] = $_ARRAYLANG['TXT_CHECKOUT_ENTRY_SAVED_SUCCESSFULLY'];\n }\n\n $this->objTemplate->hideBlock('form');\n $this->objTemplate->touchBlock('redirect');\n\n return;\n } else {\n $this->arrStatusMessages['error'][] = $_ARRAYLANG['TXT_CHECKOUT_ENTRY_SAVED_ERROR'];\n }\n }\n } else {\n //get passed data\n $arrFieldValues['invoice_number'] = !empty($_REQUEST['invoice_number']) ? $_REQUEST['invoice_number'] : '';\n $arrFieldValues['invoice_currency'] = !empty($_REQUEST['invoice_currency']) ? $_REQUEST['invoice_currency'] : '';\n $arrFieldValues['invoice_amount'] = !empty($_REQUEST['invoice_amount']) ? $_REQUEST['invoice_amount'] : '';\n $arrFieldValues['contact_title'] = !empty($_REQUEST['contact_title']) ? $_REQUEST['contact_title'] : '';\n $arrFieldValues['contact_forename'] = !empty($_REQUEST['contact_forename']) ? $_REQUEST['contact_forename'] : '';\n $arrFieldValues['contact_surname'] = !empty($_REQUEST['contact_surname']) ? $_REQUEST['contact_surname'] : '';\n $arrFieldValues['contact_company'] = !empty($_REQUEST['contact_company']) ? $_REQUEST['contact_company'] : '';\n $arrFieldValues['contact_street'] = !empty($_REQUEST['contact_street']) ? $_REQUEST['contact_street'] : '';\n $arrFieldValues['contact_postcode'] = !empty($_REQUEST['contact_postcode']) ? $_REQUEST['contact_postcode'] : '';\n $arrFieldValues['contact_place'] = !empty($_REQUEST['contact_place']) ? $_REQUEST['contact_place'] : '';\n $arrFieldValues['contact_country'] = !empty($_REQUEST['contact_country']) ? $_REQUEST['contact_country'] : '';\n $arrFieldValues['contact_phone'] = !empty($_REQUEST['contact_phone']) ? $_REQUEST['contact_phone'] : '';\n $arrFieldValues['contact_email'] = !empty($_REQUEST['contact_email']) ? $_REQUEST['contact_email'] : '';\n\n //get keys of passed options selection\n if (!isset($this->arrCurrencies[$arrFieldValues['invoice_currency']]) && ($key = array_search(strtoupper($arrFieldValues['invoice_currency']), $this->arrCurrencies))) {\n $arrFieldValues['invoice_currency'] = $key;\n }\n if ((strtolower($arrFieldValues['contact_title']) !== self::MISTER) && (strtolower($arrFieldValues['contact_title']) !== self::MISS)) {\n if (ucfirst(strtolower($arrFieldValues['contact_title'])) == $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISTER']) {\n $arrFieldValues['contact_title'] = self::MISTER;\n } elseif (ucfirst(strtolower($arrFieldValues['contact_title'])) == $_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISS']) {\n $arrFieldValues['contact_title'] = self::MISS;\n }\n } else {\n $arrFieldValues['contact_title'] = strtolower($arrFieldValues['contact_title']);\n }\n if (!isset($this->arrCountries[$arrFieldValues['contact_country']]) && ($key = array_search(ucfirst(strtolower($arrFieldValues['contact_country'])), $this->arrCountries))) {\n $arrFieldValues['contact_country'] = $key;\n }\n }\n\n //get currency options\n $arrSelectOptions['currencies'][] = '<option value=\"0\">'.$_ARRAYLANG['TXT_CHECKOUT_INVOICE_CURRENCY'].$htmlRequiredField.'</option>';\n foreach ($this->arrCurrencies as $id => $currency) {\n $selected = ($id == $arrFieldValues['invoice_currency']) ? ' selected=\"selected\"' : '';\n $arrSelectOptions['currencies'][] = '<option value=\"'.$id.'\"'.$selected.'>'.contrexx_raw2xhtml($currency).'</option>';\n }\n\n //get title options\n $selectedMister = (self::MISTER == $arrFieldValues['contact_title']) ? ' selected=\"selected\"' : '';\n $selectedMiss = (self::MISS == $arrFieldValues['contact_title']) ? ' selected=\"selected\"' : '';\n $arrSelectOptions['titles'][] = '<option value=\"0\">'.$_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE'].$htmlRequiredField.'</option>';\n $arrSelectOptions['titles'][] = '<option value=\"'.self::MISTER.'\"'.$selectedMister.'>'.$_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISTER'].'</option>';\n $arrSelectOptions['titles'][] = '<option value=\"'.self::MISS.'\"'.$selectedMiss.'>'.$_ARRAYLANG['TXT_CHECKOUT_CONTACT_TITLE_MISS'].'</option>';\n\n //get country options\n if (!empty($this->arrCountries)) {\n //$arrSelectOptions['countries'][] = '<option value=\"0\">'.$_ARRAYLANG['TXT_CHECKOUT_CONTACT_COUNTRY'].$htmlRequiredField.'</option>';\n foreach ($this->arrCountries as $id => $name) {\n if (\\Cx\\Core\\Country\\Controller\\Country::getAlpha2ById($id) != 'CH') {\n continue;\n }\n $selected = $id == $arrFieldValues['contact_country'] ? ' selected=\"selected\"' : '';\n $arrSelectOptions['countries'][] = '<option value=\"'.$id.'\"'.$selected.'>'.contrexx_raw2xhtml($name).'</option>';\n }\n }\n\n // check wihch css classes have to be set\n foreach ($arrFieldValues as $name => $value) {\n if (isset($arrFieldsToHighlight[$name])) {\n $arrCssClasses[$name][] = $cssHighlightingClass;\n }\n if (empty($value)) {\n $arrCssClasses[$name][] = $cssLabelClass;\n }\n $arrCssClasses[$name] = implode(' ', $arrCssClasses[$name]);\n }\n\n \\JS::activate('jquery');\n \\JS::registerCode($this->getJavascript($htmlRequiredField));\n\n $this->objTemplate->setVariable(array(\n 'TXT_CHECKOUT_DESCRIPTION' => $_ARRAYLANG['TXT_CHECKOUT_DESCRIPTION'],\n 'TXT_CHECKOUT_BILL_DATA' => $_ARRAYLANG['TXT_CHECKOUT_BILL_DATA'],\n 'TXT_CHECKOUT_CONTACT_DATA' => $_ARRAYLANG['TXT_CHECKOUT_CONTACT_DATA'],\n 'CHECKOUT_INVOICE_NUMBER' => !empty($arrFieldValues['invoice_number']) ? $arrFieldValues['invoice_number'] : $_ARRAYLANG['TXT_CHECKOUT_INVOICE_NUMBER'].$htmlRequiredField,\n 'CHECKOUT_INVOICE_CURRENCY_OPTIONS' => !empty($arrSelectOptions['currencies']) ? implode($arrSelectOptions['currencies']) : '',\n 'CHECKOUT_INVOICE_AMOUNT' => !empty($arrFieldValues['invoice_amount']) ? $arrFieldValues['invoice_amount'] : $_ARRAYLANG['TXT_CHECKOUT_INVOICE_AMOUNT'].$htmlRequiredField,\n 'CHECKOUT_CONTACT_TITLE_OPTIONS' => !empty($arrSelectOptions['titles']) ? implode($arrSelectOptions['titles']) : '',\n 'CHECKOUT_CONTACT_FORENAME' => !empty($arrFieldValues['contact_forename']) ? $arrFieldValues['contact_forename'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_FORENAME'].$htmlRequiredField,\n 'CHECKOUT_CONTACT_SURNAME' => !empty($arrFieldValues['contact_surname']) ? $arrFieldValues['contact_surname'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_SURNAME'].$htmlRequiredField,\n 'CHECKOUT_CONTACT_COMPANY' => !empty($arrFieldValues['contact_company']) ? $arrFieldValues['contact_company'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_COMPANY'],\n 'CHECKOUT_CONTACT_STREET' => !empty($arrFieldValues['contact_street']) ? $arrFieldValues['contact_street'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_STREET'].$htmlRequiredField,\n 'CHECKOUT_CONTACT_POSTCODE' => !empty($arrFieldValues['contact_postcode']) ? $arrFieldValues['contact_postcode'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_POSTCODE'].$htmlRequiredField,\n 'CHECKOUT_CONTACT_PLACE' => !empty($arrFieldValues['contact_place']) ? $arrFieldValues['contact_place'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PLACE'].$htmlRequiredField,\n 'CHECKOUT_CONTACT_COUNTRY_OPTIONS' => !empty($arrSelectOptions['countries']) ? implode($arrSelectOptions['countries']) : '',\n 'CHECKOUT_CONTACT_PHONE' => !empty($arrFieldValues['contact_phone']) ? $arrFieldValues['contact_phone'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_PHONE'].$htmlRequiredField,\n 'CHECKOUT_CONTACT_EMAIL' => !empty($arrFieldValues['contact_email']) ? $arrFieldValues['contact_email'] : $_ARRAYLANG['TXT_CHECKOUT_CONTACT_EMAIL'].$htmlRequiredField,\n 'CHECKOUT_INVOICE_NUMBER_CLASS' => $arrCssClasses['invoice_number'],\n 'CHECKOUT_INVOICE_CURRENCY_CLASS' => $arrCssClasses['invoice_currency'],\n 'CHECKOUT_INVOICE_AMOUNT_CLASS' => $arrCssClasses['invoice_amount'],\n 'CHECKOUT_CONTACT_TITLE_CLASS' => $arrCssClasses['contact_title'],\n 'CHECKOUT_CONTACT_FORENAME_CLASS' => $arrCssClasses['contact_forename'],\n 'CHECKOUT_CONTACT_SURNAME_CLASS' => $arrCssClasses['contact_surname'],\n 'CHECKOUT_CONTACT_COMPANY_CLASS' => $arrCssClasses['contact_company'],\n 'CHECKOUT_CONTACT_STREET_CLASS' => $arrCssClasses['contact_street'],\n 'CHECKOUT_CONTACT_POSTCODE_CLASS' => $arrCssClasses['contact_postcode'],\n 'CHECKOUT_CONTACT_PLACE_CLASS' => $arrCssClasses['contact_place'],\n 'CHECKOUT_CONTACT_COUNTRY_CLASS' => $arrCssClasses['contact_country'],\n 'CHECKOUT_CONTACT_PHONE_CLASS' => $arrCssClasses['contact_phone'],\n 'CHECKOUT_CONTACT_EMAIL_CLASS' => $arrCssClasses['contact_email'],\n 'TXT_CORE_SUBMIT' => $_CORELANG['TXT_CORE_SUBMIT'],\n 'TXT_CORE_RESET' => $_CORELANG['TXT_CORE_RESET'],\n ));\n\n $this->objTemplate->hideBlock('redirect');\n $this->objTemplate->parse('form');\n }", "title": "" }, { "docid": "be78fc7fd9ebf0a588ed520c89b18e69", "score": "0.64287937", "text": "function uncomp_edd_bottom_purchase(){ ?>\n<p>Purchase Form Bottom (way bottom)</p>\n<?php }", "title": "" }, { "docid": "c81f820d54c9fd793f6c365fea107a1b", "score": "0.6410013", "text": "function sponsor_form_payment_check() {\n $total = $_SESSION['post-data']['hitch-post-quantity'] * 300 + $_SESSION['post-data']['corral-quantity'] * 2500;\n\t$output = '\n\t<p>Your total is: &#160 &#160 <strong>$' . $total . '.00</strong><p>\n\t<p>Please make checks for sponsorships payable to: </br>\n\tWhere Ya’ Rack? c/o Young Leadership Council, PO Box 56909</br>\n\tNew Orleans, LA 70156</p>\n\t<p>We will be in touch as soon as we receive payment and can schedule your rack installation.</p>\n\t<p>Thank you for your sponsorship!</p>';\t\n\techo $output;\n\t// attach PDF and drawing file and send email\n\tinclude 'create-pdf.php';\n\tclear_form();\n\tclear_temp_files();\n}", "title": "" }, { "docid": "9de8c746c6b3bc541b33804eaa789ed9", "score": "0.63820124", "text": "public function _displayForm()\n\t\t{\n\t\t\t//postavljanje valuea u admin formi i sprema se\t\n\t\t\t$wspaytitle = $this->TITLE;\n\t\t\t$wspaydescription = $this->DESCRIPTION;\n\t\t\t$shopid = $this->ID;\n\t\t\t$secretkey = $this->KEY;\n\t\t\t\n\t\t\t$wspayup = $this->l('Save settings');\n\t\t\t\t\n\t\t\t//prikaz\n\t\t\t$this->_html .=\n\t\t\t\"\n\t\t\t{$message}\n\t<fieldset>\n\t\t\t<legend>WSPay™</legend>\n\t\t\t<h2> WSPay™ Payment Gateway </h2>\n\t\t\t<img src = 'http://www.shop.hr/wp-content/uploads/2013/09/wspay.png'>\n\t\t\t<p> WSPay™ sustav za internet autorizaciju i naplatu kreditnih kartica. </p> \n\t\t\t<p>\tWSPay™ je sustav koji vlasnicima web trgovina omogućuje autorizaciju i naplatu usluga u realnom vremenu. </p>\n\t</fieldset>\n\t<fieldset>\n\t\t\t<legend> Settings </legend>\n\t\t<form action='{$_SERVER['REQUEST_URI']}' method='POST'>\n\t\t\t<label> Title </label>\n\t\t\t\t<input type='text' name='TITLE' value='{$wspaytitle}'/><br>\n\t\t\t\t<br>\n\t\t\t<label> Description: </label>\n\t\t\t\t<input type='text' name='DESCRIPTION' value='{$wspaydescription}' style='width:380px; height:40px' /><br>\n\t\t\t\t<br>\n\t\t\t<label> ShopID: </label>\n\t\t\t\t<input type='text' name='ID' value='{$shopid}'/><br>\n\t\t\t\t<br>\n\t\t\t<label> Secret key: </label>\n\t\t\t\t<input type='text' name='KEY' value='{$secretkey}'/><br>\n\t\t\t\t<br>\t\t\n\t\t\t<p>\n\t\t\t<label>&nbsp;</label>\n\t\t\t\t<input name='submit' type='submit' value='{$wspayup}' class='button'/>\t\n\t\t</form>\n\t</fieldset>\";\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "416cf40a87528432408db1c45590ab18", "score": "0.63712883", "text": "function _renderForm( $data )\r\n {\r\n // Render the form for collecting payment info\r\n \r\n $vars = new JObject(); \r\n $vars->message = JText::_('TIENDA AMBRAPOINTS PAYMENT MESSAGE');\r\n\t\t\r\n $html = $this->_getLayout('message', $vars);\r\n \r\n return $html;\r\n }", "title": "" }, { "docid": "c713cb934fe3832e6ed5fa4ca22f9a43", "score": "0.6367681", "text": "public function payment_fields() {\n\n // ok, let's display some description before the payment form\n if ( $this->description ) {\n // you can instructions for test mode, I mean test card numbers etc.\n if ( $this->testmode ) {\n $this->description .= ' MODO DE TESTE HABILITADO. No modo de teste, você pode gerar boletos de teste no ambiente de homologação do Banco Bradesco.';\n $this->description = trim( $this->description );\n }\n\n // display the description with <p> tags etc.\n echo wpautop( wp_kses_post( $this->description ) );\n\n }\n\n // I will echo() the form, but you can close PHP tags and print it directly in HTML\n echo '<fieldset id=\"wc-' . esc_attr( $this->id ) . '-form\" class=\"wc-boleto-form wc-payment-form\" style=\"background:transparent;\">';\n\n // Add this action hook if you want your custom gateway to support it\n do_action( 'woocommerce_boleto_form_start', $this->id );\n\n // pega o valor total da compra\n $valor_compra = $this->valor_total_carrinho();\n\n // pega quantidade de parcelas possivel para a venda\n $quantidade_parcelas = $this->calcula_quantidade_parcelas();\n\n // calcula o valor de cada parcela e monta as options do select\n $opcoes = '';\n for($contador = 1; $quantidade_parcelas >= $contador ; $contador++) {\n $valor_parcela = $this->calcula_valor_parcela($valor_compra, $contador);\n if($contador == 1) {\n $opcoes .= '<option value=\"'.$contador.'\">'.$contador.' x R$ '.number_format($valor_parcela, 2, ',', '.').' (À Vista)</option>';\n } else {\n $opcoes .= '<option value=\"'.$contador.'\">'.$contador.' x R$ '.number_format($valor_parcela, 2, ',', '.').'</option>';\n }\n }\n\n // I recommend to use inique IDs, because other gateways could already use #ccNo, #expdate, #cvc\n echo '\n <div class=\"form-row form-row-wide selecionar-parcelas-boleto\">\n <label><span class=\"required\">*</span> Parcelar em:</label>\n <select id=\"parcelas\" class=\"form-control\" name=\"parcelas\">\n '.$opcoes.'\n </select>\n </div>\n <div class=\"clear\"></div>';\n\n do_action( 'woocommerce_boleto_form_end', $this->id );\n\n echo '</fieldset>';\n\n }", "title": "" }, { "docid": "9f8eac6e418ee11a4778023cce79a875", "score": "0.6358567", "text": "function reset_to_default_form($form_type ){\r\n\r\n return '[calendar] \\n\\\r\n<div class=\"payment-form\"> \\n\\\r\n <div class=\"form-hints\"> \\n\\ \r\n '.__('Dates' ,'booking').': [selected_short_timedates_hint] ([nights_number_hint] - '.__('night(s)' ,'booking').')<br><br> \\n\\ \r\n '.__('Full cost of the booking' ,'booking').': [cost_hint] <br> \\n\\ \r\n </div><hr/> \\n\\ \r\n <p>'.__('First Name (required)' ,'booking').':<br />[text* name] </p> \\n\\\r\n <p>'.__('Last Name (required)' ,'booking').':<br />[text* secondname] </p> \\n\\\r\n <p>'.__('Email (required)' ,'booking').':<br />[email* email] </p> \\n\\\r\n <p>'.__('Phone' ,'booking').':<br />[text phone] </p> \\n\\\r\n <p>'.__('Address (required)' ,'booking').':<br /> [text* address] </p> \\n\\ \r\n <p>'.__('City (required)' ,'booking').':<br /> [text* city] </p> \\n\\\r\n <p>'.__('Post code (required)' ,'booking').':<br /> [text* postcode] </p> \\n\\ \r\n <p>'.__('Country (required)' ,'booking').':<br /> [country] </p> \\n\\\r\n <p>'.__('Adults' ,'booking').': [select visitors class:span1 \"1\" \"2\" \"3\" \"4\"] '.__('Children' ,'booking').': [select children class:span1 \"0\" \"1\" \"2\" \"3\"]</p> \\n\\\r\n <p>'.__('Details' ,'booking').':<br /> [textarea details] </p> \\n\\\r\n <p>[checkbox* term_and_condition use_label_element \"'.__('I Accept term and conditions' ,'booking').'\"] </p> \\n\\\r\n <p>[captcha]</p> \\n\\\r\n <p>[submit class:btn \"'.__('Send' ,'booking').'\"]</p> \\n\\\r\n</div>';\r\n\r\n }", "title": "" }, { "docid": "f27a7c0c09e433ce02c4db268c4bd4ac", "score": "0.63463706", "text": "function Render()\n\t{\n\n\t\techo \"<div class='customer-standard-display-title'>&nbsp;</div><br/><br/>\";\n\t\techo \"<div class='customer-standard-table-title-style-notice'><FONT COLOR='red'>Please confirm the new request below</FONT></div><br/><br/>\";\n\n\t\techo \"<form method=\\\"POST\\\" action=\\\"./flex.php/Console/Support/\\\"\\\">\";\n\n\n\t\t$bolFaultLine = FALSE;\n\t\t$bolServiceType = FALSE;\n\t\t$bolInContract = FALSE;\n\n\t\t$mixTypeOfServiceList = \"<table class=\\\"customer-standard-table-style\\\">\";\n\t\t$mixServiceList = \"<table class=\\\"customer-standard-table-style\\\">\t\t\t\t\t\t\n\t\t<tr valign=\\\"top\\\">\n\t\t\t<td>Service</td>\n\t\t\t<td>Plan</td>\n\t\t\t<td>Contract Ends</td>\n\t\t</tr>\";\n\t\t$mixHiddenFields = \"\";\n\t\tforeach($_POST as $key=>$val)\n\t\t{\n\t\t\tif(is_array($val))\n\t\t\t{\n\t\t\t\tforeach($val as $key2=>$val2)\n\t\t\t\t{\n\t\t\t\t\t$key2 = htmlspecialchars(\"$key2\", ENT_QUOTES);\n\t\t\t\t\t$val2 = htmlspecialchars(\"$val2\", ENT_QUOTES);\n\t\t\t\t\t$bit = \"[\";\n\t\t\t\t\tif($key == \"mixServiceType\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$bolServiceType = TRUE;\n\t\t\t\t\t\t$mixTypeOfServiceList .= \"\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>$val2</td>\n\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t}\n\t\t\t\t\tif($key == \"intFaultLine\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$bolFaultLine = TRUE;\n\t\t\t\t\t\t$mixContent = explode(\"||\",$val2);\n\t\t\t\t\t\t$mixShowExpire = $mixContent[2];\n\t\t\t\t\t\tif(!$mixShowExpire)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mixShowExpire = \"N/a\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$mixShowNotice = \"\";\n\t\t\t\t\t\t$intTimeExpires = strtotime($mixShowExpire);\n\t\t\t\t\t\tif($intTimeExpires > time() && $intRequestType == \"3\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mixShowNotice = \" class=\\\"text_notice\\\"\";\n\t\t\t\t\t\t\t$bolInContract = TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$mixServiceList .= \"\n\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t<td>$mixContent[0]</td>\n\t\t\t\t\t\t\t<td>$mixContent[1]</td>\n\t\t\t\t\t\t\t<td$mixShowNotice>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif($mixShowExpire !== \"\" && $mixShowExpire !== \"N/a\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mixServiceList .= date(\"d-m-Y\",strtotime($mixShowExpire));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($mixShowExpire == \"N/a\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mixServiceList .= \"$mixShowExpire\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$mixServiceList .= \"</td>\n\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t$val2 = \"$mixContent[0]\";\n\t\t\t\t\t}\n\t\t\t\t\t$mixHiddenFields .= \"<input type=\\\"hidden\\\" name=\\\"$key$bit$key2]\\\" value=\\\"$val2\\\">\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$key = htmlspecialchars(\"$key\", ENT_QUOTES);\n\t\t\t\t$val = htmlspecialchars(\"$val\", ENT_QUOTES);\n\t\t\t\t$mixHiddenFields .= \"<input type=\\\"hidden\\\" name=\\\"$key\\\" value=\\\"$val\\\">\\n\";\n\t\t\t\t$$key=$val;\n\t\t\t}\n\t\t}\n\t\t$mixTypeOfServiceList .= \"</table>\";\n\t\t$mixServiceList .= \"</table>\";\n\n\t\tprint \"$mixHiddenFields\";\n\t\techo \"\n\t\t<input type=\\\"hidden\\\" name=\\\"intRequestType\\\" value=\\\"$_POST[intRequestType]\\\">\n\t\t<input type=\\\"hidden\\\" name=\\\"intRequestTypeSubmit\\\" value=\\\"1\\\">\n\t\t<input type=\\\"hidden\\\" name=\\\"intRequestTypeSubmitFinal\\\" value=\\\"1\\\">\n\t\t<div class='customer-standard-table-title-style-address'>Address Details</div>\n\t\t<div class='GroupedContent'>\n\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t<TR>\n\t\t\t<TD width=\\\"160\\\">Street Address: </TD>\n\t\t\t<TD>$mixAccount_Address1</TD>\n\t\t</TR>\n\t\t<TR>\n\t\t\t<TD></TD>\n\t\t\t<TD>$mixAccount_Address2</TD>\n\t\t</TR>\n\t\t<TR>\n\t\t\t<TD>Suburb: </TD>\n\t\t\t<TD>$mixAccount_Suburb</TD>\n\t\t</TR>\n\t\t<TR>\n\t\t\t<TD>State: </TD>\n\t\t\t<TD>$mixAccount_State</TD>\n\t\t</TR>\n\t\t<TR>\n\t\t\t<TD>Postcode: </TD>\n\t\t\t<TD>$mixAccount_Postcode</TD>\n\t\t</TR>\n\t\t<TR>\n\t\t\t<TD>Country: </TD>\n\t\t\t<TD>$mixAccount_Country</TD>\n\t\t</TR>\n\t\t</TABLE>\n\t\t</div>\n\t\t<br/>\";\n\n\t\tswitch($_POST['intRequestType'])\n\t\t{\n\n\t\t\t// Logging a fault to an existing service\n\t\t\tcase \"1\":\n\t\t\tif($bolFaultLine)\n\t\t\t{\n\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>Logging a fault to an existing service</div>\n\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t$mixServiceList\n\t\t\t\t</div>\n\t\t\t\t<br/>\";\n\t\t\t}\n\t\t\tbreak;\n\n\t\t\t// Making a change to an existing service\n\t\t\tcase \"2\":\n\t\t\techo \"<div class='customer-standard-table-title-style-password'>Making a change to an existing service</div>\n\t\t\t<div class='GroupedContent'>\n\t\t\t$mixServiceList\n\t\t\t</div>\n\t\t\t<br/>\";\n\t\t\techo \"<div class='customer-standard-table-title-style-password'>Create Diversions</div>\n\t\t\t<div class='GroupedContent'>\n\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t<TR VALIGN=\\\"TOP\\\">\n\t\t\t<TD width=\\\"160\\\">Are any diversions required:</TD>\n\t\t\t<TD>$intDiversionsRequired</TD>\n\t\t\t</TR>\t\t\t\t\t\n\t\t\t<TD width=\\\"160\\\">If so:</TD>\n\t\t\t<TD>\n\t\t\t\t<TABLE style=\\\"font-size: 12px;\\\">\n\t\t\t\t<TR>\n\t\t\t\t\t<TD>From number</TD>\n\t\t\t\t\t<TD></TD>\n\t\t\t\t\t<TD>Diverted to number</TD>\n\t\t\t\t</TR>\n\t\t\t\t<TR>\n\t\t\t\t\t<TD>$intDiversionFromNumber</TD>\n\t\t\t\t\t<TD><IMG SRC=\\\"./img/template/arrow_right.jpg\\\" WIDTH=\\\"34\\\" HEIGHT=\\\"11\\\" BORDER=\\\"0\\\" ALT=\\\"\\\"></TD>\n\t\t\t\t\t<TD>$intDiversionToNumber</TD>\n\t\t\t\t</TR>\n\t\t\t\t</TABLE>\n\t\t\t</TD>\n\t\t\t</TR>\n\t\t\t</TABLE>\n\t\t\t</div>\n\t\t\t<br/>\";\n\t\t\tbreak;\n\n\t\t\t// Disconnect a no longer required line number\n\t\t\tcase \"3\":\n\t\t\tif($bolFaultLine)\n\t\t\t{\n\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>Disconnect a no longer required line number</div>\n\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t$mixServiceList\n\t\t\t\t</div>\n\t\t\t\t<br/>\";\n\t\t\t}\n\t\t\tbreak;\n\n\t\t\t// Add a new line\n\t\t\tcase \"4\":\n\n\t\t\t\t\t\t// 100 - DSL\n\t\t\t\t\t\tif($_POST['mixServiceType'] == \"100\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>DSL Setup</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">DSL Setup</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixDSLSetup]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">How many new lines</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixTotalLines]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Requested Install Date</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixInstallDate]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>Existing Connection</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixDSLExistingConnection]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>Current Provider</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixDSLCurrentProvider]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>Current Account</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixDSLCurrentAccount]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>New Plan</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixDSLNewPlan]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>Phone Number</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixDSLPhoneNumber]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div><br/>\";\n\n\n\n\n\t\t\t\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>Relocations</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\"></TD>\n\t\t\t\t\t\t\t\t<TD>If you are crossing Telephone Exchange boundaries and are unable to keep your current numbers, do you allow \" . DBO()->CustomerGroup->external_name->Value . \" to connect a new service for you.</TD>\n\t\t\t\t\t\t\t</TR>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Selected Option: </TD>\n\t\t\t\t\t\t\t\t<TD><B>$_POST[mixRelocationOption]</B></TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div><br/>\";\n\n\n\t\t\t\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>Redirection / Announcement</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Do you require redirections:</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixRedirectionOption]</TD>\n\t\t\t\t\t\t\t</TR>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Redirection Setup:</TD>\n\t\t\t\t\t\t\t\t<TD><B>$_POST[mixRedirectionPlan]</B></TD>\n\t\t\t\t\t\t\t</TR>\t\t\t\t\t\t\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Redirection Announcement:</TD>\n\t\t\t\t\t\t\t\t<TD><B>$_POST[mixRedirectionAnnouncement]</B></TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div><br/>\";\n\n\n\t\t\t\t\t\t\techo \"\n\t\t\t\t\t\t\t<div class='customer-standard-table-title-style-password'>Preferred Contractor</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<table class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t\t<td width=\\\"160\\\">\n\t\t\t\t\t\t\t\t\t<B>Option One:</B>\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\tDo you allow Telstra to connect your line past the Main Distribution Frame (MDF) and charge fee for service?\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t\t<td width=\\\"160\\\"></td>\n\t\t\t\t\t\t\t\t<td><B>$_POST[mixContractorOptionOne]</B></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t\t<td width=\\\"160\\\">\n\t\t\t\t\t\t\t\t\t<b>Option Two:</b>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\tIf no above, please supply the details of your preferred contractor.\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t\t<td width=\\\"160\\\">\n\t\t\t\t\t\t\t\t\t<table style=\\\"font-size: 12px;\\\">\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>Private Contractor Name:</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>Contact Number:</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<table style=\\\"font-size: 12px;\\\">\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><B>$_POST[mixContractorName]</B></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><B>$_POST[mixContractorNumber]</B></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br/>\";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 101 - Mobile\n\t\t\t\t\t\tif($_POST['mixServiceType'] == \"101\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>Mobile Setup</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Setup</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixMobileSetup]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">How many new lines</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixTotalLines]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Requested Install Date</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixInstallDate]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>Number</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixMobileNumber]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>Current Provider</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixMobileCurrentProvider]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>Current Account</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixMobileCurrentAccount]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>New Plan</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixMobileNewPlan]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div><br/>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 102 - Landline\n\t\t\t\t\t\tif($_POST['mixServiceType'] == \"102\")\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>Landline Setup</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Setup</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlineSetup]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">How many new lines</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixTotalLines]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Requested Install Date</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixInstallDate]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>PSTN Message Bank</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlinePSTNMessageBank]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>PSTN Line Hunt</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlinePSTNLineHunt]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>PSTN Caller Id</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlinePSTNCallerId]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>PSTN Fax Duet</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlinePSTNFaxDuet]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>PSTN Fax Stream</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlinePSTNFaxStream]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>ISDN Indial Range</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlineISDNIndialRange]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>ISDN Caller Id</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlineISDNCallerId]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD>ISDN On Ramp</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixLandlineISDNOnRamp]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Existing line number</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixPhoneNumber]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div><br/>\";\n\n\n\n\n\t\t\t\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>Relocations</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\"></TD>\n\t\t\t\t\t\t\t\t<TD>If you are crossing Telephone Exchange boundaries and are unable to keep your current numbers, do you allow \" . DBO()->CustomerGroup->external_name->Value . \" to connect a new service for you.</TD>\n\t\t\t\t\t\t\t</TR>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Selected Option: </TD>\n\t\t\t\t\t\t\t\t<TD><B>$_POST[mixRelocationOption]</B></TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div><br/>\";\n\n\n\t\t\t\t\t\t\techo \"<div class='customer-standard-table-title-style-password'>Redirection / Announcement</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Do you require redirections:</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixRedirectionOption]</TD>\n\t\t\t\t\t\t\t</TR>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Redirection Setup:</TD>\n\t\t\t\t\t\t\t\t<TD><B>$_POST[mixRedirectionPlan]</B></TD>\n\t\t\t\t\t\t\t</TR>\t\t\t\t\t\t\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Redirection Announcement:</TD>\n\t\t\t\t\t\t\t\t<TD><B>$_POST[mixRedirectionAnnouncement]</B></TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div><br/>\";\n\n\n\n\n\n\t\t\t\t\t\t\techo \"\n\t\t\t\t\t\t\t<div class='customer-standard-table-title-style-password'>Preferred Contractor</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<table class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t\t<td width=\\\"160\\\">\n\t\t\t\t\t\t\t\t\t<B>Option One:</B>\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\tDo you allow Telstra to connect your line past the Main Distribution Frame (MDF) and charge fee for service?\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t\t<td width=\\\"160\\\"></td>\n\t\t\t\t\t\t\t\t<td><B>$_POST[mixContractorOptionOne]</B></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t\t<td width=\\\"160\\\">\n\t\t\t\t\t\t\t\t\t<b>Option Two:</b>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\tIf no above, please supply the details of your preferred contractor.\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr valign=\\\"top\\\">\n\t\t\t\t\t\t\t\t<td width=\\\"160\\\">\n\t\t\t\t\t\t\t\t\t<table style=\\\"font-size: 12px;\\\">\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>Private Contractor Name:</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>Contact Number:</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<table style=\\\"font-size: 12px;\\\">\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><B>$_POST[mixContractorName]</B></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td><B>$_POST[mixContractorNumber]</B></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br/>\";\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t// 103 - Inbound\n\t\t\t\t\t\tif($_POST['mixServiceType'] == \"103\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"\n\t\t\t\t\t\t\t<div class='customer-standard-table-title-style-password'>Inbound Setup</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR VALIGN=\\\"TOP\\\">\n\t\t\t\t\t\t\t<TD width=\\\"160\\\"></TD>\n\t\t\t\t\t\t\t<TD><B>$_POST[mixInboundSetup]</B></TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">How many new lines</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixTotalLines]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Requested Install Date</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixInstallDate]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Current Account Number</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixInboundCurrentAccount]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">Answering Point</TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixInboundAnsweringPoint]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t<div class='customer-standard-table-title-style-password'>Plan Choice.</div>\n\t\t\t\t\t\t\t<div class='GroupedContent'>\n\t\t\t\t\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t\t\t\t\t<TR>\n\t\t\t\t\t\t\t\t<TD width=\\\"160\\\">New Plan: </TD>\n\t\t\t\t\t\t\t\t<TD>$_POST[mixInboundNewPlan]</TD>\n\t\t\t\t\t\t\t</TR>\n\t\t\t\t\t\t\t</TABLE>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br/>\";\n\t\t\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\t// Other\n\t\t\tcase \"5\":\n\t\t\tbreak;\n\n\t\t\t// Unable to determine request type..?\n\t\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tif($bolServiceType)\n\t\t{\n\t\t\techo \"<div class='customer-standard-table-title-style-password'>Type of service</div>\n\t\t\t<div class='GroupedContent'>\n\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t<TR VALIGN=\\\"TOP\\\">\n\t\t\t\t<TD>$mixTypeOfServiceList</TD>\n\t\t\t</TR>\n\t\t\t</TABLE>\n\t\t\t</div>\n\t\t\t<br/>\";\n\t\t}\n\n\t\techo \"<div class='customer-standard-table-title-style-password'>Brief instructions</div>\n\t\t<div class='GroupedContent'>\n\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t<TR VALIGN=\\\"TOP\\\">\n\t\t<TD width=\\\"160\\\">Details of request:</TD>\n\t\t<TD>$mixCustomerComments</TD>\n\t\t</TR>\n\t\t</TABLE>\n\t\t</div>\n\t\t<br/>\";\n\n\t\t$oAccountUser \t= Account_User::getForId(AuthenticatedUser()->_arrUser['id']);\n\t\t$D \t\t\t\t= new DOM_Factory();\n\t\t$D->getDOMDocument()->appendChild(\n\t\t\t$D->div(array('class' => 'customer-standard-table-title-style-contact'),\n\t\t\t\t\"Contact Details\"\n\t\t\t)\n\t\t);\n\t\t$D->getDOMDocument()->appendChild(\n\t\t\t$D->div(array('class' => 'GroupedContent'),\n\t\t\t\t$D->table(array('class' => 'customer-standard-table-style'),\n\t\t\t\t\t$D->tr(\n\t\t\t\t\t\t$D->td(array('width' => 160),\n\t\t\t\t\t\t\t\"Given Name: \"\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$D->td($mixContact_GivenName)\n\t\t\t\t\t),\n\t\t\t\t\t$D->tr(\n\t\t\t\t\t\t$D->td(\"Family Name: \"),\n\t\t\t\t\t\t$D->td($mixContact_FamilyName)\n\t\t\t\t\t),\n\t\t\t\t\t$D->tr(\n\t\t\t\t\t\t$D->td(\"Email Address: \"),\n\t\t\t\t\t\t$D->td($mixContact_Email)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\techo $D->getDOMDocument()->saveHTML();\n\t\techo \"<br/>\";\n\t\t\n\t\tif($bolInContract && $intRequestType == \"3\")\n\t\t{\n\t\t\tprint \"\n\t\t\t<div class='customer-standard-table-title-style-confirm-details'>Warning: In Contract</div>\n\t\t\t<div class='GroupedContent'>\n\t\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t\t<TR>\n\t\t\t\t<TD>One of more of your services are still in contract (see above for details), an early termination fee will apply.</TD>\n\t\t\t</TR>\n\t\t\t</TABLE>\n\t\t\t</div>\n\t\t\t<br/>\";\n\t\t}\n\n\t\tprint \"\n\t\t<TABLE class=\\\"customer-standard-table-style\\\">\n\t\t<TR>\n\t\t\t<TD align=right><INPUT TYPE=\\\"button\\\" VALUE=\\\"Back\\\" onclick=\\\"javascript:history.go(-1)\\\"> <input type=\\\"submit\\\" value=\\\"Confirm Changes\\\"></TD>\n\t\t</TR>\n\t\t</TABLE>\n\t\t</form>\n\t\t\";\n\t\t\n\t\techo \"</div>\\n\";\n\n\t}", "title": "" }, { "docid": "ff57cb1309c759084fcb9eb7e74f2688", "score": "0.6335641", "text": "protected function submit_data() {\n // a form with hidden elements which is submitted to paypal via the \n // BODY element's onLoad attribute. We do this so that you can validate\n // any POST vars from you custom form before submitting to paypal. So \n // basically, you'll have your own form which is submitted to your script\n // to validate the data, which in turn calls this function to create\n // another hidden form and submit to paypal.\n \n // The user will briefly see a message on the screen that reads:\n // \"Please wait, your order is being processed...\" and then immediately\n // is redirected to paypal.\n\t \n\n echo \"<html>\";\n echo \"<head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">\";\n\t echo \"<title>Processing Payment...</title>\";\n\t echo \"<script type=\\\"text/javascript\\\">\n\t\tfunction send_tran() {\n\t\t\tvar frm = document.getElementById('form');\n\t\t\tfrm.style.visibility=\\\"hidden\\\";\n\t\t\tfrm.submit();\n\t\t}\n\t\t</script>\";\n\t echo \"</head>\";\n\t if ($this->debug) {//dont send the request just print form\n\t echo \"<body>\";\n\t\techo '<br>' . $this->eurobank_url;\n\t }\n\t else //goto bank \t \n\t\techo \"<body onLoad=\\\"send_tran();\\\">\";\n\t \n echo \"<center><h3>\".localize('_PLEASEWAIT',getlocal()).\"</h3></center>\";\n echo \"<form method=\\\"post\\\" id=\\\"form\\\" name=\\\"form\\\" action=\\\"\".$this->eurobank_url.\"\\\" accept-charset=\\\"UTF-8\\\">\";\n\n foreach ($this->fields as $name => $value) {\n echo \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\">\";\n \t if ($this->debug) {\n\t\t echo '<br>'. $name . '=>'.$value;\n\t\t }\n }\n \n echo \"</form>\";\n echo \"</body></html>\";\n \n }", "title": "" }, { "docid": "c61d2881f034b38423ab2bc2cd3c0443", "score": "0.6334802", "text": "function receipt_page( $order ) {\n\n\t\techo '<p>'.__('Thank you for your order, please click the button below to pay with epn.', 'woocommerce').'</p>';\n\n\t\techo $this->generate_epn_form( $order );\n\n\t}", "title": "" }, { "docid": "01a00c28dba09d8fc0a6fc9069e82ab4", "score": "0.6334309", "text": "function uncomp_edd_purchase_form_after_payment_fields(){ ?>\n<p>After payment fields</p>\n<?php }", "title": "" }, { "docid": "0e7510405c1ba68160ced89a544f0a8b", "score": "0.6332737", "text": "function fn_create_payment_form($submit_url, $data, $payment_name = '', $exclude_empty_values = true, $method = 'post', $parse_url = true, $target = 'form', $connection_message = '')\n{\n Embedded::leave();\n\n if (Embedded::isEnabled()) {\n list($submit_url, $data, $method, $payment_name) = Embedded::processPaymentForm($submit_url, $data, $payment_name, $exclude_empty_values, $method);\n }\n\n if ($parse_url) {\n $parsed_url = parse_url($submit_url);\n if (!empty($parsed_url['query'])) {\n $_data = array();\n parse_str($parsed_url['query'], $_data);\n $data = fn_array_merge($data, $_data);\n $submit_url = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $parsed_url['path'];\n }\n }\n\n echo <<<EOT\n <form method=\"$method\" action=\"$submit_url\" name=\"process\">\nEOT;\n\n foreach ($data as $name => $value) {\n if (fn_string_not_empty($value) || $exclude_empty_values === false) {\n echo('<input type=\"hidden\" name=\"' . htmlentities($name, ENT_QUOTES, 'UTF-8') . '\" value=\"' . htmlentities($value, ENT_QUOTES, 'UTF-8') . '\" />' . \"\\n\");\n }\n }\n\n if (!empty($connection_message)) {\n echo $connection_message;\n } elseif (!empty($payment_name)) {\n echo(__('text_cc_processor_connection', array(\n '[processor]' => $payment_name,\n )));\n }\n\n echo <<<EOT\n <noscript><p>\nEOT;\n echo(__('text_cc_javascript_disabled'));\n\n echo <<<EOT\n </p><p><input type=\"submit\" name=\"btn\" value=\"\nEOT;\n echo(__('cc_button_submit'));\n echo <<<EOT\n\"></p>\n </noscript>\n </form>\n <script type=\"text/javascript\">\n window.onload = function(){\nEOT;\n if ($target == 'parent') {\necho <<<EOT\n window.parent.location='{$submit_url}';\nEOT;\n } elseif ($target == 'form') {\necho <<<EOT\n document.process.submit();\nEOT;\n }\necho <<<EOT\n };\n </script>\n </body>\n </html>\nEOT;\n exit;\n}", "title": "" }, { "docid": "08415336df18a2225df1b2676b6773f6", "score": "0.6332269", "text": "function PrepaidSignupForm()\n\t{\n\t\t$cardType = array(\n\t \t\t\"visa\"=>\"<img src='themes/attwiz/images/visa.png' height=30px></img>\",\n\t \t\t\"mc\"=>\"<img src='themes/attwiz/images/mastercard.jpeg' height=30px></img>\",\n\t \t\t\"amex\"=>\"<img src='themes/attwiz/images/ae.jpeg' height=30px></img>\",\n\t \t\t\"discover\"=>\"<img src='themes/attwiz/images/discover.jpeg' height=30px></img>\"\n\t );\n\t $monthArray = array();\n\t for($i =1;$i <=12; $i++){\n\t \t$monthArray[$i]=date('F',mktime(0,0,0,$i));\n\t }\n\t\t$yearArray = array();\n\t $currentYear = date('Y');\n\t\tfor($i =0;$i <=10; $i++){\n\t \t$yearArray[$currentYear+$i]=$currentYear+$i;\n\t }\n\t $trialExpiryDate = date('F-j-Y',mktime(0,0,0,date('n')+1,date('j'),date('Y')));\n\t\t$price = Product::get()->byID(7)->Price;\n\t $shoppingCart = $this->renderWith('PrepaidShoppingCart',array('Price' => $price));\n\t $whatsThis = '<span id=\"WhatsThis\"><a id=\"WhatsThisImage\" href=\"themes/attwiz/images/cvv.jpg\" title=\"What\\'s this?\">What\\'s this?</a></span>';\n\t $fields = new FieldList(\n\t\t\tnew LiteralField('SignupTitle', '<h2>Create Your Account</h2>'),\n\t\t\tnew EmailField('Email', 'Email'),\n\t\t\tnew ConfirmedPasswordField('Password', 'Password'),\n\t\t\tnew LiteralField('BillingInfoTitle', '<h2>Billing Information</h2>'),\n\t\t\tnew TextField('FirstName', 'First Name'),\n\t\t\tnew TextField('LastName', 'Last Name'),\n\t\t\tnew TextField('Company', 'Company(optional)'),\n\t\t\tnew TextField('StreetAddress1', 'Street Address1'),\n\t\t\tnew TextField('StreetAddress2', 'Street Address2(optional)'),\n\t\t\tnew TextField('City', 'City'),\n\t\t\tnew TextField('State', 'State/Province'),\n\t\t\tnew TextField('PostalCode', 'Zip/Poatal Code'),\n\t \t//new DropdownField('Country','Country',$countries2,'United States'),\n\t \tnew CountryDropdownField('Country'),\n\t\t\tnew OptionsetField('CreditCardType','Credit Card Type',$cardType,'visa'),\n\t\t\tnew TextField('NameOnCard', 'Name On Card'),\n\t\t\tnew TextField('CreditCardNumber', 'Credit Card Number'),\n\t\t\tnew PasswordField('CVVCode', 'Security/CVV Code'),\n\t \tnew LiteralField('WhatIsThis', $whatsThis),\n\t\t\tnew DropdownField('ExpirationMonth','Expiration Date',$monthArray),\n\t\t\tnew DropdownField('ExpirationYear','',$yearArray),\n\t\t\tnew LiteralField('ShoppingCart', $shoppingCart),\n\t \tnew HiddenField('Price','',$price),\n\t\t\tnew HiddenField('Quantity','',1)\n\t\t);\n\t \t\n\t // Create action\n\t $actions = new FieldList(\n\t\t\t$submit = new FormAction('doPrepaidSignup','')\n\t );\n\t $submit->setAttribute('src', 'themes/attwiz/images/button_purchase.png');\n\t\t// Create action\n\t\t$validator = new RequiredFields(\n\t\t\t\t\t\t\t'Email',\n\t\t\t\t\t\t\t'Password',\n\t\t\t\t\t\t\t'FirstName',\n\t\t\t\t\t\t\t'LastName',\n\t\t\t\t\t\t\t'StreetAddress1',\n\t\t\t\t\t\t\t'City',\n\t\t\t\t\t\t\t'State',\n\t\t\t\t\t\t\t'PoatalCode',\n\t\t\t\t\t\t\t'Country',\n\t\t\t\t\t\t\t'CreditCardType',\n\t\t\t\t\t\t\t'NameOnCard',\n\t\t\t\t\t\t\t'CreditCardNumber',\n\t\t\t\t\t\t\t'CVVCode',\n\t\t\t\t\t\t\t'ExpirationMonth',\n\t\t\t\t\t\t\t'ExpirationYear',\n\t\t\t\t\t\t\t'OrderTotal'\n\t\t\t\t\t);\n\t\t$validator = null;\n\t \treturn new Form($this, 'PrepaidSignupForm', $fields, $actions, $validator);\t\t\n\t}", "title": "" }, { "docid": "92bf6434e6364a1f874a976e6b7676fb", "score": "0.6326211", "text": "function cavirtex_link($params) {\n\n\t$postReturn = cavirtex_handle_post($params);\n\n\t$code = '<form method=\"post\" action=\"\">\n<input type=\"hidden\" name=\"docavirtex\" value=\"doit\" />\n<input type=\"submit\" name=\"paybtn\" value=\"Pay with Bitcoin\" onclick=\"this.disabled=true;this.value=\\'Please wait...\\';this.form.submit();\" />';\n\tif(is_string($postReturn)) {\n\t\t// A string is treated as an error message\n\t\t$code .= '<div style=\"font-weight: bold;\">Payment failed: '.htmlentities($postReturn).'</div>';\n\t}\n\t$code .= '</form>';\n\n\treturn $code;\n}", "title": "" }, { "docid": "876b2beb94e847aa060d55b82f3af1ae", "score": "0.6300584", "text": "function becopay_link($params)\n{\n if (false === isset($params) || true === empty($params)) {\n die('[ERROR] In modules/gateways/becopay.php::becopay_link() function: Missing or invalid $params data.');\n }\n\n // Invoice Variables\n $invoiceId = $params['invoiceid'];\n\n // System Variables\n $systemurl = $params['systemurl'];\n\n $description = array(\n 'User Email:'.$params['clientdetails']['email'],\n 'InvoiceId:'.$params[\"invoiceid\"],\n 'Amount:'.$params[\"amount\"].' '.$params[\"currency\"],\n 'Description:'.$params[\"description\"],\n );\n\n $post = array(\n 'invoiceId' => $invoiceId,\n 'returnUrl' => $params['returnurl'],\n 'description'=>implode(', ',$description)\n );\n\n $form = '<form action=\"' . $systemurl . 'modules/gateways/becopay/createInvoice.php\" method=\"POST\">';\n\n foreach ($post as $key => $value) {\n $form .= '<input type=\"hidden\" name=\"' . $key . '\" value = \"' . $value . '\" />';\n }\n\n $form .= '<input type=\"submit\" value=\"' . $params['langpaynow'] . '\" />';\n $form .= '</form>';\n\n return $form;\n}", "title": "" }, { "docid": "fba126f4391ecd1f4ec3f196669124ab", "score": "0.62954617", "text": "public function quickbookInvoicePaymentHtml() {\n\t\t$invoice_data = $this->data['invoice_data'];\n\t\tglobal $base_url;\n\t\t$currency_code = $invoice_data['currency_code'];\t\t\n\t\t?><div class=\"pcs-template \">\n\t\t\t<div class=\"pcs-template-body\">\n\t\t\t\t<table style=\"clear:both;width:100%;margin-top:30px;table-layout:fixed;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style=\"padding:5px 10px 5px 0px;font-size: 10pt;\">\n\t\t\t\t\t\t\t<span class=\"pcs-label\"><?php echo t('Invoice Number'); ?> :</span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<span id=\"tmp_payment_terms\"><?php echo $invoice_data['invoice_number']; ?></span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr> \n\t\t\t\t\t\t<td style=\"padding:5px 10px 5px 0px;font-size:10pt;\">\n\t\t\t\t\t\t\t<span class=\"pcs-label\"><?php echo t('Invoice Date'); ?> :</span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<span id=\"tmp_entity_date\"><?php echo $invoice_data['created_date']; ?></span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"pcs-itemtable\" style=\"width:100%;margin-top:20px;table-layout:fixed;\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr style=\"height:32px;\">\n\t\t\t\t\t\t\t<td class=\"pcs-itemtable-header pcs-itemtable-breakword\" id=\"\" style=\"padding: 5px 0px 5px 5px;width: 5%;text-align: center;\">\n\t\t\t\t\t\t\t#\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"pcs-itemtable-header pcs-itemtable-breakword\" id=\"\" style=\"padding: 5px 10px 5px 20px;width: ;text-align: left;\">\n\t\t\t\t\t\t\t<?php echo t('Item & Description'); ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"pcs-itemtable-header pcs-itemtable-breakword\" id=\"\" style=\"padding: 5px 10px 5px 5px;width: 11%;text-align: right;\">\n\t\t\t\t\t\t\t<?php echo t('Qty'); ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"pcs-itemtable-header pcs-itemtable-breakword\" id=\"\" style=\"padding: 5px 10px 5px 5px;width: 11%;text-align: right;\">\n\t\t\t\t\t\t\t<?php echo t('Unit Price'); ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class=\"pcs-itemtable-header pcs-itemtable-breakword\" id=\"\" style=\"padding: 5px 10px 5px 5px;width: 15%;text-align: right;\">\n\t\t\t\t\t\t\t<?php echo t('Total Price'); ?>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody class=\"itemBody\">\n\t\t\t\t\t\t<?php foreach($invoice_data['line_item'] as $key => $line_item) { ?>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class=\"pcs-item-row\" style=\"padding: 10px 0 10px 5px;text-align: center;word-wrap: break-word;\" valign=\"top\"><?php echo $key+1; ?></td>\n\t\t\t\t\t\t\t\t<td class=\"pcs-item-row\" style=\"padding: 10px 0px 10px 20px;\" valign=\"top\">\n\t\t\t\t\t\t\t\t\t<span id=\"tmp_item_name\" style=\"word-wrap: break-word;\"><?php echo $line_item['service']; ?></span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class=\"pcs-item-row lineitem-column text-align-right\">\n\t\t\t\t\t\t\t\t\t<div class=\"pcs-item-desc\"><?php echo $line_item['quantity']; ?></div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class=\"pcs-item-row lineitem-column text-align-right\">\n\t\t\t\t\t\t\t\t\t<span id=\"tmp_item_rate\"><?php echo $line_item['unit_price']; ?></span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class=\"pcs-item-row lineitem-column lineitem-content-right text-align-right\">\n\t\t\t\t\t\t\t\t\t<span id=\"tmp_item_amount\"><?php echo $line_item['total_amount']; ?></span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php } ?>\t \n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t<div style=\"width: 100%;margin-top: 1px;\">\n\t\t\t\t\t<div class=\"v-top total-number-section\">\n\t\t\t\t\t\t<div style=\"white-space: pre-wrap;\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"v-top total-section\">\n\t\t\t\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" class=\"pcs-totals\">\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr >\n\t\t\t\t\t\t\t\t<td class=\"total-section-label text-align-right\"><b><?php echo t('Tax'); ?></b></td>\n\t\t\t\t\t\t\t\t<td class=\"total-section-value text-align-right\" id=\"tmp_total\"><b><?php echo $invoice_data['tax'] . ' ' . $currency_code; ?></b></td> \n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr >\n\t\t\t\t\t\t\t\t<td class=\"total-section-label text-align-right\"><b><?php echo t('Total'); ?></b></td>\n\t\t\t\t\t\t\t\t<td class=\"total-section-value text-align-right\" id=\"tmp_total\"><b><?php echo $invoice_data['total'] . ' ' . $currency_code; ?></b></td> \n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr class=\"pcs-balance\" style=\"height:40px;\">\n\t\t\t\t\t\t\t\t<td class=\"total-section-label text-align-right\"><b><?php echo t('Balance Due'); ?></b></td>\n\t\t\t\t\t\t\t\t<td class=\"total-section-value text-align-right\" id=\"tmp_balance_due\"><b><?php echo $invoice_data['balance'] . ' ' . $currency_code; ?></b></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t<div style=\"clear: both;\"></div>\n\n\t\t\t\t<?php if( $invoice_data['balance'] > 0 ) : \n\t\t\t\t\t$url = ''; \n\t\t\t\t\tif( variable_get('quickbook_invoice_menu_url', '') != '') {\n\t\t\t\t\t\t$url = variable_get('quickbook_invoice_menu_url', '') . '/';\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t?>\n\t\t\t\t\t<!-- <a class=\"btn btn-danger pay-now\" id=\"zoho-invoice-pay\" target=\"_blank\" href=\" --><?php //echo $base_url . '/' . $url . 'payment?invoice_id=' . $invoice_data['invoice_number']; ?><!-- \"> --><?php //echo t('Pay Now'); ?><!-- </a> -->\n\t\t\t\t<?php endif; ?>\n\t\t\t</div>\n\t\t</div><?php\n\t}", "title": "" }, { "docid": "ff1b62cc3b05c395c0258840e27a75b4", "score": "0.6290735", "text": "public function thawani_payment_fields()\n {\n woocommerce_wp_text_input(array(\n 'id' => $this->get_field_name('session'),\n 'label' => 'session reference:',\n 'wrapper_class' => 'form-field-wide',\n 'custom_attributes' => array(\n 'disabled' => true,\n ),\n ));\n\n echo \"<p class='form-field form-field-wide'>\n <button type='button' name='th_generate' id='thawani-gw-generate' class='button-secondary' style='margin-bottom:0.5rem' > \" . __(\"generate checkout link\", \"thawani\") . \"</button>\n <button type='button' name='th_copy_btn' id='thawani-gw-copy' class='button-secondary' style='margin-bottom:0.5rem' disabled > \" . __('copy', 'woocommerce') . \" </button>\n <input type='text' name='th_generated_link' id='thawani-gw-generated-link' name='link generated' placeholder='link will be generated' />\n </p>\";\n }", "title": "" }, { "docid": "536f403d01c0cca749af4b54af160105", "score": "0.62735313", "text": "function generateForm() {\n ?>\n <p>This survey will ask you a few questions about yourself and your purchases with us. Please answer all questions on each page before proceeding to the next page.</p> \n <form action=\"page0.php?mode=submit\" method=\"post\">\n <input class=\"button buttonright\" type=\"submit\" value=\"Begin\">\n </form>\n \n <?php\n}", "title": "" }, { "docid": "e82c3573ec6496453697cfc561b6ccab", "score": "0.6266433", "text": "function generateVKForm($return_url, $mac_id)\n {\n $form = '';\n $snd_id = $this->_getSndId();\n $charset = $this->_getCharset();\n $macfields = $this->_getMacFields($mac_id, $return_url, $snd_id, $charset);\n// $this->logger->addDebug($macfields, 'macfields');\n $bankLink = $this->_getBankLink();\n $res = $this->_generateSignature($macfields);\n if (!$res) {\n return $res;\n } else {\n $macfields['VK_MAC'] = $res;\n $form = \"<form name='hansaActivation' method='POST' action='\" . $bankLink . \"'>\\n\";\n foreach ($macfields as $f => $v) {\n $form .= \"<input type=\\\"hidden\\\" name=\\\"\" . $f . \"\\\" value=\\\"\" . htmlspecialchars($v) . \"\\\" />\\n\";\n }\n $form .= \"</form>\\n\";\n return $form;\n }\n }", "title": "" }, { "docid": "f3a1061b8768fe6c2271dfa619b2f68b", "score": "0.62631655", "text": "function uncomp_edd_top_purchase(){ ?>\n<p>Purchase Form Top</p>\n<?php }", "title": "" }, { "docid": "b1afc5f44514553e4717aad10dd27c0f", "score": "0.6249944", "text": "private function getHtmlForm() {\n return Html::openElement( 'p' )\n . $this->msg( 'wikidataquality-constraint-instructions' )->text()\n . Html::element( 'br' )\n . $this->msg( 'wikidataquality-constraint-instructions-example' )->text()\n . Html::closeElement( 'p' )\n . Html::openElement(\n 'form',\n array(\n 'action' => $_SERVER['PHP_SELF'],\n 'method' => 'post'\n )\n )\n . Html::input(\n 'entityID',\n '',\n 'text',\n array(\n 'id' => 'wdq-constraint-entityId',\n 'placeholder' => $this->msg( 'wikidataquality-constraint-form-id-placeholder' )->text()\n )\n )\n . Html::input(\n 'submit',\n $this->msg( 'wikidataquality-constraint-form-submit-label' )->text(),\n 'submit',\n array(\n 'id' => 'wbq-constraint-submit'\n )\n )\n . Html::closeElement( 'form' );\n }", "title": "" }, { "docid": "6fc34daf710663e5eafda7725a0f9035", "score": "0.6248156", "text": "function generate_address_form($data, $page = \"cart\") {\n $data = protect_output($data); // XSS protection\n $button_label = ($page == \"cart\")?\"Checkout\":\"Update\";\n echo <<<END\n<!-- address -->\n <section id=\"do_action\">\n <h3>Your details</h3>\n <!-- Address -->\n <div class=\"container-fluid\">\n <form method=\"post\" class=\"register-form\">\n <div class=\"row\">\n <div class=\"col-md-4 col-sm-4 col-lg-4\">\n <label for=\"name\">Name</label>\n <input name=\"name\" class=\"form-control\" type=\"text\" id=\"name\" value=\"$data[name]\" required>\n </div>\n </div>\nEND;\n\n // if is logged, email input is hidden\n echo ' \n <div class=\"row\">\n <div class=\"col-md-4 col-sm-4 col-lg-4\">\n <label for=\"email\" '.(is_logged()?\"style='display:none;'\":\"\").'>Email</label>\n <input name=\"email\" class=\"form-control\" id=\"email\" value=\"'.$data[\"email\"].'\" required type=\"'.(is_logged()?\"hidden\":\"email\").'\">\n </div>\n </div>';\n\n\n echo <<<END\n <div class=\"row\">\n <div class=\"col-md-4 col-sm-4 col-lg-4\">\n <label for=\"tel\">Tel. number</label>\n <input name=\"tel\" class=\"form-control\" type=\"tel\" id=\"tel\" value=\"$data[tel]\" required>\n </div>\n </div>\n <hr>\n <div class=\"row\">\n <div class=\"col-md-4 col-sm-4 col-lg-4\">\n <label for=\"address1\">Address <small>line 1</small></label>\n <input name=\"address1\" class=\"form-control\" type=\"text\" id=\"address1\" value=\"{$data[\"address\"][\"line_1\"]}\" required>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-4 col-sm-4 col-lg-4\">\n <label for=\"address2\">Address <small>line 2</small></label>\n <input name=\"address2\" class=\"form-control\" type=\"text\" id=\"address2\" value=\"{$data[\"address\"][\"line_2\"]}\">\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-md-4 col-sm-4 col-lg-4\">\n <label for=\"town\">Town / City</label>\n <input name=\"town\" class=\"form-control\" type=\"text\" id=\"town\" value=\"{$data[\"address\"][\"town\"]}\" required>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-4 col-sm-4 col-lg-4\">\n <label for=\"postcode\">Postcode</label>\n <input name=\"postcode\" class=\"form-control\" type=\"text\" id=\"postcode\" value=\"{$data[\"address\"][\"postcode\"]}\" required>\n </div>\n </div>\n\n\n <hr>\n <div class=\"row\">\n <div class=\"col-md-6 col-sm-6 col-xs-6 col-lg-6\">\n <button class=\"btn btn-default regbutton\">$button_label</button>\n </div>\n\n </div>\n </form>\n </div>\n </section><!-- end - address -->\n\nEND;\n}", "title": "" }, { "docid": "225382e9c51df674afe4c642fbecbcb2", "score": "0.62374085", "text": "public function create_form()\n {\n $formulario='\n <form action=\"'.$this->_setEntorno.'\" method=\"post\" id=\"'.$this->_setNameForm.'\" name=\"'.$this->_setNameForm.'\" >\n <input type=\"hidden\" name=\"Ds_Merchant_Amount\" value=\"'.$this->_setImporte.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_Currency\" value=\"'.$this->_setMoneda.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_Order\" value=\"'.$this->_setPedido.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_MerchantData\" value=\"'.$this->_setMerchantData.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_MerchantCode\" value=\"'.$this->_setFuc.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_Terminal\" value=\"'.$this->_setTerminal.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_TransactionType\" value=\"'.$this->_setTransactionType.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_Titular\" value=\"'.$this->_setTitular.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_MerchantName\" value=\"'.$this->_setNombreComercio.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_MerchantURL\" value=\"'.$this->_setUrlNotificacion.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_ProductDescription\" value=\"'.$this->_setProductoDescripcion.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_ConsumerLanguage \" value=\"'.$this->_setIdioma.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_UrlOK\" value=\"'.$this->_setUrlOk.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_UrlKO\" value=\"'.$this->_setUrlKo.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_PayMethods\" value=\"'.$this->_setMethods.'\" />\n <input type=\"hidden\" name=\"Ds_Merchant_MerchantSignature\" value=\"'.$this->_setFirma.'\" /> \n ';\n $formulario.=$this->_setSubmit;\n $formulario.='\n </form> \n ';\n return $formulario;\n }", "title": "" }, { "docid": "74d04fdcec1ac06dca17360dbfde9430", "score": "0.62349635", "text": "protected function generateForm($data)\n {\n $form = '<form method=\"post\" id=\"form_concordpay\" action=\"' . $this->url . '\" accept-charset=\"utf-8\">';\n foreach ($data as $k => $v) $form .= $this->printInput($k, $v);\n $button = \"<img style='position:absolute; top:50%; left:47%; margin-top:-125px; margin-left:-60px;' src='$img' >\n <script>\n function submitConcordPayForm()\n {\n document.getElementById('form_concordpay').submit();\n }\n setTimeout( submitConcordPayForm, 1500);\n </script>\";\n\n return $form .\n \"<input type='submit' style='display:none;' /></form>\"\n . $button;\n }", "title": "" }, { "docid": "9c0f658c719003d204b49b948c7a651a", "score": "0.6228392", "text": "function generate_paysolutions_form($order_id)\r\n {\r\n\r\n global $woocommerce;\r\n $order = new WC_Order($order_id);\r\n $redirect_url = $this->get_return_url($order);\r\n\r\n if (strcasecmp($this->service_provider, 'money') == 0) {\r\n $service_provider = '';\r\n } else {\r\n $service_provider = 'PAYSOLUTIONS';\r\n }\r\n\r\n if (is_user_logged_in()) { // Customer is loggedin.\r\n $loggedin_user_data = wp_get_current_user();\r\n $cust_email = $loggedin_user_data->data->user_email;\r\n } else {\r\n $cust_email = $order->data['billing']['email']; //Guest customer.\r\n }\r\n\r\n $fixed_description = $this->settings['wc_paysolutions_fixed_description'];\r\n\r\n if ($fixed_description == '') {\r\n $product_name = \"\";\r\n foreach ($order->get_items() as $item) {\r\n $product_name .= $item['name'] . ', ';\r\n }\r\n\r\n $product_name = (strlen($product_name) > 0) ? substr($product_name, 0, strlen($product_name) - 2) : \"\";\r\n $product_name .= '.';\r\n $product_name = filter_var($product_name, FILTER_SANITIZE_STRING);\r\n $product_name = mb_strimwidth($product_name, 0, 255, '...');\r\n\r\n } else {\r\n $product_name = mb_strimwidth($fixed_description, 0, 255, \"\");\r\n }\r\n\r\n $default_lang = WC_PAYSOLUTIONS_Constant::WC_PAYSOLUTIONS_DEFAULT_LANG;\r\n $selected_lang = sanitize_text_field($this->paysolutions_setting_values['wc_paysolutions_default_lang']);\r\n $default_lang = !empty($selected_lang) ? $selected_lang : $default_lang;\r\n\r\n $funpaysolutions_args = array(\r\n 'payment_description' => $product_name,\r\n 'order_id' => $order_id,\r\n 'invoice_no' => $order_id,\r\n 'amount' => $order->order_total,\r\n 'customer_email' => sanitize_email($cust_email),\r\n 'default_lang' => strtoupper($default_lang),\r\n );\r\n\r\n $objWC_PAYSOLUTIONS_Validation_Helper = new WC_PAYSOLUTIONS_Validation_Helper();\r\n $isValid = $objWC_PAYSOLUTIONS_Validation_Helper->wc_paysolutions_is_valid_merchant_request($funpaysolutions_args);\r\n\r\n if (!$isValid) {\r\n foreach ($objWC_PAYSOLUTIONS_Validation_Helper->wc_paysolutions_error as $key => $value) {\r\n echo esc_html__($value, 'woo_paysolutions');\r\n }\r\n\r\n echo '</br>';\r\n echo '&nbsp;&nbsp;&nbsp;&nbsp<a class=\"button cancel\" href=\"' . esc_url($order->get_cancel_order_url()) . '\">' . esc_html__('Cancel order &amp; restore cart', 'woo_paysolutions') . '</a>';\r\n return;\r\n } else {\r\n\r\n echo '<p><strong>' . esc_html__('Thank you for your order.', 'woo_paysolutions') . '</strong> <br/>' . esc_html__('The payment page will open if you click on button \"Pay With PAYSOLUTIONS\".', 'woo_paysolutions') . '</p>';\r\n }\r\n\r\n $objwc_paysolutions_construct_request = new wc_paysolutions_construct_request_helper();\r\n $wc_paysolutions_form_field = $objwc_paysolutions_construct_request->wc_paysolutions_construct_request(is_user_logged_in(), $funpaysolutions_args);\r\n\r\n $strHtml = '';\r\n $strHtml .= '<form action=\"' . esc_url($this->url) . '\" method=\"post\" id=\"paysolutions_payment_form\">';\r\n $strHtml .= $wc_paysolutions_form_field;\r\n $strHtml .= '<input type=\"submit\" class=\"button-alt\" id=\"submit_paysolutions_payment_form\" value=\"' . esc_html__('Pay With PAYSOLUTIONS', 'woo_paysolutions') . '\" />';\r\n $strHtml .= '&nbsp;&nbsp;&nbsp;&nbsp<a class=\"button cancel\" href=\"' . esc_url($order->get_cancel_order_url()) . '\">' . esc_html__('Cancel order &amp; restore cart', 'woo_paysolutions') . '</a>';\r\n $strHtml .= '</form>';\r\n\r\n return $strHtml;\r\n }", "title": "" }, { "docid": "f33a5e9a245573fd54b8915cea159194", "score": "0.6204252", "text": "public function generate_form($order_id)\n\t\t{\n\t\t\tglobal $woocommerce;\n\t\t\t$order = new WC_Order( $order_id );\n \n\t\t\t// We don't care about URL, do params\n\t\t\tif ( $this->testmode == 'yes' )\n\t\t\t{\n\t\t\t\t$action_adr = $this->testurl;\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$action_adr = $this->liveurl;\n\t\t\t}; //\n \n\t\t\t$itransfer_ready\t= ( $this->invoicebox_participant_id && $this->invoicebox_participant_ident && $this->invoicebox_apikey );\n\t\t\t$itransfer_order_amount\t= number_format($order->order_total, 2, '.', '');\n\t\t\t$itransfer_sign\t\t= \"\"; //$this->invoicebox_merchant.':'.$out_summ.':'.$order_id.':'.$this->invoicebox_key1;\n\t\t\t$itransfer_description\t= \"\";\n\n\t\t\tif ( !defined( \"ICL_LANGUAGE_CODE\" ) )\n\t\t\t{\n\t\t\t\tdefine( \"ICL_LANGUAGE_CODE\", $this->invoicebox_language, true );\n\t\t\t}; //\n\n\t\t\tif ( !defined( \"ICL_LANGUAGE_CODE\" ) )\n\t\t\t{\n\t\t\t\t$itransfer_description = \"Order #\" . $order_id . \" at \" . $_SERVER[\"HTTP_HOST\"];\n\t\t\t} else\n\t\t\tif ( ICL_LANGUAGE_CODE == \"ru\" )\n\t\t\t{\n\t\t\t\t$itransfer_description = \"Оплата заказа #\" . $order_id . \" на сайте \" . $_SERVER[\"HTTP_HOST\"];\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$itransfer_description = \"Order #\" . $order_id . \" at \" . $_SERVER[\"HTTP_HOST\"];\n\t\t\t}; //\n \n\t\t\t$args = array(\n\t\t\t\t\"itransfer_participant_id\"\t=> $this->invoicebox_participant_id,\n\t\t\t\t\"itransfer_participant_ident\"\t=> $this->invoicebox_participant_ident,\n\t\t\t\t\"itransfer_language_ident\"\t=> ( defined( \"ICL_LANGUAGE_CODE\" ) ? ICL_LANGUAGE_CODE : \"en\" ),\n\t\t\t\t\"itransfer_method\"\t\t=> $this->invoicebox_method,\n\t\t\t\t\"itransfer_order_id\"\t\t=> $order_id,\n\t\t\t\t\"itransfer_order_amount\"\t=> $itransfer_order_amount,\n\t\t\t\t\"itransfer_order_currency_ident\"=> $order->get_order_currency(),\n\t\t\t\t\"itransfer_body_type\"\t\t=> \"PRIVATE\",\n\t\t\t\t\"itransfer_url_cancel\"\t\t=> $order->get_cancel_order_url(),\n\t\t\t\t\"itransfer_url_back\"\t\t=> $this->get_return_url( $order ),\n\t\t\t\t\"itransfer_url_returnsuccess\"\t=> $this->get_return_url( $order ),\n\t\t\t\t\"itransfer_person_name\"\t\t=> trim( $order->billing_first_name . \" \" . $order->billing_last_name ),\n\t\t\t\t\"itransfer_person_phone\"\t=> trim( $order->billing_phone ),\n\t\t\t\t\"itransfer_person_email\"\t=> trim( $order->billing_email ),\n\t\t\t\t\"itransfer_scheme_id\"\t\t=> \"DEFAULT\",\n\t\t\t\t\"itransfer_order_description\"\t=> $itransfer_description,\n\t\t\t\t\"itransfer_sign\"\t\t=> $itransfer_sign,\n\t\t\t\t\"itransfer_testmode\"\t\t=> ( $this->testmode == 'yes' ? 1 : 0 )\n\t\t\t); //\n\n\n\t\t\t$i = 0; \n\t\t\tforeach($order->get_items() as $item)\n\t\t\t{\n\t\t\t\t$i++;\n\n\t\t\t\t$item[\"quantity\"] = isset( $item[\"quantity\"] ) ? $item[\"quantity\"] : $item[\"qty\"];\n\t\t\t\t$item[\"total\"] = number_format(isset( $item[\"total\"] ) ? $item[\"total\"] : $item[\"line_total\"], 2, \".\", \"\");\n\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_name\" => $item[\"name\"]));\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_quantity\" => $item[\"quantity\"]));\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_measure\" => 'шт.'));\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_price\" => $item[\"total\"]/$item[\"quantity\"]));\n\n\t\t\t\tif ( isset( $item[\"line_tax\"] ) )\n\t\t\t\t{\n\t\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_vatrate\" => $item[\"line_tax\"]));\n\t\t\t\t} else\n\t\t\t\tif ( !$item[\"taxes\"][\"total\"] )\n\t\t\t\t{\n\t\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_vatrate\" => $this->vatrate));\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tforeach($item[\"taxes\"][\"total\"] as $taxes)\n\t\t\t\t\t{\n\t\t\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_vatrate\" => $taxes));\n\t\t\t\t\t}; //foreach\n\t\t\t\t}; //if\n\t\t\t}; //foreach\n\n\n\t\t\tif ( $order->get_total_shipping() > 0 )\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_name\" => \"Доставка\"));\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_quantity\" => \"1\"));\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_measure\" => 'шт.'));\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_price\" => $order->get_total_shipping()));\n\t\t\t\t$args = array_merge($args, array(\"itransfer_item\".$i.\"_vatrate\" => 0));\n\t\t\t}; //\n\n\t\t\t$args_array = array();\n\t\t\tforeach ($args as $key => $value)\n\t\t\t{\n\t\t\t\t$args_array[] = '<input type=\"hidden\" name=\"'.esc_attr($key).'\" value=\"'.esc_attr($value).'\" />';\n\t\t\t}; //\n \n\t\t\treturn\n\t\t\t\t'<form action=\"' . esc_url( $action_adr ) . '\" method=\"POST\" id=\"invoicebox_payment_form\">' . \"\\n\".\n\t\t\t\timplode(\"\\n\", $args_array).\n\t\t\t\t'<input type=\"submit\" class=\"button alt\" id=\"submit_invoicebox_payment_form\" value=\"'.__('Оплатить', 'woocommerce').'\" ' . ( $itransfer_ready ? \"\" : ' disabled=\"disabled\" ' ) . ' /> ' .\n\t\t\t\t'<a class=\"button cancel\" href=\"' . $order->get_cancel_order_url() . '\">' . __('Отказаться от оплаты & вернуться в корзину', 'woocommerce') . \"</a>\\n\".\n\t\t\t\t( $itransfer_ready ?\n\t\t\t\t\t'<script type=\"text/javascript\">function invboxSubmit(){document.forms.invoicebox_payment_form.submit();};setTimeout(\"invboxSubmit()\", 100);</script>' : \n\t\t\t\t\t'<p><strong style=\"color:red\">Платёжный модуль не настроен. Пожалуйста, укажите требуемые настройки платёжного модуля.</strong></p>'\n\t\t\t\t) .\n\t\t\t\t'</form>';\n\t\t}", "title": "" }, { "docid": "2150479dc6488a533cec848ecb83ea01", "score": "0.6201326", "text": "function ideapro_form(){\n /* content variable */\n $content = '';\n $content .= '<form method=\"post\" action=\"http://127.0.0.1/task4/thank-you/\" />' ;\n $content .= '<input type=\"text\" name=\"full_name\" placeholder=\"Full Name\">' ;\n $content .= '<br />';\n\n $content .= '<input type=\"text\" name=\"email_address\" placeholder=\"Email Address\">' ;\n $content .= '<br />';\n\n $content .= '<input type=\"text\" name=\"phone_number\" placeholder=\"Phone Number\">' ;\n $content .= '<br />';\n\n $content .= '<textarea name=\"comments\" placeholder=\"Give us your Comments\"></textarea>' ;\n $content .= '<br />';\n\n $content .= '<input type=\"submit\" name=\"ideapro_submit_form\" value=\"Submit Your Information\" />';\n\n $content .= '</form>';\n return $content ;\n}", "title": "" }, { "docid": "983119c196b4675d4df9b551fb141ce3", "score": "0.6180006", "text": "function warquest_help_donate_form() {\r\n\r\n\t/* input */\r\n\tglobal $config;\r\n\t\r\n\t/* output */\r\n\tglobal $page;\r\n\tglobal $output;\r\n\tglobal $player;\r\n\t\r\n\t$output->title = t('HELP_DONATE_TITLE1');\r\n\t\r\n\t$page .= '<div class=\"subparagraph\">'.t('HELP_DONATE_TITLE1').'</div>';\r\n\t\r\n\t$page .= '<div class=\"box\">';\r\n\t\r\n\t$page .= '<div class=\"right\">';\r\n\t$page .= warquest_image('other/info.png', 'width=\"64\" heigth=\"64\"');\r\n\t$page .= '</div>';\r\n\t\r\n\t$page .= '<span class=\"subparagraph2\">'.t('HELP_SUBTITLE_DONATE1').'</span><br/>';\r\n\t$page .= t('HELP_DONATE1').'<br/>';\r\n\t$page .= '<br/>';\r\n\t\r\n\t$page .= '<span class=\"subparagraph2\">'.t('HELP_SUBTITLE_DONATE2' ).'</span><br/>';\r\n\t$page .= t('HELP_DONATE2', gold_format($config[\"gold_dollar_ratio\"])).'<br/>';\r\n\t$page .= '<br/>';\r\n\t\r\n\t$page .= '<span class=\"subparagraph2\">'.t('HELP_SUBTITLE_DONATE3').'</span><br/>';\r\n\t$page .= t('HELP_DONATE3').'<br/>';\r\n\t$page .= '<br/>';\r\n\t\r\n\t$page .=\t'</form>';\r\n\t\t\r\n\t$page .=\t'<center>';\r\n\r\n\t$tag = 'WarQuest - '.$player->name.' ['.$player->pid.']';\r\n\t$page .=\t'<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">';\r\n\t \r\n\t$page .=\t'<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">';\r\n\t$page .=\t'<input type=\"hidden\" name=\"item_name\" value=\"'.$tag.'\">';\r\n\t$page .=\t'<input type=\"hidden\" name=\"hosted_button_id\" value=\"'.$config['paypal_donate_key'].'\">';\r\n\t$page .=\t'<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\" border=\"0\" name=\"submit\" alt=\"\">';\r\n\t$page .=\t'<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/nl_NL/i/scr/pixel.gif\" width=\"1\" height=\"1\">';\r\n\t$page .=\t'</form>';\r\n\t\r\n\t$page .=\t'</center>';\r\n\r\n\t$page .= '<span class=\"subparagraph2\">'.t('HELP_SUBTITLE_DONATE4').'</span><br/>';\r\n\t$link = warquest_link('mid='.MENU_HOME.'&sid='.PAGE_COMMENT.'&eid='.EVENT_HOME_COMMENT_EDIT.'&oid='.$config[\"adminPid\"], t('LINK_HERE'));\r\n\t$page .= t('HELP_DONATE4', $link);\r\n\t$page .= '<br/>';\r\n\t\r\n\t$page .= '</div>';\t\r\n\t\r\n\twarquest_giftshop_form();\r\n\t\r\n\twarquest_sound('donate.mp3', 1);\t\r\n}", "title": "" }, { "docid": "7f3b15822eb9a630fa38e9a4c3d5a24f", "score": "0.6176766", "text": "function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') {\r\n $form = '<form name=\"' . tep_output_string($name) . '\" action=\"';\r\n if (tep_not_null($parameters)) {\r\n $form .= tep_href_link($action, $parameters);\r\n } else {\r\n $form .= tep_href_link($action);\r\n }\r\n $form .= '\" method=\"' . tep_output_string($method) . '\"';\r\n if (tep_not_null($params)) {\r\n $form .= ' ' . $params;\r\n }\r\n $form .= '>';\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "0288a0b405e485be6d3b19e2d447667c", "score": "0.6163469", "text": "public function payment_fields() {\n echo $this->description . '\n <div style=\"margin-top: 1em;\">\n <p>Social Security Number (yymmdd-nnnn) * </p>\n <input id=\"eliza_ssn\" name=\"eliza_ssn\" type=\"text\">\n </div>';\n\t\t}", "title": "" }, { "docid": "83d0d1cf1c73e155d7a33202fbb769e3", "score": "0.616232", "text": "public function form() {\n $html = 'nothing here';\n\n return $html;\n }", "title": "" }, { "docid": "b9dae02b0fdd1c9ab2d4206f84ce30d2", "score": "0.61612386", "text": "function ccService_form($form, $form_state) {\n\n if(isset($_SESSION['cart_order'])) { //locate the current order from the session\n $order = uc_order_load(intval($_SESSION['cart_order']));\n } else {\n // watchdog('ccStore_form', 'Could not load current order: !fault', $e->getMessage());\n }\n\n $cc_class_sel = 'uc_cc_show';\n $cc_class_pay = 'uc_cc_hide'; \n\n // Initiate form and add wrappers\n $form = array();\n $form['wrapper_header'] = array('#markup' => t('<div id=\"cc-wrapper\"><div id=\"cc_pay\"></div><div id=\"cc-border\">'));\n\n\t//$form['ccStore_payment_processing_wrapper'] = array('#markup' => t('<div id=\"cc_payment_processing_wrapper\"></div>'));\n\n\t/// double check this pushes to the form array\n\t$form += coinWrapper($cc_class_sel);\n\t$form += serviceWrapper($cc_class_pay);\n\t$form += paymentWrapper($cc_class_pay);\n \t$form['wrapper_end'] = array('#markup' => t('</div></div>'));\n \treturn $form; \n}", "title": "" }, { "docid": "90d3957b1380cccb3c7f72473f902ef9", "score": "0.6154462", "text": "function commerce_virtualmerchant_payment_form($order_id = 0) {\n global $base_url, $user;\n \n // need the order to get the order balance to pay\n // default to the current user's shopping cart\n if ($order_id == 0) {\n $order = commerce_cart_order_load($user->uid);\n $order_id = $order->order_id;\n }\n else {\n $order = commerce_order_load($order_id);\n }\n\n // should never happen\n if ($order == FALSE) {\n _commerce_virtualmerchant_fatal_error(\"Error loading order. Order Number {$order_id} not found\");\n }\n\n // get the amount to pay\n $order_balance = commerce_payment_order_balance($order);\n if ($order_balance['currency_code'] != commerce_default_currency()) {\n $order_balance['amount'] = commerce_currency_convert($order_balance['amount'], $order_balance['currency_code'], commerce_default_currency());\n $order_balance['currency_code'] = commerce_default_currency();\n }\n $currency = commerce_currency_load();\n $amount = number_format(commerce_currency_amount_to_decimal($order_balance['amount'], $order_balance['currency_code']), $currency['decimals'], $currency['decimal_separator'], '');\n\n // check if we are using a dummy response\n if (variable_get('commerce_virtualmerchant_server', 0) != 2) {\n // create a post request to get the Converge Payment Form html\n $post_values = array(\n 'ssl_merchant_id' => variable_get('commerce_virtualmerchant_merchant_id', ''),\n 'ssl_user_id' => variable_get('commerce_virtualmerchant_user_id', ''),\n 'ssl_pin' => variable_get('commerce_virtualmerchant_pin', ''),\n 'ssl_test_mode' => variable_get('commerce_virtualmerchant_server', 0) == 0 ? 'true' : 'false',\n 'ssl_transaction_type' => \"ccsale\",\n 'ssl_show_form' => 'true',\n 'ssl_amount' => $amount,\n 'ssl_receipt_link_method' => 'REDG',\n 'ssl_receipt_link_url' => $base_url . '/commerce/virtualmerchant/response/' . $order_id,\n );\n\n // Allow other modules to alter the post data\n drupal_alter('commerce_virtualmerchant_transaction', $post_values, $order);\n\n $url = ($post_values['ssl_test_mode'] == 'true') ? COMMERCE_VIRTUALMERCHANT_TEST_URL : COMMERCE_VIRTUALMERCHANT_URL;\n $options = array(\n 'headers' => array('Content-Type' => 'application/x-www-form-urlencoded'),\n 'method' => 'POST',\n 'data' => urldecode(http_build_query($post_values)),\n 'timeout' => COMMERCE_VIRTUALMERCHANT_TIMEOUT,\n );\n\n // Post the request to Converge\n $http_response = drupal_http_request($url, $options);\n if (isset($http_response->error)) {\n _commerce_virtualmerchant_fatal_error(\"Error with HTTP request.\\nResponse : \" . print_r($http_response, TRUE));\n }\n\n // include javascript to validate email address of anonymous users\n $js = 'function doPinPad(){';\n if ($user->uid == 0) {\n $js .= \"\n var emailInput = top.document.getElementById('edit-account-login-mail');\n if (emailInput && emailInput.value.indexOf('@') < 1) {\n emailInput.focus();\n emailInput.style.color = 'white';\n emailInput.style.backgroundColor = 'red';\n alert('You must enter a valid e-mail address to receive your receipt');\n return false;\n }\n document.getElementById('ssl_email').value = emailInput.value;\n \";\n }\n\n // hack the html returned by Converge, so it will work in the iframe\n $html = str_replace(array(\n '<head>',\n 'name=\"form1\"',\n '<br/>',\n 'function doPinPad(){',\n ),\n array(\n \"<head><base href=\\\"{$url}\\\"></base>\",\n 'name=\"form1\" target=_top',\n '',\n $js,\n ),\n $http_response->data);\n\n // hide the ssl_email element\n $html = preg_replace('/<tr>\\s*?.*?ssl_email\">/', '<tr style=\"display:none;\"><td><label for=\"ssl_email\">', $html, 1);\n }\n else {\n // build a test form to create the dummy response\n $form = drupal_get_form('commerce_virtualmerchant_dummy_form');\n\n $form['#action'] .= \"/{$order_id}\";\n $form['ssl_amount']['#default_value'] = $amount;\n $form['ssl_amount']['#value'] = $amount;\n $html = '<!DOCTYPE html>'. drupal_render($form);\n }\n\n print $html;\n drupal_exit();\n}", "title": "" }, { "docid": "eabdaabb190e69b6c70b1f7570543afe", "score": "0.6146731", "text": "public function generate()\r\n {\r\n\t\tif (!is_null(\\Input::post('FORM_SUBMIT')))\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif (!is_null(\\Input::post('addlicense')))\r\n\t\t\t{\r\n\t\t\t\t$this->_strLicense = \\Input::post('licensekey');\r\n\t\t\t\t\\Config::persist('chex-license', $this->_strLicense);\r\n\t\t\t\t\\Message::addConfirmation($GLOBALS['TL_LANG']['marxup_chex']['licenseSaved']);\r\n\t\t\t}\r\n\t\t\telseif (!is_null(\\Input::post('removelicense')))\r\n\t\t\t{\r\n\t\t\t\t$this->_strLicense = '';\r\n\t\t\t\t\\Config::remove('chex-license');\r\n\t\t\t\t\\Message::addConfirmation($GLOBALS['TL_LANG']['marxup_chex']['licenseRemoved']);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// get key if not set\r\n\t\tif (is_null($this->_strLicense))\r\n\t\t\t$this->_strLicense = \\Config::get('chex-license');\r\n\r\n\t\t//!todo mulu: Bestellschritte und co\r\n\t\tif (empty($this->_strLicense))\r\n\t\t{\r\n\t\t\t$objTemplate = new \\Contao\\BackendTemplate('nolicense');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// debug\r\n\t\t\tif (!empty($_GET['lic']))\r\n\t\t\t\t$this->_strLicense = $_GET['lic'];\r\n\t\t\t\r\n\t\t\t$objTemplate = new \\Contao\\BackendTemplate('status');\r\n\t\t\t\r\n\t\t\t// start a manual backup\r\n\t\t\tif (!empty($_POST['newmanualbackup']))\r\n\t\t\t{\r\n\t\t\t\t$this->apirequest('manualbackup');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$arrStatus = $this->apirequest('info');\r\n\t\t\t\r\n\t\t\tif ($arrStatus['error'] > 0)\r\n\t\t\t\t\\Message::addError($arrStatus['errormessage']);\r\n\t\t\t\r\n\t\t\t$objTemplate->status = $arrStatus;\r\n\t\t}\r\n\r\n\t\t$objTemplate->license = $license;\r\n\t\t$objTemplate->lang\t = $GLOBALS['TL_LANG']['marxup_chex'];\r\n\t\t$objTemplate->messages = \\Message::generate();\r\n return $objTemplate->parse();\r\n }", "title": "" }, { "docid": "8548d0be13a100ba033b18babc775132", "score": "0.614595", "text": "public function form()\n {\n\n $code = <<<CODE\n<form method=\"{$this->method}\" action=\"{$this->action}\" id=\"{$this->id}\" accept-charset=\"utf-8\" >\nCODE;\n\n if ($this->ajax)\n $code .= '</form>';\n\n return $this->out($code);\n\n }", "title": "" }, { "docid": "aa0e94e526b5db46310a0aaf7c287c5c", "score": "0.614592", "text": "function commerce_oz_payway_api_submit_form($payment_method, $pane_values, $checkout_pane, $order) {\n \t \t \t\n // Include the Drupal Commerce credit card file for forms\n module_load_include('inc', 'commerce_payment', 'includes/commerce_payment.credit_card');\n \n $form_params = array();\n $form_defaults = array();\n \n $settings = _commweb_get_var('commerce_oz_gateway_' . $payment_method['gateway_provider']);\n \n $livemode = $settings['commerce_oz_transaction_mode'];\n \n // Use CVV Field?\n if($settings['commerce_oz_use_cvv'] == 'cvv')\n {\n \t$form_params['code'] = '';\n }\n \n // Use Card Holder Name Field ?\n if($settings['commerce_oz_use_card_name'] == 'name')\n {\n \t$form_params['owner'] = 'Card Holder';\n }\n \n\n\t$logopath = '/' . drupal_get_path('module', 'commerce_oz') . '/image/payway_68.png';\n\t\n\t$descText = '<a href=\"http://www.payway.com.au\"><img src=\"' . $logopath . '\" /></a><br />You are paying through the <a href=\"http://www.payway.com.au\"/\">PayWay</a> payment gateway.<br />Enter your payment details below and click Continue to next step.<br />You will be taken to your Receipt information.<br />';\n\n // set the defaults for testing\n if($settings['commerce_oz_transaction_mode'] == 'test') {\n\n\t \t$form_defaults['number'] = $settings['commerce_oz_test_card_number'];\n\t \t$form_defaults['code'] = $settings['commerce_oz_test_card_cvv'];\n\t \t$form_defaults['exp_month'] = $settings['commerce_oz_test_card_exp_month'];\n\t \t$form_defaults['exp_year'] = $settings['commerce_oz_test_card_exp_year'];\n\t}\n\n \t// Load the DC credit card form\n \t$form = commerce_payment_credit_card_form($form_params, $form_defaults);\n\n $form['commerce_oz_payway'] = array(\n '#type' => 'fieldset',\n '#title' => $payment_method['title'],\n '#collapsible' => FALSE, \n \t'#collapsed' => FALSE,\n '#description' => t($descText),\n );\n\n\n\t// Give the card number field some air\n\t$form['credit_card']['number']['#size'] = 20;\n\n\n\n\n if($settings['commerce_oz_transaction_mode'] == 'test')\n {\n \n $form['credit_card']['number']['#description'] = t('<strong>Test Mode</strong> - You can only use the credit cards listed here in Test Mode. Valid card numbers are:\n \t\t<br /><br />Master:&nbsp;&nbsp;5163200000000008 Expiry 08/20 CVN 847\n <br />Visa:&nbsp;&nbsp;&nbsp;&nbsp;4564710000000004 Expiry 02/19 CVN 070\n <br />Amex:&nbsp;&nbsp;&nbsp;371111111111114\n <br />Diners:&nbsp;&nbsp;36000000000008\n <br />');\n\n $form['credit_card']['exp_year']['#description'] = t('<strong>Test Mode</strong> - All Test Cards can use any valid Expiry Date.');\n\n $form['credit_card']['owner']['#description'] = t('<strong>Test Mode</strong> - Payway transactions do NOT require the Card Owner field. If you choose to request this information from your users it will however be stored with the transaction records here.');\n\n }\n \n $form['commerce_oz_payway']['credit_card'] = $form['credit_card'];\n\tunset($form['credit_card']);\n\t\n\t\n return $form;\n \n}", "title": "" }, { "docid": "18c3813f72f0bc4cfbb3d3de30183486", "score": "0.614461", "text": "function jeemu_contact_form()\n{\n $form = '';\n $form .= '<h3>Contact Form</h3>';\n $form .= '<form method=\"post\" action=\"https://www.pst.or.tz/devEnv/thank-you/\">';\n $form .= '<input type=\"text\" name=\"full_name\" placeholder=\"Your Full Name\" />';\n $form .= '<br/>';\n $form .= '<input type=\"text\" name=\"email\" placeholder=\"Email Address\" />';\n $form .= '<br/>';\n $form .= '<input type=\"text\" name=\"phone_number\" placeholder=\"Phone\" />';\n $form .= '<br/>';\n $form .= '<textarea name=\"message\" class=\"large-text\" placeholder=\"Your message\"></textarea>';\n $form .= '<br/>';\n $form .= '<input type=\"submit\" name=\"jeemu_submit_form\" value=\"CONTACT US\" class=\"button button-primary\" />';\n $form .= '</form>';\n\n return $form;\n}", "title": "" }, { "docid": "2b1f33a0e0613638490d3cf3afba4c26", "score": "0.61440647", "text": "public function form()\n {\n\n $this->switch('withdraw_open', '开启提现')->rules('required');\n\n $this->text('withdraw_pass', '提现审核密码')->rules('required')->help('审核提现订单时使用');\n\n $this->number('rate', '分润提现税点')->rules('required')->help('分润钱包提现时的税点,单位为百分位');\n\n $this->number('rate_m', '分润提现单笔费用')->rules('required')->help('分润钱包提现时的单笔提现费,单位为百分位');\n\n $this->number('return_blance', '返现提现税点')->rules('required')->help('返现钱包提现时的税点,单位为百分位');\n\n $this->number('return_money', '返现提现单笔费用')->rules('required')->help('返现钱包提现时的单笔提现费,单位为百分位');\n\n $this->number('no_check', '分润免审核额度')->rules('required')->help('分润钱包提现时,低于此额度不用进行审核,单位 分');\n\n $this->number('no_check_return', '返现免审核额度')->rules('required')->help('返现钱包提现时,低于此额度不用进行审核,单位 分');\n\n }", "title": "" }, { "docid": "5abc639d8e945b175b6558bfb3a37f53", "score": "0.61432093", "text": "public function getForm() {\n return view('members/pay');\n }", "title": "" }, { "docid": "7497a76d200c5ee7a56e63d7b840009e", "score": "0.61385804", "text": "function mailprovider_form1_shortcode() {\n\tob_start(); ?>\n\n <!--Insert your mail provider's HTML and JS form code here-->\n\n\t<?php\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "fde013204862bdd83f8813ef66afb2b2", "score": "0.61332774", "text": "function uncomp_edd_purchase_form_after_submit() { ?>\n<!--<p>After order button</p>-->\n</div>\n<?php }", "title": "" }, { "docid": "cb1dde76e273d6771496f4806bc8b54f", "score": "0.6131526", "text": "public function onTP_GetHTML($vars)\n\t{\n\t\t// Fomating on data\n\t\t$vars = $this->preFormatingData($vars);\n\t\t$plgPaymentEwayrapid3Helper = new plgPaymentEwayrapid3Helper;\n\n\t\t// Split the name in first and last name\n\t\t$user = JFactory::getUser();\n\t\t$nameParts = $user->name;\n\t\t$firstName = $user->name;\n\t\t$lastName = $user->name;\n\n\t\t// Get the base URL without the path\n\t\t$rootURL = rtrim(JURI::base(), '/');\n\t\t$subpathURL = JURI::base(true);\n\n\t\tif (!empty($subpathURL) && ($subpathURL != '/'))\n\t\t{\n\t\t\t$rootURL = substr($rootURL, 0, -1 * strlen($subpathURL));\n\t\t}\n\n\t\t// Customer\n\t\t$request = new CreateAccessCodeRequest;\n\t\t$request->Customer->Reference = $vars->order_id;\n\n\t\t// $request->Customer->TokenCustomerID=\"91665902\";\n\t\t$request->Customer->Title = 'Mr.';\n\t\t$request->Customer->FirstName = $firstName;\n\t\t$request->Customer->LastName = $lastName;\n\t\t$country = !empty($vars->country) ? strtolower(trim($vars->country)) :'au';\n\t\t$request->Customer->Country = $country;\n\t\t$request->Customer->Email = trim($vars->user_email);\n\n\t\t// Shipping details\n\t\t$request->ShippingAddress->Country = !empty($vars->country) ? strtolower(trim($vars->country)) :'au';\n\n\t\t// Item/product\n\t\t$item = new LineItem;\n\t\t$item->SKU = $vars->order_id;\n\t\t$item->Description = !empty($vars->item_name) ? strtolower(trim($vars->item_name)) :'';\n\t\t$request->Items->LineItem[0] = $item;\n\n\t\t// Payment\n\t\t$request->Payment->TotalAmount = (int) ($vars->amount * 100);\n\t\t$request->Payment->InvoiceNumber = $vars->order_id;\n\t\t$request->Payment->InvoiceDescription = \"Orderid -\" . ' #' . $vars->order_id;\n\t\t$request->Payment->InvoiceReference = $vars->order_id;\n\t\t$request->Payment->CurrencyCode = strtoupper($vars->currency_code);\n\n\t\t// Url to the page for getting the result with an AccessCode\n\t\t$vars->return = trim($vars->return);\n\t\t$request->RedirectUrl = (string) $vars->notify_url;\n\n\t\t// Populate values for Options\n\t\t$opt1 = new Option;\n\t\t$opt1->Value = $vars->user_email;\n\t\t$request->Options->Option[0] = $opt1;\n\n\t\t// Method for this request. e.g. ProcessPayment, Create TokenCustomer, Update TokenCustomer & TokenPayment\n\t\t$request->Method = 'ProcessPayment';\n\n\t\ttry\n\t\t{\n\t\t\t// Call RapidAPI\n\t\t\t$result = $this->ewayService->CreateAccessCode($request);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tJError::raiseError(500, 'You have an error in your eWay Rapid 3.0 setup: ' . $e->getMessage());\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isset($result->Errors))\n\t\t{\n\t\t\t$errorMsg = '';\n\n\t\t\tforeach (explode(',', $result->Errors) as $e)\n\t\t\t{\n\t\t\t\t$errorMsg .= $this->ewayService->APIConfig[$e] . ', ';\n\t\t\t}\n\n\t\t\t$errorMsg = substr($errorMsg, 0, -2);\n\t\t\tJError::raiseError(500, 'You have an error in your eWay Rapid 3.0 setup: ' . $errorMsg);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$vars->AccessCode = $result->AccessCode;\n\t\t$vars->FormActionURL = $result->FormActionURL;\n\t\t$html = $this->buildLayout($vars);\n\t/*\t@ob_start();\n\t\tinclude dirname(__FILE__).'/ewayrapid3/form.php';\n\t\t$html = @ob_get_clean();\n\t*/\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "b73de7e6e1f70a439e971734372ba0d6", "score": "0.61294806", "text": "public function generateForm()\r\n\t{\r\n\t\t$tpl\t\t= $this->input->post('tpl');\r\n\t\t\r\n\t\techo $this->load->view('ticket/'.$tpl,'',true);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "cacd0b5c5434cb97f7febcb69468970a", "score": "0.61194026", "text": "function getFormHTML()\n {\n $html = \"<table width='100%'>\\n\";\n $html .= \"<tr><td width='200'>Assignment Window Size</td><td>\";\n $html .= \"<input type='text' name='windowsize' id='windowsize' value='4' size='10'/></td></tr>\\n\";\n $html .= \"<tr><td>Review Score Threshold</td><td>\";\n $html .= \"<input type='text' name='threshold' id='threshold' value='70' size='10'/>%</td></tr>\";\n $html .= \"</table>\\n\";\n return $html;\n }", "title": "" }, { "docid": "8cfb0098613d5d0e8c9d47a7bba7659e", "score": "0.61146635", "text": "public function generate_html()\n {\n // Prepare the input data\n $input_data = $this->input_data[0];\n \n $parameters = [\n 'label' => $this->label,\n 'field_name' => $this->field_name,\n 'value' => $input_data\n ];\n\n $return = $this->stub->parse_stub('input-text', $parameters).\"\\n\";\n\n return $return;\n }", "title": "" }, { "docid": "d940646b40f71e1c35f644e54f4b2b80", "score": "0.6107553", "text": "function receipt_page( $donation ) {\n\n\t\techo '<p>'.__('Thank you for your donation, please click the button below to pay with WorldPay.', 'wpdonations_worldpay').'</p>';\n\t\techo $this->generate_worldpay_form( $donation_id );\n\n\t}", "title": "" }, { "docid": "904a0511fce7a03fceddd7f3a727e80b", "score": "0.61022407", "text": "function createPurchaseOrderDiscountForm($table_def, $table_html ,$form_handler, $complete_location ,$cancel_location,$pos_purchase_order_id )\n{\n\t$html = confirmNavigation();\n\t$html .= '<script src=\"add_discount_to_order_contents.2014.08.03.js\"></script>';\n\t$html .= '<link type=\"text/css\" href=\"../poStyles.css\" rel=\"Stylesheet\"/>'.newline();\n\t//Product sub ID QTY ORDERED QTY RECEIVED QTY DAMAGED\n\t$html .= '<form id = \"add_discount_to_order_contents\" name=\"add_discount_to_order_contents\" action=\"'.$form_handler.'\" method=\"post\" >';\n\t$html .= '<p>Order Discount (%) <INPUT TYPE=\"TEXT\" class=\"lined_input\" id=\"show_discount\" style = \"background-color:yellow;width:20px;\" NAME=\"show_discount\" onKeyPress=\"return disableEnterKey(event)\" onKeyup=\"updateShowDiscount(this)\"\t/>';\n\t//$html .= '<input class = \"button\" type=\"button\" style=\"width:250px;margin: 0px 4px 0px 4px;\" name=\"create_po\" value=\"Apply Discount to all Ordered Quantity\" onclick=\"copyQuantity()\"/>';\n\t$html .= '</p><p></p>';\n\t$html .= '<p>Warning: If the order contents are deleted then the discounts will also be deleted</p>';\n\t$html .= $table_html;\n\t$html .= '<p>Original Order Cost <INPUT TYPE=\"TEXT\" class=\"lined_input\" readonly=\"readonly\" id=\"order_cost\" style = \"width:50px;\" NAME=\"order_cost\"\t/>';\n\t$html .= 'Total Discount <INPUT TYPE=\"TEXT\" class=\"lined_input\" readonly=\"readonly\" id=\"total_discount\" style = \"width:50px;\" NAME=\"total_discount\"\t/>';\n\t$html .= 'Discounted Order Cost <INPUT TYPE=\"TEXT\" class=\"lined_input\" readonly=\"readonly\" id=\"discounted_order_cost\" style = \"width:50px;\" NAME=\"discounted_order_cost\"\t/></p>';\n\t$html .= '<p><input class = \"button\" type=\"submit\" name=\"submit\" value=\"Submit\" onclick=\"needToConfirm=false;\"/>';\n\t$html .= '<input class = \"button\" type=\"submit\" name=\"submit\" value=\"Cancel\" /></p>'.newline();\n\t$html .= createHiddenSerializedInput('table_def', prepareArrayTableForPost($table_def)).newline();\t\n\t$html .= '<script>var json_table_def = ' . prepareArrayTableDefForJavascript($table_def) . ';</script>';\n\t$html .= createHiddenInput('complete_location', $complete_location);\n\t$html .= createHiddenInput('cancel_location', $cancel_location);\n\t//close the form\n\t$html .= '</form>' .newline();\n\t//drop the array out for form validation\n\t//$json_table_def = json_encode($table_def);\n\t$html .= '<script>var complete_location = \"' . $complete_location . '\";</script>';\n\t$html .= '<script>var cancel_location = \"' . $cancel_location . '\";</script>';\n\t$html .= '<script>needToConfirm = true;</script>';\n\t\n\t\n\treturn $html;\n}", "title": "" }, { "docid": "ca914dae635b195b8beb9b26d6273e5f", "score": "0.6089075", "text": "function aurumpay_payment_mlhuillier_form($form, &$form_state, $user_id, $order_id) {\n global $base_url;\n $base = array(\n '#type' => 'textfield',\n '#required' => TRUE,\n );\n $hidden = array(\n '#type' => 'hidden',\n '#required' => TRUE,\n );\n $user = user_load($user_id);\n $order = commerce_order_load($order_id);\n if ( (bool)$order ) {\n $addressfield = array();\n \n $profile_id = field_get_items('commerce_order', $order, 'commerce_customer_billing');\n\n $customer_profile = commerce_customer_profile_load(isset($profile_id) ? $profile_id[0]['profile_id'] : 0);\n\n if ($customer_profile)\n $addressfield = field_get_items('commerce_customer_profile', $customer_profile, 'commerce_customer_address');\n\n $fee = ( !empty($order->commerce_order_total) ) ? $order->commerce_order_total['und'][0]['amount'] : FALSE;\n $fee = ( $fee ) ? $fee / 100 : 0;\n $fee = sprintf(\"%01.2f\", $fee);\n\n $form['endpoint'] = $hidden + array(\n '#value' => variable_get(PAYMENT_METHOD_MLHUILLIER . '_mid'),\n );\n $form['login'] = $hidden + array(\n '#value' => variable_get(PAYMENT_METHOD_MLHUILLIER . '_login'),\n );\n $form['merchant_control'] = $hidden + array(\n '#value' => variable_get(PAYMENT_METHOD_MLHUILLIER . '_control_key'),\n );\n $form['merchant_name'] = $hidden + array(\n '#value' => '',\n );\n $form['user_id'] = array(\n '#type' => 'hidden',\n '#value' => $user_id, \n );\n $form['ipaddress'] = $hidden + array(\n '#value' => $_SERVER['REMOTE_ADDR'],\n );\n $form['server_callback_url'] = $hidden + array(\n '#value' => $base_url . '/aurumpay_callback',\n );\n $form['merchant_redirect'] = $hidden + array(\n '#value' => $base_url . '/' . variable_get('aurumpay_payment_redirect_url'),\n );\n $form['client_orderid'] = $hidden + array(\n '#value' => $order_id,\n );\n $form['payment_method'] = $hidden + array(\n '#value' => PAYMENT_METHOD_OTC,\n );\n $form['country'] = $hidden + array(\n '#value' => 'PH',\n );\n $form['currency'] = $hidden + array(\n '#value' => 'PHP',\n );\n $form['order_desc'] = array(\n '#type' => 'hidden',\n '#value' => '',\n );\n $form['amount'] = $hidden + array(\n '#value' => $fee,\n );\n $form['order_id'] = array(\n '#title' => 'Order ID',\n '#type' => 'textfield',\n '#value' => $order_id,\n '#disabled' => TRUE,\n );\n $form['display_amount'] = $base + array(\n '#title' => 'Amount',\n '#value' => $fee,\n '#disabled' => TRUE,\n );\n $form['first_name'] = $base + array(\n '#title' => 'First Name',\n '#default_value' => $addressfield ? $addressfield[0]['first_name'] : '',\n );\n $form['last_name'] = $base + array(\n '#title' => 'Last Name',\n '#default_value' => $addressfield ? $addressfield[0]['last_name'] : '',\n );\n $form['address1'] = $base + array(\n '#title' => 'Address',\n '#default_value' => $addressfield ? $addressfield[0]['thoroughfare'] : '',\n );\n $form['city'] = $base + array(\n '#title' => 'City',\n '#default_value' => $addressfield ? $addressfield[0]['locality'] : '',\n );\n $form['zip_code'] = $base + array(\n '#title' => 'Zip Code',\n '#default_value' => $addressfield ? $addressfield[0]['postal_code'] : '',\n );\n $form['phone'] = $base + array(\n '#title' => 'Phone',\n );\n $form['email'] = $base + array(\n '#title' => 'Email',\n '#default_value' => $user ? $user->mail : '',\n );\n $form['addons'] = array(\n '#prefix' => '<div class=\"addons-wrapper\">',\n '#suffix' => '</div>',\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Submit',\n '#validate' => array('aurumpay_payment_validate'),\n );\n $form['#action'] = variable_get(PAYMENT_METHOD_MLHUILLIER . '_sale_url'); \n $form['#method'] = 'POST';\n\n return $form;\n }\n}", "title": "" }, { "docid": "4d1b640314b0ab13c744fd531bb4a6be", "score": "0.6084129", "text": "public function payment_fields() {\n\t\t$integration_type_cls = 'integration_type_' . $this->id;\n\t\techo '<input type=\"hidden\" class=\"' . wp_kses_data( $integration_type_cls ) . '\" value=\"' . wp_kses_data( $this->get_integration_type() ) . '\" />';\n\t\tif ( class_exists( 'APS_Public' ) ) {\n\t\t\tAPS_Public::load_valu_wizard( $this->aps_config->get_language() );\n\t\t}\n\t}", "title": "" }, { "docid": "8053a2c7f01766139f9e94c5a91f99cb", "score": "0.6079936", "text": "function Cform(){\r\n \r\n print('</form>');\r\n \r\n }", "title": "" }, { "docid": "6d2cd67435a692d1fddfc384c7f0edce", "score": "0.6059557", "text": "function serviceWrapper($cc_class_pay){\n\n\t///// start service charge wrapper\n\t$form['cc_service_payment_wrapper'] = array('#markup' => t('<div id=\"cc_service_payment_wrapper\" class=\"'.$cc_class_pay.'\">'));\n\t$form['cc_service_payment'] = array('#markup' => t('<div id=\"cc_service_information\">Checking Balance</div>'));\n\t$form['cc_service_charge'] = array(\n\t\t'#markup' => '<div id=\"cc_coin_charge\" class=\"uc_cc_show\"><a id=\"cc_coin_charge\" class=\"btn btn-primary\" style=\"cursor: pointer\">Service Charge</a></div>',\n \t'#value' => t('Service Charge'),\n '#ajax' => array(\n 'callback' => 'service_charge_submit'),);\n\t$form['uc_cc_payment_type'] = array(\n\t\t '#type' => 'hidden',\n\t\t '#value' => t(''),\n\t\t );\n // $form['uc_cc_service_fund'] = array('#markup' => '<div id=\"cc_coin_fund\" class=\"uc_cc_show\"><a id=\"cc_coin_fund\" class=\"btn btn-primary\" style=\"cursor: pointer\">Fund Account</a></div><br />'); \n\n\t///// End service charge wrapper\n $form['uc_cc_service_payment_wrapper_end'] = array('#markup' => t('</div>'));\n\treturn $form;\n}", "title": "" }, { "docid": "2bfea42d9cd57bfc5121c0c96abdeded", "score": "0.6032346", "text": "function print_form(){\n }", "title": "" }, { "docid": "6a36023fb8d95887306018bc0269f300", "score": "0.60239834", "text": "function payment_form( $cart, $shipping_info ) {\n\n\t\t\tglobal $mp;\n\t\t\n\t\t\t$settings = get_option( 'mp_settings' );\n\t\t\n\t\t\tif ( ! is_user_logged_in() ) {\n\n\t\t\t\t$message = str_replace( '%login_url_here%', wp_login_url( mp_checkout_step_url( 'checkout' ) ), $settings['gateways']['mycred']['visitors'] );\n\t\t\t\t$message = $this->mycred->template_tags_general( $message );\n\n\t\t\t\treturn '<div id=\"mp-mycred-balance\">' . $message . '</div>';\n\n\t\t\t}\n\t\t\n\t\t\t$balance = $this->mycred->get_users_balance( get_current_user_id(), $this->mycred_type );\n\t\t\t$total = $this->get_cart_total( $cart );\n\t\t\n\t\t\t// Low balance\n\t\t\tif ( $balance-$total < 0 ) {\n\n\t\t\t\t$message = $this->mycred->template_tags_user( $settings['gateways']['mycred']['lowfunds'], false, wp_get_current_user() );\n\t\t\t\t$instructions = '<div id=\"mp-mycred-balance\">' . $message . '</div>';\n\t\t\t\t$red = ' style=\"color: red;\"';\n\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t$message = '';\n\t\t\t\t$instructions = $this->mycred->template_tags_general( $settings['gateways']['mycred']['instructions'] );\n\t\t\t\t$red = '';\n\n\t\t\t}\n\t\t\n\t\t\t// Return Cost\n\t\t\treturn '\n<div id=\"mp-mycred-balance\">' . $instructions . '</div>\n<div id=\"mp-mycred-cost\">\n<table style=\"width:100%;\">\n\t<tr>\n\t\t<td class=\"info\">' . __( 'Current Balance', 'mycred_market' ) . '</td>\n\t\t<td class=\"amount\">' . $this->mycred->format_creds( $balance ) . '</td>\n\t</tr>\n\t<tr>\n\t\t<td class=\"info\">' . __( 'Total Cost', 'mycred_market' ) . '</td>\n\t\t<td class=\"amount\">' . $this->mycred->format_creds( $total ) . '</td>\n\t</tr>\n\t<tr>\n\t\t<td class=\"info\">' . __( 'Balance After Purchase', 'mycred_market' ) . '</td>\n\t\t<td class=\"amount\"' . $red . '>' . $this->mycred->format_creds( $balance-$total ) . '</td>\n\t</tr>\n</table>\n</div>';\n\n\t\t}", "title": "" }, { "docid": "fac252b8deadcf338dafd1c12cef881f", "score": "0.60204536", "text": "public function beforeRenderPaymentForm() { }", "title": "" }, { "docid": "21c99065944e07ae6bc9feb8e369458e", "score": "0.60081947", "text": "function commerce_oz_ematters_2p_submit_form($payment_method, $pane_values, $checkout_pane, $order) {\n \t \t \t\n // Include the Drupal Commerce credit card file for forms\n module_load_include('inc', 'commerce_payment', 'includes/commerce_payment.credit_card');\n \n $form_params = array();\n $form_defaults = array();\n \n $settings = _commweb_get_var('commerce_oz_gateway_' . $payment_method['gateway_provider']);\n \n $livemode = $settings['commerce_oz_transaction_mode'];\n\t\n\t$form_params['owner'] = 'Card Holder';\t\n \t$form_params['code'] = 'CVV';\n \n\n\t$logopath = '/' . drupal_get_path('module', 'commerce_oz') . '/image/ematters_68.png';\n\t\n\t$descText = '<a href=\"http://www.paymentexpress.com\"><img src=\"' . $logopath . '\" /></a><br />Enter your payment details below and click Continue to next step.<br />You will be taken to your Receipt information.<br />';\n\n // set the defaults for testing\n if($settings['commerce_oz_transaction_mode'] == 'test') {\n\n\t \t$form_defaults['number'] = $settings['commerce_oz_test_card_number'];\n\t \t$form_defaults['code'] = $settings['commerce_oz_test_card_cvv'];\n\t \t$form_defaults['exp_month'] = $settings['commerce_oz_test_card_exp_month'];\n\t \t$form_defaults['exp_year'] = $settings['commerce_oz_test_card_exp_year'];\n\t}\n\n \t// Load the DC credit card form\n \t$form = commerce_payment_credit_card_form($form_params, $form_defaults);\n\n $form['commerce_oz_2p_head'] = array(\n '#type' => 'fieldset',\n '#title' => $payment_method['title'],\n '#collapsible' => FALSE, \n \t'#collapsed' => FALSE,\n '#description' => t($descText),\n );\n\n if($settings['commerce_oz_transaction_mode'] == 'test')\n {\n \n $form['credit_card']['number']['#description'] = t('<strong>Test Mode</strong> - You can only use the credit cards listed here in Test Mode. Valid card numbers are:\n \t\t<br /><br />Master:&nbsp;&nbsp;5431111111111111\n <br />Visa:&nbsp;&nbsp;&nbsp;&nbsp;4111111111111111\n <br />Amex:&nbsp;&nbsp;&nbsp;371111111111114\n <br />Diners:&nbsp;&nbsp;36000000000008\n <br /><br />All Test Cards can use any valid Expiry Date.');\n\n $form['credit_card']['exp_year']['#description'] = t('<strong>Test Mode</strong> -All Test Cards can use any valid Expiry Date.');\n\n $form['credit_card']['owner']['#description'] = t('<strong>Test Mode</strong> - PXPost transactions do NOT require the Card Owner field. If you choose to request this information from your users it will however be stored with the transaction records here and in the PXPost system.');\n\n }\n \n $form['commerce_oz_2p_head']['credit_card'] = $form['credit_card'];\n\tunset($form['credit_card']);\n\t\n\t\n return $form;\n \n}", "title": "" }, { "docid": "c472f62b64b71b35815c76201d3d36e3", "score": "0.6007235", "text": "function submit_paypal_post() {\n // a form with hidden elements which is submitted to paypal via the\n // BODY element's onLoad attribute. We do this so that you can validate\n // any POST vars from you custom form before submitting to paypal. So\n // basically, you'll have your own form which is submitted to your script\n // to validate the data, which in turn calls this function to create\n // another hidden form and submit to paypal.\n\n // The user will briefly see a message on the screen that reads:\n // \"Please wait, your order is being processed...\" and then immediately\n // is redirected to paypal.\n\n echo \"<html>\\n\";\n echo \"<head><title>Processing Payment...</title></head>\\n\";\n echo \"<body onLoad=\\\"document.form.submit();\\\">\\n\";\n echo \"<center><h3>Please wait, your order is being processed...</h3></center>\\n\";\n echo \"<form method=\\\"post\\\" name=\\\"form\\\" action=\\\"\".$this->paypal_url.\"\\\">\\n\";\n\n foreach ($this->fields as $name => $value) {\n echo \"<input type=\\\"hidden\\\" name=\\\"$name\\\" value=\\\"$value\\\">\";\n }\n\n echo \"</form>\\n\";\n echo \"</body></html>\\n\";\n\n }", "title": "" }, { "docid": "116d3c399fd627e0f499531fb7c4e999", "score": "0.60046333", "text": "protected function createFormHtml()\n {\n $html = '<html>';\n $html.= '<head>'.$this->writeCss().'</head>';\n $html.= '<body>';\n $html.= '<h1>'.$this->_title.'</h1>';\n $html.= $this->form->getNotice(); \n\n $html.= '<div class=\"WizardStep\">Step 1</div> <div class=\"WizardStep\">|</div> <div class=\"WizardStep active\">Step 2</div>';\n \n ( ! empty($this->wizard) ? $html.= $this->wizard->getMessage() : '' );\n\n $html.= $this->form->open('/'.getInstance()->uri->getRequestUri(), array('method' => 'POST', 'name' => 'step2', 'id' => 'setup_wizard'));\n\n $html.= '<table class=\"modelTable\">';\n $html.= '<tr>';\n $html.= '<th colspan=\"2\">'.$this->_sub_title.'</th>';\n $html.= '</tr>';\n $html.= $this->createForm();\n $html.='</tbody>';\n $html.='</table>';\n \n $html.= $this->form->submit('back','Back');\n $html.= $this->form->submit('submit_step2','Install');\n $html.= $this->form->close();\n\n $html.= '<p></p>';\n $html.= '<p class=\"footer\" style=\"font-size:11px;color:#006857;\">'.$this->getNote().'</p>';\n $html.= \"\\n</body>\";\n $html.= \"\\n</html>\";\n\n echo $html;\n }", "title": "" }, { "docid": "58cc5b24aa08e84a1708c1b9a73fb768", "score": "0.60005325", "text": "function wpdev_reapply_bk_form($return_form, $bk_type, $my_booking_form = ''){\r\n\r\n $cost_currency = get_bk_option( 'booking_paypal_curency' );\r\n if ($cost_currency == 'USD' ) $cost_currency = '$';\r\n elseif ($cost_currency == 'EUR' ) $cost_currency = '&euro;';\r\n elseif ($cost_currency == 'GBP' ) $cost_currency = '&#163;';\r\n elseif ($cost_currency == 'JPY' ) $cost_currency = '&#165;';\r\n\r\n $_POST['booking_form_type'] = $my_booking_form; // Its required for the correct calculation of the Advanced Cost.\r\n $show_cost_hint = apply_bk_filter('advanced_cost_apply', 0 , '', $bk_type, array() , true ); // Get info to show advanced cost.\r\n $return_form = apply_bk_filter('reupdate_static_cost_hints_in_form', $return_form, $bk_type ); //FixIn: 5.4.5.5\r\n//debuge($show_cost_hint); \r\n foreach ( $show_cost_hint as $key_name => $value ) {\r\n\r\n if ( strpos( $return_form, '['.$key_name.']' ) !== false )\r\n $return_form = str_replace('['.$key_name.']', \r\n '<span id=\"bookinghint_' . $key_name . $bk_type.'\">'.$cost_currency.' 0.00</span>'\r\n .'<input style=\"display:none;\" type=\"text\" value=\"0.00\" id=\"'.$key_name.''.$bk_type.'\" name=\"'.$key_name.''.$bk_type.'\" />'\r\n , $return_form); \r\n }\r\n\r\n // Cost Hints\r\n $return_form = str_replace('[cost_hint]', '<span id=\"booking_hint'.$bk_type.'\">'.$cost_currency.' 0.00</span><input style=\"display:none;\" type=\"text\" value=\"0.00\" id=\"cost_hint'.$bk_type.'\" name=\"cost_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[original_cost_hint]', '<span id=\"original_booking_hint'.$bk_type.'\">'.$cost_currency.' 0.00</span><input style=\"display:none;\" type=\"text\" value=\"0.00\" id=\"original_cost_hint'.$bk_type.'\" name=\"original_cost_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[additional_cost_hint]', '<span id=\"additional_booking_hint'.$bk_type.'\">'.$cost_currency.' 0.00</span><input style=\"display:none;\" type=\"text\" value=\"0.00\" id=\"additional_cost_hint'.$bk_type.'\" name=\"additional_cost_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[deposit_hint]', '<span id=\"deposit_booking_hint'.$bk_type.'\">'.$cost_currency.' 0.00</span><input style=\"display:none;\" type=\"text\" value=\"0.00\" id=\"deposit_hint'.$bk_type.'\" name=\"deposit_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[balance_hint]', '<span id=\"balance_booking_hint'.$bk_type.'\">'.$cost_currency.' 0.00</span><input style=\"display:none;\" type=\"text\" value=\"0.00\" id=\"balance_hint'.$bk_type.'\" name=\"balance_hint'.$bk_type.'\" />', $return_form);\r\n\r\n if (function_exists ('get_booking_title')) {\r\n $bk_title = get_booking_title( $bk_type );\r\n $bk_title = apply_bk_filter('wpdev_check_for_active_language', $bk_title );\r\n } else \r\n $bk_title = ''; \r\n $return_form = str_replace('[resource_title_hint]', '<span id=\"resource_title_hint_tip'.$bk_type.'\"> '.$bk_title.'</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"'.$bk_title.'\" id=\"resource_title_hint'.$bk_type.'\" name=\"resource_title_hint'.$bk_type.'\" />', $return_form);\r\n \r\n // Dates and Times Hints\r\n $return_form = str_replace('[check_in_date_hint]', '<span id=\"check_in_date_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"check_in_date_hint'.$bk_type.'\" name=\"check_in_date_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[check_out_date_hint]', '<span id=\"check_out_date_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"check_out_date_hint'.$bk_type.'\" name=\"check_out_date_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[start_time_hint]', '<span id=\"start_time_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"start_time_hint'.$bk_type.'\" name=\"start_time_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[end_time_hint]', '<span id=\"end_time_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"end_time_hint'.$bk_type.'\" name=\"end_time_hint'.$bk_type.'\" />', $return_form); \r\n $return_form = str_replace('[selected_dates_hint]', '<span id=\"selected_dates_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"selected_dates_hint'.$bk_type.'\" name=\"selected_dates_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[selected_timedates_hint]', '<span id=\"selected_timedates_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"selected_timedates_hint'.$bk_type.'\" name=\"selected_timedates_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[selected_short_dates_hint]', '<span id=\"selected_short_dates_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"selected_short_dates_hint'.$bk_type.'\" name=\"selected_short_dates_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[selected_short_timedates_hint]', '<span id=\"selected_short_timedates_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"selected_short_timedates_hint'.$bk_type.'\" name=\"selected_short_timedates_hint'.$bk_type.'\" />', $return_form); \r\n $return_form = str_replace('[days_number_hint]', '<span id=\"days_number_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"days_number_hint'.$bk_type.'\" name=\"days_number_hint'.$bk_type.'\" />', $return_form);\r\n $return_form = str_replace('[nights_number_hint]', '<span id=\"nights_number_hint_tip'.$bk_type.'\">...</span><input style=\"display:none;\" class=\"wpdevbk-date-time-hint-input\" type=\"text\" value=\"...\" id=\"nights_number_hint'.$bk_type.'\" name=\"nights_number_hint'.$bk_type.'\" />', $return_form);\r\n\r\n $return_form = $this->wpdev_reapply_bk_form_for_cost_input($return_form, $bk_type);\r\n if (function_exists('wpdev_bk_form_conditions_parsing')) \r\n $return_form = wpdev_bk_form_conditions_parsing( $return_form, $bk_type);\r\n return $return_form ;\r\n }", "title": "" }, { "docid": "3226153de458b54c7f507973c0a562e9", "score": "0.600022", "text": "function return_page_form($values) {\r\n\treturn '\r\n\t\t<form action=\"?action=insert\" method=\"post\">'.\r\n\t\t\treturn_input_text('pageid','Page ID',$values['pageid'],true).\r\n\t\t\treturn_input_text('title','Page Title',$values['title'],true).\r\n\t\t\treturn_textarea('content','Page Content',$values['content']). \t\r\n\t\t\treturn_input_text('parent','Parent Page',$values['parent']).'\r\n\t\t\t<input type=\"submit\" class=\"btn btn-primary\" value=\"Submit\">\r\n\t\t\t<a href=\"?\" class=\"btn btn-warning\">Clear</a>\r\n\t\t</form>';\r\n}", "title": "" }, { "docid": "1ec02abb60f3d491532e45670aab88e2", "score": "0.59994227", "text": "public function renderForm() {\n $status = OrderConfirmForm::GetStatusForm();\n $email = OrderConfirmForm::GetEmailForm();\n $fields_form = array($status, $email);\n\n $helper = new HelperForm();\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));\n $helper->default_form_language = $lang->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;\n $this->fields_form = array();\n $helper->id = (int) Tools::getValue('id_carrier');\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'maborderconfirm';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFieldsValues(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n \n return $helper->generateForm($fields_form);\n }", "title": "" }, { "docid": "8c3f9150ac77697c6f3a4f6a9305e902", "score": "0.59936047", "text": "public function commissions_details_page() {\n if(isset($_POST['submit_new_payout'])){\n $this->make_payout();\n } else if ( isset( $_GET['make_payout'] ) ) {\n \n $user_id = absint( $_GET['make_payout'] ); \n $user_data = get_userdata($user_id); \n\n ?>\n <div class=\"wrap\">\n <h2><?php esc_html_e( 'New Payment for', 'listeo_core' ); ?> <?php echo $user_data->display_name; ?></h2>\n <div class=\"payout-make-box\">\n \n \n <p>By clicking Submit Button you'll mark all his current <strong>Unpaid</strong> commissions as <strong>Paid</strong></p>\n <p>User's requested Payment Method: \n <strong><?php echo ($user_data->listeo_core_payment_type == 'paypal') ? 'PayPal' : 'Bank Transfer' ; ?>\n </strong> (payment details in next step)\n </p>\n \n </div>\n <form method=\"POST\" id=\"listeo-make-payout\">\n <input type=\"submit\" name=\"submit_new_payout\" id=\"submit\" class=\"button button-primary\" value=\"Make Payout\">\n <input type=\"hidden\" name=\"action\" value=\"listeo_make_payout\" />\n <input type=\"hidden\" name=\"user_id\" value=\"<?php echo $user_id; ?>\" /> \n <?php if(isset($user_data->listeo_core_payment_type)) { \n $payment_method = $user_data->listeo_core_payment_type; \n } else {\n $payment_method = \"banktransfer\";\n }?>\n <input type=\"hidden\" name=\"payment_method\" value=\"<?php echo esc_attr($payment_method); ?>\" /> \n\n <?php if($payment_method == 'paypal'): ?>\n <input type=\"hidden\" name=\"payment_details\" value=\"<?php echo $user_data->listeo_core_ppemail ?>\">\n <?php endif; ?> \n <?php if($payment_method == 'banktransfer'): ?>\n <input type=\"hidden\" name=\"payment_details\" value=\"<?php echo esc_attr($user_data->listeo_core_bank_details); ?>\">\n <?php endif; ?>\n \n\n\n <h4>Commissions</h4>\n <?php \n $commission_class = new Listeo_Core_Commissions;\n $commissions_ids = $commission_class->get_commissions( array( 'user_id'=>$user_id ) );\n $commissions = array();\n foreach ($commissions_ids as $id) {\n $commissions[$id] = $commission_class->get_commission($id);\n }\n $balance = 0;\n ?>\n <?php if($commissions) {?>\n <table class=\"wp-list-table widefat fixed striped\">\n <thead>\n <tr>\n <th></th>\n <th>Listing Title</th>\n <th>Total Order value</th>\n <th>Site Fee</th>\n <th>User Earning</th>\n <th>Order ID</th>\n <th>Date</th>\n <th>Status</th>\n </tr>\n </thead>\n <?php \n\n foreach ($commissions as $commission) { \n $order = wc_get_order( $commission['order_id'] );\n $total = $order->get_total();\n $earning = $total - $commission['amount'];\n $balance = (float) $balance + $earning;\n ?>\n <tr>\n <td><input type=\"checkbox\" checked=\"checked\" name=\"commission[<?php echo $commission['id']; ?>]\"></td>\n <td><?php echo get_the_title($commission['listing_id']) ?></td>\n <td class=\"paid\"><?php echo wc_price($total); ?></td>\n <td class=\"unpaid\"><?php echo wc_price($commission['amount']); ?></td>\n <td class=\"paid\"> <span><?php echo wc_price($earning); ?></span></td>\n <td>#<?php echo $commission['order_id']; ?></td>\n <td><?php echo date(get_option( 'date_format' ), strtotime($commission['date'])); ?></td>\n <td><?php echo $commission['status']; ?></td>\n \n </tr>\n <?php } ?>\n <tfoot>\n <tr>\n <td colspan=\"4\" style=\"text-align: right;\">Total </td>\n <td><?php echo wc_price($balance); ?></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\n </tfoot>\n </table>\n <?php } ?>\n <br>\n \n <input type=\"submit\" name=\"submit_new_payout\" id=\"submit\" class=\"button button-primary\" value=\"Make Payout\">\n </form>\n \n </div>\n\n <?php } \n \n else {\n if ( ! class_exists( 'WP_List_Table' ) ) {\n require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );\n }\n \n \n $balances_table = new Listeo_Balances_List_Table();\n $balances_table->prepare_items(); ?>\n <div class=\"wrap\">\n\n <h2>Users balances</h2>\n\n <?php $balances_table->views(); ?>\n\n <form id=\"commissions-filter\" method=\"get\">\n <input type=\"hidden\" name=\"page\" value=\"<?php echo $_REQUEST['page'] ?>\" />\n <?php // $commissions_table->add_search_box( __( 'Search commissions', 'listeo_core' ), 's' ); ?>\n <?php $balances_table->display(); ?>\n </form>\n\n </div>\n <?php\n }\n }", "title": "" }, { "docid": "0e28a7d0df3114363ced209533a190be", "score": "0.59751046", "text": "function commerce_oz_payway_api_submit_form_submit($payment_method, $pane_form, $pane_values, $order, $charge) {\n\t\n\t\n\t$path = drupal_get_path('module', 'commerce_oz');\n\trequire_once($path . '/includes/api/Qvalent_PayWayAPI.php');\n\t\n//\tdsm($paywayAPI);\n\t\n // Get the order\n $order_wrapper = entity_metadata_wrapper('commerce_order', $order);\n $order_id = $order->order_id;\n\n // Get the credit card from the fieldset\n $credit_card = $pane_values['commerce_oz_payway']['credit_card'];\n \n \n watchdog('payway', nl2br(print_r($pane_values, TRUE)));\n \n\t// Get the payment method settings\n $settings = _commweb_get_var('commerce_oz_gateway_' . $payment_method['gateway_provider']);\t\n $debugmode = $settings['commerce_oz_debug_mode'];\n $livemode = $settings['commerce_oz_transaction_mode'];\n \n $path_to_cert = $_SERVER['DOCUMENT_ROOT'] . base_path() . $path . '/includes/api/cacerts.crt';\n \n \n $initParams =\n \"certificateFile=\" . $settings['certificate_path'] . '&' .\n \"caFile=\" . $path_to_cert . '&' .\n \"logDirectory=\" . 'sites/commerce.localhost/files';\n $paywayAPI = new Qvalent_PayWayAPI();\n $paywayAPI->initialise( $initParams );\n \n \n // Create a new transaction for the order\n $transaction = _commerce_oz_open_transaction($payment_method['base'], $order->order_id);\n \n \n //\twatchdog('payway', nl2br(print_r($paywayAPI, TRUE)));\n ///\twatchdog('payway', nl2br(print_r($initParams, TRUE)));\n //\twatchdog('payway', nl2br(print_r($settings, TRUE)));\n \t//dsm($initParams);\n \t\n \t//Generate the MerchantTxnRef and the OrderInfo\n\t\t$merchant_reference = $order->order_id . '-' . $transaction->transaction_id;\n\n \t\n \t\n \t$requestParameters = array();\n $requestParameters[ \"order.type\" ] = \"capture\";\n $requestParameters[ \"customer.username\" ] = $settings['payway_username'];\n $requestParameters[ \"customer.password\" ] = $settings['payway_password'];\n $requestParameters[ \"customer.merchant\" ] = $settings['payway_merchant'];\n \n $requestParameters[ \"customer.orderNumber\" ] = $merchant_reference;\n $requestParameters[ \"customer.customerReferenceNumber\" ] = $merchant_reference;\n \n // $requestParameters[ \"customer.originalOrderNumber\" ] = $order->order_id;\n $requestParameters[ \"card.PAN\" ] = $credit_card['number'];\n \n \n \tif(isset($credit_card['credit_card']['code'])) {\n \t\t$requestParameters[ \"card.CVN\" ] = $credit_card['code'];\n\t\t}\n \n // Use Card Holder Name Field ?\n \tif(isset($credit_card['credit_card']['name']))\n\t {\n\t \t$requestParameters['card.cardHolderName'] = $credit_card['name'];\n\t }\n \n \n $requestParameters[ \"card.expiryYear\" ] = substr($credit_card['exp_year'], 2, 2);\n $requestParameters[ \"card.expiryMonth\" ] = $credit_card['exp_month'];\n $requestParameters[ \"card.currency\" ] = 'AUD';\n $requestParameters[ \"order.amount\" ] = $charge['amount'];\n $requestParameters[ \"order.ECI\" ] = 'SSL';\n\n $requestText = $paywayAPI->formatRequestParameters( $requestParameters );\n \t\n \t\n \twatchdog('payway', nl2br(print_r($requestParameters, TRUE)));\n \t\n \t$responseText = $paywayAPI->processCreditCard( $requestText );\n\n // Parse the response string into an array\n $responseParameters = $paywayAPI->parseResponseParameters( $responseText );\n\n // \tdsm($responseParameters);\n watchdog('payway', nl2br(print_r($responseParameters, TRUE)));\n \n \n\t$request_map = $requestParameters;\n\n\t$response_map = $responseParameters;\n \n\t$request_map['customer.username'] = _commweb_build_merchant_string($request_map['customer.username']);\n\t$request_map['customer.password'] = _commweb_build_accesscode_string($request_map['customer.password']);\n\t$request_map['card.PAN'] = _commweb_build_accesscode_string($request_map['card.PAN']);\n\t\n\tif(isset($credit_card['credit_card']['code'])) {\n\t\t\t$request_map['card.CVN'] = _commweb_build_accesscode_string($request_map['card.CVN']);\n\t}\n \n\n \n _commerce_oz_payway_api_close_transaction($transaction, $payment_method, $request_map, $response_map);\n\t\n\t_commerce_oz_debug_transaction($transaction, $request_map, $response_map, ($debugmode == 'debug'));\n\t\n\t// Fire completion Rule\n\trules_invoke_event('commerce_oz_transaction_complete', $transaction);\n\t\n\treturn _commerce_oz_handle_payment_response($transaction, $request_map, $response_map);\n \n\n\n}", "title": "" }, { "docid": "7fcfe4c13b4836b37cf597b793d39792", "score": "0.59720707", "text": "function AccountsBody()\n\t{\t$this->account->InputForm();\n\t}", "title": "" }, { "docid": "8d5b87502307bf85b7d493e6a3b6d074", "score": "0.5967704", "text": "public function payment_fields() {\r\n \r\n // ok, let's display some description before the payment form\r\n if ( $this->description ) {\r\n // you can instructions for test mode, I mean test card numbers etc.\r\n if ( $this->testmode ) {\r\n $this->description .= ' Powered by NAMISI ARNOLD PAUL, checkout using MTN Mobile Money';\r\n $this->description = trim( $this->description );\r\n }\r\n // display the description with <p> tags etc.\r\n echo wpautop( wp_kses_post( $this->description ) );\r\n }\r\n \r\n // I will echo() the form, but you can close PHP tags and print it directly in HTML\r\n echo '<fieldset id=\"wc-' . esc_attr( $this->id ) . '-cc-form\" class=\"wc-credit-card-form wc-payment-form\" style=\"background:transparent;\">';\r\n \r\n // Add this action hook if you want your custom payment gateway to support it\r\n do_action( 'woocommerce_credit_card_form_start', $this->id );\r\n \r\n // I recommend to use inique IDs, because other gateways could already use #ccNo, #expdate, #cvc\r\n echo '<div class=\"form-row form-row-wide\"><label>MTN Mobile Money Number <span class=\"required\">*</span></label>\r\n <input id=\"misha_ccNo\" name = \"mobile_number\" type=\"text\" autocomplete=\"off\">\r\n </div>\r\n <div class=\"clear\"></div>\r\n \r\n ';\r\n \r\n do_action( 'woocommerce_credit_card_form_end', $this->id );\r\n \r\n echo '<div class=\"clear\"></div></fieldset>';\r\n \r\n }", "title": "" }, { "docid": "fb40ad9c43ba6c7b77216f4b937936eb", "score": "0.59582466", "text": "function get_payneteasy_args( $order ) {\r\n\t\t$order_id = $order->id;\r\n\t\tif ( 'yes' == $this->debug ) {\r\n\t\t\t$this->log->add( 'payneteasy', 'Generating payment form for order ' . $order->get_order_number() . '. Notify URL: ' . $this->notify_url );\r\n\t\t}\r\n\r\n //Order items\r\n $orderItems=\"\";\r\n $orderItemsCount = 0;\r\n // (code=167;itemNumber=167;description=Товар;quantity=1;price=54995;unitCostAmount=54995;totalAmount=54995)\r\n foreach ( $order->get_items() as $item_id => $item ) {\r\n $product = $item->get_product();\r\n $orderItems.=\"(\";\r\n if(is_object( $product ) && $product->get_sku()!==\"\")$orderItems.=\"code=\". $product->get_sku().';';\r\n $orderItems.=\"itemNumber=\".$item_id.';';\r\n $orderItems.=\"description=\".$item->get_name().';';\r\n $orderItems.=\"quantity=\".$item->get_quantity().';';\r\n $orderItems.=\"price=\".(intval(100*$order->get_line_total( $item ))).';';\r\n $orderItems.=\"unitCostAmount=\".( intval($order->get_line_subtotal( $item )*100)/intval($item->get_quantity()) ).';';\r\n $orderItems.=\"totalAmount=\".( intval($order->get_line_total( $item )*100) );\r\n $orderItems.=\")\";\r\n $orderItemsCount++;\r\n }\r\n\t\t// payneteasy Args\r\n $payneteasy_args = [\r\n \"url\" => $this->gateway_url,\r\n \"endpoint\" => $this->merchant_endpoint,\r\n \"merchant_key\" => $this->merchant_code,\r\n \"merchant_login\" => $this->merchant_login,\r\n \"data\"=>[\r\n \"client_orderid\" => $order_id,\r\n \"order_desc\" => 'Order #'.$order_id.' '.site_url(),//$orderItems, // !!!!$description,\r\n \"first_name\" => \"Payn\",\r\n \"last_name\" => \"Etyeasy\",\r\n \"birthday\" => \"\",\r\n\r\n \"address1\" => $order->get_billing_address_1(),\r\n \"address2\" => $order->get_billing_address_2(),\r\n \"city\" => $order->get_billing_city(),\r\n \"state\" => \"\",\r\n \"zip_code\" => $order->get_billing_postcode(),\r\n \"country\" => \"RU\",\r\n \"phone\" => $order->get_billing_phone(),\r\n \"cell_phone\" => $order->get_billing_phone(),\r\n \"amount\" => $order->get_total(),\r\n \"currency\" => $this->currency,\r\n \"email\" => $order->get_billing_email(),\r\n \"ipaddress\" => auto_reverse_proxy_pre_comment_user_ip(), // !!Request::server('REMOTE_ADDR'),\r\n \"site_url\" => site_url(),\r\n \"redirect_url\" => $order->get_checkout_order_received_url()//$host.Setting::get('transfer.0.response'),\r\n // \"server_callback_url\" => $host.Setting::get('transfer.0.callback')\r\n ]\r\n ];\r\n // print_r($payneteasy_args);\r\n\t\t/////////////////////////////////////////////////\r\n\t\t$payneteasy_args = apply_filters( 'woocommerce_payneteasy_args', $payneteasy_args );\r\n\r\n\t\treturn $payneteasy_args;\r\n\t}", "title": "" }, { "docid": "8073870ddec2d94e98cadebb95d8e85d", "score": "0.59579587", "text": "function printFormInstall()\n\t\t{\n\t\t$html = '\n\t\t\n\t\t<div>\n\t\t\n\t\t<form id=\"forminstall\">\n \n\t\t<legend><h1>Configuración del módulo</h1></legend>\n \n\t\t\t\t\t<p>&nbsp;</p>\n\t\t\t\t\t\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t <div>\n\t\t\t\t\t \t<p><label>Qué tipo de funcionalidad desea instalar?</label></p>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <p>\n\t\t\t\t\t\t <select name=\"funcionality\" class=\"large\">\n\t\t\t\t\t\t\t <option value=\"sel\">Seleccione</option>\n\t\t\t\t\t\t\t <option value=\"1\">Instalaci&oacute;n por defecto</option>\n\t\t\t\t\t\t </select>\n\t\t\t\t\t\t </p>\n\t\t\t\t\t </div>\t\t\t\t \n\t\t\t\t\t </fieldset>\n\t\t\t\t\t \n\t\t\t\t\t <p>&nbsp;</p>\n\t\t\t\t\t \n\t\t\t\t\t <fieldset>\n\t\t\t\t\t <div>\n\t\t\t\t\t \t<p><label>Instalar datos de ejemplo?</label></p>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <p>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t <input type=\"radio\" name=\"dataExample\" value=\"1\" id=\"dataExample_0\" />Si</label>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t <input type=\"radio\" name=\"dataExample\" value=\"0\" id=\"dataExample_1\" />No</label>\n\t\t\t\t\t\t </p>\n\t\t\t\t\t </div>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t<p>&nbsp;</p>\t \n\t\t\t\t <a class=\"uibutton\" onclick=\"xajax_install(xajax.getFormValues(\\'forminstall\\')); return false;\">Instalar módulo</a> \t\t\t\t \n\t\t</form>\t\t\t \n\t</div>\t\t\t\n</div>';\nreturn $html;\n\t\t}", "title": "" }, { "docid": "004cd78e9a1e1ec4116d30d711c731c4", "score": "0.5950641", "text": "function printCreateAccountForm() {\n\t\tglobal $menuvar, $tts_config, $LANG;\n\n\t\t$content .= \"\n\t\t\t\t<div id=\\\"createAccountResponse\\\">\n\t\t\t\t</div>\n\t\t\t\t<form name=\\\"createAccountForm\\\" id=\\\"createAccountForm\\\" action=\\\"\" . $menuvar['REGISTER'] . \"\\\" method=\\\"post\\\" class=\\\"inputForm\\\" onsubmit=\\\"return false;\\\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<legend>\" . $LANG['FORMTITLES_CREATE_ACCOUNT'] . \"</legend>\n\t\t\t\t\t\t<div><label for=\\\"first_name\\\">\" . $LANG['FORMITEMS_FIRST_NAME'] . \" <span>- Required</span></label> <input name=\\\"first_name\\\" id=\\\"first_name\\\" type=\\\"text\\\" size=\\\"60\\\" class=\\\"required\\\" /></div>\n\t\t\t\t\t\t<div><label for=\\\"last_name\\\">\" . $LANG['FORMITEMS_LAST_NAME'] . \" <span>- Required</span></label> <input name=\\\"last_name\\\" id=\\\"last_name\\\" type=\\\"text\\\" size=\\\"60\\\" class=\\\"required\\\" /></div>\n\t\t\t\t\t\t<div><label for=\\\"email_address\\\">\" . $LANG['FORMITEMS_EMAIL_ADDRESS'] . \" <span>- Required</span></label> <input name=\\\"email_address\\\" id=\\\"email_address\\\" type=\\\"text\\\" size=\\\"60\\\" class=\\\"required\\\" /></div>\n\t\t\t\t\t\t<div><label for=\\\"username\\\">\" . $LANG['FORMITEMS_USERNAME'] . \" <span>- Required</span></label> <input name=\\\"username\\\" id=\\\"username\\\" type=\\\"text\\\" size=\\\"60\\\" class=\\\"required\\\" /></div>\n\t\t\t\t\t\t<div><label for=\\\"password\\\">\" . $LANG['FORMITEMS_PASSWORD'] . \" <span>- Required</span></label> <input name=\\\"password\\\" id=\\\"password\\\" type=\\\"password\\\" size=\\\"60\\\" class=\\\"required\\\" /></div>\n\t\t\t\t\t\t<div><label for=\\\"password2\\\">\" . $LANG['FORMITEMS_CONFIRM_PASSWORD'] . \" <span>- Required</span></label> <input name=\\\"password2\\\" id=\\\"password2\\\" type=\\\"password\\\" size=\\\"60\\\" class=\\\"required\\\" /></div>\n\t\t\t\t\t\t<div><label for=\\\"language\\\">\" . $LANG['FORMITEMS_LANGUAGE'] . \" <span>- Required</span></label> \" . createDropdown(\"languages\", \"language\", \"\", \"\", \"required\") . \"</div>\n\t\t\t\t\t\t<div class=\\\"center\\\"><input type=\\\"submit\\\" class=\\\"button\\\" value=\\\"\" . $LANG['BUTTONS_CREATE_ACCOUNT'] . \"\\\" /></div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\";\n\t\t\t\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "89f7fe38e0c303c8281619ac7723df8d", "score": "0.5949948", "text": "function GetFeedbackRequestBody(OrderRequiredFeedback $orderRequiredFeedback, Order $order){\n $body = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n <html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <title>Washita</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n </head>\n <body style=\"margin: 0; padding: 0; background:#fff; font-family:lucida sans unicode,lucida grande,sans-serif;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:600px;border-collapse: collapse; background:white; border-style:solid;border-color: #336799;margin:20px auto\">\n <tr style=\"background:#336799\">\n <td style=\"padding:10px 20px;\">';\n $body .= '<img src=\"'.$GLOBALS['site_root'].'/img/freeze/logo.png'.'\" />';\n $body .= '<span style=\"float:right;margin:20px 10px;font-size:20px;color:white\">\n Tu pedido ya fue entregado\n </span>\n </td>\n </tr>\n \n <tr>\n <td style=\"padding:10px 20px;\">';\n $body .= '<p style=\"margin-bottom:0\">\n ¡'.$order->Name.', gracias por escoger washita!\n <br/> \n tu ropa ya ha sido entregada\n </p>';\n $body .= \"<p>\n Tu pedido fue entregado hoy <b>\".strftime(\"%d-%b-%Y\", $order->PickupTime->to->getTimestamp()).\"</b>\n en \".$order->GetFullAddress().\"<br/>\n Número de Orden: \".$order->OrderNumber.\"<br/>\n Servicio: \".$order->WashingTypeText().\"<br/>\n Peso: \".NumberFormatWithTens($order->Weight).\" Kg <br/>\n Monto Cancelado: \".MoneyFormat($order->PriceWithDiscount).\"<br/>\n </p>\";\n\n $baseUrl = $GLOBALS['site_root'].'/order_feedback.php?feedbackCode='.$orderRequiredFeedback->FeedbackCode;\n $body .= '<p>\n <br/><b style=\"color: #30669B; font-size: 20px\">Califica nuestro servicio</b>\n </p>\n <br/> \n <div> \n <a href=\"'.$baseUrl.'&rating=1\" style=\" \n padding: 10px 25px;\n margin: 5px;\n font-size: 18px;\n color: #fff;\n border-radius: 10px;\n background-color: #0E3E6C;\n border-width: 1px;\n text-decoration: initial;\n display: inline-block;\n \">\n Malo\n </a>\n <a href=\"'.$baseUrl.'&rating=2\" style=\" \n padding: 10px 25px;\n margin: 5px;\n font-size: 18px;\n color: #fff;\n border-radius: 10px;\n background-color: #19538A;\n border-width: 1px;\n text-decoration: initial;\n display: inline-block;\n \">\n Regular\n </a>\n <a href=\"'.$baseUrl.'&rating=3\" style=\" \n padding: 10px 25px;\n margin: 5px;\n font-size: 18px;\n color: #fff;\n border-radius: 10px;\n background-color: #4E7EAB;\n border-width: 1px;\n text-decoration: initial;\n display: inline-block;\n \">\n Bueno\n </a>\n <a href=\"'.$baseUrl.'&rating=4\" style=\" \n padding: 10px 25px;\n margin: 5px;\n font-size: 18px;\n color: #fff;\n border-radius: 10px;\n background-color: #7BA3CA;\n border-width: 1px;\n text-decoration: initial;\n display: inline-block;\n \">\n ¡Excelente!\n </a> \n </div>\n <br/>\n <br/>\n <br/>\n <br/>\n ';\n \n \n \n $body .= 'Ayúdanos a mejorar nuestro servicio contándonos cómo podríamos haberlo hecho mejor.</br>\n Si necesitas una boleta o factura, escríbenos a service@washita.cl \n </td>\n </tr>\n <tr>\n <td style=\"padding:10px 20px;text-align: center;color:grey\">\n <hr style=\"border-style: dashed;color: #66cdcc;\"/>\n \n <p style=\"font-size:14px\">¿Preguntas? ¡Contáctanos!</p>\n <a style=\"color:#336799\" href=\"tel:+56(22) 405 3056\">+56(22) 405 3056</a> | \n <a style=\"color:#336799\" href=\"mailto:service@washita.cl\" target=\"_top\">service@washita.cl</a>\n \n <hr style=\"border-style: dashed;color: #66cdcc;\"/>\n <span style=\"font-size:12px; float:center\">\n Copyright © 2016 Washita.cl Todos los derechos reservados.\n <br/> Este e-mail ha sido enviado por WASHita.cl<span>\n </td>\n </tr>\n </table>\n </body>\n\n </html>';\n\n return $body;\n}", "title": "" }, { "docid": "4be59ed2873729932fb44f2f84c467da", "score": "0.5948892", "text": "function show_form()\n{\n\techo '<h2>Menu</h2>\n \t<form action=\"index.php\" method=\"post\">';\n\t$menu = new MenuDisplay();\n\techo $menu->get_menu();\n\n \techo '<label>Special Instructions: </label><br/>\n \t<textarea name=\"special_instructions\"></textarea>\n\n \t<input type=\"hidden\" id=\"formData\" name=\"order_data\" value=\"\"/>\n \t</form>\n \t<button id=\"sendOrder\">Submit Order</button>';\n}", "title": "" }, { "docid": "d9a750c4f1a1cb46757384e0518b71d7", "score": "0.5946816", "text": "function commerce_hellaspay_settings_form($settings = NULL) {\r\n $form = array();\r\n\r\n $settings = (array) $settings + array(\r\n 'hellaspay_mid' => '',\r\n 'hellaspay_pass' => '',\r\n 'hellaspay_source' => '',\r\n 'status' => array('pending'),\r\n\t'hellaspay_method_title' => 'Hellas Pay Credit Card',\r\n 'success_message' => '',\r\n 'fail_message' => '',\r\n );\r\n\r\n $form['hellaspay_mid'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Merchant ID'),\r\n '#description' => t(' Your Merchant ID'),\r\n '#default_value' => $settings['hellaspay_mid'],\r\n );\r\n\r\n $form['hellaspay_pass'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('API Key'),\r\n '#description' => t(' Your API Key'),\r\n '#default_value' => $settings['hellaspay_pass'],\r\n );\r\n\r\n $form['hellaspay_source'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Source Code'),\r\n '#description' => t(' Viva Payments Source Code'),\r\n '#default_value' => $settings['hellaspay_source'],\r\n );\r\n\r\n $form['hellaspay_instalments'] = array(\r\n \t'#type' => 'radios',\r\n \t'#title' => t('Instalments'),\r\n \t'#description' => t(' Allow instalments'),\r\n \t'#options' => array(\r\n \t'1' => t('Allow'),\r\n \t'2' => t('Deny')\r\n ),\r\n \t'#default_value' => @$settings['hellaspay_instalments'],\r\n \t );\r\n\t \r\n $form['hellaspay_mode'] = array(\r\n \t'#type' => 'radios',\r\n \t'#title' => t('Transaction mode'),\r\n \t'#description' => t(' Transaction options'),\r\n \t'#options' => array(\r\n \t'Live' => t('Live transactions'),\r\n \t'Test' => t('Testing')\r\n ),\r\n \t'#default_value' => @$settings['hellaspay_mode'],\r\n \t );\t \r\n\t \r\n $form['hellaspay_currency'] = array(\r\n '#type' => 'select',\r\n '#title' => t('Currency code'),\r\n '#description' => t(' Transactions can only be processed in one of the listed currencies.'),\r\n '#options' => _commerce_hellaspay_currency_array(),\r\n '#default_value' => @$settings['hellaspay_currency'],\r\n );\r\n\t \r\n $form['hellaspay_method_title'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Payment method title'),\r\n '#default_value' => $settings['hellaspay_method_title'],\r\n );\t \r\n\r\n $form['hellaspay_status'] = array(\r\n '#type' => 'select',\r\n '#title' => t('Status'),\r\n '#description' => t('Choose order status after success transaction'),\r\n '#options' => commerce_hellaspay_statuses(),\r\n '#default_value' => @$settings['hellaspay_status'],\r\n );\r\n\r\n $form['hellaspay_success_message'] = array(\r\n '#type' => 'textarea',\r\n '#rows' => 3,\r\n '#title' => t('Success message'),\r\n '#description' => t('Enter text that will be displayed when payment succesful'),\r\n '#default_value' => @$settings['hellaspay_success_message'],\r\n );\r\n\r\n $form['hellaspay_fail_message'] = array(\r\n '#type' => 'textarea',\r\n '#rows' => 3,\r\n '#title' => t('Fail message'),\r\n '#description' => t('Enter text that will be displayed when payment fail'),\r\n '#default_value' => @$settings['hellaspay_fail_message'],\r\n );\r\n\r\n $form['#submit'][] = variable_set('commerce_hellaspay_settings', $form);\r\n\r\n return $form;\r\n}", "title": "" }, { "docid": "e1d8be88b30e7f7abb87e2484f84a534", "score": "0.5945047", "text": "function afficheBoutonRetour(){\n\treturn '<input type=\"submit\" name=\"Retour\" value=\"\" </input>';\n}", "title": "" }, { "docid": "44f1a1162bf179f9a7d980839b63e593", "score": "0.5941633", "text": "function payzw_link($params)\n{\n // Gateway Configuration Parameters\n $accountId = $params['accountID'];\n $secretKey = $params['secretKey'];\n $testMode = $params['testMode'];\n// $dropdownField = $params['dropdownField'];\n// $radioField = $params['radioField'];\n// $textareaField = $params['textareaField'];\n // Invoice Parameters\n $invoiceId = $params['invoiceid'];\n $description = $params[\"description\"];\n $amount = $params['amount'];\n $currencyCode = $params['currency'];\n\n // Client Parameters\n $firstname = $params['clientdetails']['firstname'];\n $lastname = $params['clientdetails']['lastname'];\n $email = $params['clientdetails']['email'];\n $address1 = $params['clientdetails']['address1'];\n $address2 = $params['clientdetails']['address2'];\n $city = $params['clientdetails']['city'];\n $state = $params['clientdetails']['state'];\n $postcode = $params['clientdetails']['postcode'];\n $country = $params['clientdetails']['country'];\n $phone = $params['clientdetails']['phonenumber'];\n\n // System Parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $moduleName = $params['paymentmethod'];\n $returnUrl = $params['returnurl'];\n // $completeUrl = $systemUrl . 'modules/gateways/payzw/complete.php?id=' . $invoiceId;\n $resultUrl = $systemUrl . 'modules/gateways/callback/' . $moduleName . '.php';\n $langPayNow = $params['langpaynow'];\n $moduleDisplayName = $params['name'];\n $whmcsVersion = $params['whmcsVersion'];\n /**\n * Do cURL request to paynow then process payment\n */\n\n // die($resultUrl);\n $checkoutUrl = paynow($accountId, $secretKey, $amount, $invoiceId, $email, $resultUrl, $returnUrl);\n\n /**\n * Clean up checkout url\n */\n $paymentLink = explode('-', $checkoutUrl)[0];\n\n\n\n\n $htmlOutput = '<form method=\"get\" action=\"' . $paymentLink . '\">';\n $htmlOutput .= '<input name=\"pay\" type=\"submit\" value=\"' . $langPayNow . '\" />';\n $htmlOutput .= '</form>';\n\n return $htmlOutput;\n}", "title": "" }, { "docid": "8c9a57d9d51a129e16a051ca42f69360", "score": "0.59410965", "text": "function displayForm() {\n\t\t\t\n\t\t$html = '';\n\t\t\t\n\t\t//build out form\n\t\t$html .= '<form method=\"post\" action=\"'.__ROOT__.'/phpapplications/processorderpage.php\">';\n\t\t\t\n\t\t//table\n\t\t$html .= '<table style=\" background: lemonchiffon; padding:10px; border: 1px dashed #999999;\">';\n\t\t$html .= $this->displayMessage();\n\t\t$html .= $this->displayRow('First Name', '<input type=\"text\" name=\"form[0][firstname]\" value=\"' . (isset($_SESSION['firstname']) ? $_SESSION['firstname'] : '') . '\"/>', 'firstname');\n\t\t$html .= $this->displayRow('Last Name', '<input type=\"text\" name=\"form[0][lastname]\" value=\"' . (isset($_SESSION['lastname']) ? $_SESSION['lastname'] : '') . '\"/>', 'lastname');\n\t\t$html .= $this->displayRow('Address', '<input type=\"text\" name=\"form[0][address]\" value=\"' . (isset($_SESSION['address']) ? $_SESSION['address'] : '') . '\"/>', 'address');\n\t\t$html .= $this->displayRow('Age', '<input type=\"text\" name=\"form[0][age]\" value=\"' . (isset($_SESSION['age']) ? $_SESSION['age'] : '') . '\"/>', 'age');\n\t\t$html .= $this->displayRow('', '<input type=\"Submit\" value=\"Submit Docs\"');\n\t\t$html .= '</table>';\n\t\t$html .= '</form>';\n\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "6889d800d3b1dacebd9258483659b13d", "score": "0.5940295", "text": "public function formTagWithHiddenFields($options = array())\n {\n // Minimum requirements\n if (!array_key_exists('paymentEmail', $options) || !$options['paymentEmail']) {\n return \"No payment email provided.\";\n }\n\n $pluginSettings = craft()->plugins->getPlugin('paypalstandardpayments')->getSettings();\n\n if ($pluginSettings['testEnabled']) {\n $formAction = \"https://www.sandbox.paypal.com/cgi-bin/webscr\";\n $options['paymentEmail'] = 'test-merchant@thenewline.com';\n } else {\n $formAction = \"https://www.paypal.com/cgi-bin/webscr\";\n }\n\n // Provide default values if missing\n if (!array_key_exists('formHandle', $options) || !$options['formHandle']) {\n $options['formHandle'] = 'online-order';\n }\n if (!array_key_exists('notificationRecipients', $options) || !$options['notificationRecipients']) {\n $options['notificationRecipients'] = $options['paymentEmail'];\n }\n if (!array_key_exists('paymentType', $options) || !$options['paymentType']) {\n $options['paymentType'] = '_xclick';\n }\n if (!array_key_exists('notificationSubject', $options) || !$options['notificationSubject']) {\n $options['notificationSubject'] = 'Online Order';\n }\n if (!array_key_exists('returnUrl', $options) || !$options['returnUrl']) {\n $options['returnUrl'] = craft()->getSiteUrl();\n }\n if (!array_key_exists('cancelUrl', $options) || !$options['cancelUrl']) {\n $options['cancelUrl'] = craft()->getSiteUrl();\n }\n if (!array_key_exists('offlineUrl', $options) || !$options['offlineUrl']) {\n $options['offlineUrl'] = craft()->getSiteUrl();\n }\n\n // Include the Form Validation CSS\n craft()->templates->includeCssResource('paypalstandardpayments/css/formValidation.min.css');\n\n // Include the Plugin JS\n craft()->templates->includeJsResource('paypalstandardpayments/js/paypalStandardPayments.js');\n\n // Include the Form Validation JS\n craft()->templates->includeJsResource('paypalstandardpayments/js/formValidation.min.js');\n craft()->templates->includeJsResource('paypalstandardpayments/js/bootstrapFormValidation.min.js');\n\n // If CSRF protection is enabled, include JavaScript\n $this->_csrf();\n\n $templateContents = array(\n 'formAction' => $formAction,\n 'paymentType' => trim($options['paymentType']),\n 'paymentEmail' => trim($options['paymentEmail']),\n 'notificationSubject' => $options['notificationSubject'],\n 'returnUrl' => $options['returnUrl'],\n 'cancelUrl' => $options['cancelUrl'],\n 'offlineUrl' => $options['offlineUrl'],\n 'formHandle' => trim($options['formHandle']),\n 'notificationRecipients' => trim($options['notificationRecipients']),\n 'notificationSubject' => trim($options['notificationSubject'])\n );\n\n // Render the form tag template\n return TemplateHelper::getRaw(\n craft()->paypalStandardPayments->renderPluginTemplate('form-tag', $templateContents)\n );\n }", "title": "" } ]
c1c810af60de9e60524bcbf0816e3364
Return details of products searched by various types
[ { "docid": "b9c4338853273e31fd1a3f29d9fedc38", "score": "0.6416771", "text": "public function searchProducts($search, $category, $searchType = \"UPC\", $searchNode=\"\")\n\t{\n\t\t// Set class vars.\n\t\t$this->searchString = $search;\n\t\t$this->category = $category;\n\t\t$this->searchType = $searchType;\n\t\t$this->searchNode = $searchNode;\n\t\t$this->searchProducts = true;\n\n\t\tswitch($searchType)\n\t\t{\n\t\t\tcase \"UPC\" :\n\t\t\t\t$parameters =\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"Operation\" => \"ItemLookup\",\n\t\t\t\t\t\t\"ItemId\" => $search,\n\t\t\t\t\t\t\"SearchIndex\" => $category,\n\t\t\t\t\t\t\"IdType\" => \"UPC\",\n\t\t\t\t\t\t\"ResponseGroup\" => \"Medium\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"ISBN\" :\n\t\t\t\t$parameters =\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"Operation\" => \"ItemLookup\",\n\t\t\t\t\t\t\"ItemId\" => $search,\n\t\t\t\t\t\t\"SearchIndex\" => self::BOOKS,\n\t\t\t\t\t\t\"IdType\" => \"ISBN\",\n\t\t\t\t\t\t\"ResponseGroup\" => \"Medium\"\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase \"TITLE\" :\n\t\t\t\tswitch($category)\n\t\t\t\t{\n\t\t\t\t\tcase \"MUSICTRACKS\" :\n\t\t\t\t\t\t$parameters =\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"Operation\" => \"ItemSearch\",\n\t\t\t\t\t\t\t\t//\"Title\" => $search,\n\t\t\t\t\t\t\t\t\"Keywords\" => $search,\n\t\t\t\t\t\t\t\t\"Sort\" => \"titlerank\",\n\t\t\t\t\t\t\t\t\"SearchIndex\" => $category,\n\t\t\t\t\t\t\t\t\"ResponseGroup\" => \"Large\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\t$parameters =\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"Operation\" => \"ItemSearch\",\n\t\t\t\t\t\t\t\t//\"Title\" => $search,\n\t\t\t\t\t\t\t\t\"Keywords\" => $search,\n\t\t\t\t\t\t\t\t\"Sort\" => \"relevancerank\",\n\t\t\t\t\t\t\t\t\"SearchIndex\" => $category,\n\t\t\t\t\t\t\t\t\"ResponseGroup\" => \"Large\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"TITLE2\" :\n\t\t\t\t$parameters =\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"Operation\" => \"ItemSearch\",\n\t\t\t\t\t\t\"Title\" => $search,\n\t\t\t\t\t\t//\"Keywords\" => $search,\n\t\t\t\t\t\t\"Sort\" => \"relevancerank\",\n\t\t\t\t\t\t\"SearchIndex\" => $category,\n\t\t\t\t\t\t\"ResponseGroup\" => \"Large\"\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\t// Same as TITLE but add BrowseNodeID param.\n\t\t\tcase \"NODE\" :\n\t\t\t\t$parameters =\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"Operation\" => \"ItemSearch\",\n\t\t\t\t\t\t//\"Title\" => $search,\n\t\t\t\t\t\t\"Keywords\" => $search,\n\t\t\t\t\t\t\"SearchIndex\" => $category,\n\t\t\t\t\t\t\"BrowseNode\" => $searchNode,\n\t\t\t\t\t\t\"ResponseGroup\" => \"Large\"\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $this->verifyXmlResponse($this->queryAmazon($parameters));\n\t}", "title": "" } ]
[ { "docid": "c4911c8b2b651a9ab7257cfb61fbc131", "score": "0.7079248", "text": "public function search_by_type($id){\n\t\t$data=Product::where(['type'=>$id])\n\t\t->Where('status','=',1)\n\t\t->get();\n\t\treturn view('product_list',compact('data'));\n\t}", "title": "" }, { "docid": "90e598dde36be8655a174a2eadfbd21c", "score": "0.67853457", "text": "public function get_individual_products($type){\n $query = $this->db->get_where('products', array('product_type' => $type));\n return $query->result_array();\n }", "title": "" }, { "docid": "1ed8d074174738b27a4bc2b2684e7fc2", "score": "0.6694391", "text": "function getProducts($searchParams) {\n\t}", "title": "" }, { "docid": "59b9ec0c674d1bc6e3ca29a85b7b40c0", "score": "0.66735905", "text": "public function getProducts()\n\t{\n\t\t$request = $this->getHttpClient()->get($this->buildSearchUrl(),$this->setHeaders());\n\n\t\t$response = $request->send();\n\n\t\t$this->rawProducts = $response->json();\n\n\t}", "title": "" }, { "docid": "c74f269209c5f59460acfa2d38512095", "score": "0.66271687", "text": "public function getSearchProduct($request);", "title": "" }, { "docid": "26e5f7dd1b49c1711fc3225bb3dfa4f4", "score": "0.6552122", "text": "protected function findProducts() {\n $query = oxConfig::getParameter(\"query\");\n\n $oSearch = oxNew(\"oxsearch\");\n\n $result = $oSearch->getSearchArticles($query);\n $iFound = $oSearch->getSearchArticleCount($query);\n\n $return = new stdClass();\n $return->result = true;\n $return->found = $iFound;\n $pageSize = oxConfig::getInstance()->getConfigParam('iNrofCatArticles');\n $pageSize = $pageSize ? $pageSize : 10;\n $return->pageSize = $pageSize;\n $articles = array();\n foreach ($result as $oArticle) {\n $article = new stdClass();\n $article->id = $oArticle->getProductId();\n $article->name = $oArticle->oxarticles__oxtitle->value;\n $article->artnum = $oArticle->oxarticles__oxartnum->value;\n $article->price = $oArticle->getFPrice();\n $article->description = $oArticle->oxarticles__oxshortdesc->value;\n $article->thumbnail = $oArticle->getIconUrl();\n $articles[] = $article;\n }\n $return->products = $articles;\n $this->_oSmarty->assign(\"json\", json_encode($return));\n }", "title": "" }, { "docid": "c20340ae0b2093bfd11c5cd28344e710", "score": "0.6551071", "text": "public function getProducts();", "title": "" }, { "docid": "3258685bb340261bac556a76d3d656ef", "score": "0.65339535", "text": "public function get_products_by_type($type = '', $where = '', $sort_by = ''){\n\t\t\t$column = 'name';\n\t\t\t$order = 'ASC';\n\t\t\t\n\t\t\tif( strpos($sort_by, '-' ) !== false ) {\n\t\t\t\t$sort = explode('-', $sort_by, 2);\n\t\t\t\t$column = $sort[0];\n\t\t\t\t$order = $sort[1];\n\t\t\t\t\t\t\n\t\t\t\tif($order == 'ascending'){\n\t\t\t\t\t$order = 'ASC';\n\t\t\t\t}else{\n\t\t\t\t\t$order = 'DESC';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif($column == 'created'){\n\t\t\t\t\t$column = 'date_added';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif($column == 'best'){\n\t\t\t\t\t$column = 'id';\n\t\t\t\t\t$order = 'ASC';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif($sort_by == 'featured'){\n\t\t\t\t$column = 'id';\n\t\t\t\t$order = 'ASC';\n\t\t\t}\n\t\t\t\n\t\t\tif($type == 'clothing'){\n\t\t\t\t\n\t\t\t\t$this->db->where('category','Shirts');\n\t\t\t\t$this->db->or_where('category','Dresses');\n\t\t\t\t$this->db->or_where('category','Pants');\n\t\t\t\t$this->db->or_where('category','Lingeries');\n\t\t\t\t$this->db->or_where('category','Tops');\n\t\t\t}\n\t\t\t\n\t\t\tif($type == 'bags-and-shoes'){\n\t\t\t\t$string1 = 'Bags';\n\t\t\t\t$string1 = $this->db->escape($string1);\n\t\t\t\t$string2 = 'Shoes';\n\t\t\t\t$string2 = $this->db->escape($string2);\n\t\t\t\t//$this->db->where(\"(category = $string1 OR category = $string2)\");\n\t\t\t\t$this->db->where('category','Bags');\n\t\t\t\t$this->db->or_where('category','Shoes');\n\t\t\t}\n\t\t\t\n\t\t\tif($type == 'sale'){\n\t\t\t\t$this->db->where('sale','Yes');\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($where)){\n\t\t\t\t$this->db->where($where);\n\t\t\t}\n\t\t\t\n\t\t\t//$this->db->limit($limit, $offset);\n\t\t\t//$this->db->order_by('id','DESC');\n\t\t\t//$this->db->order_by('name','ASC');\n\t\t\t$this->db->order_by($column,$order);\n\t\t\t$query = $this->db->get('products');\n\t\t\tif($query->num_rows() > 0){\n\t\t\n\t\t\t\tforeach ($query->result() as $row){\n\t\t\t\t\t$data[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "1a7126b8ae4dc640ade128192ce92402", "score": "0.6516701", "text": "function searchProduct($param) {\n\t$oshop = new OOOnlineShop();\n $res['method'] = \"searchProduct\";\n\t$res['search'] = htmlentities($param['search']);\n\t\n $products['method'] = \"getProductsList\";\n\t$param['from'] = \"\";\n\t$param['limit'] = \"\";\n\t$param['cat'] = \"\";\n\t$products = $oshop->getProductsList($param);\n\t$search = \"\";\n\t$count = count($products);\n\t$x = 0;\n\n\tfor ($i = 0; $i <= $count; $i++) {\n\t\tif (stristr($products[$i]['description'], $res['search'])) {\n\t\t\t$search[$x] = $products[$i];\n\t\t}\n\t}\n\n\t$res['data'] = $search;\n\t\n\techo json_encode($res);\t\t\n}", "title": "" }, { "docid": "6ca28743f9bb43938edc41dab08a619a", "score": "0.64961857", "text": "public function search(Request $request)\n {\n if($request->searchType == \"homeSearch\"){\n $searchTerm = $request->search;\n $result = Product::where('productName', 'LIKE', '%' . $request->search . '%');\n\n $something = array('searchTerm' => $searchTerm, 'results' => $result);\n\n $results = $something['results'];\n session()->flash('terms', $searchTerm);\n session()->flash('results', $results->get());\n\n $_GET['page'] = 1;\n return redirect('product');\n }else{\n if($request->searchType == 'typeSearch'){\n $searchTerm = ProductType::where('typeID', '=', $request->search)->pluck('type')->first();\n $result = Product::where('typeID', '=', $request->search);\n\n $something = array('searchTerm' => $searchTerm, 'results' => $result);\n\n $results = $something['results'];\n session()->flash('terms', $searchTerm);\n session()->flash('results', $results->get());\n\n $_GET['page'] = 1;\n return redirect('product');\n }else{\n // Filter by search criteria (in description if necessary)\n $something = $this->checkName($request->search, $request->searchIn);\n\n // Filter the results by the type\n $something = $this->checkType($something['searchTerm'], $something['results'], $request->type, $request->accessoryTypes, $request->cardType, $request->edition);\n\n $searchTerm = $something['searchTerm'];\n\n if($searchTerm == ''){\n $searchTerm = 'No search Criteria Selected. Showing all Results.';\n }\n }\n }\n\n $results = $something['results'];\n session()->flash('terms', $searchTerm);\n session()->flash('results', $results->get());\n\n $_GET['page'] = 1;\n return redirect('product')\n ->withInput();\n }", "title": "" }, { "docid": "0102d6172d77827ac062cae1d8e16ad1", "score": "0.6428483", "text": "public function collectSearchProducts()\n {\n $search = $this->productsLogic->searchProducts($_REQUEST['w']);\n $result = $this->productsLogic->printDiv($search);\n\n\n include 'view/products.php';\n }", "title": "" }, { "docid": "eb3b929a630ee930bff0dc60de776d5a", "score": "0.6423592", "text": "public function seachProduct($name)\n\t{\n\t\t$sql = \"SELECT * FROM product JOIN manufactures on product.manu_ID = manufactures.manu_ID JOIN protypes ON protypes.type_ID = product.type_ID WHERE product.name LIKE '%$name%'\n\";\n\t\t$result = self::$conn->query($sql);\n\t\treturn $this->getData($result);\n\t}", "title": "" }, { "docid": "6ff8a2165b78fbcd1fe662a3ad236012", "score": "0.64228725", "text": "public function showProducts() {\n\t\ttry {\n\n\t\t\t// Query all products join with categories\n\t\t\t$this->_show_all_products = $this->_connect->prepare(\"select p.*, c.category_name, b.type_name from product p join category c on c.category_id = p.category_id join type b on b.type_id = p.type_id\");\n\t\t\t$this->_show_all_products->execute();\n\t\t\t$this->allProducts = $this->_show_all_products->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\treturn json_encode(array(\n\t\t\t\t'error' => false,\n\t\t\t\t'items' => $this->allProducts\n\t\t\t), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP);\n\n\t\t} catch(PDOException $e) {\n\t\t\techo json_encode(array(\n\t\t\t\t'error' => true,\n\t\t\t\t'message' => $e->getMessage()\n\t\t\t), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP);\n\t\t}\n\t}", "title": "" }, { "docid": "da9beaa52c643afbbd6b7c0148464f28", "score": "0.6406177", "text": "function loadFilteredProducts($type)\n{\n $db = $GLOBALS['db'];\n $data = $db->query(\"SELECT id, name, price, taste FROM drinks WHERE typeOfDrink = '$type'\") or die($db->error);\n\n $products = $data->fetchAll(PDO::FETCH_ASSOC);\n return $products;\n}", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.640135", "text": "public function getProduct();", "title": "" }, { "docid": "bbab3fd53994be2b2bd7f19338755133", "score": "0.63942295", "text": "public function products_list() { \n $term = Input::get('term');\n $results = array();\n $queries = DB::table('products')\n ->where('name', 'LIKE', '%'.$term.'%')\n ->get();\n \n foreach ($queries as $query)\n {\n $product = Products::find($query->id);\n $results[] = [ 'id' => $product->id, 'value' => $product->name, 'price' => $product->price , 'quantity' => $product->quantity_available() , 'barcode' => $product->barcode , 'type' => $product->type ];\n }\n return Response::json($results);\n }", "title": "" }, { "docid": "a2449ba54e620e995b37243ec94e5caf", "score": "0.63719064", "text": "public function get_products(Request $request)\n {\n $search['content'] = $request->input('search');\n switch($search['content']) {\n case filter_var($search['content'], FILTER_VALIDATE_EMAIL):\n $search['type'] = 'email';\n break;\n case is_string($search['content']):\n $search['type'] = 'name';\n break;\n }\n\n $qt = intval($request->input('qt', 10));\n $products = Product::select(\n 'id',\n 'id_category',\n 'id_brand',\n 'name',\n 'stock',\n 'price',\n 'price_from',\n ) //->where($search['type'], 'like', '%'.$search['content'].'%')\n // ->join('brands', 'products.id_brand', '=', 'brands.id')\n ->orderByDesc('id')\n ->paginate($qt);\n\n foreach($products as $key => $item) {\n $cat = $this->getCategory($item['id_category']);\n $brand = $this->getBrand($item['id_brand']);\n $products[$key]['name_category'] = $cat['name'];\n $products[$key]['name_brand'] = $brand['name'];\n }\n\n return response()->json($products);\n }", "title": "" }, { "docid": "a34646aa8617a712f8949ed84cfeff4f", "score": "0.63692695", "text": "public function getProductTypesForSimpleProductSync();", "title": "" }, { "docid": "b2f66e9b04f88bc3866e384901434d8e", "score": "0.6344315", "text": "public function searchProducts($params = [])\n {\n }", "title": "" }, { "docid": "23fd5861860920f333dc6be4abea7176", "score": "0.63412005", "text": "public function productByCategory($type)\n {\n $category = Category::findBySlug($type)->first();\n\n if ($category) {\n $products = $category->products()->visibleColumn()->valid();\n } else {\n $products = Product::visibleColumn()->valid();\n\n }\n\n if (request()->has('sorting_by')) {\n $sorting = $this->defineSorting(request()->get('sorting_by'));\n $products = $products->orderBy($sorting['column'], $sorting['dir']);\n } else {\n $products = $products->createdAtDesc();\n }\n\n return $products;\n }", "title": "" }, { "docid": "3c49598db43dd727b90ca2102699fa7c", "score": "0.6338565", "text": "public function index()\n {\n\n //find nang cao + find don gian\n $key = isset($_GET['search']) ? $_GET['search'] : '';\n $price1 = isset($_GET['price1']) ? $_GET['price1'] : '';\n $id = isset($_GET['id']) ? $_GET['id'] : '';\n $name_sp = isset($_GET['name_sp']) ? $_GET['name_sp'] : '';\n $type = isset($_GET['type']) ? $_GET['type'] : '';\n if( $key != '')\n {\n $allProduct = DB::table('products')\n ->where('name', 'LIKE', '%' . $key . '%')\n ->paginate(8);\n\n $allProduct->appends(array(\n 'search' => $key,\n ));\n\n /* $allProduct = DB::table('products')\n ->where('name', 'LIKE', '%' . $key . '%')\n ->orWhere('price1', '=', $price1)\n ->orWhere('id', '=',$id)\n ->orWhere('type', 'Like', $type)\n ->paginate(6);\n\n $allProduct->appends(array(\n 'search' => $key,\n ));*/\n }\n else if($name_sp != '' and $price1 != '' and $id != '' and $type != '')\n {\n $allProduct = DB::table('products')\n ->join('typemarchandises', 'products.type', '=', 'typemarchandises.id')\n ->where('products.name', 'LIKE', '%' . $name_sp . '%')\n ->where('products.price1', '=', $price1)\n ->Where('products.id', '=',$id)\n ->Where('typemarchandises.name', 'Like', $type)\n ->select('products.*')\n ->paginate(8);\n $allProduct->appends(array(\n 'name_sp' => $name_sp,\n 'price1' => $price1,\n 'id' => $id,\n 'type' => $id,\n\n ));\n }\n else if($name_sp != '' and $price1 != '' and $id != '' )\n {\n $allProduct = DB::table('products')\n ->join('typemarchandises', 'products.type', '=', 'typemarchandises.id')\n ->where('products.name', 'LIKE', '%' . $name_sp . '%')\n ->where('products.price1', '=', $price1)\n ->Where('products.id', '=',$id)\n ->select('products.*')\n ->paginate(8);\n\n $allProduct->appends(array(\n 'name_sp' => $name_sp,\n 'price1' => $price1,\n 'id' => $id,\n ));\n }\n else if($name_sp != '' and $price1 != '' and $type != '' )\n {\n $allProduct = DB::table('products')\n ->join('typemarchandises', 'products.type', '=', 'typemarchandises.id')\n ->where('products.name', 'LIKE', '%' . $name_sp . '%')\n ->where('products.price1', '=', $price1)\n ->Where('typemarchandises.name', 'Like', $type)\n ->select('products.*')\n ->paginate(8);\n\n $allProduct->appends(array(\n 'name_sp' => $name_sp,\n 'price1' => $price1,\n 'type' => $type,\n ));\n }\n else if($name_sp != '' and $price1 != '')\n {\n $allProduct = DB::table('products')\n ->join('typemarchandises', 'products.type', '=', 'typemarchandises.id')\n ->where('products.name', 'LIKE', '%' . $name_sp . '%')\n ->where('products.price1', '=', $price1)\n ->select('products.*')\n ->paginate(8);\n $allProduct->appends(array(\n 'name_sp' => $name_sp,\n 'price1' => $price1,\n ));\n }\n else if($name_sp != '')\n {\n $allProduct = DB::table('products')\n ->where('name', 'LIKE', '%' . $name_sp . '%')\n ->paginate(8);\n $allProduct->appends(array(\n 'name_sp' => $name_sp,\n ));\n }\n\n else if($price1 != '')\n {\n $allProduct = DB::table('products')\n ->where('price1', '=', $price1)\n ->paginate(8);\n\n $allProduct->appends(array(\n 'price1' => $price1,\n ));\n }\n else if( $id != '')\n {\n $allProduct = DB::table('products')\n ->Where('id', '=',$id)\n ->paginate(8);\n\n $allProduct->appends(array(\n 'id' => $id,\n ));\n }\n else if( $type != '')\n {\n $allProduct = DB::table('products')\n ->join('typemarchandises', 'products.type', '=', 'typemarchandises.id')\n ->Where('typemarchandises.name', 'Like', '%' . $type . '%')\n ->select('products.*')\n ->paginate(8);\n // $allProduct = DB::table('products')\n // ->Where('type', 'Like', $type)\n // ->paginate(6);\n $allProduct->appends(array(\n 'type' => $type,\n ));\n }\n else\n {\n $allProduct = DB::table('products')->paginate(8);\n }\n return view('products.index', array('products' => $allProduct));\n }", "title": "" }, { "docid": "00a28d4961b8c5b1df7cf5de0469ab87", "score": "0.6336426", "text": "public function get_products_by_type_filter($where = '', $type = '', $sort_by = ''){\n\t\t\t$column = 'name';\n\t\t\t$order = 'ASC';\n\t\t\t\n\t\t\tif( strpos($sort_by, '-' ) !== false ) {\n\t\t\t\t$sort = explode('-', $sort_by, 2);\n\t\t\t\t$column = $sort[0];\n\t\t\t\t$order = $sort[1];\n\t\t\t\t\t\t\n\t\t\t\tif($order == 'ascending'){\n\t\t\t\t\t$order = 'ASC';\n\t\t\t\t}else{\n\t\t\t\t\t$order = 'DESC';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif($column == 'created'){\n\t\t\t\t\t$column = 'date_added';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif($column == 'best'){\n\t\t\t\t\t$column = 'id';\n\t\t\t\t\t$order = 'ASC';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\tif($sort_by == 'featured'){\n\t\t\t\t$column = 'id';\n\t\t\t\t$order = 'ASC';\n\t\t\t}\n\t\t\t\n\t\t\tif($type == 'clothing'){\n\t\t\t\t\n\t\t\t\t$this->db->where('category','Shirts');\n\t\t\t\t$this->db->or_where('category','Dresses');\n\t\t\t\t$this->db->or_where('category','Pants');\n\t\t\t\t$this->db->or_where('category','Lingeries');\n\t\t\t\t$this->db->or_where('category','Tops');\n\t\t\t}\n\t\t\t\n\t\t\tif($type == 'bags-and-shoes'){\n\t\t\t\t$string1 = 'Bags';\n\t\t\t\t$string1 = $this->db->escape($string1);\n\t\t\t\t$string2 = 'Shoes';\n\t\t\t\t$string2 = $this->db->escape($string2);\n\t\t\t\t//$this->db->where(\"(category = $string1 OR category = $string2)\");\n\t\t\t\t$this->db->where('category','Bags');\n\t\t\t\t$this->db->or_where('category','Shoes');\n\t\t\t}\n\t\t\t\n\t\t\tif($type == 'sale'){\n\t\t\t\t$this->db->where('sale','Yes');\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($where)){\n\t\t\t\t$this->db->where($where);\n\t\t\t}\n\t\t\t\n\t\t\t//$this->db->limit($limit, $offset);\n\t\t\t//$this->db->order_by('id','DESC');\n\t\t\t//$this->db->order_by('name','ASC');\n\t\t\t$this->db->order_by($column,$order);\n\t\t\t$query = $this->db->get('products');\n\t\t\tif($query->num_rows() > 0){\n\t\t\n\t\t\t\tforeach ($query->result() as $row){\n\t\t\t\t\t$data[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "8753867996492d72e02d64702a393dab", "score": "0.62858343", "text": "public function show(Product_Type $product_Type)\n {\n //\n }", "title": "" }, { "docid": "0253afd2a7e9c98390db3fbea2b3cb21", "score": "0.6272547", "text": "public function getProductType();", "title": "" }, { "docid": "8df3fa78d87b32bde16fa8ef762e061f", "score": "0.62601405", "text": "public function indexWithType(Request $request, Type $type)\n {\n // Return the view with only the selected type\n $sort = $request->get('sort');\n $order_by = $request->get('order_by');\n\n if(!empty($sort) && !empty($order_by))\n {\n $products = Product::orderBy($sort, $order_by)\n ->whereIn('type_id', Type::whereId($type->id)->get()->pluck('id'))->get();\n } else {\n $products = Product::whereIn('type_id', Type::whereId($type->id)->get()->pluck('id'))->get();\n }\n\n $types = Type::orderBy('title', 'asc')->get();\n\n $brands = Brand::orderBy('title', 'asc')->get();\n\n $categories = Category::orderBy('title', 'asc')->get();\n\n return view('klant.body.products.products', compact('products', 'brands', 'categories', 'types'));\n }", "title": "" }, { "docid": "4d431b4eb78b7f464618e929a4603d1f", "score": "0.6258391", "text": "public function index()\n {\n //实例化product产品导航表\n $db = DB::table(\"product\");\n //判断并封装搜索\n $params = array();\n if(!empty($_GET['name'])){\n $db->where(\"name\",\"like\",\"%{$_GET['name']}%\");\n $params['name'] = $_GET['name'];\n }\n $product = $db->orderBy('id',\"desc\")->paginate(5);//每5条数据分页\n foreach ($product as $k =>$v){\n $product[$k]->type_name = DB::table(\"product_table\")->where(\"id\",$v->product_id )->first();\n }\n //显示视图\n return view('admin.product.index',['product'=>$product,'params'=>$params]);\n }", "title": "" }, { "docid": "c7eadec77b38db57164e04b8c1ebe1c4", "score": "0.6256552", "text": "public function search()\n {\n $name = $this->request->getRequestPost('search_name');\n $listProduct = $this->product->search($name);\n $this->render('Product/listProduct', 'listProduct', $listProduct);\n }", "title": "" }, { "docid": "9e846e0f879e6308bcf1e382392c6969", "score": "0.62425804", "text": "public function search()\n {\n $products = array();\n $this->paginate['conditions'] = [$this->Session->read('search-conditions')];\n \n if($this->request->is('post'))\n {\n // perform the search\n $searchStrings = $this->request->data['products']['searchedStrings'];\n \n if(trim($searchStrings) != '')\n { \n $keys = explode(' ', $searchStrings);\n $conditions = '1';\n foreach ($keys as $key)\n { \n $conditions .= ' AND (Product.description LIKE \\'%' . $key . '%\\')';\n\n }\n \n /*\n * The $conditions have the conditions for the query where\n * this is \"1 AND (Product.description LIKE '%keyword1%') AND (Product.description LIKE '%keyword2%')...\n * etc\n * This return the Products that have all the keywords ond his description\n */\n \n $this->set('query',$conditions);\n \n // Conditions to paginate\n $this->paginate['conditions'] = [$conditions];\n // Save into session to be accessed after refresh or change page\n $this->Session->write('search-conditions', $conditions);\n \n }\n else{\n //Find all, 1 = allways true\n $this->paginate['conditions'] = [1];\n // Save into session to be accessed after refresh or change page\n $this->Session->write('search-conditions', 1);\n }\n \n }\n $this->Paginator->settings = $this->paginate;\n $this->set('paginatesett', $this->Paginator->settings);\n $products = $this->Paginator->paginate('Product');\n $this->set('products', $products);\n }", "title": "" }, { "docid": "f00c8c7e02a37927eed8a449dbd24557", "score": "0.62407064", "text": "function showProducts()\n\t{\n\t\t$sql= \"SELECT product_id,title,thumb_image FROM products_table ORDER BY title ASC\";\n\t\t$query = new Bin_Query();\n\t\tif($query->executeQuery($sql))\n\t\t{\t\t\n\t\t\treturn Display_DProductDetail::showProducts($query->records);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"No Products Found\";\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "51274bff3c420d643b3018a0c3ebe8f7", "score": "0.6235537", "text": "public function ajaxProcessSearchProducts() {\n\n $this->context->customer = new Customer((int) Tools::getValue('id_customer'));\n $currency = new Currency((int) Tools::getValue('id_currency'));\n\n if ($products = Product::searchByName((int) $this->context->language->id, pSQL(Tools::getValue('product_search')))) {\n\n foreach ($products as &$product) {\n // Formatted price\n $product['formatted_price'] = Tools::displayPrice(Tools::convertPrice($product['price_tax_incl'], $currency), $currency);\n // Concret price\n $product['price_tax_incl'] = Tools::ps_round(Tools::convertPrice($product['price_tax_incl'], $currency), 2);\n $product['price_tax_excl'] = Tools::ps_round(Tools::convertPrice($product['price_tax_excl'], $currency), 2);\n $productObj = new Product((int) $product['id_product'], false, (int) $this->context->language->id);\n $combinations = [];\n $attributes = $productObj->getAttributesGroups((int) $this->context->language->id);\n\n // Tax rate for this customer\n\n if (Tools::isSubmit('id_address')) {\n $product['tax_rate'] = $productObj->getTaxesRate(new Address(Tools::getValue('id_address')));\n }\n\n $product['warehouse_list'] = [];\n\n foreach ($attributes as $attribute) {\n\n if (!isset($combinations[$attribute['id_product_attribute']]['attributes'])) {\n $combinations[$attribute['id_product_attribute']]['attributes'] = '';\n }\n\n $combinations[$attribute['id_product_attribute']]['attributes'] .= $attribute['attribute_name'] . ' - ';\n $combinations[$attribute['id_product_attribute']]['id_product_attribute'] = $attribute['id_product_attribute'];\n $combinations[$attribute['id_product_attribute']]['default_on'] = $attribute['default_on'];\n\n if (!isset($combinations[$attribute['id_product_attribute']]['price'])) {\n $priceTaxIncl = Product::getPriceStatic((int) $product['id_product'], true, $attribute['id_product_attribute']);\n $priceTaxExcl = Product::getPriceStatic((int) $product['id_product'], false, $attribute['id_product_attribute']);\n $combinations[$attribute['id_product_attribute']]['price_tax_incl'] = Tools::ps_round(Tools::convertPrice($priceTaxIncl, $currency), 2);\n $combinations[$attribute['id_product_attribute']]['price_tax_excl'] = Tools::ps_round(Tools::convertPrice($priceTaxExcl, $currency), 2);\n $combinations[$attribute['id_product_attribute']]['formatted_price'] = Tools::displayPrice(Tools::convertPrice($priceTaxExcl, $currency), $currency);\n }\n\n if (!isset($combinations[$attribute['id_product_attribute']]['qty_in_stock'])) {\n $combinations[$attribute['id_product_attribute']]['qty_in_stock'] = StockAvailable::getQuantityAvailableByProduct((int) $product['id_product'], $attribute['id_product_attribute'], (int) $this->context->company->id);\n }\n\n if (Configuration::get('EPH_ADVANCED_STOCK_MANAGEMENT') && (int) $product['advanced_stock_management'] == 1) {\n $product['warehouse_list'][$attribute['id_product_attribute']] = Warehouse::getProductWarehouseList($product['id_product'], $attribute['id_product_attribute']);\n } else {\n $product['warehouse_list'][$attribute['id_product_attribute']] = [];\n }\n\n $product['stock'][$attribute['id_product_attribute']] = Product::getRealQuantity($product['id_product'], $attribute['id_product_attribute']);\n }\n\n if (Configuration::get('EPH_ADVANCED_STOCK_MANAGEMENT') && (int) $product['advanced_stock_management'] == 1) {\n $product['warehouse_list'][0] = Warehouse::getProductWarehouseList($product['id_product']);\n } else {\n $product['warehouse_list'][0] = [];\n }\n\n $product['stock'][0] = StockAvailable::getQuantityAvailableByProduct((int) $product['id_product'], 0, (int) $this->context->company->id);\n\n foreach ($combinations as &$combination) {\n $combination['attributes'] = rtrim($combination['attributes'], ' - ');\n }\n\n $product['combinations'] = $combinations;\n\n if ($product['customizable']) {\n $productInstance = new Product((int) $product['id_product']);\n $product['customization_fields'] = $productInstance->getCustomizationFields($this->context->language->id);\n }\n\n }\n\n $toReturn = [\n 'products' => $products,\n 'found' => true,\n ];\n } else {\n $toReturn = ['found' => false];\n }\n\n $this->content = json_encode($toReturn);\n }", "title": "" }, { "docid": "723a923c90e583ea5fe6d5baeefb86e9", "score": "0.62306964", "text": "function getProduct();", "title": "" }, { "docid": "27d1230ac15259c5a26b34ef70fe2fad", "score": "0.6221456", "text": "public function index(Request $request)\n {\n\t\t$input=$request->all();\n\t\t$r=TypeProduct::where('id', '<>', '0');\n\t\tif(isset($input['id']) and $input['id']<>0){\n\t\t\t$r->where('id', '=', $input['id']);\n\t\t}\n\t\t/*if(isset($input['name']) and $input['name']<>\"\"){\n\t\t\t$r->where('name', 'like', '%'.$input['name'].'%');\n\t\t}*/\n\t\t$typeProducts = $r->with('user')->paginate(25);\n\t\t//$typeProducts = TypeProduct::with('user')->paginate(25);\n\n return view('type_products.index', compact('typeProducts'));\n }", "title": "" }, { "docid": "21c9b0fc1d99ec67e730ed67256c7ae1", "score": "0.6203932", "text": "public function search_product(Request $request)\n {\n $price = explode(\",\", $request->price);\n\n $products = Product::select('products.*')\n ->join('users', 'products.user_id', '=', 'users.id')\n ->OfAnimalType($request->animal_type)\n ->OfBreed($request->breed)\n ->OfName($request->name)\n ->OfPriceMin($price[0])\n ->OfPriceMax($price[1])\n ->OfDescription($request->description)\n ->OfApproved()\n ->OfQuantity()\n ->OfRegion($request->region)\n ->OfProvince($request->province)\n ->OfCity($request->city)\n ->orderBy('products.name')\n ->get();\n\n $product_params = [$request->animal_type, $request->breed, $request->name, $price[0], $price[1], $request->region, $request->province, $request->city, $request->description];\n\n return view('search.index')\n ->with('products', $products)\n ->with('product_params', $product_params);\n }", "title": "" }, { "docid": "2a956dde3ab745656b1475a14fb33c1f", "score": "0.6202474", "text": "public function getProducts()\n\t{\n\t\t/**\n\t\t* todo\n\t\t*/ \n\t}", "title": "" }, { "docid": "e3aef812420f546a8882126568ee9e7e", "score": "0.6188954", "text": "function viewSearchProductList($term){\n $product = new productModel();\n if(isset($_GET['category'])){\n $product->prodcategory = $_GET['category'];\n\n }\n if(isset($_GET['sales'])){\n $product->prodsortsales = $_GET['sales'];\n }\n\n return $product->viewSearchProdList($term);\n }", "title": "" }, { "docid": "4144175f0a11fce977568a7f3f2cebce", "score": "0.618804", "text": "function ciniki_merchandise_productSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'start_needle'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Search String'),\n 'limit'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Limit'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'merchandise', 'private', 'checkAccess');\n $rc = ciniki_merchandise_checkAccess($ciniki, $args['tnid'], 'ciniki.merchandise.productList');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of products\n //\n $strsql = \"SELECT ciniki_merchandise.id, \"\n . \"ciniki_merchandise.code, \"\n . \"ciniki_merchandise.name, \"\n . \"ciniki_merchandise.permalink, \"\n . \"ciniki_merchandise.status, \"\n . \"ciniki_merchandise.sequence, \"\n . \"ciniki_merchandise.flags, \"\n . \"ciniki_merchandise.unit_amount, \"\n . \"ciniki_merchandise.unit_discount_amount, \"\n . \"ciniki_merchandise.unit_discount_percentage, \"\n . \"ciniki_merchandise.taxtype_id, \"\n . \"ciniki_merchandise.inventory, \"\n . \"ciniki_merchandise.shipping_other, \"\n . \"ciniki_merchandise.shipping_CA, \"\n . \"ciniki_merchandise.shipping_US, \"\n . \"ciniki_merchandise.primary_image_id, \"\n . \"ciniki_merchandise.synopsis, \"\n . \"ciniki_merchandise.description \"\n . \"FROM ciniki_merchandise \"\n . \"WHERE ciniki_merchandise.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n if( ciniki_core_checkModuleFlags($ciniki, 'ciniki.merchandise', 0x01) ) {\n $strsql .= \"AND (code LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR code LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \";\n } else {\n $strsql .= \"AND (name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \";\n }\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \";\n } else {\n $strsql .= \"LIMIT 25 \";\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.merchandise', array(\n array('container'=>'products', 'fname'=>'id', \n 'fields'=>array('id', 'code', 'name', 'permalink', 'status', 'sequence', 'flags', 'unit_amount', 'unit_discount_amount', 'unit_discount_percentage', 'taxtype_id', 'inventory', 'shipping_other', 'shipping_CA', 'shipping_US', 'primary_image_id', 'synopsis', 'description')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['products']) ) {\n $products = $rc['products'];\n foreach($products as $pid => $product) {\n if( ciniki_core_checkModuleFlags($ciniki, 'ciniki.merchandise', 0x01) && $product['code'] != '' ) {\n $products[$pid]['display_name'] = $product['code'] . ' - ' . $product['name'];\n } else {\n $products[$pid]['display_name'] = $product['name'];\n }\n }\n } else {\n $products = array();\n }\n\n return array('stat'=>'ok', 'products'=>$products);\n}", "title": "" }, { "docid": "98700b505e233e69b3ec61a7b552274e", "score": "0.61671275", "text": "function _get_products(){\n $sql = \"SELECT * FROM {node} WHERE type = '%s' AND status = %d ORDER BY '%s'\";\n $result = db_query(db_rewrite_sql($sql), \"product\", 0, 'nid');\n \n $results = array(\"\" => \"\");\n while($data = db_fetch_object($result)){\n $results[$data->nid] = '['.$data->nid.'] '.$data->title;\n }\n \n return $results;\n}", "title": "" }, { "docid": "e33563cf9899b9ada3f5a158b8eff7e7", "score": "0.61493576", "text": "public function actionIndex()\n {\n $searchModel = new ProductTypeSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "54375f9d63db14e161b69aca812d3898", "score": "0.61478287", "text": "private function search_products($search, $page)\n\t{\n\t\t$result = array();\n\n\t\tif($search){\n\n\t\t\tif(substr($search,0,5) == 'bici:' or substr($search,0,5) == 'moto:'){\n\t\t\t\t$text = substr($search,5,10);\n\t\t\t\t$this->session->set_userdata('search', $text);\n\n\t\t\t\t$type = substr($search,0,5);\n\t\t\t\t$this->session->set_userdata('type', $type);\n\t\t\t}elseif(substr($search,0,5) == 'todo:'){\n\t\t\t\t$this->session->unset_userdata('search');\n\t\t\t\t$this->session->unset_userdata('type');\n\t\t\t}else{\n\t\t\t\t$this->session->set_userdata('search', $search);\n\t\t\t\t$this->session->set_userdata('type', '');\n\t\t\t}\n\n\t\t\tif($this->session->userdata('search') or $this->session->userdata('type')){\n\t\t\t\t$result['list'] = $this->productos->get_search_productos($this->session->userdata('search'), $this->session->userdata('type'), 20, $page);\n\t\t\t\t$result['total'] = $this->productos->get_total_search_productos($this->session->userdata('search'), $this->session->userdata('type'));\n\t\t\t}else{\n\t\t\t\t$result['list'] = $this->productos->get_productos(20, $page);\n\t\t\t\t$result['total'] = $this->productos->get_total_productos();\n\t\t\t}\n\n\t\t}elseif($this->session->userdata('search')){\n\n\t\t\t$result['list'] = $this->productos->get_search_productos($this->session->userdata('search'), $this->session->userdata('type'), 20, $page);\n\t\t\t$result['total'] = $this->productos->get_total_search_productos($this->session->userdata('search'), $this->session->userdata('type'));\n\n\t\t}else{\n\n\t\t\t$result['list'] = $this->productos->get_productos(20, $page);\n\t\t\t$result['total'] = $this->productos->get_total_productos();\n\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0f72e77703119866f191e1d4f15e7c46", "score": "0.6141072", "text": "public static function getProductById($id, $type = \"single\")\n {\n $products = [];\n if ($type == \"single\") {\n $products = Products::join(\"cates\", \"products.cate_id\", \"=\", \"cates.id\")->join(\"discounts\", \"discounts.id\", \"=\", \"cates.discount_id\")\n ->select([\"products.*\", \"cates.name as cate\", \"cates.alias as cate_alias\", \"discounts.percent as percent\"])\n ->where(\"products.id\", $id)->first();\n } else if ($type == \"array\") {\n $products = Products::join(\"cates\", \"products.cate_id\", \"=\", \"cates.id\")->join(\"discounts\", \"discounts.id\", \"=\", \"cates.discount_id\")\n ->select([\"products.*\", \"cates.name as cate\", \"cates.alias as cate_alias\", \"discounts.percent as percent\"])\n ->whereIn(\"products.id\", $id)->get();\n }\n return $products;\n }", "title": "" }, { "docid": "a3fcba6e5d6ddc668aeff18ba14493ad", "score": "0.61394536", "text": "public function getAllProduct()\n {\n return Product::with('images','type')->orderBy('id', 'desc')->paginate(Product::ITEMS_PER_PAGE);\n }", "title": "" }, { "docid": "dba44731dd3034f2a001b91a5497f418", "score": "0.6125869", "text": "public function getProducts(){\n if($this->get_request_method() != \"GET\"){\n $this->response('',406);\n }\n\n $query=\"SELECT p.id, p.nombre, p.descripcion, p.precio, c.nombre AS categoria, c.id as catId FROM producto p JOIN categoria c on p.categoria = c.id\";\n\n $this->db->get($query);\n }", "title": "" }, { "docid": "b6605de3e0af50e00cc45864735b05f9", "score": "0.61215323", "text": "function index_product_details($data) {\n $register = $this->xml_select->IndexPage->selectproducthome;\n $result = $this->mysqli->query($register);\n if ($result->num_rows) {\n while ($row = $result->fetch_assoc()) {\n $products[] = $row;\n }\n }\n return $products;\n }", "title": "" }, { "docid": "5bbe6c68f01155f3e202af737e5dc354", "score": "0.6119749", "text": "public function product_search_by_supplier(){\n\n\t\t$CI =& get_instance();\n\t\t$this->auth->check_admin_auth();\n\t\t$CI->load->library('lpurchase');\n\t\t$CI->load->model('Suppliers');\n\t\t$supplier_id = $this->input->post('supplier_id');\t\t\t\n $content = $CI->Suppliers->product_search_item($supplier_id);\n\n if (empty($content)) {\n \techo \"No Product Found !\";\n\t }else{\n\t \t// Select option created for product\n\t echo \"<select name=\\\"product_id[]\\\" onChange=\\\"purchase_productList(1);\\\" class=\\\"productSelection js-example-basic-single form-control\\\" id=\\\"product_id\\\">\";\n\t \techo \"<option value=\\\"0\\\">\".display('select_one').\"</option>\";\n\t \tforeach ($content as $product) {\n\t \t\t\techo \"<option value=\".$product['product_id'].\">\";\n\t \t\t\techo $product['product_name'].\"-(\".$product['product_model'].\")\";\n\t \t\t\techo \"</option>\"; \n\t \t}\t\n\t echo \"</select>\";\n\t }\n\t}", "title": "" }, { "docid": "5799ca2039c4b2a83d66f31043fea3b0", "score": "0.61183894", "text": "public function index()\n {\n $r = request();\n if($r->search) {\n return new ProductCollection(Product::where('name', 'like', \"%\".$r->search.\"%\")->paginate(request()->limit));\n\n\n }\n\n\n return new ProductCollection(Product::paginate(request()->limit));\n }", "title": "" }, { "docid": "0cf92c4fb546e118389b66a17a054d39", "score": "0.6117863", "text": "private function init_products_info()\n {\n $products = false;\n foreach ($this->categories as $section_name => $section) :\n foreach ($section as $category) :\n foreach ($category['sub_cat'] as $subcategory) :\n\n $subcat_name = $subcategory['cat_name'];\n $subcat_object = $this->get_html($subcategory['cat_url']);\n $list_of_products = $subcat_object->find('div[id=divProductList] div[class=prod-list-compare]');\n\n foreach ($list_of_products as $current_product) :\n $pickable = explode(' ', $current_product->next_sibling()->class);\n $pickable = array_search('hidden', $pickable);\n if (!$pickable) :\n $title = $current_product->parent()->find('span[class=h4]', 0)->innertext;\n $url = $this->site_info['main_url'].$current_product->parent()->find('a', 0)->href;\n $products[] = array(\n 'item_status' => 1,\n 'item_type_id' => self::PRODUCT_TYPE_ID,\n 'store_name' => $this->site_info['store_name'],\n 'item_code' => md5($url),\n 'item_title' => addslashes($title),\n 'item_buy_url' => $url,\n 'item_url_slug' => Common::createSlug($title, $url),\n 'category' => $this->search_cat(trim($subcat_name)),\n 'external_category' => 0,\n 'manufacturer_name' => ''\n );\n endif;\n endforeach;\n endforeach;\n endforeach;\n endforeach;\n\n $products = ($products) ? array_unique($products, SORT_REGULAR) : $products;\n foreach ($products as $key => $value){\n if ($value['category'] == '') {\n unset($products[$key]);\n continue;\n }\n }\n return $products;\n }", "title": "" }, { "docid": "61f853a18887cc55b9738b3491b6212a", "score": "0.6114505", "text": "function product_detail( $name, $id,$vendor, Request $request)\t//Shows product detail\n\t{\n\t\t//echo $name.\",\".$id.\",\".$vendor;exit;\t\t\n\t\t// Redirects to product_detail_new function if product is comparitive product.. \n\t\tif( empty( $vendor ) && !isset( $vendor ) )\n\t\t{\n\t\t\treturn redirect( 'product/'.$name.\"/\".$id );\n\t\t}\n\t\t$bname = explode(\"-\", $name );\n\t\t// Checks if the product is BOOK.. \n\t\tif( end( $bname ) == \"book\" )\n\t\t{\n\t\t\t$args = \"&isBook=true\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$args = \"\";\n\t\t}\n\t\t$id=$id.\"-\".$vendor;\n\t\t//SOLR URL for getting product detail\n\t\t$url = composer_url( 'ext_prod_detail.php?_id='.$id.$args );\n\t\t$data['product'] = file_get_contents( $url );\t\t\n\t\t$data['product'] = json_decode($data['product']);\n\n\t\t//List of PRODUCTS> \n\t\tif( isset( $data['product']->return_txt ) )\n\t\t\t$data['product'] = $data['product']->return_txt;\n\t\telse\n\t\t\t$data['product'] = \"\";\n\n\t\tif( end( $bname ) == \"book\" && is_object( $data['product'] ) )\n\t\t{\n\t\t\t$data['product']->grp = \"books\";\n\t\t}\n//echo \"<pre>\";print_r($data);exit;\n\t\t//IF PRODUCT FOUND..\n\t\tif(!empty($data['product']))\n\t\t{ \t\t\t\n\t\t\tif($name !== create_slug($data['product']->name) && ($data['product']->grp != \"books\") )\n\t\t\t{\n\t\t\t\t#if URL name doesn't match to product name\t\t\t\t\n\t\t\t\treturn redirect( \"product/\".create_slug($data['product']->name).\"/\".$data['product']->id.\"-\".$data['product']->vendor );\n\t\t\t}\n\n\t\t\t/*****Creating Title***/\n\t\t\tif(isset($data['product']->seo_title) && (!empty($data['product']->seo_title)))\n\t\t\t{\n\t\t\t\t$data['title'] = $data['product']->seo_title;\n\t\t\t}\n\t\t\t//// RELATED PRODUCTS list.. \n\t\t\t$viewurl = composer_url( 'site_view_also.php?info='.urlencode($data['product']->name).'&cat='.urlencode($data['product']->category).'&pid='.$id.$args );\t\t\t\n\t\t\t$data['ViewAlso'] = file_get_contents($viewurl);\t\t\t\n\t\t\t$data['ViewAlso'] = json_decode($data['ViewAlso']);\n\t\t\t$data['ViewAlso'] = $data['ViewAlso']->return_txt;\t\t\t\n\t\t\t$data['full'] = false;\n\t\t\t$data['moreimage'] = false;\t\t\t\t\t\t\t\n\t\t\t$data['page_title'] = \"\";\n\n\t\t\t/*** PROCESS RECENTLY VIEWED PRODUCT START *****/\n\t\t\t$recently_viewed = $request->cookie('recently_viewed');\n\n\t\t\t$r_prods = $this->get_recent_viewed( $recently_viewed );\n\n\t\t\tif( !empty( $recently_viewed ) )\n\t\t\t{\n\t\t\t\t$ids = json_decode( $recently_viewed );\n\n\t\t\t\tif( !is_array( $ids ) )\n\t\t\t\t{\n\t\t\t\t\t$ids = array();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ids = array();\n\t\t\t}\t\t\t\n\t\t\tif( !in_array($id, $ids) )\n\t\t\t{\n\t\t\t\tarray_unshift( $ids, $id );\n\t\t\t}\n\t\t\t$ids = array_slice( $ids, 0, 12 );\n\t\t\t\n\t\t\t$data['views']['r_prods']\t= $r_prods; // LIST OF Recently Viewed Products.. \n\n\t\t\t/*** PROCESS RECENTLY VIEWED PRODUCT ENDS *****/\n\n\t\t\tif( isset( $data['product']->category ) )\n\t\t\t{\n\t\t\t\t$data['c_name'] = $data['product']->category; // Category name to be used in DETAIL VIEW file.. \n\t\t\t}\n\n\t\t\t$response = new \\Illuminate\\Http\\Response( view(\"v1.product_detail\",$data) );\n\t\t\t// SENDS the current product ID to the USER COOKIE...\n\t\t\t$response->withCookie( cookie()->forever('recently_viewed', json_encode( $ids ) )); \n\t\t\t\n\t\t\treturn $response;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn redirect( 'search?search_text='.unslug($name).'&group=all' );\n\t\t\t//404 Page, as the product not found.. \n\t\t\tabort(404);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "d359dcc2ddcacdcfd7324cd297cbdea2", "score": "0.61092514", "text": "public function index()\n {\n $products = Product::all()->groupBy('type');\n\n \treturn view('products', compact('products'));\n }", "title": "" }, { "docid": "ac0efff9a45cfd0e801a530e4fd7285b", "score": "0.6096762", "text": "public function search_place_product(Request $request){\n return response()->json([\n 'stores' => new PlaceCollection($this->place::search_place($request->busqueda)->orderBy('id')->get()),\n 'products' => new SearchItemCollection($this->place_item::search_item_title($request->busqueda)->orderBy('id')->get()),\n ]);\n }", "title": "" }, { "docid": "0b268617ceb5ca846cd6851699e0d383", "score": "0.6089619", "text": "function hp_list($customer_type_id = 0) {\n\t\t$this->Product->virtualFields['price'] = $this->Product->price;\n\t\t$recommended = $this->Product->find('all', array(\n\t\t\t'conditions' => array('Product.active' => true),\n\t\t\t'contain' => array(),\n\t\t\t'fields' => array(\n\t\t\t\t'Product.id',\n\t\t\t\t'Product.name',\n\t\t\t\t'Product.title',\n\t\t\t\t'Product.short_description',\n\t\t\t\t'Product.price',\n\t\t\t\t'Product.retail_price_with_dph',\n\t\t\t\t'Product.url',\n\t\t\t\t'Product.rate',\n\t\t\t\t\t\t\t\n\t\t\t\t'Image.id',\n\t\t\t\t'Image.name'\n\t\t\t),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'recommended_products',\n\t\t\t\t\t'alias' => 'RecommendedProduct',\n\t\t\t\t\t'type' => 'INNER',\n\t\t\t\t\t'conditions' => array('Product.id = RecommendedProduct.product_id')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'images',\n\t\t\t\t\t'alias' => 'Image',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Image.product_id = Product.id AND Image.is_main = \"1\"')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'customer_type_product_prices',\n\t\t\t\t\t'alias' => 'CustomerTypeProductPrice',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.id = CustomerTypeProductPrice.product_id AND CustomerTypeProductPrice.customer_type_id = ' . $customer_type_id)\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'customer_type_product_prices',\n\t\t\t\t\t'alias' => 'CustomerTypeProductPriceCommon',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('Product.id = CustomerTypeProductPriceCommon.product_id AND CustomerTypeProductPriceCommon.customer_type_id = 2')\n\t\t\t\t),\n\t\t\t),\n\t\t\t'order' => array('RecommendedProduct.order' => 'asc')\n\t\t));\n\t\tunset($this->Product->virtualFields['price']);\n\n\t\treturn $recommended;\n\t}", "title": "" }, { "docid": "4982cff96e23b183bf20652eeb5765b1", "score": "0.60889876", "text": "function px_product_search($query, $category_id = null, $page = 1, $perpage = 10, $CTY = PX_CTY_DEFAULT, $CID = 0, $sort = null, $lid = '')\r\n{\r\n if($perpage > 100)\r\n {\r\n $perpage = 100;\r\n }\r\n else if($perpage <= 0)\r\n {\r\n $perpage = 10;\r\n }\r\n\r\n switch($sort)\r\n {\r\n case 'price_high':\r\n {\r\n $sortBy = 'price';\r\n $sortOrder = 'desc';\r\n break;\r\n }\r\n case 'price_low':\r\n {\r\n $sortBy = 'price';\r\n $sortOrder = 'asc';\r\n break;\r\n }\r\n case 'relevance':\r\n default:\r\n {\r\n $sortBy = 'relevance';\r\n $sortOrder = 'desc';\r\n break;\r\n }\r\n }\r\n\r\n $criteria = array(\r\n 'query' => urlencode($query),\r\n 'category_id' => $category_id,\r\n 'page' => $page,\r\n 'perpage' => $perpage,\r\n 'shop_id' => PX_SHOP_ID,\r\n 'CTY' => $CTY,\r\n 'CID' => $CID,\r\n 'version' => PX_VERSION,\r\n 'sort' => $sortBy,\r\n 'sortorder' => $sortOrder,\r\n 'lid' => $lid,\r\n );\r\n\r\n $search_results = px_api_call('buyat.affiliate.productx.productsearch', PX_API_KEY, $criteria);\r\n\r\n $products = array(\r\n 'results' => array(),\r\n 'products' => array(),\r\n );\r\n\r\n $products['results']['current_results'] = $search_results['current_results'];\r\n $products['results']['total_results'] = $search_results['total_results'];\r\n $products['results']['start'] = $search_results['start'];\r\n $products['results']['limit'] = $search_results['limit'];\r\n\r\n if($products['results']['current_results'] > 0)\r\n {\r\n foreach($search_results['products'] AS $index => $product_info)\r\n {\r\n $products['products'][] = $product_info['value'];\r\n }\r\n }\r\n\r\n return $products;\r\n}", "title": "" }, { "docid": "02766dc0768b8ed469ec1cea9a94817e", "score": "0.6087385", "text": "public function search($type,$dept=null,Request $request)\n {\n\n $lang = $request->input('lang');\n\n $validator = Validator::make($request->all(), [\n 'lang' => 'required',\n ]);\n\n if ($validator->fails()) {\n $statusCode = 400;\n $response[\"status\"] = -2;\n $response['message'] = $validator->errors()->all()[0];\n return response()->json($response, $statusCode); \n\n } else {\n\n $city = null;\n $dep_id = null;\n\n $product = Products::whereIn('type',['1','2']);\n\n if(filled(request()->city) || filled(request()->dep_id)){\n if(filled(request()->city)){\n $city = request()->city;\n $product->where('country_id',request()->city);\n }\n if(filled(request()->dep_id)){\n $dep_id = request()->dep_id;\n $product->where('dep_id',request()->dep_id);\n }\n }\n $count = $product->where('stock','>','0')->count();\n $products = $product->where('stock','>','0')->with('products_gallary','product_dep')->get()->sortBy('sorting');\n $currentPage = LengthAwarePaginator::resolveCurrentPage();\n\n // Create a new Laravel collection from the array data\n $itemCollection = collect($products);\n\n // Define how many items we want to be visible in each page\n $perPage = 15;\n\n // Slice the collection to get the items to display in current page\n $currentPageItems = $itemCollection->slice(($currentPage * $perPage) - $perPage, $perPage)->all();\n\n // Create our paginator and pass it to the view\n $products= new LengthAwarePaginator($currentPageItems , count($itemCollection), $perPage);\n\n $statusCode = 200;\n $response['status'] = 1;\n $response['message'] = $lang == 'ar' ? \" \":\" products\";\n $response['data'] = $products;\n return response()->json($response, $statusCode); \n }\n\n\n }", "title": "" }, { "docid": "a65f7ece38c9e0ff231777dae1af369d", "score": "0.6078022", "text": "public function actionListProduct()\n\t{\n\t\t$get = Yii::$app->request->get();\n\n\t\t$search = new ProductSearchForm();\n\t\t$search->setSearchCriteria($get);\n\t\t$dataProvider = $search->search();\n\n\t\treturn $dataProvider;\n\t}", "title": "" }, { "docid": "35ca188080ccd94e5a60b97cd62a444a", "score": "0.60734034", "text": "public function searchDetails(Request $request)\n {\n $user = session()->get('authUser');\n \n $result = [\n 'count' => 0,\n 'title' => $request->search,\n ];\n\n $result['stores'] = [\n 'data' => [],\n 'message' => trans('api.stores.not_available'),\n ];\n \n if(empty($request->store_id))\n {\n $stores = Store::selectRaw('stores.id,stores.store_name,stores.store_image')\n ->join('products','products.vendor_id','stores.vendor_id')\n ->where('store_name', 'like', '%' . $request->search . '%')\n ->where('stores.status','Active')\n ->groupBy('stores.id')\n ->orderBy('stores.store_name')\n ->get();\n \n $result['count'] += $stores->count();\n }\n\n // only first page we display stores\n if((empty($request->page) ||$request->page == 1) && empty($request->store_id))\n {\n $result['stores'] = [\n 'data' => $stores,\n 'message' => trans('api.stores.not_available'),\n ];\n }\n\n $productQuery = ApiHelper::getProductsQuery($request, $user)\n ->leftjoin('products_keywords', function ($join) {\n $join->on('products_keywords.product_id', '=', 'products.id');\n })\n ->leftjoin('keywords', function ($join) use ($request) {\n $join->on('keywords.id', '=', 'products_keywords.keyword_id');\n })\n ->when(!empty($request->store_id),function ($query) use($request) {\n $query->where('stores.id', $request->store_id);\n })\n ->where(function ($query) use ($request) {\n $query->where('products.product_title','like', '%' . $request->search . '%')\n ->orWhere('keywords.keyword', 'like','%' . $request->search . '%');\n })\n ->orderBy('products.product_title', 'asc')\n ->paginate($this->perPage);\n \n \n $result['count'] = isset($result['count']) ? $result['count'] + $productQuery->total() : $productQuery->total(); \n \n $productsData = $productQuery->toArray();\n\n //dd($result['count']);\n $products = ApiHelper::getProductResponse($productsData['data']);\n\n $result['products'] = [\n 'data' => $products,\n 'has_more' => !empty($productsData['next_page_url']) ? 1 : 0,\n 'message' => trans('api.products.not_available'),\n ];\n\n return $this->toJson($result);\n }", "title": "" }, { "docid": "d0ae5e0f36df49e711751c95c5fea020", "score": "0.60625327", "text": "function get_type_name($type) {\n $conn = db_connect();\n $query = \"select * from products where type = '\".$type.\"'\";\n $result = @$conn->query($query);\n \n if(!$result) {\n return false;\n }\n $num_cats = @$result->num_rows;\n if($num_cats == 0) {\n return false;\n }\n \n $result = product_result_to_array($result);\n return $result;\n \n}", "title": "" }, { "docid": "6c8c6091f0972bffaf4172ed271c8569", "score": "0.60593075", "text": "public function findProduct($search_value = '10181', $entries_per_page = 3, $sort='EndTimeSoonest',$storename='',$startpage=1,$categoryid,$filters){\n \n $search_field = \"\";\n\t\t$search_type = 'findItemsByKeywords';\n\t\tif($categoryid>0) $search_type='findItemsAdvanced';\n\t\tif(!empty($storename)) $search_type='findItemsIneBayStores';\n switch ($search_type){\n\t\t\tcase 'findItemsIneBayStores': $search_field = \"storeName=\". urlencode($storename).\"&outputSelector=StoreInfo&keywords=\" . urlencode($search_value);\n break;\n // case 'findItemsByCategory': $search_field = \"categoryId=$search_value\";\n break;\n //case 'findItemsByProduct': $search_field = \"productId.@type=ReferenceID&productId=$search_value\";\n //break;\n\t\t\tcase 'findItemsAdvanced':\t$search_field = \"categoryId=$categoryid&keywords=\" . urlencode($search_value);\n break;\t\t\t\t\t\t\n case 'findItemsByKeywords':\n default: $search_field = \"keywords=\" . urlencode($search_value);\n break;\n\n }\n \n //build query uri\n $uri = sprintf(\"%s?OPERATION-NAME=%s&SERVICE-VERSION=%s&siteid=3&SECURITY-APPNAME=%s&RESPONSE-DATA-FORMAT=%s&GLOBAL-ID=EBAY-GB&REST-PAYLOAD&%s&paginationInput.entriesPerPage=%s&sortOrder=%s&paginationInput.pageNumber=%s\".$filters,\n $this->uri_finding,\n $search_type,\n $this->version,\n $this->appid,\n $this->format,\n $search_field,\n $entries_per_page,\n\t\t\t\t\t\t$sort,\n\t\t\t\t\t\t$startpage\n\t\t\t\t\t\t);\n \n\t\t//echo $uri;\n return json_decode($this->curl($uri));\n }", "title": "" }, { "docid": "83132ff0a6ca6d6c3c525e12bb3f8bc2", "score": "0.60564005", "text": "function product_getType($item_number, $key) {\n $result = performApiRequest($key, 0, 'GET', 'art;WHERE `artikelnummer`=' . $item_number);\n if (sizeof($result) > 0) {\n return $result[0]->art;\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "b4d467abeeec82292964ccf5ee812a0a", "score": "0.6053382", "text": "public function index()\n {\n $types = ProductType::get();\n\n $data = [\n 'types' => $types\n ];\n\n return response()->json($types);\n }", "title": "" }, { "docid": "c286ff3a2f5ef0c5c62180bd3e9a942f", "score": "0.6048853", "text": "public function index()\n {\n $types = ProductType::all();\n return view('product-types/list', compact('types'));\n }", "title": "" }, { "docid": "8b52b5de3083f9c12b3a77d7513eb50d", "score": "0.6030811", "text": "public function getModel()\n {\n $player = EkomApi::inst()->productLayer();\n $params = ListParams::create();\n $params->infuse();\n\n\n $search = \"\";\n $nbProducts = 0;\n $productBoxModels = [];\n $shopId = E::getShopId();\n $langId = E::getLangId();\n $model = [];\n\n\n if (array_key_exists('search', $_GET)) {\n $search = $_GET['search'];\n ApplicationRegistry::set(\"ekom.breadcrumbs.label\", \"Votre résultat de recherche pour \\\"$search\\\"\");\n\n\n Hooks::call(\"Ekom_SearchResults_Provider\", $model, [\n 'search' => $search,\n 'shop_id' => $shopId,\n 'lang_id' => $langId,\n ]);\n\n\n if (empty($model)) {\n\n\n $q = \"\nselect cl.product_card_id \n\nfrom ek_shop_has_product_card_lang cl \ninner join ek_shop_has_product_card c on c.shop_id=cl.shop_id and c.product_card_id=cl.product_card_id\ninner join ek_shop_has_product p on p.shop_id= c.shop_id and p.product_id=c.product_id\n \nwhere cl.shop_id=$shopId \nand cl.lang_id=$langId\nand c.active=1 \nand cl.label like :label\n \n \";\n $q2 = str_replace('select cl.product_card_id', 'select count(*) as count', $q);\n $markers = [];\n\n QueryDecorator::create()\n ->setAllowedSortFields([\n 'p._sale_price_with_tax' => 'price',\n 'cl.label' => 'label',\n ])\n ->setAllowNipp(false)// no pagination (at least that's the intent)\n ->decorate($q, $q2, $markers, $params);\n\n\n $cardIds = QuickPdo::fetchAll($q, [\n 'label' => '%' . QuickPdoStmtTool::stripWildcards($search) . '%',\n ], \\PDO::FETCH_COLUMN);\n\n\n foreach ($cardIds as $cardId) {\n $productBoxModels[] = $player->getProductBoxModelByCardId($cardId);\n }\n $nbProducts = count($productBoxModels);\n\n\n $list = EkomListBundleFactoryHelper::getListBundleByItemsParams($productBoxModels, $params);\n\n\n $model = [\n \"search\" => $search,\n \"nbProducts\" => $nbProducts,\n \"listBundle\" => $list,\n ];\n }\n\n }\n return $model;\n\n\n }", "title": "" }, { "docid": "588b9f02087e48a2800c0145c894d888", "score": "0.6029925", "text": "public function admin_search($product_id = null, $product_code = null, $product_name = null) {\n //Check if atleast one input has a value\n if((is_null($product_id) || $product_id == '') && (is_null($product_code) || $product_code == '') && (is_null($product_name) || $product_name == '')) {\n $products = null;\n }\n else {\n $find_array = array(\n 'limit' => 20,\n 'conditions' => array('OR' => array()), \n );\n\n if((!is_null($product_id) && $product_id != '')){\n $find_array['conditions']['OR']['id'] = $product_id; \n }\n\n if((!is_null($product_code) && $product_code != '')){\n $find_array['conditions']['OR']['productcode'] = $product_code; \n }\n\n if((!is_null($product_name) && $product_name != '')){\n $find_array['conditions']['OR']['LOWER(name) LIKE'] = '%' . strtolower($product_name) . '%'; \n }\n\n $this->Paginator->settings = $find_array;\n $products = $this->Paginator->paginate($this->Product->Entity);\n\n }\n $product_id = is_null($product_id) || $product_id == 'null' ? '' : $product_id;\n $product_code = is_null($product_code) || $product_code == 'null' ? '' : $product_code;\n $product_name = is_null($product_name) || $product_name == 'null' ? '' : $product_name;\n $this->set(compact('products', 'product_id', 'product_code', 'product_name'));\n }", "title": "" }, { "docid": "5fd12044b4e8ee75673c9a4e10f8baeb", "score": "0.60251784", "text": "public function get_product_details_search($row){\r\n // $result = \"\";\r\n //$query = $this->mysqli->query(\"SELECT DISTINCT * FROM product INNER JOIN supplier_product ON product.p_id=supplier_product.p_id INNER JOIN item ON product.p_id=item.p_id AND product_status=1 WHERE product.p_name LIKE '%\" . $row . \"%' OR product.brand_name LIKE '%\" . $row . \"%' OR product.model_no LIKE '%\" . $row . \"%' \");\r\n //$query = $this->mysqli->query(\"SELECT DISTINCT * FROM product_list INNER JOIN brand ON product_list.brand_id=brand.brand_id INNER JOIN model ON product_list.model_id=model.model_id INNER JOIN supplier_product ON product_list.p_id=supplier_product.p_id INNER JOIN category ON product_list.category_id=category.category_id WHERE category.category_name LIKE '%\" . $row . \"%' OR brand.brand_name LIKE '%\" . $row . \"%' OR model.model_name LIKE '%\" . $row . \"%' \");\r\n $query = $this->mysqli->query(\"SELECT * FROM product_list INNER JOIN brand ON product_list.brand_id=brand.brand_id INNER JOIN model ON product_list.model_id=model.model_id INNER JOIN supplier_product ON product_list.p_id=supplier_product.p_id INNER JOIN category ON product_list.category_id=category.category_id INNER JOIN items ON items.p_id=product_list.p_id WHERE items.item_status='1' AND (category.category_name LIKE '%\" . $row . \"%' OR brand.brand_name LIKE '%\" . $row . \"%' OR model.model_name LIKE '%\" . $row . \"%') GROUP BY product_list.warrenty ASC\");\r\n\r\n if ($query->num_rows > 0) {\r\n while ($row = $query->fetch_assoc()) {\r\n $result[] = $row;\r\n }\r\n return $result;\r\n }else\r\n {\r\n return 0;\r\n }\r\n }", "title": "" }, { "docid": "881c9d28f8b2cfb9adfae92a8939a9cf", "score": "0.6021675", "text": "public function showStoreProducts(){\n\t\t$data['store_id'] = 1;\n\t\t$status = $this->model['Produto_model']->select(PRODUCT_TABLE,\"WHERE store_id = '\" . $data['store_id'] . \"'\");\n\t\tif($status){\n\t\t\t$this->return['products'] = $this->model['Produto_model']->get_result();\n\t\t\tif(count($this->return['products']) == 0){\n\t\t\t\t$this->return['success'] = FALSE;\n\t\t\t\t$this->return['error'] = \"Sem produtos.\";\n\t\t\t}\n\t\t}else{\n\t\t\t$this->return['success'] = FALSE;\n\t\t\t$this->return['error'] = \"Erro X\";\n\t\t}\n\t}", "title": "" }, { "docid": "82550a5b2b2f75c5406899b447a3c69d", "score": "0.60209996", "text": "function getAssociatedProducts($module, $focus, $seid = '')\n{\n\t$log = vglobal('log');\n\t$log->debug(\"Entering getAssociatedProducts(\" . $module . \",\" . get_class($focus) . \",\" . $seid . \"='') method ...\");\n\t$adb = PearDatabase::getInstance();\n\t$output = '';\n\tglobal $theme;\n\n\t$no_of_decimal_places = getCurrencyDecimalPlaces();\n\t$theme_path = \"themes/\" . $theme . \"/\";\n\t$image_path = $theme_path . \"images/\";\n\t$product_Detail = [];\n\n\t// DG 15 Aug 2006\n\t// Add \"ORDER BY sequence_no\" to retain add order on all inventoryproductrel items\n\n\tif ($module == 'Products') {\n\t\t$query = \"SELECT\n \t\t vtiger_products.productid,\n \t\t vtiger_products.productcode,\n \t\t vtiger_products.productname,\n \t\t vtiger_products.unit_price,\n \t\t vtiger_products.usageunit,\n \t\t vtiger_products.qtyinstock,vtiger_crmentity.deleted,\n \t\t vtiger_crmentity.description AS product_description,\n \t\t 'Products' AS entitytype\n \t\t FROM vtiger_products\n \t\t INNER JOIN vtiger_crmentity\n \t\t ON vtiger_crmentity.crmid=vtiger_products.productid\n \t\t WHERE vtiger_crmentity.deleted=0\n \t\t && productid=?\";\n\t\t$params = array($seid);\n\t} elseif ($module == 'Services') {\n\t\t$query = \"SELECT\n \t\t vtiger_service.serviceid AS productid,\n \t\t 'NA' AS productcode,\n \t\t vtiger_service.servicename AS productname,\n \t\t vtiger_service.unit_price AS unit_price,\n \t\t vtiger_service.service_usageunit AS usageunit,\n \t\t 'NA' AS qtyinstock,vtiger_crmentity.deleted,\n \t\t vtiger_crmentity.description AS product_description,\n \t\t \t'Services' AS entitytype\n \t\t\t\t\t\t\t\tFROM vtiger_service\n \t\t INNER JOIN vtiger_crmentity\n \t\t ON vtiger_crmentity.crmid=vtiger_service.serviceid\n \t\t WHERE vtiger_crmentity.deleted=0\n \t\t && serviceid=?\";\n\t\t$params = array($seid);\n\t}\n\n\t$result = $adb->pquery($query, $params);\n\t$num_rows = $adb->num_rows($result);\n\t$finalTaxTotal = '0';\n\tfor ($i = 1; $i <= $num_rows; $i++) {\n\t\t$deleted = $adb->query_result($result, $i - 1, 'deleted');\n\t\t$hdnProductId = $adb->query_result($result, $i - 1, 'productid');\n\t\t$hdnProductcode = $adb->query_result($result, $i - 1, 'productcode');\n\t\t$productname = $adb->query_result($result, $i - 1, 'productname');\n\t\t$productdescription = $adb->query_result($result, $i - 1, 'product_description');\n\t\t$comment = $adb->query_result($result, $i - 1, 'comment');\n\t\t$qtyinstock = $adb->query_result($result, $i - 1, 'qtyinstock');\n\t\t$qty = $adb->query_result($result, $i - 1, 'quantity');\n\t\t$unitprice = $adb->query_result($result, $i - 1, 'unit_price');\n\t\t$listprice = $adb->query_result($result, $i - 1, 'listprice');\n\t\t$entitytype = $adb->query_result($result, $i - 1, 'entitytype');\n\t\t$usageunit = vtranslate($adb->query_result($result, $i - 1, 'usageunit'), $entitytype);\n\t\t$purchase = $adb->query_result($result, $i - 1, 'purchase');\n\t\t$margin = $adb->query_result($result, $i - 1, 'margin');\n\t\t$marginp = $adb->query_result($result, $i - 1, 'marginp');\n\t\t$tax = $adb->query_result($result, $i - 1, 'tax');\n\n\t\tif (($deleted) || (!isset($deleted))) {\n\t\t\t$product_Detail[$i]['productDeleted' . $i] = true;\n\t\t} elseif (!$deleted) {\n\t\t\t$product_Detail[$i]['productDeleted' . $i] = false;\n\t\t}\n\n\t\tif (!empty($entitytype)) {\n\t\t\t$product_Detail[$i]['entityType' . $i] = $entitytype;\n\t\t}\n\n\t\tif ($listprice == '')\n\t\t\t$listprice = $unitprice;\n\t\tif ($qty == '')\n\t\t\t$qty = 1;\n\n\t\t//calculate productTotal\n\t\t$productTotal = $qty * $listprice;\n\n\t\t//Delete link in First column\n\t\tif ($i != 1) {\n\t\t\t$product_Detail[$i]['delRow' . $i] = \"Del\";\n\t\t}\n\t\tif (empty($focus->mode) && $seid != '') {\n\t\t\t$sub_prod_query = $adb->pquery(\"SELECT crmid as prod_id from vtiger_seproductsrel WHERE productid=? && setype='Products'\", array($seid));\n\t\t} else {\n\t\t\t$sub_prod_query = $adb->pquery(\"SELECT productid as prod_id from vtiger_inventorysubproductrel WHERE id=? && sequence_no=?\", array($focus->id, $i));\n\t\t}\n\t\t$subprodid_str = '';\n\t\t$subprodname_str = '';\n\t\t$subProductArray = [];\n\t\tif ($adb->num_rows($sub_prod_query) > 0) {\n\t\t\tfor ($j = 0; $j < $adb->num_rows($sub_prod_query); $j++) {\n\t\t\t\t$sprod_id = $adb->query_result($sub_prod_query, $j, 'prod_id');\n\t\t\t\t$sprod_name = $subProductArray[] = \\vtlib\\Functions::getCRMRecordLabel($sprod_id);\n\t\t\t\t$str_sep = \"\";\n\t\t\t\tif ($j > 0)\n\t\t\t\t\t$str_sep = \":\";\n\t\t\t\t$subprodid_str .= $str_sep . $sprod_id;\n\t\t\t\tif (isset($sprod_name)) {\n\t\t\t\t\t$subprodname_str .= $str_sep . \" - \" . $sprod_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$subprodname_str = str_replace(\":\", \"<br>\", $subprodname_str);\n\n\t\t$product_Detail[$i]['subProductArray' . $i] = $subProductArray;\n\t\t$product_Detail[$i]['hdnProductId' . $i] = $hdnProductId;\n\t\t$product_Detail[$i]['productName' . $i] = \\vtlib\\Functions::fromHTML($productname);\n\t\t/* Added to fix the issue Product Pop-up name display */\n\t\t$product_Detail[$i]['hdnProductcode' . $i] = $hdnProductcode;\n\t\t$product_Detail[$i]['productDescription' . $i] = \\vtlib\\Functions::fromHTML($productdescription);\n\t\tif ($module == 'Products' || $module == 'Services') {\n\t\t\t$product_Detail[$i]['comment' . $i] = $productdescription;\n\t\t} else {\n\t\t\t$product_Detail[$i]['comment' . $i] = $comment;\n\t\t}\n\n\t\tif ($focus->object_name != 'Order') {\n\t\t\t$product_Detail[$i]['qtyInStock' . $i] = \\vtlib\\Functions::formatDecimal($qtyinstock);\n\t\t}\n\t\t$listprice = number_format($listprice, $no_of_decimal_places, '.', '');\n\t\t$product_Detail[$i]['qty' . $i] = \\vtlib\\Functions::formatDecimal($qty);\n\t\t$product_Detail[$i]['listPrice' . $i] = $listprice;\n\t\t$product_Detail[$i]['unitPrice' . $i] = number_format($unitprice, $no_of_decimal_places, '.', '');\n\t\t$product_Detail[$i]['usageUnit' . $i] = $usageunit;\n\t\t$product_Detail[$i]['productTotal' . $i] = $productTotal;\n\t\t$product_Detail[$i]['subproduct_ids' . $i] = $subprodid_str;\n\t\t$product_Detail[$i]['subprod_names' . $i] = $subprodname_str;\n\t\t$product_Detail[$i]['purchase' . $i] = number_format($purchase, $no_of_decimal_places, '.', '');\n\t\t$product_Detail[$i]['margin' . $i] = number_format($margin, $no_of_decimal_places, '.', '');\n\t\t$product_Detail[$i]['marginp' . $i] = number_format($marginp, $no_of_decimal_places, '.', '');\n\t\t$product_Detail[$i]['tax' . $i] = $tax;\n\t\t$discount_percent = \\vtlib\\Functions::formatDecimal($adb->query_result($result, $i - 1, 'discount_percent'));\n\t\t$discount_amount = $adb->query_result($result, $i - 1, 'discount_amount');\n\t\t$discount_amount = \\vtlib\\Functions::formatDecimal(number_format($discount_amount, $no_of_decimal_places, '.', ''));\n\t\t$discountTotal = '0';\n\t\t//Based on the discount percent or amount we will show the discount details\n\t\t//To avoid NaN javascript error, here we assign 0 initially to' %of price' and 'Direct Price reduction'(for Each Product)\n\t\t$product_Detail[$i]['discount_percent' . $i] = 0;\n\t\t$product_Detail[$i]['discount_amount' . $i] = 0;\n\n\t\tif (!empty($discount_percent)) {\n\t\t\t$product_Detail[$i]['discount_type' . $i] = \"percentage\";\n\t\t\t$product_Detail[$i]['discount_percent' . $i] = $discount_percent;\n\t\t\t$product_Detail[$i]['checked_discount_percent' . $i] = ' checked';\n\t\t\t$product_Detail[$i]['style_discount_percent' . $i] = ' style=\"visibility:visible\"';\n\t\t\t$product_Detail[$i]['style_discount_amount' . $i] = ' style=\"visibility:hidden\"';\n\t\t\t$discountTotal = $productTotal * $discount_percent / 100;\n\t\t} elseif (!empty($discount_amount)) {\n\t\t\t$product_Detail[$i]['discount_type' . $i] = \"amount\";\n\t\t\t$product_Detail[$i]['discount_amount' . $i] = $discount_amount;\n\t\t\t$product_Detail[$i]['checked_discount_amount' . $i] = ' checked';\n\t\t\t$product_Detail[$i]['style_discount_amount' . $i] = ' style=\"visibility:visible\"';\n\t\t\t$product_Detail[$i]['style_discount_percent' . $i] = ' style=\"visibility:hidden\"';\n\t\t\t$discountTotal = $discount_amount;\n\t\t} else {\n\t\t\t$product_Detail[$i]['checked_discount_zero' . $i] = ' checked';\n\t\t}\n\n\t\t$totalAfterDiscount = $productTotal - $discountTotal;\n\t\t$totalAfterDiscount = number_format($totalAfterDiscount, $no_of_decimal_places, '.', '');\n\t\t$discountTotal = number_format($discountTotal, $no_of_decimal_places, '.', '');\n\t\t$product_Detail[$i]['discountTotal' . $i] = $discountTotal;\n\t\t$product_Detail[$i]['totalAfterDiscount' . $i] = $totalAfterDiscount;\n\n\t\t$amount = '0';\n\t\t$tax_details = getTaxDetailsForProduct($hdnProductId, 'all');\n\t\t//First we should get all available taxes and then retrieve the corresponding tax values\n\t\t$allTaxes = getAllTaxes('available', '', 'edit', $focus->id);\n\t\t$taxtype = getInventoryTaxType($module, $focus->id);\n\t\tfor ($tax_count = 0; $tax_count < count($tax_details); $tax_count++) {\n\t\t\t$tax_name = $tax_details[$tax_count]['taxname'];\n\t\t\t$tax_label = $tax_details[$tax_count]['taxlabel'];\n\t\t\t$tax_value = '0';\n\n\t\t\t//condition to avoid this function call when create new PO/Invoice from Product module\n\t\t\tif ($focus->id != '') {\n\t\t\t\tif ($taxtype == 'individual')//if individual then show the entered tax percentage\n\t\t\t\t\t$tax_value = getInventoryProductTaxValue($focus->id, $hdnProductId, $tax_name);\n\t\t\t\telse//if group tax then we have to show the default value when change to individual tax\n\t\t\t\t\t$tax_value = $tax_details[$tax_count]['percentage'];\n\t\t\t} else//if the above function not called then assign the default associated value of the product\n\t\t\t\t$tax_value = $tax_details[$tax_count]['percentage'];\n\n\n\t\t\t$product_Detail[$i]['taxes'][$tax_count]['taxname'] = $tax_name;\n\t\t\t$product_Detail[$i]['taxes'][$tax_count]['taxlabel'] = $tax_label;\n\t\t\t$product_Detail[$i]['taxes'][$tax_count]['percentage'] = $tax_value;\n\t\t\t$amount = $totalAfterDiscount * $tax_value / 100;\n\t\t\t$amount = number_format($amount, $no_of_decimal_places, '.', '');\n\t\t\t$product_Detail[$i]['taxes'][$tax_count]['amount'] = $amount;\n\t\t\tif ($tax == $tax_name) {\n\t\t\t\t$product_Detail[$i]['taxTotal' . $i] = $amount;\n\t\t\t}\n\t\t}\n\t\tif ($taxtype == 'group') {\n\t\t\tforeach ($allTaxes as $key => $value) {\n\t\t\t\tif ($tax == $value['taxname']) {\n\t\t\t\t\t$amount = $totalAfterDiscount * $value['percentage'] / 100;\n\t\t\t\t\t$amount = number_format($amount, $no_of_decimal_places, '.', '');\n\t\t\t\t\t$product_Detail[$i]['taxes'][$tax]['amount'] = $amount;\n\t\t\t\t\t$finalTaxTotal += $amount;\n\t\t\t\t\t$product_Detail[$i]['taxTotal' . $i] = $amount;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Calculate netprice\n\t\t$netPrice = $totalAfterDiscount + number_format($product_Detail[$i]['taxTotal' . $i], $no_of_decimal_places, '.', '');\n\t\t//if condition is added to call this function when we create PO/Invoice from Product module\n\n\t\t$product_Detail[$i]['netPrice' . $i] = $netPrice;\n\t}\n\n\t//set the taxtype\n\t$product_Detail[1]['final_details']['taxtype'] = $taxtype;\n\n\t//Get the Final Discount, S&H charge, Tax for S&H values\n\t//To set the Final Discount details\n\t$finalDiscount = '0';\n\t$product_Detail[1]['final_details']['discount_type_final'] = 'zero';\n\n\t$subTotal = ($focus->column_fields['hdnSubTotal'] != '') ? $focus->column_fields['hdnSubTotal'] : '0';\n\t$subTotal = number_format($subTotal, $no_of_decimal_places, '.', '');\n\n\t$product_Detail[1]['final_details']['hdnSubTotal'] = $subTotal;\n\t$discountPercent = ($focus->column_fields['hdnDiscountPercent'] != '') ? $focus->column_fields['hdnDiscountPercent'] : '0';\n\t$discountAmount = ($focus->column_fields['hdnDiscountAmount'] != '') ? $focus->column_fields['hdnDiscountAmount'] : '0';\n\tif ($discountPercent != '0') {\n\t\t$discountAmount = ($product_Detail[1]['final_details']['hdnSubTotal'] * $discountPercent / 100);\n\t}\n\n\t//To avoid NaN javascript error, here we assign 0 initially to' %of price' and 'Direct Price reduction'(For Final Discount)\n\t$discount_amount_final = '0';\n\t$discount_amount_final = number_format($discount_amount_final, $no_of_decimal_places, '.', '');\n\t$product_Detail[1]['final_details']['discount_percentage_final'] = 0;\n\t$product_Detail[1]['final_details']['discount_amount_final'] = $discount_amount_final;\n\n\t//fix for opensource issue not saving invoice data properly\n\tif (!empty($focus->column_fields['hdnDiscountPercent'])) {\n\t\t$finalDiscount = ($subTotal * $discountPercent / 100);\n\t\t$product_Detail[1]['final_details']['discount_type_final'] = 'percentage';\n\t\t$product_Detail[1]['final_details']['discount_percentage_final'] = $discountPercent;\n\t\t$product_Detail[1]['final_details']['checked_discount_percentage_final'] = ' checked';\n\t\t$product_Detail[1]['final_details']['style_discount_percentage_final'] = ' style=\"visibility:visible\"';\n\t\t$product_Detail[1]['final_details']['style_discount_amount_final'] = ' style=\"visibility:hidden\"';\n\t}\n\t//fix for opensource issue not saving invoice data properly\n\telseif (!empty($focus->column_fields['hdnDiscountAmount'])) {\n\t\t$finalDiscount = $focus->column_fields['hdnDiscountAmount'];\n\t\t$product_Detail[1]['final_details']['discount_type_final'] = 'amount';\n\t\t$product_Detail[1]['final_details']['discount_amount_final'] = $discountAmount;\n\t\t$product_Detail[1]['final_details']['checked_discount_amount_final'] = ' checked';\n\t\t$product_Detail[1]['final_details']['style_discount_amount_final'] = ' style=\"visibility:visible\"';\n\t\t$product_Detail[1]['final_details']['style_discount_percentage_final'] = ' style=\"visibility:hidden\"';\n\t}\n\t$finalDiscount = number_format($finalDiscount, $no_of_decimal_places, '.', '');\n\t$product_Detail[1]['final_details']['discountTotal_final'] = $finalDiscount;\n\n\t//To set the Final Tax values\n\t//we will get all taxes. if individual then show the product related taxes only else show all taxes\n\t//suppose user want to change individual to group or vice versa in edit time the we have to show all taxes. so that here we will store all the taxes and based on need we will show the corresponding taxes\n\n\tfor ($tax_count = 0; $tax_count < count($allTaxes); $tax_count++) {\n\t\t$tax_name = $allTaxes[$tax_count]['taxname'];\n\t\t$tax_label = $allTaxes[$tax_count]['taxlabel'];\n\n\t\t//if taxtype is individual and want to change to group during edit time then we have to show the all available taxes and their default values\n\t\t//Also taxtype is group and want to change to individual during edit time then we have to provide the asspciated taxes and their default tax values for individual products\n\t\tif ($taxtype == 'group')\n\t\t\t$tax_percent = $adb->query_result($result, 0, $tax_name);\n\t\telse\n\t\t\t$tax_percent = $allTaxes[$tax_count]['percentage'];\n\n\t\tif ($tax_percent == '' || $tax_percent == 'NULL')\n\t\t\t$tax_percent = '0';\n\t\t$taxamount = ($subTotal - $finalDiscount) * $tax_percent / 100;\n\t\t$taxamount = number_format($taxamount, $no_of_decimal_places, '.', '');\n\t\t$product_Detail[1]['final_details']['taxes'][$tax_count]['taxname'] = $tax_name;\n\t\t$product_Detail[1]['final_details']['taxes'][$tax_count]['taxlabel'] = $tax_label;\n\t\t$product_Detail[1]['final_details']['taxes'][$tax_count]['percentage'] = $tax_percent;\n\t\t$product_Detail[1]['final_details']['taxes'][$tax_count]['amount'] = $taxamount;\n\t}\n\t$product_Detail[1]['final_details']['tax_totalamount'] = $finalTaxTotal;\n\t$product_Detail[1]['final_details']['tax'] = $tax;\n\t//To set the grand total\n\t$grandTotal = ($focus->column_fields['hdnGrandTotal'] != '') ? $focus->column_fields['hdnGrandTotal'] : '0';\n\t$grandTotal = number_format($grandTotal, $no_of_decimal_places, '.', '');\n\t$product_Detail[1]['final_details']['grandTotal'] = $grandTotal;\n\n\t$log->debug(\"Exiting getAssociatedProducts method ...\");\n\treturn $product_Detail;\n}", "title": "" }, { "docid": "c6ec7c7de495f83f364ed32b50dc9000", "score": "0.6010981", "text": "public function searchProduct(&$data, $offset, $limit = 9, $order = null)\n {\n $total = 0;\n\n //data from elastic\n $elastic['index'] = ELASTIC_DATABASE;\n $elastic['type'] = 'products';\n $elastic['body'] = [\n 'query' => [\n 'filtered' => [\n 'filter' => ['bool' => ['must_not' => ['term' => ['create_info.status' => 9]]]]\n ]\n ],\n ];\n\n $order = ['random' => [\"order\" => 'asc']];\n\n\n $elastic['body']['sort'] = $order;\n\n\n if(!empty($data)){\n if(!empty($data['code'])){ //mã sản phẩm\n $elastic['body']['query']['filtered']['query']['bool']['should'][] = ['match' => ['code' => $data['code']]];\n $elastic['body']['query']['filtered']['query']['bool']['should'][] = ['match' => ['name' => $data['code']]];\n $this->controller->set('code', $data['code']);\n }\n\n if(!empty($data['price'])){\n if(!empty($data['price']['from'])){\n $elastic['body']['query']['filtered']['filter']['bool']['must'][] = ['range' => ['prices.regular' => ['gte' => $data['price']['from']]]];\n }\n\n if(!empty($data['price']['to'])){\n $elastic['body']['query']['filtered']['filter']['bool']['must'][] = ['range' => ['prices.regular' => ['lte' => $data['price']['to']]]];\n }\n }\n }\n\n\n\n //limit\n $elastic['from'] = $offset;\n $elastic['size'] = $limit;\n\n $elastic['body']['_source'] = ['_id', 'favorite', 'cate_ids', 'style_id', 'name', 'desc', 'code', 'images', 'checked', 'create_info', 'prices', 'shop_id', 'attributes', 'design', 'at_home'];\n\n\n $results = $this->controller->Elasticsearch->search($elastic);\n\n $items = [];\n if(!empty($results['hits']['hits'])){\n // nếu đang xem tất cả cửa hàng\n if(empty($shop_id)){\n $Shop = MyApp::uses(\"Shop\", 'Model');\n $shops = $Shop->getList();\n } else {\n $shops[(string)$shop_id] = $this->controller->Auth->user('shop.name');\n }\n\n $total = $results['hits']['total'];\n foreach ($results['hits']['hits'] as $k => $val) {\n $val['_source']['_id'] = $val['_id'];\n $val = &$val['_source'];\n\n $val['creator'] = $this->controller->User->getSimpleFields($val['create_info']['create_user']);\n\n if(empty($val['name'])){\n $val['name'] = $val['code'];\n } else {\n $val['name'] .= ' - ' . $val['code'];\n }\n //images\n if(!empty($val['images'])){\n $val['image'] = array_shift($val['images']);\n $val['image'] = $this->controller->Common->setImage($val['image'], Photo);\n }\n\n $val['link_detail'] = URL_BASE . '/products/detail/' . _SEO($val['name'] . SPLIT_URL . (string)$val['_id']);\n\n //lấy thông tin vật tư\n if(!empty($val['attributes'])){\n foreach ($val['attributes'] as $_k => $_val) {\n $val['attributes'][$_k]['attr_name'] = $this->controller->ExtMaterial->getDetailById($_val['attr_id'], ['name']);\n }\n\n }\n\n $val['shop_name'] = @$shops[$val['shop_id']];\n $items[$k] = $val;\n }\n }\n\n $this->controller->set('total', $total);\n\n return [$items, $total];\n }", "title": "" }, { "docid": "9658b29bc2bdb0bc0fcf9d4e10ce2a6f", "score": "0.60108906", "text": "function searchProduct()\n{\n echo '===================================== search Product ===================================' .PHP_EOL;\n global $ProductService;\n\n $param =\n [## ============================ *Required Parameters =============================\n # یکی از این چهار فیلد اجباری است\n 'offset' => 'Put offset',\n# 'firstId' => 'Put first id',\n# 'lastId' => 'Put last id',\n# 'id' => [Put product entity ids],\n ## ============================= Optional Parameters ==============================\n# \"token\" => \"{Put AccessToken | ApiToken}\", # for this service you can use AccessToken \n# 'query' => 'Put search query',\n# 'size' => 'Put output size',\n# 'businessId' => 'Put business id',\n# 'uniqueId' => 'Put product unique id',\n# 'categoryCode' => [{Put product category codes}],\n# 'guildCode' => [{Put guild codes}],\n# 'currencyCode' => 'Put currency code',\n# 'attributeTemplateCode' => 'Put attribute template code',\n# 'attributes' => [\n# [\n# 'attributeCode' => 'Put attribute code',\n# 'attributeValue' => 'Put attribute value',\n# ],\n# ],\n# 'orderBySale' => 'put asc/desc',\n# 'orderByLike' => 'put asc/desc',\n# 'orderByPrice' => 'put asc/desc',\n# 'tags' => ['Put tags1', 'Put tags2', ..],\n# 'tagTrees' => ['Put tags tree1', 'Put tags tree2', ..],\n# 'scVoucherHash' => ['Put Service Call Voucher Hashes'],\n# 'scApiKey' => 'Put service call Api Key',\n ];\n try {\n $result = $ProductService->searchProduct($param);\n print_r($result);\n }\n catch (ValidationException $e) {\n print_r($e->getResult());\n print_r($e->getErrorsAsArray());\n } catch (PodException $e) {\n print_r($e->getResult());\n }\n}", "title": "" }, { "docid": "feb615afe42de34379ef3bad0c8eb23b", "score": "0.60088795", "text": "function viewProductList(){\n $product = new productModel();\n if(isset($_GET['category'])){\n $product->prodcategory = $_GET['category'];\n }\n\n if(isset($_GET['sales'])){\n $product->prodsortsales = $_GET['sales'];\n }\n\n return $product->viewProdList();\n }", "title": "" }, { "docid": "b9578c9f880dc149455937b7aff482eb", "score": "0.6000798", "text": "protected function getProducts()\n {\n /**\n * Search provider being taken trough container. This is src/Product/SearchProvider class\n */\n $searchProvider = $this->getContainer()->get('invertus.training.product.search_provider');\n\n $context = new ProductSearchContext($this->context);\n\n $query = new ProductSearchQuery();\n\n $query\n ->setResultsPerPage(20)\n ->setPage(1)\n ;\n\n /**\n * We get product list using context and query\n * Context is simply required for context of page like language\n * Query tells what sort of list we went to provider. Query might contain idCategory,\n * idManufacturer and so but it only matters if searchProvider takes them into account\n */\n $result = $searchProvider->runQuery(\n $context,\n $query\n );\n\n /**\n * Assemble is required to assemble product data and add missing properties\n */\n $assembler = new ProductAssembler($this->context);\n\n /**\n * Presentation settings hold settings that might affect how to dispaly products\n * Example: if Catalog mode is on you shouldn't display add to cart.\n */\n $presenterFactory = new ProductPresenterFactory($this->context);\n $presentationSettings = $presenterFactory->getPresentationSettings();\n\n /**\n * Present is responsible for presenting additional data like images links etc,\n */\n $presenter = new ProductListingPresenter(\n new ImageRetriever(\n $this->context->link\n ),\n $this->context->link,\n new PriceFormatter(),\n new ProductColorsRetriever(),\n $this->context->getTranslator()\n );\n\n $products_for_template = [];\n\n foreach ($result->getProducts() as $rawProduct) {\n $products_for_template[] = $presenter->present(\n $presentationSettings,\n $assembler->assembleProduct($rawProduct),\n $this->context->language\n );\n }\n\n return $products_for_template;\n }", "title": "" }, { "docid": "ffc988f214352c5d52ee9b141141cb5c", "score": "0.5999179", "text": "public function getSearch($start, $show) {\n\t\t\t$search = parent::getSearchArray();\n\t\t\t$content = getRequest('content');\n\t\t\tif ($content) {\n\t\t\t\t$content = explode(',', $content);\n\t\t\t\t$products = array();\n\t\t\t\tforeach ($content as $key => $val) {\n\t\t\t\t\t$val = trim($val);\n\t\t\t\t\tif (!validNumber($val, 'integer') || !$val) {\n\t\t\t\t\t\tunset($content[$key]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$products[$val] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($products) {\n\t\t\t\t\t// retrieve a list of filtered product ids\n\t\t\t\t\t$packageIDs = self::findPackageByContent($products, true);\n\t\t\t\t\tif ($packageIDs) {\n\t\t\t\t\t\t$search[] = \"`packageID` IN ('\".implode(\"', '\", $packageIDs).\"')\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tags = getRequest('tags');\n\t\t\tif ($tags) {\n\t\t\t\tif ($tags) {\n\t\t\t\t\t$tags = explode(',', $tags);\n\t\t\t\t\tforeach ($tags as $key => $tag) {\n\t\t\t\t\t\tif (!$tag || !preg_match('/^[a-z0-9 ]*$/i', $tag)) {\n\t\t\t\t\t\t\tunset($tags[$key]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tags[$key] = strtoupper(trim($tag));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($tags) {\n\t\t\t\t$firstKey = false;\n\t\t\t\t$tagTables = array();\n\t\t\t\t$packageTables = array();\n\t\t\t\t$tagClause = array();\n\t\t\t\tforeach ($tags as $key => $val) {\n\t\t\t\t\tif ($firstKey === false) {\n\t\t\t\t\t\t$firstKey = $key;\n\t\t\t\t\t\t$packageTables[] = '`packageTagMap` `pt'.$key.'` ON (`t'.$key.'`.`tagID` = `pt'.$key.'`.`tagID`)';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$packageTables[] = '`packageTagMap` `pt'.$key.'` ON (`t'.$key.'`.`tagID` = `pt'.$key.'`.`tagID` AND `pt'.$firstKey.'`.`packageID` = `pt'.$key.'`.`packageID`)';\n\t\t\t\t\t}\n\t\t\t\t\t$tagTables[] = '`productTags` `t'.$key.'`';\n\t\t\t\t\t$tagClause[] = \"`t\".$key.\"`.`tag` = '\".$val.\"'\";\n\t\t\t\t}\n\n\t\t\t\t$searchSql = 'SELECT `packages`.* FROM '.implode(' JOIN ', $tagTables).' JOIN '.implode(' JOIN ', $packageTables).' JOIN `packages` ON (`pt'.$firstKey.'`.`packageID` = `packages`.`packageID`)'.($search ? ' WHERE `packages`.'.implode(' AND `packages`.', $search).' AND '.implode(' AND ', $tagClause) : ' WHERE '.implode(' AND ', $tagClause));\n\n\t\t\t\t$countSql = 'SELECT COUNT(*) AS `count` FROM '.implode(' JOIN ', $tagTables).' JOIN '.implode(' JOIN ', $packageTables).' JOIN `packages` ON (`pt'.$firstKey.'`.`packageID` = `packages`.`packageID`)'.($search ? ' WHERE `packages`.'.implode(' AND `packages`.', $search).' AND '.implode(' AND ', $tagClause) : ' WHERE '.implode(' AND ', $tagClause));\n\t\t\t} else {\n\t\t\t\t$searchSql = 'SELECT * FROM `packages`'.($search ? ' WHERE '.implode(' AND ', $search) : '').' LIMIT '.$start.', '.$show;\n\t\t\t\t$countSql = 'SELECT COUNT(*) AS `count` FROM `packages`'.($search ? ' WHERE '.implode(' AND ', $search) : '');\n\t\t\t}\n\t\t\treturn array($searchSql, $countSql);\n\t\t}", "title": "" }, { "docid": "8d090eb5800c293349899cf12adbe5ac", "score": "0.5999158", "text": "public function index()\n {\n $productList = Product::with('productType', 'attributeValues', 'attributeValues.attribute')->get();\n $typeList = ProductType::all();\n\n return view('product', compact('productList', 'typeList'));\n }", "title": "" }, { "docid": "8d803bacf2fb940af2487c8d357158ed", "score": "0.5993775", "text": "public function showProduct($id)\n { \n return Product::with('images','type')->find($id);\n }", "title": "" }, { "docid": "72602d0fbacfa167a6fbfd7bf0c86d63", "score": "0.59910345", "text": "public function getDataForProductPage($pageType, $result)\n {\n $currencyCode = $this->_currencyCode;\n $attribute_data = $this->_gtmHelper->getAttributeMappingData();\n $product_data_arr =[];\n $product_data_arr['id'] = $result[1]['product']['id'];\n $product_data_arr['name'] = $result[1]['product']['name'];\n $product_data_arr['category'] = $result[1]['product']['category'];\n $product_data_arr['variant'] = $result[1]['product']['variant'];\n $product_data_arr['price'] = $result[1]['product']['price'];\n $product_data_arr['brand'] = $result[1]['product']['brand'];\n $product_data_arr['type'] = $result[1]['product']['product_type'];\n $product_data_arr['ratings'] = $result[1]['product']['ratings'];\n if (!empty($attribute_data)) {\n foreach ($attribute_data as $attr_key => $attr_value) {\n if (isset($result[1]['product']['attributes'][$attr_value])) {\n if ($attr_value == 'quantity_and_stock_status') {\n if (isset($result[1]['product']['attributes'][$attr_value])) {\n $in_stock = $result[1]['product']['attributes'][$attr_value]['value'];\n $attr_value = ($in_stock['is_in_stock'] == 1) ? __('in stock') : __('out of stock');\n }\n $product_data_arr[$attr_key] = $attr_value;\n } else {\n $product_data_arr[$attr_key] = $result[1]['product']['attributes'][$attr_value]['value'];\n }\n }\n }\n }\n \n $productType = $result[1]['product']['product_type'];\n $productArray = [\n 'event' => 'uaevent',\n 'eventCategory' => 'Ecommerce',\n 'eventAction'=> 'Product Detail',\n 'eventLabel' => $result[1]['product']['name'].'::'. $result[1]['product']['id']\n ];\n $actionField = [\n 'action' => 'detail',\n 'list' => 'category-page'\n ];\n $productArray['ecommerce']['currencyCode'] = $currencyCode;\n $productArray['ecommerce']['detail']['actionField'] = $actionField;\n $productArray['ecommerce']['detail']['products'] = $product_data_arr;\n\n return $productArray;\n }", "title": "" }, { "docid": "43e29518edb444cc189a1d988bea1f77", "score": "0.5975285", "text": "public function show(Request $request)\n {\n $columns = array(\n 0 => 'product_code',\n 1 => 'product_name',\n 2 => 'distributor_name',\n 3 => 'action'\n );\n\n $queryListProduct = VDistributorProductList::select('id', 'product_code', 'product_name', 'distributor_name');\n $totalData = $queryListProduct->count();\n $totalFiltered = $totalData;\n\n $limit = $request->input('length');\n $start = $request->input('start');\n $order = $columns[$request->input('order.0.column')];\n $dir = $request->input('order.0.dir');\n\n if (empty($request->input('search.value'))) {\n $posts = VDistributorProductList::select('id', 'product_code', 'product_name', 'distributor_name')\n ->offset($start)\n ->limit($limit)\n ->orderBy($order, $dir)\n ->get();\n } else {\n $search = $request->input('search.value');\n\n $posts = VDistributorProductList::select('id', 'product_code', 'product_name', 'distributor_name')\n ->where('product_code', 'ILIKE', \"$search\")\n ->orWhere('product_name', 'ILIKE', \"%{$search}%\")\n ->orWhere('distributor_name', 'ILIKE', \"%{$search}%\")\n ->offset($start)\n ->limit($limit)\n ->orderBy($order, $dir)\n ->get();\n\n $totalFiltered = VDistributorProductList::select('id', 'product_code', 'product_name', 'distributor_name')\n ->where('product_code', 'ILIKE', \"$search\")\n ->orWhere('product_name', 'ILIKE', \"%{$search}%\")\n ->orWhere('distributor_name', 'ILIKE', \"%{$search}%\")\n ->count();\n }\n\n $data = array();\n if (!empty($posts)) {\n foreach ($posts as $post) {\n $nestedData['product_code'] = strtoupper($post->product_code);\n $nestedData['product_name'] = strtoupper($post->product_name);\n $nestedData['distributor_name'] = strtoupper($post->distributor_name);\n $nestedData['action'] = \"<div class='btn-group btn-group-sm edit-delete'>\n <button type='button' class='btn btn-default waves-effect deleteBtn' style='float: none;'\n onclick='deleteButton(this)'>\n <i class='material-icons'>delete</i>\n </button>\n </div>\n <div class='btn-group btn-group-sm save-confirm-cancel'>\n <button type='button' class='btn btn-success waves-effect confirmBtn' style='float: none; display: none;'\n onclick='actionDelete(this,$post->id)'>\n <i class='material-icons'>check</i>\n </button>\n <button type='button' class='btn bg-red waves-effect cancelBtn' style='float: none; display: none;'\n onclick='cancelButton(this)'>\n <i class='material-icons'>refresh</i>\n </button>\n </div>\";\n $data[] = $nestedData;\n }\n }\n\n $json_data = array(\n \"draw\" => intval($request->input('draw')),\n \"recordsTotal\" => intval($totalData),\n \"recordsFiltered\" => intval($totalFiltered),\n \"data\" => $data\n );\n\n echo json_encode($json_data);\n }", "title": "" }, { "docid": "9bcbb3559424bbee80021a30e967f221", "score": "0.59734356", "text": "public function index()\n\t{\n $limit = Input::has('limit') ? Input::get('limit') : Config::get('app.laragento.defaults.pagination.limit');\n $offset = Input::has('offset') ? Input::get('offset') : Config::get('app.laragento.defaults.pagination.offset');\n\n\n //Now we need to check for queries\n $queries = $this->getQueries();\n\n\n $productQuery = Laragento\\Product::take($limit)->skip($offset);\n\n $select = array('catalog_product_entity.entity_id as id', 'sku');\n\n //There are two possibly useful queries parameters that are not actual fields that we need\n //to treat on their own, those being the SKU and ID (or entity_id) which are on the catalog_product_entity\n //table itself, not in an eav table\n if($queries !== false)\n {\n if(isset($queries['sku']))\n $productQuery->where('catalog_product_entity.sku', '=', $queries['sku']);\n if(isset($queries['id']))\n $productQuery->where('catalog_product_entity.entity_id', '=', $queries['id']);\n\n unset($queries['sku']);\n unset($queries['id']);\n if(($key = array_search('sku', $this->fields)) !== false)\n {\n unset($this->fields[$key]);\n }\n if(($key = array_search('id', $this->fields)) !== false)\n {\n unset($this->fields[$key]);\n }\n\n }\n\n //Check if any ?fields= came in on the query string (or anywhere else) and process those if so\n if($this->fields !== false)\n {\n\n if(in_array('inventory', $this->fields)){\n $productQuery->leftJoin('cataloginventory_stock_item as inventory', 'catalog_product_entity.entity_id', '=', 'inventory.product_id');\n $select[] = 'inventory.qty as inventory';\n\n if(($key = array_search('inventory', $this->fields)) !== false)\n {\n unset($this->fields[$key]);\n }\n }\n\n //Load the attributes from the appropriate table\n foreach($this->fields as $attributeCode)\n {\n //make sure it's snake case\n $attributeCode = $this->toSnakeCase($attributeCode);\n $eavTypeId = $this->attributeHelper->getEavEntityTypeId(Laragento\\EavEntityType::TYPE_PRODUCT);\n $attribute = $this->attributeHelper->getEavAttribute($attributeCode, $eavTypeId);\n\n if(!$attribute)\n throw new \\Symfony\\Component\\Translation\\Exception\\InvalidResourceException($attributeCode . ' does not exist for this product');\n\n $productQuery->leftJoin('catalog_product_entity_' . $attribute['backend_type'] . ' as ' . $attributeCode, 'catalog_product_entity.entity_id', '=', $attributeCode . '.entity_id');\n $productQuery->where($attributeCode . '.attribute_id', '=', $attribute['id']);\n $select[] = $attributeCode . '.value as ' . $this->toCamelCase($attributeCode);\n\n }\n\n //Add any additional where filters for any parameters that are being searched for\n foreach($queries as $attributeCode => $attributeValue)\n {\n //make sure it's snake case\n $attributeCode = $this->toSnakeCase($attributeCode);\n $eavTypeId = $this->attributeHelper->getEavEntityTypeId(Laragento\\EavEntityType::TYPE_PRODUCT);\n $attribute = $this->attributeHelper->getEavAttribute($attributeCode, $eavTypeId);\n\n if(!$attribute)\n throw new \\Symfony\\Component\\Translation\\Exception\\InvalidResourceException($attributeCode . ' does not exist for this produt');\n\n if(strpos($attributeValue, '*') !== false)\n $productQuery->where($attributeCode . '.value', 'like', str_replace('*', '%', $attributeValue));\n else\n $productQuery->where($attributeCode . '.value', '=', $attributeValue);\n\n }\n\n }\n\n $productQuery->select($select);\n\n $products = $productQuery->remember(1)->get();\n\n $productsResult = array();\n\n //Build a more formal output array\n foreach($products as $product){\n $productsResult[] = $this->buildProductJson($product, false, true);\n }\n\n return Response::json($productsResult);\n\t}", "title": "" }, { "docid": "92c906cf33271a42431516e828e8f843", "score": "0.5971619", "text": "public function product($product)\n {\n $products = Product::where('prod_type', $product)->get();\n //$model = User::where('votes', '>', 100)->firstOrFail();\n //$products = Product::all();\n\n return response()->json(['products' => $products]);\n }", "title": "" }, { "docid": "e44e48a182d6fe124d1bc9dbb3ab04eb", "score": "0.5970547", "text": "public function index()\n {\n $types = Type::all();\n $products = Product::paginate(9);\n $type = null;\n return view('product.index',compact('types','products','type'));\n }", "title": "" }, { "docid": "f9e5fe99cde780fd26d097cc92252c53", "score": "0.59675425", "text": "public function index()\n {\n $productTypes = ProductType::with('product')->get();\n return view('productTypes.index', compact('productTypes'));\n }", "title": "" }, { "docid": "7426295a5b23a78172b80f857a473eba", "score": "0.5966907", "text": "public function show_product(){\n\t\t\t\n\t\t\t$query=\"\n\t\t\tSELECT tbl_product.*, tbl_category.catName,tbl_brand.brandName\n\t\t\tFROM tbl_product INNER JOIN tbl_category ON tbl_product.catID = tbl_category.catID\n\t\t\tINNER JOIN tbl_brand ON tbl_product.brandID = tbl_brand.brandID\n\t\t\torder by tbl_product.productID desc\n\t\t\t\";\n\n\t\t\t$result = $this -> db ->select($query);\n\t\t\treturn $result;\n\n\t\t}", "title": "" }, { "docid": "556c50c360be1931879c687c4d2a4ddb", "score": "0.5949852", "text": "public function productfilter() {\n $dataProvider = Product::model()->allProducts();\n $all_products = Product::model()->returnProducts($dataProvider);\n $this->renderPartial(\"_product_list\", array('products' => $all_products,\n 'dataProvider' => $dataProvider,));\n }", "title": "" }, { "docid": "40d1311523f1580d36900fdea70921f8", "score": "0.594795", "text": "public function search(){\n\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n // Init data\n $keyword = trim($_POST['search']);\n\n try {\n $categories = $this->productModel->getCategories();\n $products = $this->productModel->getProductsByKeyword($keyword);\n\n $data = [\n 'categories' => $categories,\n 'products' => $products,\n 'keyword' => $keyword\n ];\n \n $this->view('products/search', $data);\n } \n catch (Exception $e) {\n echo 'Exception : ' . $e->getMessage();\n }\n\n }", "title": "" }, { "docid": "6232f5102498f205e9f8fdee8cf81b64", "score": "0.59472394", "text": "function getProductDetail()\r\n{\r\n\tglobal $DB, $objComm;\r\n\t$SQL = $SQL=\"SELECT \r\n\t\tproduct_type.product_type,\r\n\t\tproduct_type.id\tAS ptID,\t\r\n\t\tproduct.id AS pID,\r\n\t\tproduct.product_type_id,\r\n\t\tproduct.product_name,\r\n\t\tproduct.product_image,\r\n\t\tproduct.product_price,\r\n\t\tproduct.product_variations,\r\n\t\tproduct.product_size,\r\n\t\tproduct.product_color,\r\n\t\tSUBSTRING(product.product_desc,1,50) AS product_desc,\r\n\t\tDATE(product.product_date) AS product_date,\r\n\t\tproduct.product_status,\r\n\t\tproduct.product_total_products,\r\n\t\tproduct.product_remain_total_products\r\n\t\tFROM product_type \r\n\t\tJOIN product ON product_type.id=product.product_type_id\r\n\t\tWHERE product_status='Active' AND product.id='\".$_REQUEST[\"id\"].\"' AND product.product_remain_total_products > 0 ORDER BY product_type.id ASC\";\r\n\r\n\t\t$DATAproduct=$DB->fetchOne($SQL,\"\");\r\n\t\t$DATAproduct->status=\"OK\";$DATAproduct->msg=\"WELL DONE\";\r\n\techo json_encode($DATAproduct);\r\n}", "title": "" }, { "docid": "40cd6d5a0c19b5ff383b1713643253ec", "score": "0.5937225", "text": "public function productSearch(Request $request)\n {\n $search = $request->product_title;\n $products = product::where('product_name', 'LIKE', '%' . $search . '%')\n ->where('status', 1)->get();\n return view('layouts.pages.search_live_resuit', compact('products'));\n }", "title": "" }, { "docid": "ce91e8e9000cb5dce6a2792c47931fa5", "score": "0.59339815", "text": "public function index()\n {\n $category = null;\n\n if ($categoryId = $this->request->get('category_id')) {\n $category = Category::find($categoryId);\n }\n\n $query = (new SearchProductQuery())\n ->category($category)\n ->like($this->request->input('q'))\n ->order($this->request->input('order'));\n\n return $this->view('products.index', array_merge(\n compact('category'),\n $this->paginate($query->query(), static::PRODUCTS_PER_PAGE, 'products')\n ));\n }", "title": "" }, { "docid": "93bbcba26a2399cbab83e5db50f704dd", "score": "0.59230006", "text": "public static function searchProduct($searchkey)\n {\n\n $search = new Search();\n $search->setCategory('All');\n $search->setResponseGroup(array('Large', 'Small'));\n $search->setKeywords($searchkey);\n\n $formattedResponse = self::$API->runOperation($search);\n $response = json_decode(json_encode($formattedResponse), true);\n // print_r ($response); \n\n foreach ($response['Items']['Item'] as $key=>$p) {\n $title[] = $p['ItemAttributes']['Title'];\n $src[] = $p['LargeImage']['URL'];\n $price[] = $p['OfferSummary']['LowestNewPrice']['Amount'] / 100;\n $priceoriginal[] = $p['ItemAttributes']['ListPrice']['Amount'] / 100;\n $link[] = $p['DetailPageURL'];\n $size[] = $p['ItemAttributes']['ClothingSize'];\n $brand[] = $p['ItemAttributes']['Brand'];\n\n if($key==50){\n break;\n }\n }\n\n $product['title'] = $title;\n $product['src'] = $src;\n $product['price'] = $price;\n $product['priceoriginal'] = $priceoriginal;\n $product['link'] = $link;\n $product['size'] = $size;\n $product['brand'] = $brand;\n\n // print_r($product);\n\n\n $product_json=json_encode($product);\n\n return $product_json;\n\n \n //All','Beauty','Grocery','Industrial','PetSupplies','OfficeProducts','Electronics','Watches','Jewelry','Luggage','Shoes','Furniture','KindleStore','Automotive','Pantry','MusicalInstruments','GiftCards','Toys','SportingGoods','PCHardware','Books','LuxuryBeauty','Baby','HomeGarden','VideoGames','Apparel','Marketplace','DVD','Appliances','Music','LawnAndGarden','HealthPersonalCare','Software' \n \n }", "title": "" }, { "docid": "9db9805ac0a409d4d9dd0b47f6a9da12", "score": "0.591845", "text": "protected function prepareProductTypeFilter(){\n $aProductTypes = AMI_Registry::get('AMI/Runtime/' . $this->getModId() . '/product_types');\n\n if(!sizeof($aProductTypes)){\n $aProductTypes = array($this->owner . '_fake_type');\n }\n\n $sql = \"AND `item_type` IN (\";\n foreach($aProductTypes as $type){\n $sql .= \"%s,\";\n }\n $sql = mb_substr($sql, 0, -1) . ')';\n $this->oProductTypeFilter = DB_Query::getSnippet($sql);\n foreach($aProductTypes as $type){\n $this->oProductTypeFilter->q($type);\n }\n\n AMI_Event::addHandler('on_query_add_table', array($this, 'handleQueryAddTable'), $this->getModId());\n }", "title": "" }, { "docid": "6646e01f73bfb9d40f3d552046596474", "score": "0.59171027", "text": "public function search()\n {\n $search_term = urldecode(request('query'));\n\n $products = Product::search($search_term);\n $sub_category_list = [];\n\n $categories = [\n 'level_1' => 'search',\n 'query' => $search_term,\n ];\n\n return view('products.products', compact('products', 'categories', 'sub_category_list'));\n }", "title": "" }, { "docid": "fbc8e95d7600479bb086efaafef915ac", "score": "0.59072715", "text": "public function simpleProductTypesDataProvider()\n {\n return [\n [\n 'filters' => [\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => 'downloadable-product',\n 'condition_type' => 'eq',\n ],\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => 'virtual-product',\n 'condition_type' => 'eq',\n ],\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => 'SKU-1',\n 'condition_type' => 'eq',\n ],\n ],\n ]\n ];\n }", "title": "" }, { "docid": "18f366a567234f0ef7289cd0881debe2", "score": "0.59054524", "text": "public function get_products_display()\n\t{\n\t\treturn $this->get_table_rows_display(\"products\");\n\t}", "title": "" }, { "docid": "5b198358e74f90ad6df3502c38369a35", "score": "0.5903705", "text": "public function searchStoreByProduct(Request $request) {\n\t\t$keywords = $request->keywords;\n\t\t$citySlug = $request->citySlug;\n\t\t$pageSize = 8;\n\t\t$offset = $request->offset;\n\t\t\n\t\t$city = City::bySlug($citySlug)->with(['stores' => function ($query) use ($keywords, $pageSize, $offset) {\n\n\t\t\treturn $query->show()\n\t\t\t->where(function ($query) use ($keywords) {\n\t\t\t\t$query->whereHas('products', function ($queryChild) use ($keywords) {\n\t\t\t\t\t$queryChild->likeName($keywords);\n\t\t\t\t});\n\t\t\t\t$query->orWhereHas('catalogues', function ($queryChild) use ($keywords) {\n\t\t\t\t\t$queryChild->likeName($keywords);\n\t\t\t\t});\n\t\t\t})\n\t\t\t->limit($pageSize)\n\t\t\t->offset($offset)\n\t\t\t->get();\n\n\t\t}])->first();\n\n\t\treturn $this->respondSuccess('Search store', $city->stores->load('coupons', 'activities'), 200, 'many');\n\t}", "title": "" }, { "docid": "cfdef65cc79fb21ad909f98f9b89cc0b", "score": "0.59033036", "text": "public function searchProduct(Request $request) \n {\n $keyword = $request->input('search');\n\n //Search in the Product table\n $products = product::query()\n ->where('name', 'LIKE', \"%{$keyword}%\")\n ->orWhere('price', 'LIKE', \"%{$keyword}%\")\n ->orWhere('units_in_stock', 'LIKE', \"%{$keyword}%\")\n ->orWhere('details', 'LIKE', \"%{$keyword}%\")\n ->get();\n\n //Search in the Category table\n $categories = MarketCategory::query()\n ->where('category_name', 'LIKE', \"%{$keyword}%\")\n ->get();\n\n return view('marketSearch', compact('categories','products'));\n }", "title": "" }, { "docid": "b520bbc2cf89354f5ef42c2ba8cc7ba4", "score": "0.5902082", "text": "public function getPriceTypes() {\n\t\t$db = JFactory::getDBO();\n\n\t\t// Create a new query object.\n\t\t$query = $db->getQuery(true);\n\n\t\t$query->select($db->quoteName(array('a.id', 'a.name')));\n\t\t$query->from($db->quoteName('#__gtpihpssurvey_ref_price_types', 'a'));\n\t\t\n\t\tif (JFactory::getUser()->guest) {\n\t\t\t$query->where($db->quoteName('a.published') . ' = 1');\n\t\t}\n\t\t//echo nl2br(str_replace('#__','pihps_',$query));\n\t\t$db->setQuery($query);\n\t\treturn $db->loadObjectList();\n\t}", "title": "" }, { "docid": "221612d7bc48a075f487bb7dbbcab854", "score": "0.59020644", "text": "public function searchProduct(Request $request) {\n $search_string = $request->search_string;\n\n $products = Product::whereRaw(\"LOWER(name) LIKE '%\" . strtolower($search_string) . \"%'\")\n ->orWhereRaw(\"LOWER(description) LIKE '%\" . strtolower($search_string) . \"%'\")\n ->paginate(8);\n\n return view('product_list', compact('products'));\n }", "title": "" }, { "docid": "6aaeb9743f98e7e2aeb9051fb3924a75", "score": "0.590024", "text": "public function identifyProduct( $type ){\r\n //\r\n return array(\"Response\" => \"Success or Fail\");\r\n }", "title": "" }, { "docid": "b7b5d967dfa46f7f36a37b0daf8c69bb", "score": "0.5897943", "text": "public function getAllProducts($params = [])\n {\n }", "title": "" }, { "docid": "7ce04598b70bef8b555f6249608bf84b", "score": "0.5895558", "text": "public function index()\n {\n $this->_data['items'] = Product::where('type',$this->_data['type'])->orderBy('priority', 'asc')->paginate(25);\n return view('backend.products.index',$this->_data);\n }", "title": "" }, { "docid": "50142b4925b4386dfea6746aa554b57f", "score": "0.5895369", "text": "public function show(ProductType $productType)\n {\n dd($productType);\n }", "title": "" }, { "docid": "a775866cbbb4154a45827703a8192c38", "score": "0.589436", "text": "public function show(tipo_product $tipo_product)\n {\n //\n }", "title": "" }, { "docid": "3dde2a416d39eabfa8a9942607cbbd8e", "score": "0.5892478", "text": "function fetch_products(){\n $str_query=\"select * FROM mw_product\";\n return $this->query($str_query);\n }", "title": "" }, { "docid": "7bffa54cb44c3a3a86c633a7c828f17b", "score": "0.5889509", "text": "public function getProductTypes()\n {\n return Controllers\\ProductTypesController::getInstance();\n }", "title": "" }, { "docid": "9b75f3027682f79bd8f0aa78ca4b8958", "score": "0.5888458", "text": "function getlistProd($conf=array()){\r\n\t\tif(!isset($conf['cat_id'])){\r\n\t\t\t$conf['cat_id'] = false;\r\n\t\t}\r\n\t\tif(!isset($conf['publish'])){\r\n\t\t\t$conf['publish'] = false;\r\n\t\t}\r\n\t\tif(!isset($conf['start'])){\r\n\t\t\t$conf['start'] = false; \r\n\t\t}\r\n\t\tif(!isset($conf['limit'])){\r\n\t\t\t$conf['limit'] = false;\r\n\t\t}\r\n\t\tif(!isset($conf['search'])){\r\n\t\t\t$conf['search'] = false;\r\n\t\t}\r\n\t\r\n\t\t$this->db->select('a.id p_id, b.id cat_id');\r\n\t\t\r\n\t\t//get the limit and offset record\r\n\t\t$this->db->like('a.publish', $conf['publish']);//}\r\n\t\tif($conf['cat_id']){\r\n\t\t$this->db->where('a.cat_id', $conf['cat_id']);\r\n\t\t}\r\n\t\tif($conf['search']){\r\n\t\t$this->db->like('a.name', $conf['search']);\t\r\n\t\t$this->db->or_like('a.sku', $conf['search']);\t\r\n\t\t}\r\n\t\t$this->db->join('store_category b', 'b.id=a.cat_id');\r\n\t\t$this->db->order_by('a.id', 'desc');\r\n\t\t\r\n\t\t$this->dodol->db_calc_found_rows();\r\n\t\t\r\n\t\t$q = $this->db->get('store_product a',$conf['limit'], $conf['start']);\r\n\t\t\r\n\t\t\r\n\t\tif($q->num_rows() > 0){\r\n\t\t\t$data['prods'] = $q->result();\r\n\t\t\t$data['num_rec'] = $this->dodol->db_found_rows();\r\n\t\t\treturn $data;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" } ]
754ab2d3a813a43b14fb53e6ecf286ca
Don't make any changes; instead, try to predict some of the changes that may occur.
[ { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.0", "text": "public function check();", "title": "" } ]
[ { "docid": "ee7def663c495c55c0b44156199bc338", "score": "0.5909309", "text": "public function testFundingPredicted()\n {\n }", "title": "" }, { "docid": "906895303209a79f5e69a279bbd1a636", "score": "0.5818394", "text": "private function verifyChanges()\n {\n $r = new Danidoble();\n foreach ($this->attributes as $key => $attribute) {\n if (isset($this->original->{$key}) && $this->original->{$key} !== $this->attributes->{$key}) {\n $r->{$key} = $attribute;\n }\n }\n\n $this->to_update = $r;\n }", "title": "" }, { "docid": "6b6977f2f5196d3840f95380465e1212", "score": "0.57235724", "text": "function letGo()\n {\n $this->prophet->checkPredictions();\n }", "title": "" }, { "docid": "5974fac455d3ad263c5f722971a49336", "score": "0.55405307", "text": "abstract public function testPreUpdateIncorrectObject(): void;", "title": "" }, { "docid": "a5f4e42ba221dda3e568c10d58da3e59", "score": "0.5496382", "text": "public function ApplyChanges()\n {\n // Do not delete this line\n IPS_LogMessage(\"Visonic DEBUG\", \"Apply changes!\");\n\n }", "title": "" }, { "docid": "858b1507ca0d1f7987ec3d18e0f90c27", "score": "0.54385346", "text": "public function trackChanges()\n\t{\n\t\tforeach($this->_states as $name => $value)\n\t\t{\n\t\t\t$obj = $this->_control->getViewState($name);\n\t\t\t$this->_existingState[$name] = is_object($obj) ? clone($obj) : $obj;\n\t\t}\n\t}", "title": "" }, { "docid": "5802ca86a585f04b23e7447db591b19f", "score": "0.5350973", "text": "public function apply_changes() {\n $this->data = array_replace_recursive( $this->data, $this->changes ); // @codingStandardsIgnoreLine\n $this->changes = array();\n }", "title": "" }, { "docid": "d297b291967efa695b54a30b4977654c", "score": "0.533026", "text": "public function testModelHasChangedFalseAfterOriginalSet() {\r\n $triggered_change = false;\r\n $model = new Backbone_Model(array('x'=>1));\r\n $model->on('change:x', function() use (&$triggered_change) { $triggered_change = true; });\r\n $model->set('x', 2, array('silent'=>true));\r\n $this->assertTrue($model->hasChanged());\r\n $model->set('x', 1, array('silent'=>true));\r\n $this->assertFalse($model->hasChanged());\r\n $this->assertFalse($triggered_change);\r\n }", "title": "" }, { "docid": "e218e3dde8103fcf2507b5cdfa31fbbe", "score": "0.5268058", "text": "public function ApplyChanges()\n\t\t{\n\t\t\tparent::ApplyChanges();\n\t\t}", "title": "" }, { "docid": "e218e3dde8103fcf2507b5cdfa31fbbe", "score": "0.5268058", "text": "public function ApplyChanges()\n\t\t{\n\t\t\tparent::ApplyChanges();\n\t\t}", "title": "" }, { "docid": "9d59a8b4d54c84073d3265458dfffd05", "score": "0.52643436", "text": "public function ApplyChanges()\n {\n parent::ApplyChanges();\n }", "title": "" }, { "docid": "01606b21818c332e1d2537c80cd3570f", "score": "0.5234225", "text": "public function ApplyChanges() {\n\t\tparent::ApplyChanges();\n\n\t}", "title": "" }, { "docid": "271cf01e73aa64098a739d8370f5ce92", "score": "0.52231115", "text": "private function updatePredictionModel($customer, $checkoutIntent, $quoteId, $predictedDiscountPercent, $quoteValue)\n {\n //If yes, Update the record\n //If No, Add a new record\n $collections = Mage::getModel('prediction/promotions')\n ->getCollection()\n ->addFieldToFilter('quote_id', $quoteId);\n\n //Get the AOV and LTV and TotalSales for the customer\n //Refactor to Magento Models later\n $aov_global_currency = 0;\n $ltv_global_currency = 0;\n $total_orders = 0;\n\n if ($customer->getCustomerId() != NULL) {\n $readConnection = Mage::getSingleton('core/resource')->getConnection('core_read');\n $query = 'select customer_id, base_grand_total*base_to_global_rate as ltv_global , (base_grand_total*base_to_global_rate)/count(customer_id) as aov_global, count(customer_id) as total_orders from sales_flat_order where customer_id=' . $customer->getCustomerId();\n $results = $readConnection->fetchAll($query);\n $aov_global_currency=$results[0]['aov_global'];\n $ltv_global_currency=$results[0]['ltv_global'];\n $total_orders=$results[0]['total_orders'];\n }\n\n\n $currentTimestamp = Mage::getModel('core/date')->timestamp(time());;\n\n //If no record\n if ($collections->count() < 1) {\n $this->log(\"NEW RECORD : Visitor With ID: \" . $customer->getVisitorId() . \" will be created\");\n $pmodel = Mage::getModel('prediction/promotions');\n $pmodel->setVisitorId($customer->getVisitorId())\n ->setCustomerId($customer->getCustomerId())\n ->setQuoteId($quoteId)\n ->setSessionId($this->getSessionID($customer->getVisitorId()))\n ->setCheckoutIntent($checkoutIntent)\n ->setDiscountPercent($predictedDiscountPercent)\n ->setCouponCode($this->createCouponCode($predictedDiscountPercent, null, $customer, $quoteValue))\n ->setAovGlobal($aov_global_currency)\n ->setLtvGlobal($ltv_global_currency)\n ->setTotalOrders($total_orders)\n ->setCreatedAt($currentTimestamp)\n ->setUpdatedAt($currentTimestamp)\n ->save();\n\n } else {\n $this->log(\"UPDATE RECORD : Visitor With ID: \" . $customer->getVisitorId());\n //Loop\n foreach ($collections as $promo) {\n $promo->setVisitorId($customer->getVisitorId());\n $promo->setCheckoutIntent($checkoutIntent);\n $promo->setAovGlobal($aov_global_currency);\n $promo->setLtvGlobal($ltv_global_currency);\n $promo->setTotalOrders($total_orders);\n $promo->setUpdatedAt($currentTimestamp);\n if ($predictedDiscountPercent != $promo->getDiscountPercent()) {\n //delete old code\n //create a new code\n Mage::helper('reckless_prediction')->deleteCouponCode($promo->getCouponCode());\n $promo->setCouponCode($this->createCouponCode($predictedDiscountPercent, null, $customer, $quoteValue));\n }\n\n $promo->save();\n }\n }\n }", "title": "" }, { "docid": "f8b8188b550dfdcc287c269ca6005562", "score": "0.5220983", "text": "public function testModelChangedHasChangedAttributesPreviousAttributes() {\r\n $test = $this; /* @var $test Test_Model_TestCase */\r\n $changed = false;\r\n $model = new Backbone_Model(array('name' => 'Tim', 'age' => 10));\r\n $this->assertFalse($model->changedAttributes());\r\n $model->on('change', function() use ($test, $model, &$changed) {\r\n $test->assertTrue($model->hasChanged('name'), 'name changed');\r\n $test->assertFalse($model->hasChanged('age'), 'age did not');\r\n $test->assertEquals(array('name' => 'Rob'), $model->changedAttributes(), 'changedAttributes returns the changed attrs');\r\n $test->assertEquals('Tim', $model->previous('name'));\r\n $test->assertEquals(array('name' => 'Tim', 'age' => 10), $model->previousAttributes(), 'previousAttributes is correct');\r\n $changed = true;\r\n });\r\n $this->assertFalse($model->hasChanged());\r\n $this->assertFalse($model->hasChanged(null));\r\n $model->set('name', 'Rob', array('silent'=>true));\r\n $this->assertTrue($model->hasChanged());\r\n $this->assertTrue($model->hasChanged(null));\r\n $this->assertTrue($model->hasChanged('name'));\r\n $model->change();\r\n $this->assertTrue($changed, 'ran the expected assertions');\r\n \r\n $this->assertEquals('Rob', $model->name);\r\n }", "title": "" }, { "docid": "ab3867a4d6828dfd49b40cbe200ea45d", "score": "0.514572", "text": "public function resetChanged()\n {\n $this->changed = array();\n }", "title": "" }, { "docid": "0635a2cf513e4b5c568966c17aa2491a", "score": "0.512018", "text": "abstract public function testPreUpdate(): void;", "title": "" }, { "docid": "b0910dfa31f5221188bb2668bbd5bbd3", "score": "0.5082883", "text": "public function testNestedSetDuringChange() {\r\n $count = 0; $test = $this;\r\n $model = new Backbone_Model();\r\n //Should be called 3 times.\r\n $model->on('change', function() use (&$count, $test, $model) {\r\n switch($count++) {\r\n case 0:\r\n $test->assertEquals(array('x'=>true), $model->changedAttributes());\r\n $test->assertEquals(null, $model->previous('x'));\r\n $model->y = true;\r\n break;\r\n case 1:\r\n $test->assertEquals(array('y'=>true), $model->changedAttributes());\r\n $test->assertEquals(true, $model->previous('x'));\r\n $model->z = true;\r\n break;\r\n case 2:\r\n $test->assertEquals(array('z'=>true), $model->changedAttributes());\r\n $test->assertEquals(true, $model->previous('y'));\r\n break;\r\n default:\r\n $test->fail();\r\n }\r\n });\r\n $model->x = true;\r\n $this->assertEquals(3, $count);\r\n }", "title": "" }, { "docid": "1206f8b09bcd2f2048d4df321547ca1e", "score": "0.5074725", "text": "public function testModelChangeAfterInitialize() {\r\n $changed = 0;\r\n $attrs = array('id' => 1, 'label' => 'c');\r\n $obj = new Backbone_Model($attrs);\r\n $obj->on('change', function() use (&$changed) { $changed += 1; });\r\n $obj->set($attrs);\r\n $this->assertEquals(0, $changed);\r\n }", "title": "" }, { "docid": "db27eb72a5dde486c4cbd05cddee4cf4", "score": "0.5074501", "text": "public function testDeterminationOfChangedAttributes()\n\t{\n\t\t$array = array('name' => 'Taylor', 'age' => 25, 'foo' => null);\n\n\t\t$model = new Model($array, true);\n\t\t$model->name = 'Otwell';\n\t\t$model->new = null;\n\n\t\t$this->assertTrue($model->changed('name'));\n\t\t$this->assertFalse($model->changed('age'));\n\t\t$this->assertFalse($model->changed('foo'));\n\t\t$this->assertFalse($model->changed('new'));\n\t\t$this->assertTrue($model->dirty());\n\t\t$this->assertEquals(array('name' => 'Otwell', 'new' => null), $model->get_dirty());\n\n\t\t$model->sync();\n\n\t\t$this->assertFalse($model->changed('name'));\n\t\t$this->assertFalse($model->changed('age'));\n\t\t$this->assertFalse($model->changed('foo'));\n\t\t$this->assertFalse($model->changed('new'));\n\t\t$this->assertFalse($model->dirty());\n\t\t$this->assertEquals(array(), $model->get_dirty());\n\t}", "title": "" }, { "docid": "cc74ca377a1082823fc9c510dc3e2555", "score": "0.5071396", "text": "public function testModelNoChangeEventIfNoChanges() {\r\n $test = $this;\r\n $model = new Backbone_Model();\r\n $model->on('change', function() use ($test) { $test->fail(); });\r\n $model->change();\r\n }", "title": "" }, { "docid": "0b608c209ef7b50222e3bfdf604d1dca", "score": "0.5061783", "text": "function checkpoint() {\r\n\t\t/** new qualia++ **/\r\n\t}", "title": "" }, { "docid": "133f03d20fddd724a6bb190eccd91d49", "score": "0.504378", "text": "abstract public function preCheck();", "title": "" }, { "docid": "7c5d91fc8340bb34c6249213a946b93c", "score": "0.5038024", "text": "public function misbehave()\n {\n $this->statusCode = 0;\n }", "title": "" }, { "docid": "e9fcdca71b730066174cf1d7fd12b45e", "score": "0.5030728", "text": "public function apply_changes() {\n\t\tif ( function_exists( 'array_replace' ) ) {\n\t\t\t$this->data = array_replace( $this->data, $this->changes ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.array_replaceFound\n\t\t} else { // PHP 5.2 compatibility.\n\t\t\tforeach ( $this->changes as $key => $change ) {\n\t\t\t\t$this->data[ $key ] = $change;\n\t\t\t}\n\t\t}\n\t\t$this->changes = [];\n\t}", "title": "" }, { "docid": "e25e2bd4f74220c93f23a6ac2e7557cb", "score": "0.5010743", "text": "public function testModelHasChangedForFalseyKeys() {\r\n $model = new Backbone_Model();\r\n $model->set(array('x' => true), array('silent'=>true));\r\n $this->assertFalse($model->hasChanged(0));\r\n $this->assertFalse($model->hasChanged(''));\r\n }", "title": "" }, { "docid": "f78bebb76d88853a3e456349f35c6bbd", "score": "0.50092494", "text": "protected function _preSave()\n\t{\n\t}", "title": "" }, { "docid": "c6090870a4e6b6f0ed2abdc76cf885ec", "score": "0.5004227", "text": "public function save_preliminary_eye()\n {\n foreach ($this->input['entity'] as $key => $entity) {\n Preliminary::updateOrCreate(\n [\n 'entity' => $entity, 'visit' => $this->visit], ['left' => $this->input['left'][$key] ?: 0,\n 'right' => $this->input['right'][$key] ?: 0,\n 'user' => $this->user, 'remarks' => str_random()]);\n }\n return true;\n }", "title": "" }, { "docid": "7a9e5cb120e30a0daf8616692d6018f7", "score": "0.4982803", "text": "public function testModelChangeAttributeCallbacksAfterAllChanges() {\r\n $test = $this;\r\n $model = new Backbone_Model();\r\n $calls = 0;\r\n \r\n $assertion = function() use ($test, $model, &$calls) {\r\n $test->assertEquals('a', $model->a);\r\n $test->assertEquals('b', $model->b);\r\n $test->assertEquals('c', $model->c);\r\n $calls++;\r\n };\r\n \r\n $model->on('change:a', $assertion);\r\n $model->on('change:b', $assertion);\r\n $model->on('change:c', $assertion);\r\n \r\n $model->set(array('a'=>'a', 'b'=>'b', 'c'=>'c'));\r\n $this->assertEquals(3, $calls);\r\n }", "title": "" }, { "docid": "dd16a2a9ff57081c1e8a475a3d8fe62f", "score": "0.4978077", "text": "public function testModelHasChangedSetShouldUseSameComparison() {\r\n $test = $this;\r\n $changed = 0;\r\n $changed_a = 0;\r\n $model = new Backbone_Model(array('a'=>null));\r\n $model->on('change', function() use ($test, $model, &$changed) {\r\n $test->assertTrue($model->hasChanged('a'));\r\n $changed++;\r\n })\r\n ->on('change:a', function() use (&$changed_a) {\r\n $changed_a++;\r\n })\r\n ->set('a', false);\r\n $this->assertEquals(1, $changed);\r\n $this->assertEquals(1, $changed_a);\r\n }", "title": "" }, { "docid": "3a0328ed7c638b9ffbe73964fc3c538e", "score": "0.49416104", "text": "protected function preCheck()\n\t{\n\t}", "title": "" }, { "docid": "a02688a4ccddd8bec4ed8d68beb7a207", "score": "0.4937421", "text": "public function disputed()\n {\n try{\n DB::beginTransaction();\n // Disputed procedure from selected\n $this -> getPayment() -> disputed();\n\n $this -> state = 'disputed';\n\n $this -> save();\n DB::commit();\n\n }\n catch (\\Exception $e){\n DB::rollBack();\n throw new RequestException('Error happened! Please try again later!');\n }\n }", "title": "" }, { "docid": "8ce11cd3cee5dbed3fe1d4156adfd36b", "score": "0.49218485", "text": "public function someBusinessLogic(): void\n {\n $this->state = rand(0, 10);\n echo \"Subject: My state has just changed.<br>\";\n $this->notify();\n }", "title": "" }, { "docid": "61729ef063e0a941a9670c9ed78b3045", "score": "0.4920102", "text": "function _update31()\n{\n\t_isCallerUpdate( debug_backtrace() );\n\n\t$return = true;\n\n\t/**\n\t * 1. REPORT_CARD_GRADES table:\n\t * Change gpa_value & unweighted_gp columns type to numeric\n\t * Was numeric(4,2) which would prevent to enter values like 100.\n\t */\n\tDBQuery( \"ALTER TABLE report_card_grades\n\t\tALTER COLUMN gpa_value TYPE numeric;\" );\n\n\tDBQuery( \"ALTER TABLE report_card_grades\n\t\tALTER COLUMN unweighted_gp TYPE numeric;\" );\n\n\t/**\n\t * 2. REPORT_CARD_GRADE_SCALES table:\n\t * Change hhr_gpa_value & hr_gpa_value & hrs_gpa_value columns type to numeric\n\t * Was numeric(4,2) which would prevent to enter values like 100 (or above).\n\t */\n\tDBQuery( \"ALTER TABLE report_card_grade_scales\n\t\tALTER COLUMN hhr_gpa_value TYPE numeric;\" );\n\n\tDBQuery( \"ALTER TABLE report_card_grade_scales\n\t\tALTER COLUMN hr_gpa_value TYPE numeric;\" );\n\n\tDBQuery( \"ALTER TABLE report_card_grade_scales\n\t\tALTER COLUMN hrs_gpa_value TYPE numeric;\" );\n\n\t/**\n\t * 3. Add Grades/MassCreateAssignments.php to profile_exceptions table.\n\t */\n\t$admin_profiles_RET = DBGet( \"SELECT id\n\t\tFROM user_profiles\n\t\tWHERE profile='admin'\" );\n\n\tforeach ( (array) $admin_profiles_RET as $admin_profile )\n\t{\n\t\t$profile_id = $admin_profile['ID'];\n\n\t\t$mca_profile_exceptions_exists = DBGet( \"SELECT 1\n\t\t\tFROM profile_exceptions\n\t\t\tWHERE profile_id='\" . $profile_id . \"'\n\t\t\tAND modname='Grades/MassCreateAssignments.php'\" );\n\n\t\tif ( ! $mca_profile_exceptions_exists )\n\t\t{\n\t\t\tDBQuery( \"INSERT INTO profile_exceptions\n\t\t\t\tVALUES ('\" . $profile_id . \"', 'Grades/MassCreateAssignments.php', 'Y', 'Y');\" );\n\t\t}\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "e206e2966f593a4373a7b585855045c1", "score": "0.4915941", "text": "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\t\t\n\t\t\n\t\t$this->ValidateConfiguration();\t\n\t\n }", "title": "" }, { "docid": "8a7cd4b335cb8b8c3fa251a2135c6570", "score": "0.48928195", "text": "public function preFillFalse()\n {\n }", "title": "" }, { "docid": "f9a16feb2cdd2958ba348ddffbc5d31f", "score": "0.4882864", "text": "public function fakeRobot(): void\n {\n $this->fakeScore(0);\n }", "title": "" }, { "docid": "44463cd9ef6f6bfac8a79acf4e162c9d", "score": "0.48641106", "text": "public function upgrade1000100Step1()\n {\n }", "title": "" }, { "docid": "9ce0a1a417fd210f31edbb21255fb5d5", "score": "0.48639488", "text": "public function testModelNestedChangesDontClobber() {\r\n $test = $this;\r\n $called_a = false;\r\n $called_b = false;\r\n $model = new Backbone_Model();\r\n $model->on('change:state', function($model, $newState) use (&$called_a, $test) {\r\n $called_a = true;\r\n $test->assertEquals(null, $model->previous('state'));\r\n $test->assertEquals('hello', $newState);\r\n //Fire a nested change event.\r\n $model->set('other', 'whatever');\r\n })\r\n ->on('change:state', function($model, $newState) use (&$called_b, $test) {\r\n $called_b = true;\r\n $test->assertEquals(null, $model->previous('state'));\r\n $test->assertEquals('hello', $newState);\r\n })\r\n ->set('state', 'hello');\r\n \r\n $this->assertTrue($called_a);\r\n $this->assertTrue($called_b);\r\n }", "title": "" }, { "docid": "771cfb2d3260ebe80532bf5ff993fbfe", "score": "0.48624635", "text": "public function testApply()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "80a366285dbfa69dbde1afcf702d6a06", "score": "0.4861434", "text": "public function testModelNestedChangeWithSilent() {\r\n $count = 0; $test = $this;\r\n $model = new Backbone_Model();\r\n $model->on('change', function() use (&$count, $test, $model) {\r\n switch($count++) {\r\n case 0:\r\n $test->assertEquals(array('x'=>true), $model->changedAttributes());\r\n $model->set('y', true, array('silent'=>true));\r\n break;\r\n case 1:\r\n $test->assertEquals(array('y'=>true, 'z'=>true), $model->changedAttributes());\r\n break;\r\n default:\r\n $test->fail();\r\n } \r\n });\r\n $model->x = true;\r\n $model->z = true;\r\n $this->assertEquals(2, $count);\r\n }", "title": "" }, { "docid": "e9798d16a95d79ad6eb799f3a3f6ad80", "score": "0.48399618", "text": "public function testIsDirty()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "eb3cf73637c203611e1b0a73c0f07963", "score": "0.48346245", "text": "public function preUpdate()\n {\n $this->fechmodi = new \\DateTime();\n $this->cedu = Utility::upperCase($this->cedu);\n $this->naci = Utility::upperCase($this->naci);\n $this->nomb = Utility::upperCase($this->nomb);\n $this->apell = Utility::upperCase($this->apell);\n $this->profesionFix = Utility::upperCase($this->profesionFix);\n $this->correo = Utility::lowerCase($this->correo);\n }", "title": "" }, { "docid": "960b2ede3bfaa0e8677fb6335452c86a", "score": "0.48329926", "text": "public function convertToPermanent()\n {\n $this->is_throwaway = false;\n $this->save();\n }", "title": "" }, { "docid": "3e526601780a31d2808e5da4397b2540", "score": "0.48266855", "text": "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n $this->RegisterMessage($this->GetIDForIdent(\"HeatingRequirement\"), 10603 /*VM_UPDATE*/);\n $this->RegisterMessage($this->GetIDForIdent(\"CurrentTargetTemp\"), 10603 /*VM_UPDATE*/);\n\n\n // Set interval to 5 minutes\n $this->SetTimerInterval(\"HeatingStatusTimer\", 1000 * 60 * 5);\n\n // Set default values\n\n $this->CreateValveProtectionEvent();\n $this->SetDefaultTargetTemperature();\n\n $this->ComputeHeatingStatus();\n }", "title": "" }, { "docid": "36ce4b6604d28e9e585b0169178939e4", "score": "0.48215085", "text": "public function predict()\n {\n // Check if the Reckless Data Module is enabled\n if (Mage::helper('reckless_prediction')->isRecklessModuleEnabled() &&\n Mage::helper('reckless_prediction')->isRecklessPromotionEnabled()) {\n $this->log('Prediction Started');\n try {\n $this->updatePredictions();\n //$this->generatePromoCoupons();\n\n } catch (Exception $e) {\n $this->sendAlertEmail(\"Error: Reckless Data Predictions\", $e->getTraceAsString());\n }\n } else {\n $this->log(\"Reckless Data is Disabled\");\n }\n\n return $this;\n }", "title": "" }, { "docid": "a8839b26f6fd7d2f4350d4b03309c1d6", "score": "0.48179975", "text": "protected function checkForChangedRelations()\n\t{\n\t\tforeach ($this->entityRegistry->getEntities() as $entity)\n\t\t{\n\t\t\t$meta = $this->entityRegistry->getMeta($entity);\n\n\t\t\tforeach ($meta->relations['belongsTo'] as $relation)\n\t\t\t{\n\t\t\t\t$this->checkBelongsToRelation($entity, $relation);\n\t\t\t}\n\n\t\t\tforeach ($meta->relations['hasOne'] as $relation)\n\t\t\t{\n\t\t\t\t$this->checkHasOneRelation($entity, $relation);\n\t\t\t}\n\n\t\t\tforeach ($meta->relations['hasMany'] as $relation)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * We are handling a Master and checking the Details.\n\t\t\t\t * Details[i]->masterId = Master->id\n\t\t\t\t * or\n\t\t\t\t * We are handling a Master and checking the children.\n\t\t\t\t * Children[i]->parentId = Master->id\n\t\t\t\t */\n\t\t\t}\n\n\t\t\tforeach ($meta->relations['hasManyThrough'] as $relation)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * We are handling a Master and checking the Tags.\n\t\t\t\t * Map[i]->masterId = Master->id\n\t\t\t\t * Map[i]->tagId = Tag->id\n\t\t\t\t */\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e0047ec3829a718e0eed155938e04db7", "score": "0.48168513", "text": "protected function extraModelTests() {\n }", "title": "" }, { "docid": "5f7b4b6b8a5b2b094afcc7fbd3b53e4d", "score": "0.48139867", "text": "public function testChangeStateFromOutdatedToUpdated()\n {\n $complement = $this->complement;\n\n $complement::AdvancedLocalComplement()->setState('outdated');\n\n $state = $complement::AdvancedLocalComplement()->getState();\n $this->assertSame('outdated', $state);\n\n ob_start();\n $newState = $complement::AdvancedLocalComplement()->changeState();\n ob_end_clean();\n\n $this->assertSame('updated', $newState);\n\n $state = $complement::AdvancedLocalComplement()->getState();\n $this->assertSame('updated', $state);\n }", "title": "" }, { "docid": "ca4b041ecbafb75ceb20b1b400ac9b7a", "score": "0.48068154", "text": "public function run()\n {\n Model::unguard();\n \n $developers = DB::table('developers')->get();\n foreach($developers as $dev) {\n var_dump($dev);\n if(empty($dev->original) && !empty($dev->romaji)) {\n // $dev->original = $dev->romaji;\n // $dev->romaji = null;\n // echo \"WOW\";\n // $dev->save();\n\n $developer = Developer::find($dev->id);\n $developer->original = $developer->romaji;\n $developer->romaji = null;\n $developer->save();\n echo \"OK \";\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "96f5ddbd5637069f860623ee531ffc4a", "score": "0.4796103", "text": "public function processChanges()\n {\n $needReset = false;\n\n $pk = $this->owner->getPk();\n $mok = $this->owner->getTable() . '_' . $pk;\n $mfk = $this->table . '_' . $pk;\n\n if (count($this->uowAttach) > 0) {\n $query = new Query(Flame::getAdapter());\n $query->insert($this->mappedByTable);\n\n foreach ($this->uowAttach as $pkValue => $value) {\n $query->values(array(\n $mok => $this->owner->getPkValue(),\n $mfk => $pkValue\n ))->execute();\n }\n $needReset = true;\n }\n\n if (count($this->uowDetach) > 0) {\n\n $keys = array_keys($this->uowDetach);\n\n $query = new Query(Flame::getAdapter());\n $query\n ->delete($this->mappedByTable)\n ->where(\"{$mok} = :mok\")\n ->in($mfk, $keys)\n ->setParam('mok', $this->owner->getPkValue())\n ->execute();\n\n $needReset = true;\n }\n\n if ($needReset) {\n $this->reset();\n }\n }", "title": "" }, { "docid": "0ad0e7d34ca7c9508550b9b06b5fe818", "score": "0.4792994", "text": "protected function preGenerateData()\n {\n }", "title": "" }, { "docid": "e249fd716304d3267cab26b717f7b013", "score": "0.47728035", "text": "public function applyWeightChanges()\r\n {\r\n $networkLayers = $this->network->getNetworkLayers();\r\n foreach ($networkLayers as $num => $layer) {\r\n if ($num < count($networkLayers) - 1) {\r\n //Calculate weight changes for non bias weights\r\n for ($i = $layer['start_node']; $i <= $layer['end_node']; ++$i) {\r\n for ($j = $networkLayers[$num + 1]['start_node']; $j <= $networkLayers[$num + 1]['end_node']; ++$j) {\r\n $this->network->updateWeight($i, $j, $this->weightUpdates[$i][$j]);\r\n }\r\n }\r\n //Calculate weight changes for bias weights\r\n for ($b = $networkLayers[$num + 1]['start_node']; $b <= $networkLayers[$num + 1]['end_node']; ++$b) {\r\n $this->network->updateBiasWeight($num, $b, $this->biasWeightUpdates[$num][$b]);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "c4f661deb93c0bf62dd2c40d908bf263", "score": "0.4771614", "text": "protected function beforeUpdate() {\n \n }", "title": "" }, { "docid": "a4cdce51e013b90d66813de3a94d0166", "score": "0.47669142", "text": "function doOtherChecks()\n\t{\n\t}", "title": "" }, { "docid": "cdb759ab18255d1e928d7a3b0ec9febf", "score": "0.47607112", "text": "public function testModelMultipleNestedChangesWithSilent2() {\r\n $changes = array();\r\n $model = new Backbone_Model();\r\n $model->on('change:b', function($model, $val) use (&$changes) { $changes[] = $val; });\r\n $model->on('change', function() use ($model) {\r\n $model->set('b', 1);\r\n $model->set('b', 2, array('silent'=>true));\r\n });\r\n $model->set('b', 0);\r\n $this->assertEquals(array(0,1,1), $changes);\r\n $model->change();\r\n $this->assertEquals(array(0,1,1,2,1), $changes);\r\n }", "title": "" }, { "docid": "852260b710968b4c1a217e90c22e31ee", "score": "0.47586286", "text": "public function preFillTrue()\n {\n }", "title": "" }, { "docid": "fe334767953a95612b470dadb61d364d", "score": "0.47570032", "text": "protected function onMake():void\n {\n return;\n }", "title": "" }, { "docid": "75b7f32863e576791a0d6bebaa8e287f", "score": "0.47503942", "text": "public function testModelPreviousForFalseyKeys() {\r\n $model = new Backbone_Model(array(0=>true, ''=>true));\r\n $model->set(array(0=>false, ''=>false), array('silent'=>true));\r\n $this->assertEquals(true, $model->previous(0));\r\n $this->assertEquals(true, $model->previous(''));\r\n }", "title": "" }, { "docid": "5429b223ab7cdff7e5c862b7f60f89d4", "score": "0.47403446", "text": "public function old()\n {\n $this->process(false);\n }", "title": "" }, { "docid": "f5a95bbb81f9a795f6ff3d33329290c7", "score": "0.47397625", "text": "public function testUpdateScenario()\n {\n }", "title": "" }, { "docid": "7ee706ccb403922855be890bd851cc99", "score": "0.4735339", "text": "public function testModelUnsetAndChangedAttributes() {\r\n $model = new Backbone_Model(array('a'=>1));\r\n $model->set('a', null, array('unset'=>true, 'silent'=>true));\r\n $changedAttributes = $model->changedAttributes();\r\n $this->assertArrayHasKey('a', $changedAttributes, 'changedAttributes should contain unset properties');\r\n \r\n $changedAttributes = $model->changedAttributes();\r\n $this->assertArrayHasKey('a', $changedAttributes, 'changedAttributes should contain unset properties when running changedAttributes again after an unset');\r\n }", "title": "" }, { "docid": "cd85528031175fa16da88172b5f1efa8", "score": "0.4728815", "text": "public function preLoadData()\n\t{\t\t\n\t\t\n\t\t// skip this stuff\n\t\treturn;\t\t\n\t\t\n\t}", "title": "" }, { "docid": "99ec2cb7b8565b74bd2a72501655f5a5", "score": "0.47281516", "text": "public function someBusinessLogic(): void\n {\n echo \"<br />Subject: I'm doing something important.<br />\";\n $this->state = rand(0, 10);\n\n echo \"Subject: My state has just changed to: {$this->state}<br />\";\n $this->notify();\n }", "title": "" }, { "docid": "1d4ca250510a41006f127bf51f316dfb", "score": "0.47222054", "text": "public function testEager()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "5493ccd2b2082cbd92825b4db0c9cf2e", "score": "0.47192413", "text": "public function testUpdateNetworkTrafficAnalysis()\n {\n }", "title": "" }, { "docid": "4d04538c6247cdf5318db88adb15583f", "score": "0.4716542", "text": "protected function processPresets() {\n\n\t}", "title": "" }, { "docid": "bb0779f9f27f25a97beda6e2b7c44936", "score": "0.47153366", "text": "public function checkPredictions()\n {\n $exception = new AggregateException(\"Some predictions failed:\\n\");\n foreach ($this->prophecies as $prophecy) {\n try {\n $prophecy->checkProphecyMethodsPredictions();\n } catch (PredictionException $e) {\n $exception->append($e);\n }\n }\n\n if (count($exception->getExceptions())) {\n throw $exception;\n }\n }", "title": "" }, { "docid": "fc19388794564bad1c374f78b494a1c0", "score": "0.47109014", "text": "public function preSave() {\n\t}", "title": "" }, { "docid": "ac082342e71e6b48b4575d27cfde255e", "score": "0.4710899", "text": "abstract public function testPrePersistIncorrectObject(): void;", "title": "" }, { "docid": "3c8e4635698bf938b96bcc32b3718922", "score": "0.47076273", "text": "public function doSomething(): void\n {\n echo \"Originator: I'm doing something important.\\n\";\n $this->state = $this->generateRandomString(30);\n echo \"Originator: and my state has changed to: {$this->state}\\n\";\n }", "title": "" }, { "docid": "9dc6e11a9f67db2c724a0a9b4de5309a", "score": "0.46974397", "text": "public function testBackstagePassesUpdate()\n {\n $item = [new Item('Backstage passes to a TAFKAL80ETC concert', 15, 15)];\n $gildedRose = new GildedRose($item);\n $gildedRose->update_quality();\n $this->assertEquals($item[0]->sell_in, 14);\n $this->assertEquals($item[0]->quality, 16);\n }", "title": "" }, { "docid": "57c49145c42a0c2ec45c2998babae97d", "score": "0.46946165", "text": "public function mutate(): void\n {\n if (random_int(0, 1) === 0) {\n //mutate register\n $this->register1 = Config::getRandomSourceRegisterIndex();\n } else {\n //mutate value\n $this->register2 = Config::getRandomSourceRegisterIndex();\n }\n }", "title": "" }, { "docid": "f435bfead1e9d47034ce34ef7b2246e2", "score": "0.46900696", "text": "public function testNotChangedRelations()\n {\n $articleId = 3;\n $newStores = [1, 2, 3];\n $oldStores = [1, 2, 3];\n $articleMock = $this->prepareArticleMock($articleId, $newStores);\n\n $this->prepareLookupStoreIds($articleId, $oldStores);\n\n $this->connectionMock\n ->expects($this->never())\n ->method('delete');\n\n $this->connectionMock\n ->expects($this->never())\n ->method('insertMultiple');\n\n $this->assertEquals($articleMock, $this->saveHandlerObject->execute($articleMock));\n }", "title": "" }, { "docid": "2c8121754fbea1060649b8b7e4a63a6c", "score": "0.46809706", "text": "public function testDeterminingChanges() {\n // Initial creation.\n $block = $this->createBlockContent('test_changes');\n $this->assertEquals(REQUEST_TIME, $block->getChangedTime(), 'Creating a block sets default \"changed\" timestamp.');\n\n // Update the block without applying changes.\n $block->save();\n $this->assertEquals('test_changes', $block->label(), 'No changes have been determined.');\n\n // Apply changes.\n $block->setInfo('updated');\n $block->save();\n\n // The hook implementations block_content_test_block_content_presave() and\n // block_content_test_block_content_update() determine changes and change\n // the title as well as programmatically set the 'changed' timestamp.\n $this->assertEquals('updated_presave_update', $block->label(), 'Changes have been determined.');\n $this->assertEquals(979534800, $block->getChangedTime(), 'Saving a custom block uses \"changed\" timestamp set in presave hook.');\n\n // Test the static block load cache to be cleared.\n $block = BlockContent::load($block->id());\n $this->assertEquals('updated_presave', $block->label(), 'Static cache has been cleared.');\n }", "title": "" }, { "docid": "dff9b41cb6462553c53ce91b08aff3e5", "score": "0.46798596", "text": "protected function recordHistoricCopy()\n\t{\n\t}", "title": "" }, { "docid": "1bdb3025b124caf6071067cf00eaa611", "score": "0.46758753", "text": "abstract protected function update();", "title": "" }, { "docid": "52925d0872111e5894fd83800e1f07fe", "score": "0.4671793", "text": "protected function _update()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "4f177d19fd2364159c41984995467d91", "score": "0.4671149", "text": "public function run()\n {\n $events = Event::all();\n $predictions = Prediction::all()->toArray();\n\n foreach ($events as $event) {\n $eventPrediction = new EventPrediction([\n 'event_id' => $event->id,\n 'prediction_id' => $predictions[array_rand($predictions)]['id']\n ]);\n\n $eventPrediction->save();\n }\n }", "title": "" }, { "docid": "c0400b864e8e0794c3058d36c6b7b1fd", "score": "0.46652183", "text": "function testBackstagePasses(){\n $items = array(\n new Item(\"Backstage passes\", 11, 30),\n );\n $gildedRose = new GildedRose($items);\n // 11\n $gildedRose->updateQuality();\n $this->assertEquals(10, $items[0]->sell_in);\n $this->assertEquals(31, $items[0]->quality);\n $gildedRose->updateQuality();\n $this->assertEquals(9, $items[0]->sell_in);\n $this->assertEquals(33, $items[0]->quality);\n\n $gildedRose->updateQuality();\n $this->assertEquals(8, $items[0]->sell_in);\n $this->assertEquals(35, $items[0]->quality);\n $gildedRose->updateQuality();\n $this->assertEquals(7, $items[0]->sell_in);\n $this->assertEquals(37, $items[0]->quality);\n $gildedRose->updateQuality();\n $this->assertEquals(6, $items[0]->sell_in);\n $this->assertEquals(39, $items[0]->quality);\n // 6\n $gildedRose->updateQuality();\n $this->assertEquals(5, $items[0]->sell_in);\n $this->assertEquals(41, $items[0]->quality);\n $gildedRose->updateQuality();\n $this->assertEquals(4, $items[0]->sell_in);\n $this->assertEquals(44, $items[0]->quality);\n $gildedRose->updateQuality();\n $this->assertEquals(3, $items[0]->sell_in);\n $this->assertEquals(47, $items[0]->quality);\n $gildedRose->updateQuality();\n $this->assertEquals(2, $items[0]->sell_in);\n $this->assertEquals(50, $items[0]->quality);\n $gildedRose->updateQuality();\n $this->assertEquals(1, $items[0]->sell_in);\n $this->assertEquals(50, $items[0]->quality);\n $gildedRose->updateQuality();\n $this->assertEquals(0, $items[0]->sell_in);\n $this->assertEquals(50, $items[0]->quality);\n // concert\n $gildedRose->updateQuality();\n $this->assertEquals(-1, $items[0]->sell_in);\n $this->assertEquals(0, $items[0]->quality);\n }", "title": "" }, { "docid": "f1da652473c8b9c1c52addc2e28b2a60", "score": "0.4659337", "text": "public function testReverseTransformUpdate()\r\n\t{\r\n\t\t/*\r\n\t\t * Generate a unique random entity name\r\n\t\t */\r\n\t\t$entityName = uniqid( 'test_' );\r\n\t\r\n\t\t/*\r\n\t\t * Create and persist an entity\r\n\t\t */\r\n\t\t$entity1 = new State();\r\n\t\t$entity1->setName( $entityName );\n\t\t$entity1->setCountry( $this->country );\n\t\t$this->om->persist( $entity1 );\r\n\t\t$this->om->flush();\n\t\t\n\t\t/*\n\t\t * Store entity's DB id\n\t\t */\n\t\t$entityId = $entity1->getId();\r\n\t\t\r\n\t\t/*\n\t\t * Entity with similar name exists in DB\n\t\t * The transformer should return the DB object\n\t\t */\n\t\t$this->assertEquals( $entity1, $this->entityTransformer->reverseTransform( $entity1 ) );\n\t\t\n\t\t/*\n\t\t * We change the name of the managed entity ( update process )\n\t\t */\n\t\t$entityNewName = uniqid( 'test_' );\n\t\t$entity1->setName( $entityNewName );\n\t\t\n\t\t/*\n\t\t * Entity is not found in DB, the transformer should:\n\t\t * - refresh the managed entity to preserve its original DB data\n\t\t * - return a new entity with the new name\n\t\t */\n\t\t$transformedEntity = $this->entityTransformer->reverseTransform( $entity1 );\n\t\t\n\t\t/*\n\t\t * First, we check that the old entity kept its name\n\t\t */\n\t\t$this->assertEquals( $entityName, $this->repository->find( $entityId )->getName() );\n\t\t\n\t\t/*\n\t\t * Next, we check that the entity returned by the transformer has the new name\n\t\t */\n\t\t$this->assertEquals( $entityNewName, $transformedEntity->getName() );\r\n\t}", "title": "" }, { "docid": "da18473f5b3be28d6a6463a7ba915eb0", "score": "0.46563756", "text": "public function testModelChangeFiresChangeAttr() {\r\n $changed = false;\r\n $model = new Backbone_Model(array('x'=>1));\r\n $model->set('x', 2, array('silent'=>true));\r\n $model->on('change:x', function() use (&$changed) { $changed = true; });\r\n $model->change();\r\n $this->assertTrue($changed);\r\n }", "title": "" }, { "docid": "3cbd449ff5e0734fc2fea7cd433f9e07", "score": "0.46493125", "text": "protected function _preSave(){ }", "title": "" }, { "docid": "5c2941e8e6c905a5ba60f27aec6554dc", "score": "0.46484208", "text": "public function testModelNestedSetDuringChangeAttr() {\r\n $events = array();\r\n $model = new Backbone_Model();\r\n $model->on('all', function($event) use (&$events) { $events[] = $event; });\r\n $model->on('change', function() use ($model) {\r\n $model->set('z', true, array('silent'=>true));\r\n });\r\n $model->on('change:x', function() use ($model) {\r\n $model->set('y', true);\r\n });\r\n $model->set('x', true);\r\n $this->assertEquals(array('change:y', 'change:x', 'change'), $events);\r\n $events = array();\r\n $model->change();\r\n $this->assertEquals(array('change:z', 'change'), $events);\r\n }", "title": "" }, { "docid": "23a67523766993f56d3605c858972d34", "score": "0.46354228", "text": "public function testRemoteRemoteIdApplyChangesPatch()\n {\n }", "title": "" }, { "docid": "9888b7bd6484a7de0336a24af93aa0b1", "score": "0.46336883", "text": "protected function setOldData() {\n\t\t$this->data = $this->Object->completeData();\n\t}", "title": "" }, { "docid": "9f4763790da8b8543019ab0aa6939aa6", "score": "0.46319807", "text": "public function testModelNestedChangeOnlyFiresOnce() {\r\n $changes = 0;\r\n $model = new Backbone_Model();\r\n $model->on('change', function() use (&$changes, $model) {\r\n $changes++;\r\n $model->change();\r\n });\r\n $model->x = true;\r\n $this->assertEquals(1, $changes);\r\n }", "title": "" }, { "docid": "247e0f124e7e70f7c04be4156bfd0b79", "score": "0.4631554", "text": "public function testModelNestedChangeAttrWithSilent() {\r\n $changes = 0;\r\n $model = new Backbone_Model();\r\n $model->on('change:y', function() use (&$changes) { $changes++; });\r\n $model->on('change', function() use ($model) {\r\n $model->set('y', true, array('silent'=>true));\r\n $model->set('z', true);\r\n });\r\n $model->set('x',true);\r\n $this->assertEquals(1, $changes);\r\n }", "title": "" }, { "docid": "3eb61a71320555dc1bc07c4ac7afcf06", "score": "0.4628956", "text": "function update07to071() {\n global $DB;\n\n if (!$DB->fieldExists(\"glpi_profiles\", \"rule_dictionnary_software\", false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `rule_dictionnary_software` VARCHAR( 1 ) NULL DEFAULT NULL\";\n $DB->queryOrDie($query, \"0.71 add rule_dictionnary_software in glpi_profiles if not present for compatibility\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `rule_dictionnary_software` = `rule_softwarecategories`\";\n $DB->queryOrDie($query, \"0.71 update value of rule_dictionnary_software right\");\n }\n\n if (!$DB->fieldExists(\"glpi_profiles\", \"rule_dictionnary_dropdown\", false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `rule_dictionnary_dropdown` VARCHAR( 1 ) NULL DEFAULT NULL\";\n $DB->queryOrDie($query, \"0.71 add rule_dictionnary_dropdown in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `rule_dictionnary_dropdown` = `rule_dictionnary_software`\";\n $DB->queryOrDie($query, \"0.71 update value of rule_dictionnary_dropdown\");\n }\n\n $cache_tables = [\"glpi_rule_cache_manufacturer\",\n \"glpi_rule_cache_model_computer\",\n \"glpi_rule_cache_model_monitor\",\n \"glpi_rule_cache_model_printer\",\n \"glpi_rule_cache_model_peripheral\",\n \"glpi_rule_cache_model_phone\",\n \"glpi_rule_cache_model_networking\",\n \"glpi_rule_cache_type_computer\",\n \"glpi_rule_cache_type_monitor\",\n \"glpi_rule_cache_type_printer\",\n \"glpi_rule_cache_type_peripheral\",\n \"glpi_rule_cache_type_phone\",\n \"glpi_rule_cache_type_networking\",\n \"glpi_rule_cache_software\",\n \"glpi_rule_cache_os\",\n \"glpi_rule_cache_os_sp\",\n \"glpi_rule_cache_os_version\"];\n\n foreach ($cache_tables as $cache_table) {\n if (!$DB->tableExists($cache_table)) {\n $query = \"CREATE TABLE `\".$cache_table.\"` (\n `ID` INT( 11 ) NOT NULL auto_increment ,\n `old_value` VARCHAR( 255 ) NULL default NULL ,\n `rule_id` INT( 11 ) NOT NULL DEFAULT '0',\n `new_value` VARCHAR( 255 ) NULL default NULL ,\n PRIMARY KEY ( `ID` ),\n KEY `rule_id` (`rule_id`),\n KEY `old_value` (`old_value`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.71 add table \".$cache_table.\"\");\n }\n }\n\n //Add the field version espacially for the software's cache\n if (!$DB->fieldExists(\"glpi_rule_cache_software\", \"version\", false)) {\n $query = \"ALTER TABLE `glpi_rule_cache_software`\n ADD `version` VARCHAR( 255 ) DEFAULT NULL \";\n $DB->queryOrDie($query, \"0.71 add version in glpi_rule_cache_software if not present\");\n }\n\n if (!$DB->fieldExists(\"glpi_rule_cache_software\", \"manufacturer\", false)) {\n $query = \"ALTER TABLE `glpi_rule_cache_software`\n ADD `manufacturer` VARCHAR( 255 ) NOT NULL AFTER `old_value` \";\n $DB->queryOrDie($query, \"0.71 add manufacturer in glpi_rule_cache_software if not present\");\n }\n\n if (!$DB->fieldExists(\"glpi_rule_cache_software\", \"new_manufacturer\", false)) {\n $query = \"ALTER TABLE `glpi_rule_cache_software`\n ADD `new_manufacturer` VARCHAR( 255 ) NOT NULL AFTER `version` \";\n $DB->queryOrDie($query, \"0.71 add new_manufacturer in glpi_rule_cache_software if not present\");\n }\n\n $model_cache_tables = [\"glpi_rule_cache_model_computer\",\n \"glpi_rule_cache_model_monitor\",\n \"glpi_rule_cache_model_printer\",\n \"glpi_rule_cache_model_peripheral\",\n \"glpi_rule_cache_model_phone\",\n \"glpi_rule_cache_model_networking\"];\n\n foreach ($model_cache_tables as $model_cache_table) {\n if (!$DB->fieldExists($model_cache_table, \"manufacturer\", false)) {\n $query = \"ALTER TABLE `\".$model_cache_table.\"`\n ADD `manufacturer` VARCHAR( 255 ) DEFAULT NULL \";\n $DB->queryOrDie($query, \"0.71 add manufacturer in \".$model_cache_table.\" if not present\");\n }\n }\n\n if (!$DB->fieldExists(\"glpi_rules_descriptions\", \"active\", false)) {\n $query = \"ALTER TABLE `glpi_rules_descriptions`\n ADD `active` INT( 1 ) NOT NULL DEFAULT '1'\";\n $DB->queryOrDie($query, \"0.71 add active in glpi_rules_descriptions if not present\");\n }\n\n if (!$DB->tableExists(\"glpi_auth_ldap_replicate\")) {\n $query = \"CREATE TABLE IF NOT EXISTS `glpi_auth_ldap_replicate` (\n `ID` int(11) NOT NULL auto_increment,\n `server_id` int(11) NOT NULL default '0',\n `ldap_host` varchar(255) NULL default NULL,\n `ldap_port` int(11) NOT NULL default '389',\n `name` varchar(255) NULL default NULL,\n PRIMARY KEY (`ID`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.71 add table glpi_auth_ldap_replicate\");\n }\n\n if (!$DB->fieldExists(\"glpi_config\", \"dbreplicate_notify_desynchronization\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `dbreplicate_notify_desynchronization` SMALLINT NOT NULL DEFAULT '0',\n ADD `dbreplicate_email` VARCHAR( 255 ) NULL ,\n ADD `dbreplicate_maxdelay` INT NOT NULL DEFAULT '3600'\";\n $DB->queryOrDie($query, \"0.71 alter config add config for dbreplicate notif\");\n }\n\n if ($DB->fieldExists(\"glpi_reminder\", \"author\", false)) {\n $query = \"ALTER TABLE `glpi_reminder`\n CHANGE `author` `FK_users` INT( 11 ) NOT NULL DEFAULT '0'\";\n $DB->queryOrDie($query, \"0.71 rename author in glpi_reminder\");\n\n if (isIndex(\"glpi_reminder\", \"author\")) {\n $query = \"ALTER TABLE `glpi_reminder`\n DROP INDEX `author`\";\n $DB->queryOrDie($query, \"0.7 drop index author on glpi_reminder\");\n }\n\n $query = \" ALTER TABLE `glpi_reminder`\n ADD INDEX `FK_users` (`FK_users`) \";\n $DB->queryOrDie($query, \"0.71 ad index FK_users in glpi_reminder\");\n }\n\n if (!$DB->fieldExists(\"glpi_reminder\", \"recursive\", false)) {\n $query = \"ALTER TABLE `glpi_reminder`\n ADD `recursive` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `type`\";\n $DB->queryOrDie($query, \"0.71 add recursive in glpi_reminder\");\n\n $query = \"ALTER TABLE `glpi_reminder`\n ADD INDEX `recursive` (`recursive`) \";\n $DB->queryOrDie($query, \"0.71 add recursive index in glpi_reminder\");\n }\n\n if (!$DB->fieldExists(\"glpi_reminder\", \"private\", false)) {\n $query = \"ALTER TABLE `glpi_reminder`\n ADD `private` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `type`\";\n $DB->queryOrDie($query, \"0.71 add private in glpi_reminder\");\n\n $query = \"UPDATE `glpi_reminder`\n SET `private` = '0'\n WHERE `type` = 'public' \";\n $DB->queryOrDie($query, \"0.71 update private field in glpi_reminder\");\n\n $query = \"ALTER TABLE `glpi_reminder`\n ADD INDEX `private` (`private`) \";\n $DB->queryOrDie($query, \"0.71 add private index in glpi_reminder\");\n\n // Drop type\n $query = \"ALTER TABLE `glpi_reminder`\n DROP `type`\";\n $DB->queryOrDie($query, \"0.71 drop type in glpi_reminder\");\n }\n\n if ($DB->fieldExists(\"glpi_reminder\", \"title\", false)) {\n $query = \"ALTER TABLE `glpi_reminder`\n CHANGE `title` `name` VARCHAR( 255 ) NULL DEFAULT NULL \";\n $DB->queryOrDie($query, \"0.71 alter title to namein glpi_reminder\");\n }\n\n if (!isIndex(\"glpi_ocs_link\", \"last_ocs_update\")) {\n $query = \"ALTER TABLE `glpi_ocs_link`\n ADD INDEX `last_ocs_update` (`ocs_server_id`, `last_ocs_update`)\";\n $DB->queryOrDie($query, \"0.7 alter ocs_link add index on last_ocs_update\");\n }\n\n if (!$DB->fieldExists(\"glpi_contacts\", \"recursive\", false)) {\n $query = \"ALTER TABLE `glpi_contacts`\n ADD `recursive` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `FK_entities`\";\n $DB->queryOrDie($query, \"0.71 add recursive in glpi_contacts\");\n }\n\n if (!$DB->fieldExists(\"glpi_contracts\", \"recursive\", false)) {\n $query = \"ALTER TABLE `glpi_contracts`\n ADD `recursive` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `FK_entities`\";\n $DB->queryOrDie($query, \"0.71 add recursive in glpi_contracts\");\n }\n\n if (!$DB->fieldExists(\"glpi_enterprises\", \"recursive\", false)) {\n $query = \"ALTER TABLE `glpi_enterprises`\n ADD `recursive` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `FK_entities`\";\n $DB->queryOrDie($query, \"0.71 add recursive in glpi_enterprises\");\n }\n\n if (!$DB->fieldExists(\"glpi_docs\", \"recursive\", false)) {\n $query = \"ALTER TABLE `glpi_docs`\n ADD `recursive` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `FK_entities`\";\n $DB->queryOrDie($query, \"0.71 add recursive in glpi_docs\");\n }\n\n if (!$DB->fieldExists(\"glpi_monitors\", \"flags_pivot\", false)) {\n $query = \"ALTER TABLE `glpi_monitors`\n ADD `flags_pivot` SMALLINT( 6 ) NOT NULL DEFAULT 0 AFTER `flags_dvi`\";\n $DB->queryOrDie($query, \"0.71 add flags_pivot in glpi_monitors\");\n }\n\n if (!$DB->fieldExists(\"glpi_kbitems\", \"FK_entities\", false)) {\n $query = \"ALTER TABLE `glpi_kbitems`\n ADD `FK_entities` INT(11) NOT NULL DEFAULT 0 AFTER `ID`\";\n $DB->queryOrDie($query, \"0.71 add FK_entities in glpi_kbitems\");\n }\n\n if (!$DB->fieldExists(\"glpi_kbitems\", \"recursive\", false)) {\n // Default 1 for migration. All articles become \"global\" (root + recursive)\n $query = \"ALTER TABLE `glpi_kbitems`\n ADD `recursive` TINYINT(1) NOT NULL DEFAULT 1 AFTER `FK_entities`\";\n $DB->queryOrDie($query, \"0.71 add recursive in glpi_kbitems\");\n }\n\n if (!isIndex(\"glpi_kbitems\", \"FK_entities\")) {\n $query = \"ALTER TABLE `glpi_kbitems`\n ADD INDEX `FK_entities` (`FK_entities`)\";\n $DB->queryOrDie($query, \"0.7 alter ocs_link add index on last_ocs_update\");\n }\n\n if (!$DB->fieldExists(\"glpi_config\", \"category_on_software_delete\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `category_on_software_delete` INT( 11 ) NOT NULL DEFAULT '0'\";\n $DB->queryOrDie($query, \"0.71 add category_on_software_delete in glpi_config\");\n\n //Create a software category for softwares to be deleted by the dictionary\n $result = $DB->query(\"SELECT `ID`\n FROM `glpi_dropdown_software_category`\n WHERE `name` = 'FUSION'\");\n\n if (!$DB->numrows($result)) {\n $DB->query(\"INSERT INTO `glpi_dropdown_software_category`\n SET `name` = 'FUSION'\");\n\n $result = $DB->query(\"SELECT `ID`\n FROM `glpi_dropdown_software_category`\n WHERE `name` = 'FUSION'\");\n }\n $cat_id = $DB->result($result, 0, \"ID\");\n\n $DB->query(\"UPDATE `glpi_config`\n SET `category_on_software_delete` = '\".$cat_id.\"'\");\n }\n\n $query = \"DELETE\n FROM `glpi_display`\n WHERE `num` = '121'\";\n $DB->queryOrDie($query, \"0.71 clean glpi_display for end_warranty infocoms\");\n\n // Delete helpdesk injector user\n $query = \"DELETE\n FROM `glpi_users`\n WHERE `ID` = '1'\";\n $DB->queryOrDie($query, \"0.71 delete helpdesk injector user\");\n\n // Delete helpdesk injector user\n $query = \"DELETE\n FROM `glpi_users_profiles`\n WHERE `FK_users` = '1'\";\n $DB->queryOrDie($query, \"0.71 delete helpdesk injector user profile\");\n\n // change default device type for tracking\n if ($DB->fieldExists(\"glpi_tracking\", \"device_type\", false)) {\n $query = \"ALTER TABLE `glpi_tracking`\n CHANGE `device_type` `device_type` INT( 11 ) NOT NULL DEFAULT '0' \";\n $DB->queryOrDie($query, \"0.71 alter device_type from glpi_tracking\");\n }\n\n // Change ldap condition field bigger\n if ($DB->fieldExists(\"glpi_auth_ldap\", \"ldap_condition\", false)) {\n $query = \"ALTER TABLE `glpi_auth_ldap`\n CHANGE `ldap_condition` `ldap_condition` TEXT NULL DEFAULT NULL\";\n $DB->queryOrDie($query, \"0.71 alter change ldap_condition field to be bigger\");\n }\n\n // Add date_mod to glpi_tracking\n if (!$DB->fieldExists(\"glpi_tracking\", \"date_mod\", false)) {\n $query = \"ALTER TABLE `glpi_tracking`\n ADD `date_mod` DATETIME NULL DEFAULT NULL AFTER `closedate` \";\n $DB->queryOrDie($query, \"0.71 alter glpi_tracking add date_mod\");\n\n $query = \"UPDATE `glpi_tracking`\n SET `date_mod` = `date`\";\n $DB->queryOrDie($query, \"0.71 alter glpi_tracking update date_mod value to creation date\");\n }\n\n // Add number format\n if (!$DB->fieldExists(\"glpi_config\", \"numberformat\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `numberformat` SMALLINT NOT NULL DEFAULT '0' AFTER `dateformat` \";\n $DB->queryOrDie($query, \"0.71 alter config add numberformat\");\n }\n\n // Add group supervisor\n if (!$DB->fieldExists(\"glpi_groups\", \"FK_users\", false)) {\n $query = \"ALTER TABLE `glpi_groups`\n ADD `FK_users` INT NOT NULL DEFAULT '0' AFTER `comments` \";\n $DB->queryOrDie($query, \"0.71 alter groups add FK_users supervisor\");\n }\n\n // Add group supervisor\n if (!$DB->fieldExists(\"glpi_entities_data\", \"admin_email\", false)) {\n $query = \"ALTER TABLE `glpi_entities_data`\n ADD `admin_email` VARCHAR( 255 ) NULL AFTER `email`\";\n $DB->queryOrDie($query, \"0.71 alter entities_data add admin_email\");\n }\n\n // Add cas ldap server link\n if (!$DB->fieldExists(\"glpi_config\", \"extra_ldap_server\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `extra_ldap_server` INT NOT NULL DEFAULT '1' AFTER `cas_logout`\";\n $DB->queryOrDie($query, \"0.71 alter config add extra_ldap_server\");\n }\n\n // Add x509 email field definition\n if (!$DB->fieldExists(\"glpi_config\", \"x509_email_field\", false)) {\n $query = \"ALTER TABLE `glpi_config` ADD `x509_email_field` VARCHAR( 255 ) NULL\";\n $DB->queryOrDie($query, \"0.71 alter config add x509_email_field\");\n }\n\n // Add x509 email field definition\n if (!$DB->fieldExists(\"glpi_config\", \"existing_auth_server_field\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `existing_auth_server_field` VARCHAR( 255 ) NULL AFTER `extra_ldap_server`\";\n $DB->queryOrDie($query, \"0.71 alter config add existing_auth_server_field\");\n }\n\n // update cas auth field from 0 -> 5\n $query = \"UPDATE `glpi_users`\n SET `auth_method` = '5'\n WHERE `auth_method` = '0'\";\n $DB->queryOrDie($query, \"0.71 update auth method for CAS\");\n\n if (!$DB->tableExists(\"glpi_bookmark\")) {\n $query = \"CREATE TABLE IF NOT EXISTS `glpi_bookmark` (\n `ID` int(11) NOT NULL auto_increment,\n `name` varchar(255) default NULL,\n `type` int(11) NOT NULL default '0',\n `device_type` int(11) NOT NULL default '0',\n `FK_users` int(11) NOT NULL default '0',\n `private` smallint(6) NOT NULL default '1',\n `FK_entities` int(11) NOT NULL default '-1',\n `recursive` smallint(6) NOT NULL default '0',\n `path` varchar(255) default NULL,\n `query` text,\n PRIMARY KEY (`ID`),\n KEY `FK_users` (`FK_users`),\n KEY `private` (`private`),\n KEY `device_type` (`device_type`),\n KEY `recursive` (`recursive`),\n KEY `FK_entities` (`FK_entities`),\n KEY `type` (`type`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\";\n $DB->queryOrDie($query, \"0.71 add table glpi_bookmark\");\n }\n\n if (!$DB->fieldExists(\"glpi_profiles\", \"show_group_planning\", false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `show_group_planning` CHAR( 1 ) NULL AFTER `show_planning` \";\n $DB->queryOrDie($query, \"0.71 add show_group_planning in glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `show_group_planning` = `show_all_planning`\";\n $DB->queryOrDie($query, \"0.71 update value of show_group_planning right\");\n }\n\n if (!$DB->fieldExists(\"glpi_users\", \"FK_profiles\", false)) {\n $query = \"ALTER TABLE `glpi_users`\n ADD `FK_profiles` INT NOT NULL DEFAULT '0'\";\n $DB->queryOrDie($query, \"0.71 add default profile to user\");\n }\n\n if (!$DB->fieldExists(\"glpi_users\", \"FK_entities\", false)) {\n $query = \"ALTER TABLE `glpi_users`\n ADD `FK_entities` INT NOT NULL DEFAULT '0'\";\n $DB->queryOrDie($query, \"0.71 add default entity to user\");\n }\n\n if (!$DB->fieldExists(\"glpi_auth_ldap\", \"ldap_opt_deref\", false)) {\n $query = \"ALTER TABLE `glpi_auth_ldap`\n ADD `ldap_opt_deref` INT (1) NOT NULL DEFAULT '0'\";\n $DB->queryOrDie($query, \"0.71 add ldap_opt_deref to glpi_auth_ldap\");\n }\n\n //ticket opening restrictions\n if (!$DB->fieldExists(\"glpi_config\", \"ticket_title_mandatory\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `ticket_title_mandatory` INT (1) NOT NULL DEFAULT '0'\";\n $DB->queryOrDie($query, \"0.71 add ticket_title_mandatory to glpi_config\");\n }\n\n if (!$DB->fieldExists(\"glpi_config\", \"ticket_content_mandatory\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `ticket_content_mandatory` INT (1) NOT NULL DEFAULT '1'\";\n $DB->queryOrDie($query, \"0.71 add ticket_content_mandatory to glpi_config\");\n }\n\n if (!$DB->fieldExists(\"glpi_config\", \"ticket_category_mandatory\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `ticket_category_mandatory` INT (1) NOT NULL DEFAULT '0'\";\n $DB->queryOrDie($query, \"0.71 add ticket_category_mandatory to glpi_config\");\n }\n\n // Add alerts on licenses\n if (!$DB->fieldExists(\"glpi_config\", \"licenses_alert\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `licenses_alert` SMALLINT NOT NULL DEFAULT '0' AFTER `infocom_alerts`\";\n $DB->queryOrDie($query, \"0.71 add licenses_alert to glpi_config\");\n }\n\n if (!$DB->fieldExists(\"glpi_config\", \"autoclean_link_contact\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `autoclean_link_contact` smallint(6) NOT NULL DEFAULT '0'\n AFTER `autoupdate_link_location`,\n ADD `autoclean_link_user` smallint(6) NOT NULL DEFAULT '0'\n AFTER `autoclean_link_contact`,\n ADD `autoclean_link_group` smallint(6) NOT NULL DEFAULT '0'\n AFTER `autoclean_link_user`,\n ADD `autoclean_link_location` smallint(6) NOT NULL DEFAULT '0'\n AFTER `autoclean_link_group`\";\n $DB->queryOrDie($query, \"0.71 add autoclean_link_* to glpi_config\");\n }\n\n if (!$DB->fieldExists(\"glpi_config\", \"autoupdate_link_state\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `autoupdate_link_state` smallint(6) NOT NULL DEFAULT '0'\n AFTER `autoupdate_link_location`,\n ADD `autoclean_link_state` smallint(6) NOT NULL DEFAULT '0'\n AFTER `autoclean_link_location`\";\n $DB->queryOrDie($query, \"0.71 add autoclean_link_state to glpi_config\");\n\n $query = \"UPDATE `glpi_ocs_config`\n SET `deconnection_behavior` = ''\n WHERE `deconnection_behavior` != 'trash'\n AND `deconnection_behavior` != 'delete'\";\n $DB->query($query);\n }\n\n if (!$DB->fieldExists(\"glpi_profiles\", \"bookmark_public\", false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `bookmark_public` CHAR( 1 ) AFTER `reminder_public`\";\n $DB->queryOrDie($query, \"0.71 add bookmark_public to glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `bookmark_public` = `reminder_public`\";\n $DB->queryOrDie($query, \"0.71 init bookmark_public value in glpi_profiles\");\n }\n\n if (!$DB->fieldExists(\"glpi_config\", \"admin_reply\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `admin_reply` VARCHAR( 255 ) NULL AFTER `admin_email`\";\n $DB->queryOrDie($query, \"0.71 add admin_reply to glpi_config\");\n }\n\n if (!$DB->fieldExists(\"glpi_config\", \"mailgate_filesize_max\", false)) {\n $query = \"ALTER TABLE `glpi_config`\n ADD `mailgate_filesize_max` int(11) NOT NULL DEFAULT \".(2*1024*1024).\"\n AFTER `ticket_category_mandatory`\";\n $DB->queryOrDie($query, \"0.71 add mailgate_filesize_max to glpi_config\");\n }\n\n if (!$DB->fieldExists(\"glpi_entities_data\", \"admin_reply\", false)) {\n $query = \"ALTER TABLE `glpi_entities_data`\n ADD `admin_reply` VARCHAR( 255 ) NULL AFTER `admin_email` \";\n $DB->queryOrDie($query, \"0.71 add admin_reply to glpi_entities_data\");\n }\n\n if (!isIndex(\"glpi_kbitems\", \"fulltext\")) {\n $query = \"ALTER TABLE `glpi_kbitems`\n ADD FULLTEXT `fulltext` (`question`, `answer`)\";\n $DB->queryOrDie($query, \"0.71 add fulltext index glpi_kbitems\");\n }\n\n if (!$DB->fieldExists(\"glpi_profiles\", \"user_auth_method\", false)) {\n $query = \"ALTER TABLE `glpi_profiles`\n ADD `user_auth_method` CHAR( 1 ) NULL DEFAULT NULL AFTER `user`\";\n $DB->queryOrDie($query, \"0.71 add user_auth_method to glpi_profiles\");\n\n $query = \"UPDATE `glpi_profiles`\n SET `user_auth_method` = `user`\";\n $DB->queryOrDie($query, \"0.71 init user_auth_method value in glpi_profiles\");\n }\n\n if (isIndex(\"glpi_printers\", \"id\")) {\n $query = \"ALTER TABLE `glpi_printers`\n DROP INDEX `id`\";\n $DB->queryOrDie($query, \"0.71 drop id index in glpi_printers\");\n }\n\n if (isIndex(\"glpi_users\", \"name_2\")) {\n $query = \"ALTER TABLE `glpi_users`\n DROP INDEX `name_2`\";\n $DB->queryOrDie($query, \"0.71 drop name_2 index in glpi_users\");\n }\n\n if (!$DB->fieldExists(\"glpi_rules_descriptions\", \"comments\", false)) {\n $query = \"ALTER TABLE `glpi_rules_descriptions`\n ADD `comments` TEXT NULL DEFAULT NULL\";\n $DB->queryOrDie($query, \"0.71 add comments to glpi_rules_descriptions\");\n }\n\n}", "title": "" }, { "docid": "a06edf2313e3f0da456497af991aa17c", "score": "0.4623181", "text": "private function changed(): void\n {\n if ($this->isDirty) {\n return;\n }\n\n $this->isDirty = true;\n\n if (\n $this->association !== null &&\n $this->getMapping()['isOwningSide'] &&\n $this->getMapping()['type'] === ClassMetadata::MANY_TO_MANY &&\n $this->owner &&\n $this->em !== null &&\n $this->em->getClassMetadata(get_class($this->owner))->isChangeTrackingNotify()\n ) {\n $this->getUnitOfWork()->scheduleForDirtyCheck($this->owner);\n }\n }", "title": "" }, { "docid": "0d00199a5801fc14fdd88796590f7627", "score": "0.46206832", "text": "protected function reworkWorkingData($active_id, $pass, $obligationsAnswered)\n\t{\n\t\t// nothing to rework!\n\t}", "title": "" }, { "docid": "12fb1017897b40b8c74ba8b1a3e53522", "score": "0.4619034", "text": "public function repairBeforeProcess()\n {\n $this->repairCutlist();\n }", "title": "" }, { "docid": "97b36001a2b2a511009fbbfcc1b040f4", "score": "0.46167263", "text": "function settle() {\n }", "title": "" }, { "docid": "39c6dc3d349c7b51710311ca2ad72702", "score": "0.4611083", "text": "public function fix();", "title": "" }, { "docid": "8e22cf1e387c83b4460511686b05b8cb", "score": "0.4610954", "text": "private function backTrackTechnique() \n { \n //Because this loop would turn for ever in case of a grid that is impossible to solve\n //I give it a 0.3sec timeout, after this time if the grid is not complete, it will be considered impossible \n $currentTime = time() - $this->startTime; \n if ($currentTime > 0.3) {\n $this->incorrectGrid = true;\n return;\n }\n\n $cellWithNoResult = $this->findCellWithNoResult();\n\n if ($cellWithNoResult == null) {\n\n return true;\n\n } else {\n\n for ($i=1;$i<10;$i++) {\n \n if (is_null($cellWithNoResult->duplicationCheck($i))) {\n \n $cellWithNoResult->result = $i;\n\n if ($this->backTrackTechnique()) {\n return true;\n }\n\n $cellWithNoResult->result = null;\n }\n \n } \n return false;\n }\n $this->isCompleted = true;\n }", "title": "" }, { "docid": "77f0de5e23adff1083c6c892699f2031", "score": "0.460208", "text": "public function prePayshet(){\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "16d7d4b204135f0b9f70b1db41ee0875", "score": "0.46017575", "text": "function change_otxkeys() {\n\t\terror_log( \"\\n\\nRunning change_otxkeys utility.\" );\t\t\n\t\t$all_posts = get_posts( array (\n\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t'post_type' => 'any',\n\t\t\t\t)\n\t\t\t);\t\n\t\t$count = 1;\n\t\tforeach ( $all_posts as $single ) {\n\t\t\t$content = $single->post_content;\n\t\t\t$new_content = $content;\n\n\t\t\t$search = '[otx \"datasets-';\n\t\t\t$tp = strpos( $new_content, $search );\t\t\t\n\t\t\twhile ( FALSE !== $tp ) {\n\t\t\t\t$osc = substr ( $new_content, $tp, 60 );\n\t\t\t\t$pid = $tp + 15;\n\t\t\t\t$lp = strcspn( $new_content, '@\"', $pid );\n\t\t\t\t$vid = (int) substr ( $new_content, $pid, $lp );\n\t\t\t\t$nsc = '(*** NO CHANGE ***)';\n\t\t\t\tif ( $vid ) :\n\t\t\t\t\t$post = get_post( $vid );\n\t\t\t\t\tif ( $post ) : \n\t\t\t\t\t\t$slug = $post->post_name;\n\t\t\t\t\t\t$new_content = substr_replace( $new_content, $slug, $pid, $lp );\t\n\t\t\t\t\t\t$nsc = substr ( $new_content, $tp, 60 );\t\t\t\t\t\n\t\t\t\t\telse : \n\t\t\t\t\t\terror_log( '*** POST NOT FOUND!!!! ***' . $osc );\n\t\t\t\t\tendif;\n\t\t\t\tendif;\t\t\t\n\t\t\t\t\n//\t\t\t\terror_log( $osc . ' => ' . $nsc );\n\t\t\t\t$tp = strpos( $new_content, $search, $tp+16 );\n\t\t\t}\t\t\t\n\t\t\t\n/*\n\t\t\tif ( 3 > $count ) :\n\t\t\t\terror_log ( '*** OLD ' . $content );\n\t\t\t\terror_log ( '*** NEW ' . $new_content );\n\t\t\tendif;\n*/\n\n// CHANGES MADE TO DATABASE HERE ... DOUBLE-CHECK CORRECTNESS BEFORE UNCOMMENTING\n\n/*\t\t\t\n\t\t\tif ( $content != $new_content ) :\n\t\t\t\twp_update_post( array(\n\t\t\t\t\t\t'ID' => $single->ID,\n\t\t\t\t\t\t'post_content' => $new_content,\n\t\t\t\t\t\t) );\n\t\t\tendif;\n*/\n\n\t\t\t$count++;\n//\t\t\tif ( $count > 2 ) break;\t\n\t\t}\t\t\t\n\t}", "title": "" }, { "docid": "c609a9b8fae8cd0a394fd3748b6bf3f4", "score": "0.46016368", "text": "public function recalculateAll(): void {\n $this->recalculateHealth();\n $this->recalculateSize();\n $this->recalculateDamage();\n }", "title": "" }, { "docid": "209d835e469f68371beb2579c9700e6a", "score": "0.45974797", "text": "public function performRewind() {\n $this->data = array();\n $this->found_rows = 0;\n $this->currentPage = 0;\n $this->currentCount = 0;\n $this->fetched_rows = 0;\n $this->computeCount();\n ecolex_migration_log(\n sprintf(\"Check using modification date: %s\", $this->check_modify_date ? 'YES' : 'NO'),\n MigrationBase::MESSAGE_INFORMATIONAL\n );\n if ($this->log_detail) {\n ecolex_migration_log(\"Detailed logging enabled\", MigrationBase::MESSAGE_WARNING);\n }\n }", "title": "" }, { "docid": "572afa397b88ab067e7eefcb7f4be097", "score": "0.45951116", "text": "private function stack_will_be_modified()\n\t{\n\t\tif (!$this->stack_mutability())\n\t\t\tthrow new Exception('Stack Can\\'t Be Modified', 403);\n\t}", "title": "" }, { "docid": "9af25744b8cdb922c85528b14e0047ec", "score": "0.45940995", "text": "public function appliesAfterVat() : bool\n {\n return false;\n }", "title": "" }, { "docid": "f3ad563215f5fc4682f3de551a6fbf0d", "score": "0.45929453", "text": "public function apply()\n\t{\n\t\t$this-> save();\n\t}", "title": "" } ]
c90c0d2f4f8b721cf7dea79ffc5203f4
convert number to day
[ { "docid": "e7aebd3885bea64f64d00590db90616b", "score": "0.7355396", "text": "function numberToDay($number) \n {\n switch ($number) {\n case 1:return 'senin';break;\n case 2:return 'selasa';break;\n case 3:return 'rabu';break;\n case 4:return 'kamis';break;\n case 5:return 'jumat';break;\n case 6:return 'sabtu';break;\n case 7:return 'minggu';break;\n }\n return '';\n \n }", "title": "" } ]
[ { "docid": "b5caebe3d5dd50dc66945a1732bf48e4", "score": "0.651738", "text": "function dayToNumber($day) {\n switch ($day) {\n case 'senin':return 1;break;\n case 'selasa':return 2;break;\n case 'rabu':return 3;break;\n case 'kamis':return 4;break;\n case 'jumat':return 5;break;\n case 'sabtu':return 6;break;\n case 'minggu':return 7;break;\n }\n return 0;\n \n }", "title": "" }, { "docid": "8da6281a8daea5a27d57d8103f5f3d0b", "score": "0.6477591", "text": "public function day() { return (int)date(\"d\", $this->sec); }", "title": "" }, { "docid": "937b79249898d22e241cdf3e7a003715", "score": "0.645345", "text": "public function getDayAsNumber()\n {\n $day = $this->phpDateTime->format('j');\n\n return $day;\n }", "title": "" }, { "docid": "c52d525e15b61f35f9b14c9660ff5db6", "score": "0.6257055", "text": "function DDtoDay( $inputDate ) {\r\n\t\t $dateString = array(0 =>'','st','nd','rd','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','th','st','nd','rd','th','th','th','th','th','th','th','st'); \r\n\t\t\t$returnDate = ''; \r\n\t\t\t$tempDate = intval($inputDate); \r\n\t\t\t\tif ($tempDate >= 1 && $tempDate <= 31){\r\n\t\t\t\t $returnDate = $inputDate . $dateString[$tempDate];\r\n\t\t\t}\r\n\t\t\treturn $returnDate;\r\n\t\t}", "title": "" }, { "docid": "c53c0dbe7b0425ebeb3b7affb48ceb8c", "score": "0.6140353", "text": "static function day_str(int $day): string {\r\n\t\t$time_str = sprintf('Sunday +%s days', $day);\r\n\t\treturn date('l', strtotime($time_str));\r\n\t}", "title": "" }, { "docid": "ec3cba59bdd84d973fa80f6dc05d1c75", "score": "0.6102275", "text": "private function subDay(string $date, int $number): string\n {\n return date('Y-m-d', strtotime($date . '-' . $number . ' day'));\n }", "title": "" }, { "docid": "9800e18fcdd04d9567e06296a6ec2435", "score": "0.609446", "text": "public function getDay($leadingZero = false) {\n return $leadingZero ? $this->format ( 'd' ) : $this->_day;\n }", "title": "" }, { "docid": "38c1f386647352c81d92d1eabd78bb8c", "score": "0.6060514", "text": "function convertDayToNum($str){\n switch($str){\n case \"Mon\":\n return 1;\n case \"Tue\":\n return 2;\n case \"Wed\":\n return 3;\n case \"Thu\":\n return 4;\n case \"Fri\":\n return 5;\n case \"Sat\":\n return 6;\n case \"Sun\":\n return 7;\n default:\n return FALSE;\n }\n}", "title": "" }, { "docid": "6572da21ba517c7ab27d08243196bf2f", "score": "0.59929574", "text": "function getDay($dia_num){\n $diasMapa = array('Domingo', 'Segunda-feira', 'Terça-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sábado');\n return $diasMapa[$dia_num];\n}", "title": "" }, { "docid": "2b031599e58963a10c43de598161a80a", "score": "0.59536165", "text": "public function toStringDay() {\n return date(\"Y-m-d\", $this->sec); }", "title": "" }, { "docid": "8f7a285632260aefeb7a64353d036a5c", "score": "0.5930709", "text": "public function day()\n {\n return date('d', $this->timestamp);\n }", "title": "" }, { "docid": "8b49b600afe269c5c128c7c322d7c072", "score": "0.59221685", "text": "public function day($value) {\n return $this->setProperty('day', $value);\n }", "title": "" }, { "docid": "e9931ad06023e7d5f41a97e1a8f04b9d", "score": "0.58701986", "text": "function addDay($int){\n\t$resultDate = Date(\"d-m-Y\", strtotime($int . \" days\"));\n\treturn $resultDate;\n}", "title": "" }, { "docid": "7e65b13caccf991f70f858dc79ebad8e", "score": "0.5860808", "text": "private function addDay(string $date, int $number): string\n {\n return date('Y-m-d', strtotime($date . '+' . $number . ' day'));\n }", "title": "" }, { "docid": "fe0b7a59ffe2869a110ec366ceabcb96", "score": "0.5792178", "text": "public function toDaysPart(): int\n {\n return $this->toDays();\n }", "title": "" }, { "docid": "b81a46f8f0e308733b48173d13ad6aa5", "score": "0.57706875", "text": "function dateTimestampToLocaleDay ($stamp) {\n $time = strtotime($stamp);\n $datearray = getdate($time);\n return $datearray[\"weekday\"];\n}", "title": "" }, { "docid": "9e2a385cdf87d8b47d5446147b553a1b", "score": "0.57368535", "text": "public function toDays(): int\n {\n return intdiv($this->seconds, LocalTime::SECONDS_PER_DAY);\n }", "title": "" }, { "docid": "f72992ab75bc8f4bac672644b000e21c", "score": "0.5686089", "text": "public function day_of_week() { return (int)date(\"N\", $this->sec); }", "title": "" }, { "docid": "167808806c7950bebb15517c7a17bd5e", "score": "0.56354845", "text": "public function day($value)\n {\n return $this->setDate($this->year, $this->month, $value);\n }", "title": "" }, { "docid": "afd0936f4d93e75cf84fcf7490a0e73c", "score": "0.5628533", "text": "function dateGetDayStr($date) {\n $weekday = strtoupper(date('D', strtotime($date))); // 1-7\n return $weekday; \n}", "title": "" }, { "docid": "fbd8ccb871df877691251526a5e9bfde", "score": "0.5588112", "text": "function dameFecha2($fecha,$dia){ list($day,$mon,$year) = explode('/',$fecha);\n return date('Y-m-d',mktime(0,0,0,$mon,$day+$dia,$year)); \n}", "title": "" }, { "docid": "589ec2049f79522dd48a9b38ac1ba283", "score": "0.5573015", "text": "function dateGetDayNumber ($date) {\n $weekday = date('N', strtotime($date)); // 1-7\n return $weekday; \n}", "title": "" }, { "docid": "da204f9a8dde7143564053d00aad7408", "score": "0.5564854", "text": "public function dayOfWeek() : int\n {\n return $this->format('N');\n }", "title": "" }, { "docid": "90c30b4fe65263865b281152f639d9d3", "score": "0.5564527", "text": "public function toStringDay_1() {\n return date(\"d\", $this->sec).'-'.strtoupper(date(\"M\", $this->sec)).'-'.date(\"y\", $this->sec); }", "title": "" }, { "docid": "2e2308301fa544ec5533ce13c77333a9", "score": "0.5492637", "text": "function convert_to_normal_date($date)\n{\n $date = explode('-', $date);\n $year = $date['0'];\n $month = $date['1'];\n $day = $date['2'];\n $date = \"$month/$day/$year\";\n return $date;\n\n}", "title": "" }, { "docid": "b29f62446559f12cd9cd895aa43e1fb1", "score": "0.547294", "text": "public static function secondsToDays($seconds) { return floor($seconds / self::DAY); }", "title": "" }, { "docid": "39cd33a41cee7a13cea9a7da81adc0d3", "score": "0.54542345", "text": "public function dayOfYear() : int\n {\n return $this->format('z') + 1;\n }", "title": "" }, { "docid": "1732603ad43d861ae9aeeeb89ed388c0", "score": "0.544298", "text": "function daynumber($time) {\r\n\tglobal $startofweek;\r\n\t$daynumber = intval(date('w', $time)) - $startofweek;\r\n\tif ($daynumber < 0) $daynumber = 7 + $daynumber;\r\n\treturn $daynumber;\r\n}", "title": "" }, { "docid": "1bb22b2459254385c43aa17c065e93aa", "score": "0.54391044", "text": "public function getDayOrdinal() {\n return $this->format ( 'jS' );\n }", "title": "" }, { "docid": "2aed83c30abb8f22fae6ad64bdcd3eeb", "score": "0.54264736", "text": "function changeDate2Days($format, $dateStr) {\n\t\tif ($dateStr != 0 && $dateStr != \"00000000\") {\n\t\t\t$year = substr($dateStr,0,4);\n\t\t\t$month = substr($dateStr,5,2);\n\t\t\t$day = substr($dateStr,8,2);\n\t\t\t$days = idate(\"z\", mktime(0,0,0,$month,$day,$year)) + 1;\n\t\t\t$dayStr = substr($dateStr,2,2) . sprintf(\"%03d\", $days);\n\t\t} else {\n\t\t\t$dayStr = \"-99\";\n\t\t}\n\t\treturn formatStr($format, $dayStr);\n\t}", "title": "" }, { "docid": "08d1b89f9842b4e6d830827446c11412", "score": "0.5415699", "text": "private function getDayFromDate($date)\n {\n $dateCarbon = new Carbon($date);\n $i = $dateCarbon->dayOfWeek;\n//dd($i);\n $day = ($i == 0 ? $i = 6 : $i - 1);\n\n return $day;\n }", "title": "" }, { "docid": "0a32dcdc9724f40657a5cf482c331d42", "score": "0.5415155", "text": "function getbackday($num, $date)\n{\n\treturn date(\"Y-m-d\", strtotime(\"-\" . $num . \" day\", strtotime($date)));\n}", "title": "" }, { "docid": "7a94a916ec2d2aa469e3b04d9c822b8d", "score": "0.5411014", "text": "function getDay($pdate) {\r\n\t//return $date->format(\"d\");\r\n\treturn date(\"d\", strtotime($pdate));\r\n}", "title": "" }, { "docid": "05e7f3469c87634bcf857b8304584b71", "score": "0.53617615", "text": "function get_day() {\n\t\treturn date('w', $this->date);\t\t\n\t}", "title": "" }, { "docid": "6be330b84474955a4c6433cfd2036fda", "score": "0.5355419", "text": "public function getDayOfWeekByDate(int $_year, int $_month, int $_day): int\n {\n $t = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4];\n $_year -= (int)($_month < 3);\n return ($_year + (int)($_year / 4) - (int)($_year / 100) + (int)($_year / 400) + $t[$_month - 1] + $_day) % 7;\n }", "title": "" }, { "docid": "1887d616ac7228dbf09b4efc53d4e62d", "score": "0.53487515", "text": "function parseDatek($val) {\r\n //$q = $val.substr(0,3);\r\n $yr = substr($val, 0, 4);\r\n $mt = substr($val, 5, 2);\r\n $dy = substr($val, 8, 2);\r\n $wday = ordinalNumber($dy, intval($mt));\r\n return $wday . $yr;\r\n}", "title": "" }, { "docid": "733af5698de80e2264a0875a39d4d2de", "score": "0.5343515", "text": "public function getDay() {\n return ((($this->minutes / 60) / 24) % 365) + 1;\n }", "title": "" }, { "docid": "02f4e9145cddeba9fd411bfc0c88a11c", "score": "0.5329889", "text": "public function testDay() : int\r\n\t{\r\n\t\t$x= new KalenderGrg;\r\n\t\t$z= $x->pascha($this->year);\r\n\r\n\t\treturn $z->getDay();\r\n\t\t//return 12;\r\n\t}", "title": "" }, { "docid": "660105c83fadc2512ec652b779e827e3", "score": "0.53122926", "text": "function ConvertDate($date)\n {\n \n $temp_date = explode('/', $date);\n\n $day = $temp_date[0];\n $month = $temp_date[1];\n $year = $temp_date[2];\n\n\n if (strlen($day) == 1) {\n \n $day = \"0\".$day;\n }\n\n if (strlen($month) == 1) {\n \n $month = \"0\".$month;\n }\n\n $year = \"20\".$year;\n\n return $date = $year.\"-\".$month.\"-\".$day;\n\n\n }", "title": "" }, { "docid": "660105c83fadc2512ec652b779e827e3", "score": "0.53122926", "text": "function ConvertDate($date)\n {\n \n $temp_date = explode('/', $date);\n\n $day = $temp_date[0];\n $month = $temp_date[1];\n $year = $temp_date[2];\n\n\n if (strlen($day) == 1) {\n \n $day = \"0\".$day;\n }\n\n if (strlen($month) == 1) {\n \n $month = \"0\".$month;\n }\n\n $year = \"20\".$year;\n\n return $date = $year.\"-\".$month.\"-\".$day;\n\n\n }", "title": "" }, { "docid": "660105c83fadc2512ec652b779e827e3", "score": "0.53122926", "text": "function ConvertDate($date)\n {\n \n $temp_date = explode('/', $date);\n\n $day = $temp_date[0];\n $month = $temp_date[1];\n $year = $temp_date[2];\n\n\n if (strlen($day) == 1) {\n \n $day = \"0\".$day;\n }\n\n if (strlen($month) == 1) {\n \n $month = \"0\".$month;\n }\n\n $year = \"20\".$year;\n\n return $date = $year.\"-\".$month.\"-\".$day;\n\n\n }", "title": "" }, { "docid": "660105c83fadc2512ec652b779e827e3", "score": "0.53122926", "text": "function ConvertDate($date)\n {\n \n $temp_date = explode('/', $date);\n\n $day = $temp_date[0];\n $month = $temp_date[1];\n $year = $temp_date[2];\n\n\n if (strlen($day) == 1) {\n \n $day = \"0\".$day;\n }\n\n if (strlen($month) == 1) {\n \n $month = \"0\".$month;\n }\n\n $year = \"20\".$year;\n\n return $date = $year.\"-\".$month.\"-\".$day;\n\n\n }", "title": "" }, { "docid": "e619eaaeb6907821b5758a65305bb2d7", "score": "0.5268729", "text": "function setDay($num, &$table) {\n \tswitch ($num) {\n\t case 1:\n\t $table = \"monday\";\n\t break;\n\t case 2:\n\t \t$table = \"tuesday\";\n\t break;\n\t case 3:\n\t \t$table = \"wednesday\";\n\t break;\n\t case 4:\n\t \t$table = \"thursday\";\n\t break;\n\t case 5:\n\t \t$table = \"friday\";\n\t break;\n\t case 6:\n\t \t$table = \"saturday\";\n\t break;\n\t case 7:\n\t \t$table = \"sunday\";\n\t break;\n\t }\n }", "title": "" }, { "docid": "05e2c9f9633ce37a0456d1625cbc52f0", "score": "0.52489245", "text": "public static function dayOfYear($day)\n\t{\n\t\treturn Yii::app()->dateFormatter->format(\"EEE MMM d, yyy\", $day);\n\t}", "title": "" }, { "docid": "3ae4adbed321db50430e6211e4aea643", "score": "0.5248273", "text": "public static function getDate(string $date, int $day): string\n {\n $date_arr = explode('/', $date);\n $month = strlen($date_arr[0]) >= 2 ? $date_arr[0] : '0' . $date_arr[0];\n $year = $date_arr[2];\n\n $day = strlen($day) >= 2 ? $day : '0' . $day;\n\n return $month . '/' . $day . '/' . $year;\n }", "title": "" }, { "docid": "62d4339b1f2fd5d9831e465e8db3cb67", "score": "0.5247057", "text": "public static function number($day): int\n {\n if (!is_string($day) && !is_int($day)) {\n throw new Exception('Passed day must be int/string type. Type ' . gettype($day) . ' is invalid.');\n }\n\n $day = is_string($day) ? strtolower($day) : $day;\n $number = self::VARIANTS[$day] ?? null;\n if ($number === null) {\n throw new Exception(\"$day is not valid day representation. Use 1-7, Monday-Saturday, Mon-Sun or Mo-Su.\");\n }\n return self::VARIANTS[$day];\n }", "title": "" }, { "docid": "f96100d4b0f25a72bdb4c927326bbc79", "score": "0.523998", "text": "function day($month,$day,$year) {\n $y = $year - floor((14 - $month) / 12);\n $y=(int)$y;\n $x = $y + floor($y/4) - floor($y/100) + floor($y/400);\n $x=(int)$x;\n $m = $month + (12 * floor((14 - $month) / 12)) - 2;\n $m=(int)$m;\n $d = ($day + $x + floor((31*$m)/12)) % 7;\n $d=(int)$d;\n return $d;\n}", "title": "" }, { "docid": "062d4ad443a6e02517e4f5a65cbba186", "score": "0.5212126", "text": "public function getDay($day)\n {\n\n switch ($day) {\n case 0:\n $res = $this->lang->get('message.days.00');\n break;\n case 1:\n $res = $this->lang->get('message.days.01');\n break;\n case 2:\n $res = $this->lang->get('message.days.02');\n break;\n case 3:\n $res = $this->lang->get('message.days.03');\n break;\n case 4:\n $res = $this->lang->get('message.days.04');\n break;\n case 5:\n $res = $this->lang->get('message.days.05');\n break;\n case 6:\n $res = $this->lang->get('message.days.06');\n break;\n default:\n $res = \"\";\n }\n\n return $res;\n }", "title": "" }, { "docid": "c7b94fa8c9485e157af47938ed86472a", "score": "0.52091676", "text": "function day()\n {\n return $this->_dp['mday'];\n }", "title": "" }, { "docid": "d847576b3ba4b6dd020638b6974226ff", "score": "0.5202687", "text": "public function convertToDays($date)\n {\n $unixTimestamp = strtotime($date);\n\n //Get the day of the week using PHP's date function.\n $dayOfWeek = date(\"l\", $unixTimestamp);\n\n return $dayOfWeek;\n }", "title": "" }, { "docid": "a12beab0af71b9aa70a28a2fc386dc09", "score": "0.51989496", "text": "function makeDate($value){\n $temp = substr($value, 0, 2).'/'.substr($value,2,2).'/'.substr($value,4,4);\n return $temp;\n }", "title": "" }, { "docid": "11094540f765b2943fe5986d06e58a59", "score": "0.51984954", "text": "function fechaBase($fecha){ \n\tlist($mes,$dia,$anio)=explode(\"/\",$fecha); \n\n\t$dia=(string)(int)$dia;\n\treturn $anio.\"-\".$mes.\"-\".$dia;\n}", "title": "" }, { "docid": "c6e5bbe632cddd0281654ee590610d04", "score": "0.51968133", "text": "function date2() {\n $date = getDate();\n foreach($date as $item=>$value) {\n if ($value < 10)\n $date[$item] = \"0\".$value;\n }\n return $date['year'].\"-\".$date['mon'].\"-\".$date['mday'].\" 00:00\";\n}", "title": "" }, { "docid": "704ac7999e5b9e375c854e5e6a75f86f", "score": "0.51921785", "text": "function replace_date($date)\n{\n $txt = explode(\"/\",$date);\t\n return $txt[2].''. sprintf(\"%02d\",$txt[0]).''.sprintf(\"%02d\",$txt[1]);\t\t\n}", "title": "" }, { "docid": "23506d8c511dcf3588bc8fea5f32b494", "score": "0.51858044", "text": "function DBThaiDate($d){\nglobal $monthname;\n\tif (!$d) return \"\";\n\tif ($d == \"0000-00-00\") return \"\";\n\t\n\t$d1=explode(\"-\",$d);\n\treturn $d1[2] . \"/\" . $d1[1] . \"/\" . (intval($d1[0]) + 543);\n}", "title": "" }, { "docid": "59e7d86b7d3bd36a31e8aeebfc7cf6c7", "score": "0.51638544", "text": "function plusDay($date,$int_day)\n\t{\n\t\t$day = substr($date,8,2);\n\t\t$month = substr($date,5,2);\n\t\t$year = substr($date,0,4);\n\t\t\n\t\tfor($i=0;$i<$int_day;$i++)\n\t\t{\n\t\t\tif($month==2)\n\t\t\t{\n\t\t\t\tif($year%4==0)\n\t\t\t\t{\n\t\t\t\t\tif($day==29)\n\t\t\t\t\t{\n\t\t\t\t\t\t$day=1;\n\t\t\t\t\t\t$month=3;\n\t\t\t\t\t}\n\t\t\t\t\telse $day+=1;\n\t\t\t\t}\n\t\t\t\telse if($year%4!=0)\n\t\t\t\t{\n\t\t\t\t\tif($day==28)\n\t\t\t\t\t{\n\t\t\t\t\t\t$day=1;\n\t\t\t\t\t\t$month=3;\n\t\t\t\t\t}\n\t\t\t\t\telse $day+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(($month==1)||($month==3)||($month==5)||($month==7)||($month==8)||($month==10)||($month==12))\n\t\t\t{\n\t\t\t\tif($day==31)\n\t\t\t\t{\n\t\t\t\t\t$day=1;\n\t\t\t\t\tif($month==12)\n\t\t\t\t\t{\n\t\t\t\t\t\t$month=1;\n\t\t\t\t\t\t$year+=1;\n\t\t\t\t\t}\n\t\t\t\t\telse $month+=1;\n\t\t\t\t}\n\t\t\t\telse $day+=1;\n\t\t\t}\n\t\t\telse if(($month==4)||($month==6)||($month==9)||($month==11))\n\t\t\t{\n\t\t\t\tif($day==30)\n\t\t\t\t{\n\t\t\t\t\t$day=1;\n\t\t\t\t\t$month+=1;\n\t\t\t\t}\n\t\t\t\telse $day+=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(strlen($day)==1) $day = \"0\".$day;\n\t\tif(strlen($month)==1) $month = \"0\".$month;\n\t\t$a = $year.\"-\".$month.\"-\".$day;\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "ff192ae93dc6c3c3e495e321e3a0169b", "score": "0.5151575", "text": "function it2date($date){\n\t\t\t$y = substr($date, 6, 4);\n\t\t\t$m = substr($date, 3, 2);\n\t\t\t$d = substr($date, 0, 2);\n\t\t\treturn $y . '-' . $m . '-' . $d; \n\t\t}", "title": "" }, { "docid": "1f13a2be47e7283fc9c47778a99f1897", "score": "0.514706", "text": "static function dayNumberToLocalDayName($day, $type = 'full', $lang = 'de') {\n $map = array(\n 'de' => array(\n 'short' => array(\n 1 => 'Mo',\n 2 => 'Di',\n 3 => 'Mi',\n 4 => 'Do',\n 5 => 'Fr',\n 6 => 'Sa',\n 7 => 'So'\n ),\n 'middle' => array(\n 1 => 'Mon',\n 2 => 'Die',\n 3 => 'Mit',\n 4 => 'Don',\n 5 => 'Fre',\n 6 => 'Sam',\n 7 => 'Son'\n ),\n 'full' => array(\n 1 => 'Montag',\n 2 => 'Dienstag',\n 3 => 'Mittwoch',\n 4 => 'Donnerstag',\n 5 => 'Freitag',\n 6 => 'Samstag',\n 7 => 'Sonntag'\n )\n )\n );\n return $map[$lang][$type][$day];\n }", "title": "" }, { "docid": "c96ecce43be34331eb082ba35246a380", "score": "0.51441276", "text": "public function addDay($value = 1)\n {\n $value = (int)$value;\n\n return $this->modify(\"$value day\");\n }", "title": "" }, { "docid": "27f39fb412972ca610aa15d77d21329c", "score": "0.5140181", "text": "function castDate($date){\n\t\t$date = explode(\"-\", $date);\n\t\t$ann = $date[0]; // año\n\t\t$mes = $date[1]; // mes\n\t\t$dia = $date[2]; // dia\n\t\t\n\t\tswitch ($mes) {\n\t\t\tcase '01':$mes=\"Enero\";break;\n\t\t\tcase '02':$mes=\"Febrero\";break;\n\t\t\tcase '03':$mes=\"Marzo\";break;\n\t\t\tcase '04':$mes=\"Abril\";break;\n\t\t\tcase '05':$mes=\"Mayo\";break;\n\t\t\tcase '06':$mes=\"Junio\";break;\n\t\t\tcase '07':$mes=\"Julio\";break;\n\t\t\tcase '08':$mes=\"Agosto\";break;\n\t\t\tcase '09':$mes=\"Septiembre\";break;\n\t\t\tcase '10':$mes=\"Octubre\";break;\n\t\t\tcase '11':$mes=\"Noviembre\";break;\n\t\t\tcase '12':$mes=\"Diciembre\";break;\n\t\t}\n\t\treturn $dia.\" \".$mes.\", \".$ann;\n\t}", "title": "" }, { "docid": "7f340a7ea44cc6b71733c404c637a9bb", "score": "0.5139348", "text": "public function subDay($value = 1)\n {\n $value = (int)$value;\n\n return $this->modify(\"-$value day\");\n }", "title": "" }, { "docid": "cf57e032566cb799fc6e17765e8210e0", "score": "0.51381135", "text": "function convertDate($data): string\n{\n $d = explode('-', $data);\n return $d[2].\"/\".$d[1].\"/\".$d[0];\n}", "title": "" }, { "docid": "3cca4c2f99b53672c2b4b753aa77482a", "score": "0.51113683", "text": "public static function day(): DateInterval\n {\n return static::days(1);\n }", "title": "" }, { "docid": "aa3c979ca4dfc449adb225c73deb72b1", "score": "0.50993615", "text": "function ordinal($number)\n{\n if (!in_array($number % 100, [11, 12, 13])) {\n switch ($number % 10) {\n case 1:\n return $number . 'st';\n case 2:\n return $number . 'nd';\n case 3:\n return $number . 'rd';\n }\n }\n\n return $number . 'th';\n}", "title": "" }, { "docid": "39ff64fe39dcd3496fb28d7580d3cfd1", "score": "0.5089539", "text": "static function StrToTime(string $day): int {\n $t = strtotime(trim($day));\n return $t>0?$t:0;\n }", "title": "" }, { "docid": "3f88fd63ea462f0b5004d73e4278a269", "score": "0.5082051", "text": "function period_format($num) {\n\treturn sprintf(\"%03d\", $num);\n}", "title": "" }, { "docid": "5f8960cc54a3d94b238b9bce19862499", "score": "0.5080151", "text": "public function To($year, $month=1, $day = 1);", "title": "" }, { "docid": "5158c76729632ee228ba795e0ccb89c5", "score": "0.5076007", "text": "private function getFrenchDay(int $dayNumber)\n {\n switch ($dayNumber) {\n case 1 :\n $frenchDay = 'Lundi';\n break;\n case 2 :\n $frenchDay = 'Mardi';\n break;\n case 3 :\n $frenchDay = 'Mercredi';\n break;\n case 4 :\n $frenchDay = 'Jeudi';\n break;\n case 5 :\n $frenchDay = 'Vendredi';\n break;\n case 6 :\n $frenchDay = 'Samedi';\n break;\n case 7 :\n $frenchDay = 'Dimanche';\n break;\n default:\n $frenchDay = '';\n break;\n }\n\n return $frenchDay;\n }", "title": "" }, { "docid": "37dd6941a01c9cd3024161c055150b44", "score": "0.50688165", "text": "function dapatkanDate($day) {\n //is just string\n $theDate=date('Y-m-d H:i:s', strtotime($day.' day'));\n return $theDate;\n}", "title": "" }, { "docid": "e808c6d28607982c22c01f7ebf93835e", "score": "0.5063882", "text": "function ordinal($number) {\n $ends = array('th','st','nd','rd','th','th','th','th','th','th');\n if ((($number % 100) >= 11) && (($number%100) <= 13))\n return $number. 'th';\n else\n return $number. $ends[$number % 10];\n }", "title": "" }, { "docid": "051ca1e5e79df908d93e9e4a932dbc7b", "score": "0.5060422", "text": "function datasomadias($data,$dias=0,$operador='+'){\n\t$novadata = $data;\n\t$ano = (int) substr($data,0,4);\n\t$mes = (int) substr($data,4,2);\n\t$dia = (int) substr($data,6,2);\n\t$tdia = \"days\";\n\tif ($dias == 1){\n\t\t$tdia = \"day\";\n\t}\n\t$novadata = date('Ymd', strtotime($operador.$dias.' '.$tdia, strtotime($dia.'-'.$mes.'-'.$ano)));\n\treturn $novadata;\n}", "title": "" }, { "docid": "0deea1989ec4d6a05a86259810a9141b", "score": "0.50589216", "text": "function as_date($value) { return \"'\".strftime('%Y-%m-%d', $value).\"'\"; }", "title": "" }, { "docid": "d8b933ee9d4e68f6b9a08db23c08926c", "score": "0.50485015", "text": "public static function day(array $arg_options = array()) {\n $default_options = array(\n 'args' => array(),\n 'key' => 'day',\n 'label' => 'Select a day',\n 'choices' => array(\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n ),\n );\n $options = array_merge($default_options, $arg_options);\n if (isset($options['args'][$options['key']])) {\n $day = date('l', strtotime($options['args'][$options['key']]));\n $day_number = array_search($day, $options['choices']);\n } else {\n $day_number = self::menu(\n array(\n 'choices' => $options['choices'],\n 'default' => 'Sunday',\n 'message' => $options['label'],\n )\n );\n }\n return $day_number;\n }", "title": "" }, { "docid": "e3e1cfc0b4f7be2ffd7cc706e4a83499", "score": "0.504587", "text": "protected function convertInteger($value)\n {\n return DateTime::createFromFormat('U', (string) $value);\n }", "title": "" }, { "docid": "dc5434a548cbd7b2b35a1c02788cc189", "score": "0.5030551", "text": "public function getDay()\n {\n return $this->day;\n }", "title": "" }, { "docid": "51c832cde98eb07080e85c01d01f2884", "score": "0.50271755", "text": "function eight_digit_date_to_my_format($digitdate)\r\n{\r\n\tif(strlen($digitdate) == 8)\r\n\t{\r\n\t\t//$originaldate = $digitdate; //make a copy just in case\r\n\t\t$newday = substr($digitdate, 2, 2);\r\n\t\t$newmonth = substr($digitdate, 0, 2);\r\n\t\t$newyear = substr($digitdate, 4, 4);\r\n\t\t$newformatteddate = $newmonth .\"-\". $newday .\"-\". $newyear; \r\n\t\t\r\n\t\treturn $newformatteddate;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "90b184a41e4bdd20d427e8ac7ea8d518", "score": "0.5019451", "text": "public function jewishDay($value)\n {\n return $this->__set('jewishDay', $value);\n }", "title": "" }, { "docid": "bf1256f1125aaad85f716ffa9326723a", "score": "0.501319", "text": "public function toDays()\n {\n return $this->toHours() / self::HOURS_PER_DAY;\n }", "title": "" }, { "docid": "aeca5d58163ae5965f214703393ded62", "score": "0.5003415", "text": "public function getDayOfWeek()\n {\n return 0 + parent::format('w');\n }", "title": "" }, { "docid": "810889abd6282503fa0c688224d1760a", "score": "0.5001933", "text": "public static function new_days($my_date = 'today', $numdays = '0') {\r\n $date_t = strtotime($my_date . ' UTC');\r\n return gmdate('Y-m-d', $date_t + ($numdays * 86400));\r\n }", "title": "" }, { "docid": "52cd128923b06747b2d58d2077657e4d", "score": "0.49924725", "text": "function calcular_edad($fecha){\n$dias = explode(\"/\",$fecha,3);\n$dias = mktime(0,0,0,$dia[1],$dias[0],$dias[2]);\n$edad = (int)((time()-$dias)/31556926);\nreturn $edad;\n}", "title": "" }, { "docid": "1e30de126a8b758a316cc0ff9ce5f6d0", "score": "0.49913573", "text": "private function getFathersDay($year) {\n\t\t$first_day = mktime(0, 0, 0, 6, 1, $year);\n\t\n\t\t// Determine what day of the week the first falls on\n\t\t$day_of_week = date('D', $first_day);\n\t\n\t\t// Add the appropriate number of days to get to the second Sunday\n\t\tswitch ($day_of_week) {\n\t\t\tcase \"Sun\": \n\t\t\t\t$add = 14;\n\t\t\tbreak;\n\t\t\tcase \"Mon\":\n\t\t\t\t$add = 20;\n\t\t\tbreak; \n\t\t\tcase \"Tue\":\n\t\t\t\t$add = 19;\n\t\t\tbreak; \n\t\t\tcase \"Wed\":\n\t\t\t\t$add = 18;\n\t\t\tbreak; \n\t\t\tcase \"Thu\":\n\t\t\t\t$add = 17;\n\t\t\tbreak; \n\t\t\tcase \"Fri\":\n\t\t\t\t$add = 16;\n\t\t\tbreak; \n\t\t\tcase \"Sat\":\n\t\t\t\t$add = 15;\n\t\t\tbreak;\n\t\t}\n\t\t$day = 1 + $add;\n\t\treturn strtotime(\"6/\" . $day . \"/\" . $year);\n\t}", "title": "" }, { "docid": "5ff56e945435b0f9281f33a6d091270b", "score": "0.49902973", "text": "public static function toDays($secs)\n {\n return (int)round($secs / self::DAY_TO_SECONDS);\n }", "title": "" }, { "docid": "52bff7686d94d751e71c3e592c106534", "score": "0.49783292", "text": "function ConvFecha($fecha)\r\n{\r\n\t$fec=explode(\"/\", $fecha);\r\n\t$fechafinal=$fec[2].\"-\".$fec[1].\"-\".$fec[0];\r\n\treturn $fechafinal;\r\n}", "title": "" }, { "docid": "8bcad453242cea6621d4fa799e5e87cb", "score": "0.49764833", "text": "function interpret_date( $value , $format='d-m-Y' ){\n if( is_string( $value ) ){\n \t\n \t$value\t=\tstr_replace(\"/\", \"-\", $value);\n //use generic method for turning strings to numerical dates\n $unixtime = strtotime( $value );\n }\n else{\n //assume we have a unix time already\n $unixtime = $value;\n }\n return date( $format, $unixtime );\n }", "title": "" }, { "docid": "08760a07bcbae4e0bb3d49ec4dedf8b3", "score": "0.4970964", "text": "public static function ReadableDateWithDay($date)\n\t{\t\n\t\t$year = substr($date,0,4);\n\t\t$month = substr($date,5,2);\n\t\t$day = substr($date,8,2);\n\n\t\t$returnDate = $day . ' ' . substr(self::GetMonthName($month), 0, 3) . ' ' . $year;\n\n\t\tif ( mktime(0,0,0,$month,$day,$year) == mktime(0,0,0,date('m'),date('d'), date('Y')) ) {\n\t\t\t$returnDate = 'idag';\n\t\t}\n\t\telse if ( mktime(0,0,0,$month,$day,$year) == mktime(0,0,0,date('m'),date('d')-1, date('Y')) ) {\n\t\t\t$returnDate = 'igår';\n\t\t}\n\t\telse if ( mktime(0,0,0,$month,$day,$year) == mktime(0,0,0,date('m'),date('d')+1, date('Y')) ) {\n\t\t\t$returnDate = 'imorgon';\n\t\t}\t\t\n\t\telse if ( mktime(0,0,0,$month,$day,$year) > mktime(0,0,0,date('m'),date('d')-7, date('Y')) && mktime(0,0,0,$month,$day,$year) < mktime(0,0,0,date('m'),date('d')+7, date('Y')) ) {\n\t\t\t$returnDate = self::GetSwedishWeekday($date);\t\t\t\n\t\t} else {\n\t\t\t$returnDate = self::GetSwedishWeekday($date) . ' ' . $returnDate;\n\t\t}\n\t\treturn $returnDate;\t\t\n\t}", "title": "" }, { "docid": "01bedafa1189e2065f2c1252b966a79d", "score": "0.49693626", "text": "function getBulgarianWeekDay($month, $day) {\n if ($month == 6 && $day == 31) {\n return 0;\n }\n if ($month == 12 && $day == 31) {\n return 0;\n }\n switch ($month) {\n case 1: case 4: case 7: case 10: return ( ($day - 1) % 7 ) + 1;\n case 2: case 5: case 8: case 11: return ( ($day - 4) % 7 ) + 1;\n case 3: case 6: case 9: case 12: return ( ($day - 6) % 7 ) + 1;\n default: return 0;\n }\n}", "title": "" }, { "docid": "b96a6dae7babc743a4228c037135871a", "score": "0.49646765", "text": "function getWDay($strDate)\n{\n $strResult = \"\";\n if ($strDate != \"\") {\n list($year, $month, $day) = explode(\"-\", $strDate);\n $tsDate = mktime(0, 0, 0, (int)$month, $day, $year);\n $dtDate = getdate($tsDate);\n $strResult = $dtDate['wday'];\n }\n return $strResult;\n}", "title": "" }, { "docid": "52da4010da6f26b7010214bcab2586bf", "score": "0.4945087", "text": "public static function getDay($options = array('date' => 'current', 'numeric' => true))\n {\n if(!isset($options['date']))\n {\n $options['date'] = 'current';\n }\n if(!isset($options['numeric']))\n {\n $options['numeric'] = true;\n }\n if($options['date'] == 'current')\n {\n if($options['numeric'] == true)\n {\n return date(\"d\");\n }else{\n\n return date('l',time());\n }\n }else\n {\n if($options['numeric'] == true)\n {\n return date(\"d\", $options['date']);\n }else{\n return date('l',$options['date']);\n }\n }\n\n }", "title": "" }, { "docid": "0ceef5a29283174a2d01a41849ec024d", "score": "0.49404022", "text": "public static function getMonday()\n {\n $day = date('w');\n $day -= 1;\n $start = date('Y-m-d', strtotime('-'.$day.' days'));\n\n return $start;\n }", "title": "" }, { "docid": "e7e8048bee4a9884a86882d749c32d81", "score": "0.49388793", "text": "function minusDay($date,$int_day)\n\t{\n\t\t$day = substr($date,8,2);\n\t\t$month = substr($date,5,2);\n\t\t$year = substr($date,0,4);\n\t\t\n\t\tfor($i=0;$i<$int_day;$i++)\n\t\t{\n\t\t\tif($day==1)\n\t\t\t{\n\t\t\t\tif($month==3)\n\t\t\t\t{\n\t\t\t\t\tif($year%4==0) $day=29;\n\t\t\t\t\telse if($year%4!=0) $day=28;\n\t\t\t\t\t$month-=1;\n\t\t\t\t}\n\t\t\t\telse if(($month==1)||($month==2)||($month==4)||($month==6)||($month==8)||($month==9)||($month==11))\n\t\t\t\t{\n\t\t\t\t\t$day=31;\n\t\t\t\t\tif($month==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$month=12;\n\t\t\t\t\t\t$year-=1;\n\t\t\t\t\t}\n\t\t\t\t\telse $month-=1;\n\t\t\t\t}\n\t\t\t\telse if(($month==5)||($month==7)||($month==10)||($month==12))\n\t\t\t\t{\n\t\t\t\t\tif($day==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$day=30;\n\t\t\t\t\t\t$month-=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse $day-=1;\n\t\t}\n\t\t\n\t\tif(strlen($day)==1) $day = \"0\".$day;\n\t\tif(strlen($month)==1) $month = \"0\".$month;\n\t\t$a = $year.\"-\".$month.\"-\".$day;\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "b02f356c60f5c5cb1a738092dbe9b830", "score": "0.4933164", "text": "function convertDate($date) {\n $month = substr($date, 0, 2);\n if (strlen($date) == 9) {\n $day = \"0\" . substr($date, 3, 1);\n $year = substr($date, 5, 4);\n $date = $year . \"-\" . $month . \"-\" . $day;\n } else {\n $day = substr($date, 3, 2);\n $year = substr($date, 6, 4);\n $date = $year . \"-\" . $month . \"-\" . $day;\n }\n return $date;\n}", "title": "" }, { "docid": "e08648406dfa8e3b3056f00169ba8b8a", "score": "0.49301606", "text": "static function naturalDay($timestamp = null, $format = null) {\n\t\tdate_default_timezone_set('Europe/London');\n\t\tif(is_null($timestamp)) {\n\t\t\t$timestamp = time();\n\t\t}\n\t\tif(is_null($format)) {\n\t\t\t$format = self::DAYFORMAT;\n\t\t}\n\t\t$oneday = 60*60*24;\n\t\t$today = strtotime('today');\n\t\t$tomorrow = $today + $oneday;\n\t\t$yesterday = $today - $oneday;\n\t\t// if time is 12:00 yesterday or more and less than 12:00 the day after tomorrow\n\t\tif($timestamp >= $yesterday && $timestamp <= $tomorrow + $oneday) {\n\t\t\t// if time is greater than today\n\t\t\tif($timestamp > $today) {\n\t\t\t\t// if time is less than 12:00 tomorrow\n\t\t\t\tif($timestamp < $tomorrow) {\n\t\t\t\t\treturn 'Today';\n\t\t\t\t}\n\t\t\t\treturn 'Tomorrow';\n\t\t\t}\n\t\t\treturn 'Yesterday';\n\t\t}\n\n\t\treturn date($format, $timestamp);\n\t}", "title": "" }, { "docid": "55f83ea655412e4a0c42ec488476a7d0", "score": "0.49293408", "text": "public function getNthDay( $date )\n {\n return ceil($date->format('j') / 7);\n }", "title": "" }, { "docid": "8a40b7b8a4fdbd861c4f49439f7b667f", "score": "0.49187452", "text": "function day_of_Week($data) {\t\n\t\t$year = substr($data, 0, 4);\t\n\t\t$month = substr($data, 5, -3);\t\n\t\t$day = substr($data, 8, 9);\t\n\t\t$dayweek = date(\"w\", mktime(0,0,0,$month,$day,$year) );\t\n\t\t\n\t\tswitch($dayweek) {\t\t\n\t\t\tcase\"0\": \n\t\t\t\t$dayweek = \"Sunday\";\t \n\t\t\t\tbreak;\t\t\n\t\t\tcase\"1\": \n\t\t\t\t$dayweek = \"Monday\"; \n\t\t\t\tbreak;\t\t\n\t\t\tcase\"2\": \n\t\t\t\t$dayweek = \"Tuesday\"; \n\t\t\t\tbreak;\t\t\n\t\t\tcase\"3\": \n\t\t\t\t$dayweek = \"Wednesday\"; \n\t\t\t\tbreak;\t\t\n\t\t\tcase\"4\": \n\t\t\t\t$dayweek = \"Thursday\"; \n\t\t\t\tbreak;\t\t\n\t\t\tcase\"5\": \n\t\t\t\t$dayweek = \"Friday\"; \n\t\t\t\tbreak;\t\t\n\t\t\tcase\"6\": \n\t\t\t\t$dayweek = \"Saturday\";\t\t\n\t\t\t\tbreak;\t\n\t\t}\t\n\t\t\n\t\techo \"$dayweek\";\n\t}", "title": "" }, { "docid": "e92b044fc94105b377885e5e61d0e6ba", "score": "0.49179158", "text": "public function getDayOfWeek();", "title": "" }, { "docid": "5b9e68eca93a736b06ea8bef8ed44e30", "score": "0.491575", "text": "public function to_date($val)\n\t{\n\t return date('Y-m-d', $val);\n\t}", "title": "" }, { "docid": "fc3ba5bbff25225de132b2c8134e99bb", "score": "0.49148458", "text": "public static function getDayFromDateTime($dateTime) {\n\t\treturn $dateTime->format(\"j\");\n\t}", "title": "" }, { "docid": "836db224cf64466090f058cc5c88d6d0", "score": "0.4913233", "text": "private function getDayID($kode=0){\r\r\n\t\t$month=\"\";\r\r\n\t\tswitch($kode){\r\r\n\t\t\tcase \"Mon\" : $month = \"Senin\"; break;\r\r\n\t\t\tcase \"Tue\" : $month = \"Selasa\"; break;\r\r\n\t\t\tcase \"Wed\" : $month = \"Rabu\"; break;\r\r\n\t\t\tcase \"Thu\" : $month = \"Kamis\"; break;\r\r\n\t\t\tcase \"Fri\" : $month = \"Jum'at\"; break;\r\r\n\t\t\tcase \"Sat\" : $month = \"Sabtu\"; break;\r\r\n\t\t\tcase \"Sun\" : $month = \"Minggu\"; break;\r\r\n\t\t}\r\r\n\t\treturn $month;\r\r\n\t}", "title": "" }, { "docid": "9335c8e036c6203095b6471dd6f2c0c5", "score": "0.49094737", "text": "public function getWeekDay(){\n \t$actuallyDay = date(\"N\");\n \treturn $actuallyDay;\n\t}", "title": "" } ]
6bf013878e936962f288d3fd5b68a893
/ Test delete all transactions:test: keys
[ { "docid": "4cf0622d01b3a0ea8bad448335527ab8", "score": "0.8780205", "text": "public function testDeleteTransactions(){\n\n // Fetch all transactions:test:* keys from redis\n $transaction = Redis::command('keys', ['transaction:test:*']);\n\n foreach( $transaction as $value ){\n\n $value = str_replace('transaction:test:', '', $value);\n\n /*\n * Send request to API to delete the key\n */\n $this->delete('/transactionservice/transaction/test:' . $value )\n ->assertStatus(200)\n ->assertJsonCount(1)\n ->assertJson([\n 'status' => 'ok'\n ]);\n\n }\n\n }", "title": "" } ]
[ { "docid": "660f4f777073480ea5917b4b9402fa73", "score": "0.7255227", "text": "public function testDeleteAllAccounts()\r\n {\r\n }", "title": "" }, { "docid": "d99d8b03ba93b1dcaf7270a076e4a4a2", "score": "0.7016919", "text": "public function testKycChecksDelete()\n {\n }", "title": "" }, { "docid": "ca53491a5bf94f4ba461569c9f98594d", "score": "0.6943269", "text": "public function testDeleteAll()\n {\n $this->markTestIncomplete('このテストは、まだ実装されていません。');\n }", "title": "" }, { "docid": "389472a4ef02194de7a93922e79099bd", "score": "0.6740684", "text": "public function testDeleteKeokProcessed()\n {\n }", "title": "" }, { "docid": "b019c28638ac147e003190be0b24f642", "score": "0.6693816", "text": "public function testMerchantDelete()\n {\n\n }", "title": "" }, { "docid": "649220d42bfb998b9b1a70e0a099d43d", "score": "0.66440433", "text": "public function testDeleteOrderItemUsingDELETE()\n {\n }", "title": "" }, { "docid": "d82c4fc92ff78226af660abd98a81e4a", "score": "0.6631396", "text": "function test_deleteAll()\n {\n // Arrange\n $cuisine_type1 = \"American\";\n $cuisine_type2 = \"Greek\";\n $test_cuisine1 = new Cuisine($cuisine_type1);\n $test_cuisine1->save();\n $test_cuisine2= new Cuisine($cuisine_type2);\n $test_cuisine2->save();\n\n //Act\n Cuisine::deleteAll();\n $result = Cuisine::getAll();\n\n //Assert\n $this->assertEquals([], $result);\n }", "title": "" }, { "docid": "5cdbae6aef6408885f6c172795f876d6", "score": "0.662259", "text": "public function testDelete16()\n {\n }", "title": "" }, { "docid": "09493a3a96be7c3183883db49421d8c7", "score": "0.65766245", "text": "public function testDeleteAll()\n {\n $models = array();\n for ($i = 0; $i < 10; $i++) {\n $models[] = array(\n 'hash_before' => md5(uniqid()),\n 'hash_after' => md5(uniqid()),\n );\n }\n\n $this->createModels('tiny_compressimages/image', $models);\n\n $this->assertEquals(10, $this->_instance->getCollection()->getSize());\n\n $this->_instance->deleteAll();\n\n $this->assertEquals(0, $this->_instance->getCollection()->getSize());\n }", "title": "" }, { "docid": "529a41a5d30bb7a33e9b58d721333ac9", "score": "0.6526553", "text": "public function testDeleteDeviceUsers()\n {\n }", "title": "" }, { "docid": "f4a5ba5bb20af1b3e1b294e456677275", "score": "0.6516992", "text": "public function testSendingsSendingIdDelete()\n {\n }", "title": "" }, { "docid": "013e043b7e79137fba691d6e33fd601d", "score": "0.6505463", "text": "public function testDeleteVoucher()\n {\n }", "title": "" }, { "docid": "5073816e161e0de75a6d4ed04c247f22", "score": "0.6496973", "text": "public function testSalesOrdersStatusesIdDelete()\n {\n\n }", "title": "" }, { "docid": "448ae0d197dd7cc0d37d623588aea3c7", "score": "0.64856493", "text": "public function testDeleteAccount()\r\n {\r\n }", "title": "" }, { "docid": "81eb56a212c96c2d8f70ac9d2b0c03df", "score": "0.64823407", "text": "public function tearDown(){\n\n $where = new Where();\n $where->lessThan(\"id\",\"110000\")\n ->greaterThan(\"id\",\"100000\");\n $table = new AdminTable($this->_dbAdapter);\n $table->delete($where);\n $table = new UserTable($this->_dbAdapter);\n $table->delete($where);\n $table = new SellerTable($this->_dbAdapter);\n $table->delete($where);\n $table = new WorkerTable($this->_dbAdapter);\n $table->delete($where);\n\n }", "title": "" }, { "docid": "f3f8a570ec020af084a460fed15f1b29", "score": "0.64766955", "text": "public function test_deleteWarehouseTag() {\n\n }", "title": "" }, { "docid": "98396e52f1f50ff1c6eacad21a00f90d", "score": "0.64646214", "text": "public function testDeleteStringKey(): void\r\n {\r\n $this->Db->setKey(array(RW_App_Model_Db::KEY_STRING => 'id'));\r\n $this->dropTables()->createTables(array('album_string'));\r\n\r\n // Abaixo é igual ao testDelete trocando 1, 2 por A, B\r\n $row1 = array(\r\n 'id' => 'A',\r\n 'artist' => 'Rush',\r\n 'title' => 'Presto',\r\n 'deleted' => 0\r\n );\r\n $row2 = array(\r\n 'id' => 'B',\r\n 'artist' => 'Rush',\r\n 'title' => 'Moving Pictures',\r\n 'deleted' => 0\r\n );\r\n\r\n $this->Db->insert($row1);\r\n $this->Db->insert($row2);\r\n\r\n // Verifica se o registro existe\r\n $this->assertEquals($row1, $this->Db->fetchRow('A'), 'row1 existe');\r\n $this->assertEquals($row2, $this->Db->fetchRow('B'), 'row2 existe');\r\n\r\n // Marca para usar o campo deleted\r\n $this->Db->setUseDeleted(true)->setShowDeleted(true);\r\n\r\n // Remove o registro\r\n $this->Db->delete('A');\r\n $row1['deleted'] = 1;\r\n\r\n // Verifica se foi removido\r\n $row = $this->Db->fetchRow('A');\r\n $this->assertEquals(1, $row['deleted'], 'row1 marcado como deleted');\r\n $this->assertEquals($row2, $this->Db->fetchRow('B'), 'row2 ainda existe v1');\r\n\r\n // Marca para mostrar os removidos\r\n $this->Db->setShowDeleted(true);\r\n\r\n // Verifica se o registro existe\r\n $this->assertEquals($row1, $this->Db->fetchRow('A'), 'row1 ainda existe v1');\r\n $this->assertEquals($row2, $this->Db->fetchRow('B'), 'row2 ainda existe v2');\r\n\r\n // Marca para remover o registro da tabela\r\n $this->Db->setUseDeleted(false);\r\n\r\n // Remove o registro qwue não existe\r\n $this->Db->delete('C');\r\n\r\n // Verifica se ele foi removido\r\n $this->assertNotEmpty($this->Db->fetchRow('A'), 'row1 ainda existe v3');\r\n $this->assertNotEmpty($this->Db->fetchRow('B'), 'row2 ainda existe v3');\r\n\r\n // Remove o registro\r\n $this->Db->delete('A');\r\n\r\n // Verifica se ele foi removido\r\n $this->assertNull($this->Db->fetchRow('A'), 'row1 não existe v4');\r\n $this->assertNotEmpty($this->Db->fetchRow('B'), 'row2 ainda existe v4');\r\n }", "title": "" }, { "docid": "ca9edb73168a8c6525653f7ecfa9a68d", "score": "0.6456528", "text": "public function testBillingNotesIdDelete()\n {\n }", "title": "" }, { "docid": "fc44017ba6e08b37f65bb00488a374eb", "score": "0.64537394", "text": "public function testSystemSkillsIdDelete()\n {\n\n }", "title": "" }, { "docid": "61cc2cd0af2fe63b5b139168d3ecad5c", "score": "0.6446918", "text": "public function testDoDeleteAll()\n {\n BookTableMap::doDeleteAll();\n $this->assertCount(0, BookQuery::create()->find(), \"Expect all book rows to have been deleted.\");\n }", "title": "" }, { "docid": "2f1243d239ee741c5a8790d1470af89c", "score": "0.6421341", "text": "public function testDeleteApiKey()\n {\n $accept_language = 'es';\n $result = self::$apiInstance->deleteApiKey('64625cc9f3e02c00163f5e4d', $accept_language);\n $this->assertNotEmpty($result, 'expected not empty result');\n }", "title": "" }, { "docid": "500549fdd9b6a7baa58af56256eced1a", "score": "0.6418408", "text": "public function testDeletes(): void\n {\n\n $this->expectNotToPerformAssertions();\n $con = $this->_em->getConnection();\n\n // The \"c\" entity\n $con->insert('gh10532_x', ['id' => 1, 'discr' => 'C']);\n $con->insert('gh10532_c', ['id' => 1]);\n $c = $this->_em->find(GH10532C::class, 1);\n\n // The \"a2\" entity\n $con->insert('gh10532_a', ['id' => 2, 'gh10532x_id' => 1]);\n $a2 = $this->_em->find(GH10532A::class, 2);\n\n // The \"b\" entity\n $con->insert('gh10532_x', ['id' => 3, 'discr' => 'B']);\n $con->insert('gh10532_b', ['id' => 3, 'gh10532a_id' => 2]);\n $b = $this->_em->find(GH10532B::class, 3);\n\n // The \"a1\" entity\n $con->insert('gh10532_a', ['id' => 4, 'gh10532x_id' => 3]);\n $a1 = $this->_em->find(GH10532A::class, 4);\n\n /*\n * The following would make the deletions happen in an order\n * where the not-nullable foreign key constraints would not be\n * violated. But, we want the ORM to be able to sort this out\n * internally.\n *\n * $this->_em->remove($a1);\n * $this->_em->flush();\n * $this->_em->remove($b);\n * $this->_em->flush();\n * $this->_em->remove($a2);\n * $this->_em->remove($c);\n * $this->_em->flush();\n */\n\n $this->_em->remove($a1);\n $this->_em->remove($a2);\n $this->_em->remove($b);\n $this->_em->remove($c);\n\n $this->_em->flush();\n }", "title": "" }, { "docid": "1e340d37546a577859ca6a79ec363abc", "score": "0.6414971", "text": "public function tearDown() {\r\n $conn = $this->CI->my_database->conn;\r\n \r\n $conn->query(\"DELETE FROM korisnik WHERE KIme='KorisnikTest';\");\r\n $conn->query(\"DELETE FROM konobar WHERE KIme='KonobarTest';\");\r\n $conn->query(\"DELETE FROM restoran WHERE KIme='RestoranTest';\");\r\n $conn->query(\"DELETE FROM admin WHERE KIme='AdminTest';\");\r\n }", "title": "" }, { "docid": "0b40789e11f2526a6ccc9b7294623556", "score": "0.6405891", "text": "public function testDeleteRegistrationGlobalData()\n {\n }", "title": "" }, { "docid": "ddb9e1d31792c3a1d585c81fe9089689", "score": "0.6365027", "text": "public function testDeleteLook()\n {\n }", "title": "" }, { "docid": "7d2069dde0b88957909729e499d54be2", "score": "0.6362322", "text": "public function testDeleteAssocation()\n {\n }", "title": "" }, { "docid": "359c9202f0d8067c06d68d82189480fc", "score": "0.63506764", "text": "public function testProductsDelete()\n {\n }", "title": "" }, { "docid": "359e4f788f901dadd878344c6809b3f5", "score": "0.6330814", "text": "public function testTaskDelete()\n {\n\n }", "title": "" }, { "docid": "4e706477605f21a308c73d20fef0bb5a", "score": "0.6322143", "text": "public function testDeleteUE()\n {\n }", "title": "" }, { "docid": "54ba9f811dbfaf0e93b7283ec45fd572", "score": "0.6292155", "text": "public function testLanguageProfilesDelete()\n {\n }", "title": "" }, { "docid": "63aa92c48dceee0496f2b5d9d781c33f", "score": "0.6286157", "text": "public function testSalesOpportunitiesTypesIdDelete()\n {\n\n }", "title": "" }, { "docid": "2e4570b864f7838ec82bf5c1991a072e", "score": "0.62736166", "text": "public function testDeleteEntity()\n {\n }", "title": "" }, { "docid": "7dc417e66edfe2e79347d7aa09f06ff1", "score": "0.62726927", "text": "public function testDeleteCustomerData()\n {\n }", "title": "" }, { "docid": "6106b17e2c2079b087bbb9cc4708489f", "score": "0.6271464", "text": "public function testDELETEStoredShipmentsStoredId()\n {\n }", "title": "" }, { "docid": "a09f99fe2be26046609d95b08f5069a0", "score": "0.62713695", "text": "function testDeleteAll()\n {\n //Arrange\n $brand_name = \"Super Kicks\";\n $test_brand = new Brand($brand_name);\n $test_brand->save();\n\n $brand_name2 = \"Cool Shoes\";\n $test_brand2 = new Brand($brand_name2);\n $test_brand->save();\n\n //Act\n Brand::deleteAll();\n $result = Brand::getAll();\n\n //Assert\n $this->assertEquals([], $result);\n\n }", "title": "" }, { "docid": "9bff15e72d679d258e35581f4bcec3e7", "score": "0.62645286", "text": "public function testDeleteDeviceTemplate()\n {\n }", "title": "" }, { "docid": "132c555d3c085ac27de13665260890b7", "score": "0.6255997", "text": "public function testDoDelete_ByPks()\n {\n $books = BookQuery::create()->find();\n $bookCount = count($books);\n\n // 2) we have enough books to do this test\n $this->assertGreaterThan(1, $bookCount, 'There are at least two books');\n\n // 3) select two random books\n $book1 = $books[0];\n $book2 = $books[1];\n\n // 4) delete the books\n BookTableMap::doDelete(array($book1->getId(), $book2->getId()));\n\n // 5) we should have two less books than before\n $this->assertEquals($bookCount-2, BookQuery::create()->count(), 'Two books deleted successfully.');\n }", "title": "" }, { "docid": "04002c6d14fa451f1a46432d720533ae", "score": "0.6238259", "text": "public function testAcquisitionAssignmentsDelete()\n {\n }", "title": "" }, { "docid": "1ce9888efcbfe0586132d6436ceb0f99", "score": "0.62206703", "text": "public function testDELETEAgentsId()\n {\n }", "title": "" }, { "docid": "d3f395f6c867fdf0304aaab9be3aa73c", "score": "0.62188286", "text": "public function testDeleteFromTheCache(){\n\t\t$this->assertTrue(Cache::delete($this->key));\n\t}", "title": "" }, { "docid": "e96368e371a4130dae8e980c0bd87bbb", "score": "0.6218648", "text": "public function testMenusDelete()\n {\n }", "title": "" }, { "docid": "6df89a1ad0665dee7df0e49b045f2021", "score": "0.6205652", "text": "public function testDeleteObjectTemplate()\n {\n }", "title": "" }, { "docid": "433d5733a0ac94239fda163c4952eff5", "score": "0.62046254", "text": "public function testDeleteRegistration()\n {\n }", "title": "" }, { "docid": "512d433ec63e06795961355937388cf3", "score": "0.620257", "text": "public function testDeleteBREGlobal()\n {\n }", "title": "" }, { "docid": "72b98945bf36078570bda8e05ff9127f", "score": "0.6196337", "text": "public function test_deleteCustomerGroup() {\n\n }", "title": "" }, { "docid": "48fda3daa6d16d2f9a004b007a69b70c", "score": "0.6190693", "text": "public function testCancelTransaction()\n {\n }", "title": "" }, { "docid": "865a66003cf883f3229c56ae78690508", "score": "0.6182527", "text": "public function testDeleteDuplicate()\n {\n\n }", "title": "" }, { "docid": "813c9113450e4516052eed8ab558b9fe", "score": "0.61814076", "text": "public function testDeleteObjectItem()\n {\n }", "title": "" }, { "docid": "d467b222a0679bbb94f13832f6054da6", "score": "0.6165562", "text": "public function testDeleteNexus()\n {\n }", "title": "" }, { "docid": "06139b51f367034de5b0739e665b0eaa", "score": "0.61627823", "text": "public function testDeleteNexusParameters()\n {\n }", "title": "" }, { "docid": "a62569e60b337e5d9d46051b09b1bfbb", "score": "0.6157903", "text": "public function testDeleteArrayKey()\r\n {\r\n $this->Db->setKey(array(RW_App_Model_Base::KEY_INTEGER => 'id_int', RW_App_Model_Base::KEY_STRING => 'id_char')\r\n );\r\n $this->dropTables()->createTables(array('album_array'));\r\n $this->Db->setUseAllKeys(false);\r\n\r\n // Abaixo é igual ao testDelete trocando 1, 2 por A, B\r\n $row1 = array(\r\n 'id_int' => 1,\r\n 'id_char' => 'A',\r\n 'artist' => 'Rush',\r\n 'title' => 'Presto',\r\n 'deleted' => 0\r\n );\r\n $row2 = array(\r\n 'id_int' => 2,\r\n 'id_char' => 'B',\r\n 'artist' => 'Rush',\r\n 'title' => 'Moving Pictures',\r\n 'deleted' => 0\r\n );\r\n\r\n $this->Db->insert($row1);\r\n $this->Db->insert($row2);\r\n\r\n // Verifica se o registro existe\r\n $this->assertEquals($row1, $this->Db->fetchRow(array('id_char' => 'A', 'id_int' => 1)), 'row1 existe');\r\n $this->assertEquals($row2, $this->Db->fetchRow(array('id_char' => 'B', 'id_int' => 2)), 'row2 existe');\r\n\r\n // Marca para usar o campo deleted\r\n $this->Db->setUseDeleted(true)->setShowDeleted(true);\r\n\r\n // Remove o registro\r\n $this->Db->delete(array('id_char' => 'A'));\r\n $row1['deleted'] = 1;\r\n\r\n // Verifica se foi removido\r\n $row = $this->Db->fetchRow(array('id_char' => 'A', 'id_int' => 1));\r\n $this->assertEquals(1, $row['deleted'], 'row1 marcado como deleted');\r\n $this->assertEquals($row2, $this->Db->fetchRow(array('id_char' => 'B', 'id_int' => 2)), 'row2 ainda existe v1');\r\n\r\n // Marca para mostrar os removidos\r\n $this->Db->setShowDeleted(true);\r\n\r\n // Verifica se o registro existe\r\n $this->assertEquals($row1, $this->Db->fetchRow(array('id_char' => 'A', 'id_int' => 1)), 'row1 ainda existe v1');\r\n $this->assertEquals($row2, $this->Db->fetchRow(array('id_char' => 'B', 'id_int' => 2)), 'row2 ainda existe v2');\r\n\r\n // Marca para remover o registro da tabela\r\n $this->Db->setUseDeleted(false);\r\n\r\n // Remove o registro qwue não existe\r\n $this->Db->delete(array('id_char' => 'C'));\r\n\r\n // Verifica se ele foi removido\r\n $this->assertNotEmpty($this->Db->fetchRow(array('id_char' => 'A', 'id_int' => 1)), 'row1 ainda existe v3');\r\n $this->assertNotEmpty($this->Db->fetchRow(array('id_char' => 'B', 'id_int' => 2)), 'row2 ainda existe v3');\r\n\r\n // Remove o registro\r\n $this->Db->delete(array('id_char' => 'A'));\r\n\r\n // Verifica se ele foi removido\r\n $this->assertNull($this->Db->fetchRow(array('id_char' => 'A', 'id_int' => 1)), 'row1 não existe v4');\r\n $this->assertNotEmpty($this->Db->fetchRow(array('id_char' => 'B', 'id_int' => 2)), 'row2 ainda existe v4');\r\n }", "title": "" }, { "docid": "f163d82be636f5f6d987d46cb361dacb", "score": "0.61503166", "text": "public function testDELETEConsolidatedShipmentsConsolidatedId()\n {\n }", "title": "" }, { "docid": "b8271bb4772165473a0311269a4dc5aa", "score": "0.61453456", "text": "public function testDetachAllStoresFromSalesChannel()\n {\n }", "title": "" }, { "docid": "a3c5a0d02b5661b407fa46114acc6982", "score": "0.61449003", "text": "public function testDeleteMetadata2()\n {\n }", "title": "" }, { "docid": "ba37ce9d7cdb6c103607980ed8591233", "score": "0.6137189", "text": "public function testDeleteAllNotificationRules()\r\n {\r\n }", "title": "" }, { "docid": "7cd0330820ac0b82b1caff7e0c6a122d", "score": "0.61151814", "text": "public function testCloudPosCheckDeleteCheck()\n {\n }", "title": "" }, { "docid": "eea754e48ea2db19b18b973a30b87595", "score": "0.6113865", "text": "public function testRemoveUserMerchant()\n {\n\n }", "title": "" }, { "docid": "a0fbc25ba2613f9097933c8f619f353c", "score": "0.6109034", "text": "public function testDeleteDeviceUser()\n {\n }", "title": "" }, { "docid": "7f54159835ffbe9af40e235b7c2be64d", "score": "0.610332", "text": "public function testCustomFieldsDelete()\n {\n }", "title": "" }, { "docid": "3ea95dbf562ab096f50c178b6ea442db", "score": "0.6103139", "text": "public function testDeleteOfferUsingDELETE()\n {\n }", "title": "" }, { "docid": "53d30ca39e49e2141430ad06e1e0d488", "score": "0.6089608", "text": "public function testDeleteInventorySnapshotTag()\n {\n }", "title": "" }, { "docid": "35a718c1fbc511e1d88109a76f9554b9", "score": "0.6086924", "text": "public function testAcquisitionAssignmentsUndelete()\n {\n }", "title": "" }, { "docid": "e64f624051045891e0b094cb51c1e971", "score": "0.6075918", "text": "public function testDeleteInvalidArrayKey(): void\r\n {\r\n $this->expectException(InvalidArgumentException::class);\r\n $this->Db->setKey(array(RW_App_Model_Base::KEY_INTEGER => 'id_int', RW_App_Model_Base::KEY_STRING => 'id_char')\r\n );\r\n $this->Db->delete('A');\r\n }", "title": "" }, { "docid": "841652ee530151763416438948d2a898", "score": "0.6074701", "text": "public function test_likeDeleteById() {\n\n }", "title": "" }, { "docid": "8b1ede35b604b4df0d97ae42221b3ba8", "score": "0.6068304", "text": "public function testDelete() {\n\n $this->assertEmpty($this->bookStorage->all());\n $book = $this->bookFactory->generate(1, TRUE);\n $this->assertNotEmpty($this->bookStorage->all());\n $res = $this->delete('/api/books' . $book->getId());\n $this->assertEquals(200, $res->getStatusCode());\n $this->assertEmpty($this->bookStorage->all());\n $this->assertEmpty($this->bookStorage->find($book->getId()));\n }", "title": "" }, { "docid": "2d09d360376b35e0219cbc68bf462e38", "score": "0.60682845", "text": "protected function tearDown()\n {\n parent::tearDown();\n $pdo = $this->getDatabaseTester()->getConnection()->getConnection();\n $pdo->exec(\"DELETE FROM eav_entity;\");\n $pdo->exec(\"DELETE FROM eav_entity_int;\");\n $pdo->exec(\"DELETE FROM eav_entity_decimal;\");\n $pdo->exec(\"DELETE FROM eav_entity_string;\");\n $pdo->exec(\"DELETE FROM eav_entity_text;\");\n $pdo->exec(\"DELETE FROM eav_attribute;\");\n }", "title": "" }, { "docid": "ffd78d186940bf73fdf4ea55b08298f4", "score": "0.6065387", "text": "public function testDeleteCartTag()\n {\n }", "title": "" }, { "docid": "c682b062def2de96e95d879f60f9436c", "score": "0.6061629", "text": "public function testHttpDeletePersistenceServiceItem()\n {\n }", "title": "" }, { "docid": "981097251a8fdd8977520961a6c092d8", "score": "0.60603446", "text": "public function testDeleteDevice()\n {\n }", "title": "" }, { "docid": "b99b6d83d84175b27e928a9e7884efbb", "score": "0.60596776", "text": "public function testDeleteRegistrationConfigurationSetting()\n {\n }", "title": "" }, { "docid": "d876963939046b3f7fbb6b63d71f7f17", "score": "0.6057289", "text": "public function testDeleteInvalidArraySingleKey()\r\n {\r\n $this->expectException(LogicException::class);\r\n $this->Db->setKey(array(RW_App_Model_Base::KEY_INTEGER => 'id_int', RW_App_Model_Base::KEY_STRING => 'id_char')\r\n );\r\n $this->Db->delete(array('id_int' => 'A'));\r\n }", "title": "" }, { "docid": "e9ecb8294687a4f58442758296a0a0d3", "score": "0.6041259", "text": "public function testGetTables_With_Delete()\n {\n $query = new Query('DELETE FROM `test`');\n $query->getTables();\n }", "title": "" }, { "docid": "7061461e049ee6db29c39c90fc99b38b", "score": "0.60393864", "text": "public function testDeleteCart()\n {\n }", "title": "" }, { "docid": "b44090eb617bc20ad066f361081461b5", "score": "0.6037683", "text": "public function testTaskWorkDeleteTaskWorkById()\n {\n }", "title": "" }, { "docid": "7f480c8ccb8985617beb4d75139863b4", "score": "0.6037649", "text": "public function testDeleteCustomer()\n {\n\n }", "title": "" }, { "docid": "f0566e89dc1aba65952f6b329aac8c8d", "score": "0.60185915", "text": "public function testDelete()\n\t{\n\t\t$this->loginStudent();\n\n\t\t$data = DB::table('signup_eduprograms')->where('user_id',\\Auth::User()->id)->get();\n\n\t\t$first = 0;\n\t\tforeach( $data as $row ) {\n\t\t\t$id = $row->id;\n\n\t\t\tif($first) { //keep first \n\t\t\t\t$res = $this->call('DELETE', 'signupeduprogram/'.$id, [\n\t\t\t\t\t\t'_token' => csrf_token()\n\t\t\t\t\t]);\n\t\t\t\t$this->assertRedirectedTo('signupeduprogram');\n\t\t\t}\n\n\t\t\t$first++;\n\t\t}\n\n\t\t$data = DB::table('signup_eduprograms')->where('user_id','!=',\\Auth::User()->id)->get();\n\n\t\tforeach( $data as $row ) {\n\t\t\t$id = $row->id;\n\n\t\t\t$res = $this->call('DELETE', 'signupeduprogram/'.$id, [\n\t\t\t\t\t'_token' => csrf_token()\n\t\t\t\t]);\n\t\t\t$this->assertResponseStatus(403);\n\t\t}\n\t}", "title": "" }, { "docid": "4250d863d3b6cee0ccc7c64c97831747", "score": "0.60156095", "text": "public function testDeleteArrayKey(): void\n {\n $this->laminasDbAdapter->setTableKey(\n ['id_int' => LaminasDbAdapter::KEY_INTEGER, 'id_char' => LaminasDbAdapter::KEY_STRING]\n );\n $this->dropTables();\n $this->createTables(['album_array']);\n $this->laminasDbAdapter->setUseAllKeys(false);\n $this->laminasDbAdapter->setDefaultOrder(['id_int', 'id_char']);\n\n // Abaixo é igual ao testDelete trocando 1, 2 por A, B\n $row1 = [\n 'id_int' => 1,\n 'id_char' => 'A',\n 'artist' => 'Rush',\n 'title' => 'Presto',\n 'deleted' => 0\n ];\n $row2 = [\n 'id_int' => 2,\n 'id_char' => 'B',\n 'artist' => 'Rush',\n 'title' => 'Moving Pictures',\n 'deleted' => 0\n ];\n\n $this->laminasDbAdapter->insert($row1);\n $this->laminasDbAdapter->insert($row2);\n\n // Verifica se o registro existe\n $row = $this->laminasDbAdapter->fetchRow(['id_char' => 'A', 'id_int' => 1]);\n $this->assertInstanceOf(ArrayObject::class, $row);\n $this->assertEquals($row1, $row->getArrayCopy(), 'row1 existe');\n $row = $this->laminasDbAdapter->fetchRow(['id_char' => 'B', 'id_int' => 2]);\n $this->assertInstanceOf(ArrayObject::class, $row);\n $this->assertEquals($row2, $row->getArrayCopy(), 'row2 existe');\n\n // Marca para usar o campo deleted\n $this->laminasDbAdapter->setUseDeleted(true)->setShowDeleted(true);\n\n // Remove o registro\n $this->laminasDbAdapter->delete(['id_char' => 'A']);\n $row1['deleted'] = 1;\n\n // Verifica se foi removido\n $row = $this->laminasDbAdapter->fetchRow(['id_char' => 'A', 'id_int' => 1]);\n $this->assertInstanceOf(ArrayObject::class, $row);\n $this->assertEquals(1, $row['deleted'], 'row1 marcado como deleted');\n\n $row = $this->laminasDbAdapter->fetchRow(['id_char' => 'B', 'id_int' => 2]);\n $this->assertInstanceOf(ArrayObject::class, $row);\n $this->assertEquals($row2, $row->getArrayCopy(), 'row2 ainda existe v1');\n\n // Marca para mostrar os removidos\n $this->laminasDbAdapter->setShowDeleted(true);\n\n // Verifica se o registro existe\n $row = $this->laminasDbAdapter->fetchRow(['id_char' => 'A', 'id_int' => 1]);\n $this->assertInstanceOf(ArrayObject::class, $row, 'row1 ainda existe v1');\n $this->assertEquals($row1, $row->getArrayCopy());\n $row = $this->laminasDbAdapter->fetchRow(['id_char' => 'B', 'id_int' => 2]);\n $this->assertInstanceOf(ArrayObject::class, $row, 'row2 ainda existe v1');\n $this->assertEquals($row2, $row->getArrayCopy());\n\n // Marca para remover o registro da tabela\n $this->laminasDbAdapter->setUseDeleted(false);\n\n // Remove o registro que não existe\n $this->laminasDbAdapter->delete(['id_char' => 'C']);\n\n // Verifica se ele foi removido\n $this->assertNotEmpty(\n $this->laminasDbAdapter->fetchRow(['id_char' => 'A', 'id_int' => 1]),\n 'row1 ainda existe v3'\n );\n $this->assertNotEmpty(\n $this->laminasDbAdapter->fetchRow(['id_char' => 'B', 'id_int' => 2]),\n 'row2 ainda existe v3'\n );\n\n // Remove o registro\n $this->laminasDbAdapter->delete(['id_char' => 'A']);\n\n // Verifica se ele foi removido\n $this->assertNull($this->laminasDbAdapter->fetchRow(['id_char' => 'A', 'id_int' => 1]), 'row1 não existe v4');\n $this->assertNotEmpty(\n $this->laminasDbAdapter->fetchRow(['id_char' => 'B', 'id_int' => 2]),\n 'row2 ainda existe v4'\n );\n }", "title": "" }, { "docid": "20a0daa90f2bd66d3ba85d035bd9c969", "score": "0.6008077", "text": "public function testApiDestroy()\n {\n $user = User::find(1);\n $purchasedetails = purchasedetail::where('unit_price','800')->get();\n\n foreach ($purchasedetails as $purchasedetail) {\n\n $response = $this->actingAs($user)->withoutMiddleware()->json('DELETE', '/api/purchasedetails/'.$purchasedetail->id);\n $response->assertStatus(200)\n ->assertJson([\n 'success' => true\n ]);\n\n }\n\n\n }", "title": "" }, { "docid": "3a80971dc481710f825bbcc079f58fef", "score": "0.60051936", "text": "public function testReviewDeleteById()\n {\n\n }", "title": "" }, { "docid": "1c62ffb71378f596d7d4bd462303b8e3", "score": "0.60046643", "text": "protected function tearDown()\n {\n $this->storage->delete($this->testKey);\n }", "title": "" }, { "docid": "761d0325b4ef77c0f18c4d88798c36ac", "score": "0.6002983", "text": "public function testDoDelete_MultiTable()\n {\n $hp = BookQuery::create()->filterByTitle(\"Harry Potter and the Order of the Phoenix\")->findOne();\n\n // print \"Attempting to delete [multi-table] by found pk: \";\n $c = new Criteria();\n $c->add(BookTableMap::ID, $hp->getId());\n // The only way for multi-delete to work currently\n // is to specify the author_id and publisher_id (i.e. the fkeys\n // have to be in the criteria).\n $c->add(AuthorTableMap::ID, $hp->getAuthorId());\n $c->add(PublisherTableMap::ID, $hp->getPublisherId());\n $c->setSingleRecord(true);\n BookTableMap::doDelete($c);\n\n // check to make sure the right # of records was removed\n $this->assertCount(3, AuthorQuery::create()->find(), \"Expected 3 authors after deleting.\");\n $this->assertCount(3, PublisherQuery::create()->find(), \"Expected 3 publishers after deleting.\");\n $this->assertCount(3, BookQuery::create()->find(), \"Expected 3 books after deleting.\");\n }", "title": "" }, { "docid": "030f0c45b7b10807086e33d3988fd645", "score": "0.5994275", "text": "protected function tearDown(): void\n {\n Tenant::all()->each->delete();\n }", "title": "" }, { "docid": "3bb2146024288600728c647868dea221", "score": "0.5990459", "text": "public function testVoucherDeleteDocument()\n {\n }", "title": "" }, { "docid": "62107874fc9af573e2b32054c82bfcb6", "score": "0.5986643", "text": "public function testDeleteMatchingPrefix()\n {\n for ($i = 1; $i <= 101; $i++) {\n $this->handler->save('key_' . $i, 'value' . $i);\n }\n\n // check that there are 101 items is cache store\n $dbInfo = explode(',', $this->handler->getCacheInfo()['db0']);\n $this->assertSame('keys=101', $dbInfo[0]);\n\n // Checking that given the prefix \"key_1\", deleteMatching deletes 13 keys:\n // (key_1, key_10, key_11, key_12, key_13, key_14, key_15, key_16, key_17, key_18, key_19, key_100, key_101)\n $this->assertSame(13, $this->handler->deleteMatching('key_1*'));\n\n // check that there remains (101 - 13) = 88 items is cache store\n $dbInfo = explode(',', $this->handler->getCacheInfo()['db0']);\n $this->assertSame('keys=88', $dbInfo[0]);\n }", "title": "" }, { "docid": "2a12db7e6005cac4f99143433d23ea3a", "score": "0.5979109", "text": "public function testDeleteInvalidArrayKey(): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->laminasDbAdapter->setTableKey(\n [LaminasDbAdapter::KEY_INTEGER => 'id_int', LaminasDbAdapter::KEY_STRING => 'id_char']\n );\n $this->laminasDbAdapter->delete('A');\n }", "title": "" }, { "docid": "9e76e6c9e7491f8258ff7634dbd322ea", "score": "0.59752613", "text": "public function test_mod_threesixty_delete_analysis() {\n global $DB;\n $analysisid = 1;\n $analysisid_2 = 999;\n\n $analysis_before = $DB->count_records('threesixty_analysis');\n $carried_before = $DB->count_records('threesixty_carried_comp');\n $resp_before = $DB->count_records('threesixty_response_comp');\n $respondent_before = $DB->count_records('threesixty_respondent');\n\n // ...this should fail and records remain unchanged.\n threesixty_delete_analysis($analysisid_2);\n\n $analysis_after = $DB->count_records('threesixty_analysis');\n $carried_after = $DB->count_records('threesixty_carried_comp');\n $resp_after = $DB->count_records('threesixty_response_comp');\n $respondent_after = $DB->count_records('threesixty_respondent');\n\t\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertEqual($analysis_before-$analysis_after, 0);\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertEqual($carried_before - $carried_after, 0);\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertEqual($resp_before-$resp_after, 0);\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertEqual($respondent_before-$respondent_after, 0);\n\n $analysis_before2 = $DB->count_records('threesixty_analysis');\n $carried_before2 = $DB->count_records('threesixty_carried_comp');\n $resp_before2 = $DB->count_records('threesixty_response_comp');\n $respondent_before2 = $DB->count_records('threesixty_respondent');\n\n // ...now do a real delete.\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertTrue(threesixty_delete_analysis($analysisid));\n\n $analysis_after2 = $DB->count_records('threesixty_analysis');\n $carried_after2 = $DB->count_records('threesixty_carried_comp');\n $resp_after2 = $DB->count_records('threesixty_response_comp');\n $respondent_after2 = $DB->count_records('threesixty_respondent');\n\t\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertEqual($analysis_before2-$analysis_after2, 1);\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertEqual($carried_before2 - $carried_after2, 3);\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertEqual($resp_before2 - $resp_after2, 4);\n\t /** @noinspection PhpUndefinedMethodInspection */\n\t $this->assertEqual($respondent_before2 - $respondent_after2, 1);\n\n }", "title": "" }, { "docid": "a687cc1238ba941121b6aeb34862cfef", "score": "0.5973527", "text": "public function tearDown()\n {\n \\r\\tableDrop(PersistentObject::collectionName())->run($this->fixture->getConnection()->getHandle());\n\n parent::tearDown();\n }", "title": "" }, { "docid": "cbcc3ed173841f8334f775017e8d31ff", "score": "0.5972873", "text": "protected function tearDown() {\n $this->service->deleteAll();\n // $this->createTestUserAcls();\n }", "title": "" }, { "docid": "391ed33b2cde1b9237d0e9a0d6d7cafa", "score": "0.59685", "text": "public function testDelete()\n {\n VCR::insertCassette('customers/delete.yml');\n\n $client = new TuneupTechnology\\Client(getenv(\"API_EMAIL\"), getenv(\"API_KEY\"), 'http://tuneapp.localhost/api');\n\n $response = $client->customers->delete(1);\n\n $this->assertNotNull($response[\"deleted_at\"]);\n }", "title": "" }, { "docid": "07c3ece5e3ba4c6f6fb4c124658c9d6d", "score": "0.5961862", "text": "public function testDeleteInventorySnapshotFile()\n {\n }", "title": "" }, { "docid": "3eeefab4841d5c427ffa57e71ff92d2d", "score": "0.59554493", "text": "public function testDeletingAll()\n {\n $this->open(route('hulpverleners.index'))\n ->click('actions')\n ->click('select-all')\n ->click('actions')\n ->click('remove')\n ->click('confirm');\n\n $this->open(route('hulpverleners.index'))\n ->click('actions')\n ->click('select-all')\n ->click('actions')\n ->click('remove')\n ->click('confirm')\n ->wait();\n\n //we should keep one user\n $this->assertSame(User::count(), 1);\n }", "title": "" }, { "docid": "a791f7808e29fd3d2b18ea75611bedf9", "score": "0.5955361", "text": "public function testSpacesProjectsDelete()\n {\n }", "title": "" }, { "docid": "b4da071337543e750fe1b5f46be11077", "score": "0.5942059", "text": "public function testDeleteNotificationType()\n {\n }", "title": "" }, { "docid": "a3cdacfb9806dcb2e5270d41cafeac66", "score": "0.5939294", "text": "public function testDelete()\n {\n $this->portrait->delete();\n foreach ($this->portrait->get_images() as $image) {\n $this->assertFileNotExists($image);\n }\n $this->assertFileNotExists($this->portrait->get_alt_file());\n\n $this->totalcms->delete();\n foreach ($this->totalcms->get_images() as $image) {\n $this->assertFileNotExists($image);\n }\n $this->assertFileNotExists($this->totalcms->get_alt_file());\n\n $this->landscape->delete();\n foreach ($this->landscape->get_images() as $image) {\n $this->assertFileNotExists($image);\n }\n $this->assertFileNotExists($this->landscape->get_alt_file());\n\n $this->big->delete();\n foreach ($this->big->get_images() as $image) {\n $this->assertFileNotExists($image);\n }\n $this->assertFileNotExists($this->big->get_alt_file());\n }", "title": "" }, { "docid": "ca1151025ec8c2ab6876a67c99e95cd4", "score": "0.5934037", "text": "public function testWarehouseTransferOutABANDONRequestAbandonDelete()\n {\n }", "title": "" }, { "docid": "415350f794aed776f8df6493a2470631", "score": "0.59317076", "text": "public function testDeleteCartFile()\n {\n }", "title": "" }, { "docid": "0d894289d956dc84cbf41cfdf3f0e874", "score": "0.59309185", "text": "public function testElementCategoryDeleteSecurityEntry()\r\n {\r\n\r\n }", "title": "" }, { "docid": "376442c3b8f4e7b0d6cb3dd370c4cba7", "score": "0.59255344", "text": "public function deleteAll()\n {\n $this->_preDeleteAll();\n foreach ($this->_data as $key => $val) {\n $this->deleteOne($key);\n }\n $this->_postDeleteAll();\n }", "title": "" }, { "docid": "64d624116810f64b70993e4307582b27", "score": "0.5917303", "text": "public function testDeleteOrderLineTag()\n {\n }", "title": "" }, { "docid": "8fa0febda1880e354f6a6566b1393977", "score": "0.59134305", "text": "public function testBatchDeleteAction()\n {\n // Anonymous access should throw an exception\n $this->dispatchUrI('/browse/delete', null, true);\n\n $usersFile = $this->loadData('User', 'default');\n $foldersFile = $this->loadData('Folder', 'default');\n $itemsFile = $this->loadData('Item', 'default');\n $userDao = $this->User->load($usersFile[0]->getKey());\n\n // Assert that we can handle empty id values\n $this->resetAll();\n $this->params['items'] = '-';\n $this->params['folders'] = '-';\n $this->dispatchUrI('/browse/delete', $userDao);\n $this->assertNotEmpty($this->getBody());\n $resp = json_decode($this->getBody());\n $this->assertNotEmpty($resp->success);\n $this->assertNotEmpty($resp->failure);\n $this->assertEmpty($resp->success->folders);\n $this->assertEmpty($resp->success->items);\n $this->assertEmpty($resp->failure->folders);\n $this->assertEmpty($resp->failure->items);\n\n // Assert that we cannot batch delete our private or public folder\n $this->resetAll();\n $this->params['items'] = '';\n $this->params['folders'] = $userDao->getPrivatefolderId().'-'.$userDao->getPublicfolderId().'-';\n $this->dispatchUrI('/browse/delete', $userDao);\n $this->assertNotEmpty($this->getBody());\n $resp = json_decode($this->getBody());\n $this->assertNotEmpty($resp->success);\n $this->assertNotEmpty($resp->failure);\n $this->assertEmpty($resp->success->folders);\n $this->assertEmpty($resp->success->items);\n $this->assertEquals(count($resp->failure->folders), 2);\n $this->assertEmpty($resp->failure->items);\n $this->assertEquals($resp->failure->folders[0], $userDao->getPrivatefolderId());\n $this->assertEquals($resp->failure->folders[1], $userDao->getPublicfolderId());\n\n // Assert that deleting a nonexistent item and folder returns success\n $this->resetAll();\n $this->params['items'] = '999875-';\n $this->params['folders'] = '787134-';\n $this->dispatchUrI('/browse/delete', $userDao);\n $this->assertNotEmpty($this->getBody());\n $resp = json_decode($this->getBody());\n $this->assertNotEmpty($resp->success);\n $this->assertNotEmpty($resp->failure);\n $this->assertEquals(count($resp->success->folders), 1);\n $this->assertEquals(count($resp->success->items), 1);\n $this->assertEmpty($resp->failure->folders);\n $this->assertEmpty($resp->failure->items);\n $this->assertEquals($resp->success->folders[0], '787134');\n $this->assertEquals($resp->success->items[0], '999875');\n\n // Assert that we can delete an item and folder we have permissions on\n $item = $this->Item->load($itemsFile[1]->getKey());\n $itemId = $item->getKey();\n $this->Itempolicyuser->createPolicy($userDao, $item, MIDAS_POLICY_ADMIN);\n $folder = $this->Folder->createFolder('DeleteableFolder', 'Description', $userDao->getPublicFolder());\n $folderId = $folder->getKey();\n $this->Folderpolicyuser->createPolicy($userDao, $folder, MIDAS_POLICY_ADMIN);\n\n $this->assertNotEquals($item, false);\n $this->resetAll();\n $this->params['items'] = $item->getKey().'-';\n $this->params['folders'] = $folder->getKey().'-';\n $this->dispatchUrI('/browse/delete', $userDao);\n $item = $this->Item->load($item->getKey());\n $folder = $this->Folder->load($folder->getKey());\n $this->assertEquals($item, false);\n $this->assertEquals($folder, false);\n $this->assertNotEmpty($this->getBody());\n $resp = json_decode($this->getBody());\n $this->assertNotEmpty($resp->success);\n $this->assertNotEmpty($resp->failure);\n $this->assertEquals(count($resp->success->folders), 1);\n $this->assertEquals(count($resp->success->items), 1);\n $this->assertEmpty($resp->failure->folders);\n $this->assertEmpty($resp->failure->items);\n $this->assertEquals($resp->success->folders[0], $folderId);\n $this->assertEquals($resp->success->items[0], $itemId);\n }", "title": "" } ]
30bf7d420d72fcb38fc66ce11270a514
Add a new element to
[ { "docid": "acdd7a0c18a1aca3f607a3c9b646b72d", "score": "0.0", "text": "public function addName(\\obiba\\mica\\LocalizedStringDto $value) {\n return $this->_add(3, $value);\n }", "title": "" } ]
[ { "docid": "82d18be85289929083bce42e8680ad4d", "score": "0.83009696", "text": "public function add($element);", "title": "" }, { "docid": "82d18be85289929083bce42e8680ad4d", "score": "0.83009696", "text": "public function add($element);", "title": "" }, { "docid": "82d18be85289929083bce42e8680ad4d", "score": "0.83009696", "text": "public function add($element);", "title": "" }, { "docid": "d54a4865645450be0e99af396446a2bc", "score": "0.75597435", "text": "public function addElement($name, $element);", "title": "" }, { "docid": "96a384378e3df5e8a6a444784850c758", "score": "0.7471611", "text": "public function addElement($element) {\n $this->elements[] = $element;\n }", "title": "" }, { "docid": "4bd6a0469f16d6dba561f63aed7a27ea", "score": "0.7339925", "text": "public function add($element) {\n $type = strtolower(current(array_reverse(explode(\"\\\\\", get_class($element)))));\n parent::add($element);\n if ($type == \"hidden\")\n $this->_hiddenElements[] = $element;\n else\n $this->_inputElements[] = [$element, $this->_currentFieldset];\n }", "title": "" }, { "docid": "95d432488490e7ac084b304219e89d14", "score": "0.7326681", "text": "public function add($elem) {\n\t\t$this->elems[] = $elem;\n\t}", "title": "" }, { "docid": "86c36f47077cc91d3713c35ab8ec4305", "score": "0.7135695", "text": "public function add(string $key, $element): void;", "title": "" }, { "docid": "08812f26194c952ae248947d48ffab25", "score": "0.70985675", "text": "public function addElement(Form\\Element $element) {\n $this->elements[] = $element;\n }", "title": "" }, { "docid": "7080c0b5692647426e7486a0371be3bf", "score": "0.70120484", "text": "function append ( $element ) {\n $this->childrenElements[] = $element;\n }", "title": "" }, { "docid": "614fd21d4d45f96dcaf6cf215f4e71ac", "score": "0.6983219", "text": "public function addElement($element)\n\t{\n\t\t$this->elements[] = $element;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "120e4a40f75d467666161067acc34b53", "score": "0.68825066", "text": "public function addElement(TestInterface $element);", "title": "" }, { "docid": "71aa891a607ac01f203e10f53da7d99b", "score": "0.68602204", "text": "public function addElement(FormItBuilder_baseElement $o_formElement){\n\t\t$this->_formElements[]=$o_formElement;\n\t}", "title": "" }, { "docid": "e280f00a63d52fbd0d3aa5fadfd52b83", "score": "0.6817954", "text": "public function addElement(FormElementInterface $element): void;", "title": "" }, { "docid": "61fd1baddebcb82d91bdc6b231e2502a", "score": "0.67708594", "text": "public function add($element) {\n //debug('Form->add() ; START');\n //debug('Form->add() : '.get_class($element).' -- '.$element->getName().' -- '.$element->getId());\n if(is_object($element)) {\n if(false == $this->idIsAvailable($element)) {\n throw new Exception('Element name ('.$element->getId().') already exist');\n } else {\n $this->elements[] = $element;\n $this->aIds[] = $element->getId();\n $this->nbElements++;\n\n //debug('Form->add() : fireEvent(\\'addedToParent\\')');\n //debug('Form->add() : $this->errorMethod : '.$this->errorMethod);\n $element->fireEvent('addedToParent', array(\n 'parent' => $this,\n 'showError' => $this->errorMethod\n ));\n\n //~ $element->setParent($this);\n }\n } else {\n throw new Exception('Can\\'t add element : it must be an object');\n }\n\n //debug('Form->add() ; END');\n return $element;\n }", "title": "" }, { "docid": "36a4ae8fdf1e9434b503c14c6b545c5f", "score": "0.67453825", "text": "public function add();", "title": "" }, { "docid": "36a4ae8fdf1e9434b503c14c6b545c5f", "score": "0.67453825", "text": "public function add();", "title": "" }, { "docid": "446417f3437167e2e1ee8d6751cd806f", "score": "0.6638368", "text": "private function addRawElement($newElement)\n {\n $this->elements[] = $newElement;\n }", "title": "" }, { "docid": "de72f91ded527c24eae96d7470ee94ea", "score": "0.6632037", "text": "public function append($element)\n {\n $this->elements[] = $element;\n $this->iteratorCount = count($this->elements);\n }", "title": "" }, { "docid": "bccd45da282ba785526e099a499b74c0", "score": "0.66314095", "text": "public function addProduct(ProductElementInterface $product);", "title": "" }, { "docid": "6c2d4d04cfb3c2ef5bc1120f3967d4a2", "score": "0.66285914", "text": "function &add(& $element)\n {\n if (!is_a($element, 'Image_Graph_Font')) {\n $this->_elements[] = &$element;\n }\n $element->_setParent($this);\n return $element;\n }", "title": "" }, { "docid": "93fc17476fd8dbf9e7df8d63adef0784", "score": "0.6585109", "text": "public function addChildElement(HtmlElementInterface $element);", "title": "" }, { "docid": "ebc8cc97fdfd6bb9b72c7ff9b33086cc", "score": "0.6566829", "text": "public function add ($elType, $param = NULL, $place = 'head');", "title": "" }, { "docid": "9bb47b4933c60014ee37fea75e71f89f", "score": "0.65569246", "text": "public function add($element)\n {\n $this->elements[] = $element;\n\n return $this;\n }", "title": "" }, { "docid": "b0e27be5f01a5213708819a4ab2cc6d2", "score": "0.6519199", "text": "protected function add() {\n\t}", "title": "" }, { "docid": "1eaced86978efa40e7dfd87a785dfe80", "score": "0.65120345", "text": "public function addElement($data)\n {\n return $this->save($data);\n }", "title": "" }, { "docid": "b2ee927b21c645cc6f9e6c37440126e1", "score": "0.63844335", "text": "private function addElements()\n {\n $author = (new Text())\n ->setName('author')\n ->setLabel('Author')\n ->setAttribute('id', 'author');\n $this->add($author);\n\n $comment = (new Textarea())\n ->setName('comment')\n ->setLabel('Content')\n ->setAttribute('id', 'comment');\n $this->add($comment);\n\n $submit = (new Submit())\n ->setName('submit')\n ->setAttribute('value', 'Save')\n ->setAttribute('id', 'submitButton');\n $this->add($submit);\n }", "title": "" }, { "docid": "537acda9c78275223b8a405d790d8acb", "score": "0.63750786", "text": "public function addElements($elements);", "title": "" }, { "docid": "6ff6830d259df32ca1a49bc8935ac782", "score": "0.636007", "text": "public function add()\n\t{\n\n\t}", "title": "" }, { "docid": "6ff6830d259df32ca1a49bc8935ac782", "score": "0.636007", "text": "public function add()\n\t{\n\n\t}", "title": "" }, { "docid": "0a00419713a04bc4454f60c900b7e33e", "score": "0.6331", "text": "public function add(DiagramInterface $element);", "title": "" }, { "docid": "873d606e19e3bf66f11fe002f99c4027", "score": "0.62897384", "text": "public function addElement($type) {\n\t\t$element = $this->newElement($type)->setParent($this);\n\t\t\n\t\t$this->add($element);\n\t\t\n\t\treturn $element;\n\t}", "title": "" }, { "docid": "66846195fbdc80114fa55e3a0a8bafe4", "score": "0.62816036", "text": "public function element(Element $element)\r\n {\r\n $this->elements[] = $element;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.6258203", "text": "public function add()\n {\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.6258203", "text": "public function add()\n {\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.6258203", "text": "public function add()\n {\n }", "title": "" }, { "docid": "15f1ba47bdb270f3706044e78eabb73b", "score": "0.62540627", "text": "function add($item);", "title": "" }, { "docid": "0e111eacbd0540b1c4417df147d66f04", "score": "0.6234537", "text": "abstract protected function helperGetOrAdd(ElementInterface $element);", "title": "" }, { "docid": "cf4050914f7846cc90ee60e1f55b292e", "score": "0.62108713", "text": "public function addElement($id, &$element = NULL)\n\t{\n\t\t\n\t\t// a bit shaky, but who cares?\n\t\tif(is_null($element))\n\t\t{\n\t\t\t$element = $id;\n\t\t\t$id = reset($element->getNames());\n\t\t}\n\t\t\n\t\tif (!is_a($element,'FormElement'))\n\t\t\tthrow new FormException('Element is not a Form element: '.$id);\n\t\t\t\n\t\tif (array_key_exists($id,$this->elements))\n\t\t\tthrow new FormException('Element with id '.$id.' already exists!');\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t$this->elements[$id]=$element;\n\t\t\n\t\t//don't change the way the names are found! some Elements rely on this to stay hidden\n\t\tforeach($element->getNames() as $name)\n\t\t{\n\t\t\tif(isset($this->relay[$name]))\n\t\t\t\t$this->relay[$name] []= $id;\n\t\t\t\t//return;\n\t\t\t\t//throw new FormException('another element with variable name '.$name.' already exists!');\n\t\t\telse\t\n\t\t\t\t$this->relay[$name] = array($id);\t\t\t\n\t\t}\n\t\t\t\n\t}", "title": "" }, { "docid": "828878f49cb7c7fb155c0a8c40856bb9", "score": "0.6203352", "text": "public function add($item)\n {\n $this->addArray('content', $item, 'Element');\n }", "title": "" }, { "docid": "15dea5c2d44d2e1fb915c6848aa01b50", "score": "0.6190171", "text": "public function addElement($item)\n {\n $this->items[$this->itemsCount] = $item;\n $this->itemsCount++;\n }", "title": "" }, { "docid": "7ef4443c0425bf681d8c250a168796ad", "score": "0.6178088", "text": "public function addElement(Tx_FormBase_Core_Model_FormElementInterface $formElement) {\n\t\t$this->addRenderable($formElement);\n\t}", "title": "" }, { "docid": "f298344687209fefad5bc187baa85191", "score": "0.6166038", "text": "public function addElement($element)\n\t{\n\t\tif (count(parent::getElements()) < 2)\n\t\t{\n\t\t\tparent::addElement($element);\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "0acf2b1ed7deb5eb9763dafb1554a995", "score": "0.61593544", "text": "private function addTo(){\n\t\t$element = 'to';\n\t\t$options = array('required'=>false,'readonly' => true,'filters'=>array('StringTrim'),'label'=>'to');\n\t\t$this->addElement('text',$element,$options);\n\t\t//$prefix = array();\n\t\t//$decorator = array('DivForm');\n\t\t//$this->addCustomDecorator($prefix,$decorator,$element);\n\t\t$this->applyDecorator($element,true);\n\t\t$this->addToGroup($element);\n\t}", "title": "" }, { "docid": "51c6dc346afbd920ff3118b990798171", "score": "0.61581874", "text": "public function add (DOMElement $node) {\r\n\t \r\n\t if (array_push($this->list, $node)) {\r\n\t\t\t$this->length++;\r\n\t\t\treturn true;\r\n\t\t} else return false;\r\n\t}", "title": "" }, { "docid": "469a164585a0cc5c845caaebc04b1420", "score": "0.6148982", "text": "public function append($element)\n {\n $this->_data[] = $element;\n return $this;\n }", "title": "" }, { "docid": "b8e9e3c102f2e0c7acdc7c77b15bdd11", "score": "0.6146206", "text": "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "title": "" }, { "docid": "f00462f115a2710ea5bc4f9e5c76f8b8", "score": "0.61394346", "text": "function addFormElement($formElement) {\n\t\tif (!$formElement) {\n\t\t\treturn false;\n\t\t}\n\t\tarray_push($this->elementList, $formElement);\n\t\t\n\t\t// Add name of element, linked to it's object\n\t\t$this->elementListNames[$formElement->name] = $formElement;\n\t\t\n\t\t// Add reference to parent.\n\t\t$formElement->parent = $this;\n\t}", "title": "" }, { "docid": "8b263770871769c8c8b841887791d5a0", "score": "0.61378825", "text": "public function testAddingAnElementWillReturnTrue()\n {\n $element1 = new \\stdClass();\n $element1->Name = 'EL 2';\n\n $Collection = new \\MySQLExtractor\\Common\\Collection();\n\n $response = $Collection->add($element1);\n $this->assertTrue($response);\n\n $elements = \\PHPUnit_Framework_Assert::readAttribute($Collection, 'elements');\n $this->assertEquals(array($element1), $elements);\n }", "title": "" }, { "docid": "44fd27d3b001d04a95006f6736121178", "score": "0.61199456", "text": "public function add_element($elements)\n {\n if (is_array($elements)) {\n foreach ($elements as $element) {\n if (in_array($element, $this->elements, true)) {\n continue;\n }\n $this->elements[] = $element;\n }\n } else {\n if (in_array($elements, $this->elements, true)) {\n return;\n }\n $this->elements[] = $elements;\n }\n }", "title": "" }, { "docid": "8cc82d57a63f9212eb9d1ad65de54bad", "score": "0.6116131", "text": "public function addChild(HTMLElement $el) {\n\t\tparent::addChild($el);\n\t\t/* Add pointer to last child, and its children */\n\t\t$this->rAddPointers($this->getChild($this->getNoOfChildren()-1));\n\t}", "title": "" }, { "docid": "898f3b457d77cdc209b1e77aa4d6fa10", "score": "0.6102367", "text": "protected function addElements()\n {\n // Add \"latitude\" field\n $this->add([\n 'type' => 'text',\n 'name' => 'latitude',\n 'id' => 'latitude',\n 'options' => [\n 'label' => 'Latitude',\n ],\n ]);\n\n // Add \"longitude\" field\n $this->add([\n 'type' => 'text',\n 'name' => 'longitude',\n 'options' => [\n 'label' => 'Longitude',\n ],\n ]);\n\n // Add the Update button\n $this->add([\n 'type' => 'submit',\n 'name' => 'update',\n 'attributes' => [\n 'value' => 'Update'\n ],\n ]);\n }", "title": "" }, { "docid": "d22e398d94ed975c966090384b4de731", "score": "0.60905206", "text": "public function add_element($elementName, $content, $attributes = null)\n\t{\n\t\t$this->elements[$elementName]['name'] = $elementName;\n\t\t$this->elements[$elementName]['content'] = $content;\n\t\t$this->elements[$elementName]['attributes'] = $attributes;\n\t}", "title": "" }, { "docid": "9a21a7e4f1224efae5f69af7cae8bf10", "score": "0.6089717", "text": "function add() {\n }", "title": "" }, { "docid": "da51f85d4bd5ac2db7f965102c285f06", "score": "0.6084509", "text": "function addElement($element, $type, $attrDefinition, $attr_collections = array(),\n $attributes = array()) {\n $config = &$this->htmlPurifier()->config;\n $def = &$config->getHTMLDefinition(TRUE);\n $def->addElement($element, $type, $attrDefinition, $attr_collections, $attributes);\n }", "title": "" }, { "docid": "c1dc961aee61158daa89b3109e324cd9", "score": "0.60798395", "text": "function addElement( $element )\r\n\t\t{\r\n\t\t\t$id = NULL;\r\n\t\t\t$class = NULL;\r\n\t\t\t$eValue = NULL;\r\n\t\t\t$caption = NULL;\r\n\t\t\t$label = NULL;\r\n\t\t\t$placeholder = NULL;\r\n\t\t\t$value = NULL;\r\n\t\t\t$type = NULL;\r\n\t\t\t$name = NULL;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tforeach( $element as $attribute => $eValue ) \r\n\t\t\t{\r\n\t\t\t\t# ELEMENT ATTRIBUTES\r\n\t\t\t\tswitch ( $attribute ) \r\n\t\t\t\t{\r\n\t\t\t\t\tcase 'type':\r\n\t\t\t\t\t\tswitch ( $eValue ) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase 'button': // Defines a clickable button\r\n\t\t\t\t\t\t\tcase 'btn': // Defines a clickable button\r\n\t\t\t\t\t\t\t\t$type = 'button';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'checkbox': // Defines a checkbox\r\n\t\t\t\t\t\t\t\t$type = 'checkbox';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'color': // Defines a color picker\r\n\t\t\t\t\t\t\t\t$type = 'color';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'date': // Defines a date control (year, month and day (no time))\r\n\t\t\t\t\t\t\t\t$type = 'date';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'datetime': // Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second, based on UTC time zone)\r\n\t\t\t\t\t\t\t\t$type = 'datetime';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'datetime-local': // Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'datetime-local';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'email': // Defines a field for an e-mail address\r\n\t\t\t\t\t\t\t\t$type = 'email';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'file': // Defines a file-select field and a \"Browse...\" button (for file uploads)\r\n\t\t\t\t\t\t\t\t$type = 'file';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'hidden': // Defines a hidden input field\r\n\t\t\t\t\t\t\t\t$type = 'hidden';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'image': // Defines an image as the submit button\r\n\t\t\t\t\t\t\t\t$type = 'image';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'month': // Defines a month and year control (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'month';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'number': // Defines a field for entering a number\r\n\t\t\t\t\t\t\t\t$type = 'number';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'password': // Defines a password field (characters are masked)\r\n\t\t\t\t\t\t\tcase 'pass': // Defines a password field (characters are masked)\r\n\t\t\t\t\t\t\t\t$type = 'password';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'radio': // Defines a radio button\r\n\t\t\t\t\t\t\t\t$type = 'radio';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'range': // Defines a control for entering a number whose exact value is not important (like a slider control)\r\n\t\t\t\t\t\t\t\t$type = 'range';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'reset': // Defines a reset button (resets all form values to default values)\r\n\t\t\t\t\t\t\t\t$type = 'reset';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'search': // Defines a text field for entering a search string\r\n\t\t\t\t\t\t\t\t$type = 'search';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'submit': // Defines a submit button\r\n\t\t\t\t\t\t\t\t$type = 'submit';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'tel': // Defines a field for entering a telephone number\r\n\t\t\t\t\t\t\t\t$type = 'tel';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'text': // Default. Defines a single-line text field (default width is 20 characters)\r\n\t\t\t\t\t\t\tcase 'textbox':\r\n\t\t\t\t\t\t\t\t$type = 'text';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'textarea': // Defines a nulti-line text field\r\n\t\t\t\t\t\t\t\t$type = 'textarea';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'time': // Defines a control for entering a time (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'time';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'url': // Defines a field for entering a URL\r\n\t\t\t\t\t\t\t\t$type = 'url';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase 'week': // Defines a week and year control (no time zone)\r\n\t\t\t\t\t\t\t\t$type = 'week';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tthrow new Exception( 'Invalid attribute with new Element Class. Please check your form. Please use one of the following as defined in W3 Attribute Values. <a href=\"http://www.w3schools.com/tags/att_input_type.asp\" target=\"_blank\">Valid Attribute Values</a>' );\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} // end switch ( $eValue ) type\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'name':\r\n\t\t\t\t\t\t\tif( $eValue != '' && $eValue != NULL && $eValue != FALSE )\r\n\t\t\t\t\t\t\t\t$name = $this->form_id . '-'. preg_replace( '/[^A-Za-z-_]/', \"\", $eValue );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tthrow new Exception( 'Please set a name for your form element.' );\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} // end else\t\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'class':\r\n\t\t\t\t\t\tcase 'classes':\r\n\t\t\t\t\t\t\t$class = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'id':\r\n\t\t\t\t\t\tcase 'ids':\r\n\t\t\t\t\t\t\t$id = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'placeholder':\r\n\t\t\t\t\t\t\t$placeholder = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'label':\r\n\t\t\t\t\t\t\t$label = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'caption':\r\n\t\t\t\t\t\tcase 'captions':\r\n\t\t\t\t\t\t\t$caption = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'value':\r\n\t\t\t\t\t\t\t$value = $eValue;\t\r\n\t\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t} // end switch ( $rule ) \r\n\t\t\t\t\r\n\t\t\t} // end foreach( $element as $attribute => $eValue ) \r\n\t\t\t\r\n\t\t\t$errors = array();\r\n\t\t\t\r\n\t\t\t# VALIDATION\r\n\r\n\t\t\tif( $this->isSubmitted() )\r\n\t\t\t{\r\n\t\t\t\tforeach( $element as $rule => $msg ) \r\n\t\t\t\t{\r\n\t\t\t\t\tswitch ( $rule ) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 'val_req':\r\n\t\t\t\t\t\tcase 'val_required':\r\n\t\t\t\t\t\t\tif( empty( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = 'This field is required. Please enter a value.';\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_email':\r\n\t\t\t\t\t\t\tif( $this->vEmail( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $this->sEmail( $_POST[$name] ) );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NEW_EMAIL;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_name':\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif( $this->vName( $_POST[$name] ) == 1 )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NAME;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_alpha':\r\n\t\t\t\t\t\t\tif( $this->vAlpha( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_ALPHA;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_alphanumeric':\r\n\t\t\t\t\t\t\tif( $this->vAlphanumeric( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_ALPHANUMERIC;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_int':\r\n\t\t\t\t\t\t\tif( $this->vInt( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_INT;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_number':\r\n\t\t\t\t\t\t\tif( $this->vNumber( $_POST[$name] ) )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_NUMBER;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_pass':\r\n\t\t\t\t\t\tcase 'val_password':\r\n\t\t\t\t\t\t\tif( $this->vPassword( $_POST[$name] ) == 1 )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !empty( $msg ) ) $errors[$name] = $msg;\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_INVALID_PASS;\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'val_match':\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif( $_POST[$name] == $msg['match'] )\r\n\t\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif( !array_key_exists('message', $msg ) )\r\n\t\t\t\t\t\t\t\t\t$errors[$name] = ERR_MM_VALUE;\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t$errors[$name] = $msg['message'];\r\n\t\t\t\t\t\t\t\t\tbreak 2;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t/* ----------- SANITIZE DATA ------------*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 's_query':\r\n\t\t\t\t\t\t\t$this->_cleanQuery( $_POST[$name] );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t} // end switch ( $rule ) \r\n\t\t\t\t\t\r\n\t\t\t\t} // end foreach( $element as $attribute => $eValue ) \r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* ####################################### */\r\n\t\t\t/* ############## ELEMENT ################ */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/* ################# */\r\n\t\t\t/* ##### LABEL ##### */\r\n\t\t\t\r\n\t\t\t# Add label if there is one\r\n\t\t\tif( !empty( $label ) )\t\r\n\t\t\t\techo \"<label>$label</label>\";\r\n\t\t\t\r\n\t\t\t/* ##### LABEL ##### */\r\n\t\t\t/* ################# */\r\n\t\t\t\r\n\t\t\t/* ######################## */\r\n\t\t\t/* ##### ELEMENT TYPE ##### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t/* -------------------- Text, Textbox, or Password -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'text' || $type == 'textbox' || $type == 'password' || $type == 'email' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<input type='$type' name='$name' id='$name' placeholder='$placeholder' value='\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\r\n\t\t\t\t\tif( isset( $_POST[$name] ) ) $element .= $_POST[$name];\r\n\t\t\t\t\telseif( isset( $_GET[$name] ) ) $element .= $_GET[$name]; \r\n\t\t\t\t\telseif( !isset( $_POST[$name] ) && !isset( $_GET[$name] ) && isset( $value ) ) $element .= $value;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name $class\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close text tag\t\r\n\t\t\t\t\t$element .= \"' />\";\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'text' || $type == 'textbox' || $type == 'password' )\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/* -------------------- Textarea -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'textarea' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<textarea type='$type' name='$name' id='$name' placeholder='$placeholder\"; \r\n\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name $class \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close tag\t\r\n\t\t\t\t\t$element .= \"' >\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\t\t\t\t\tif( isset( $_POST[$name] ) ) $element .= $_POST[$name];\r\n\t\t\t\t\telseif( isset( $_GET[$name] ) ) $element .= $_GET[$name]; \r\n\t\t\t\t\telseif( !isset( $_POST[$name] ) && !isset( $_GET[$name] ) && isset( $value ) ) $element .= $value;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$element .= '</textarea>';\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'textarea' )\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/* -------------------- Submit -------------------- */\r\n\t\t\t\t\r\n\t\t\t\tif( $type == 'submit' || $type == 'button' || $type == 'btn' )\r\n\t\t\t\t{\r\n\t\t\t\t\t# Begin creating the input\r\n\t\t\t\t\t$element = \"<input type='$type' name='$name' id='$name' value='\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Set value of $name if it's set ( using $_POST , $_GET or $value\r\n\t\t\t\t\tif( $value != '' || $value != FALSE || $value != NULL ) $element .= $value;\r\n\t\t\t\t\telse $element .= 'Submit';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t# Set the class\r\n\t\t\t\t\t$element .= \"' class='$name btn btn-default $class \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Add appropriate spacing if there's a caption\r\n\t\t\t\t\tif( !empty( $caption ) ) $element .= \" mbt \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Check for errors, # Set Error class and display error underneath input\r\n\t\t\t\t\tif( array_key_exists( $name, $errors ) ) $element .= \" error \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t# Close text tag\t\r\n\t\t\t\t\t$element .= \"' />\";\r\n\t\t\t\t\t\r\n\t\t\t\t} // end if( $type == 'textarea' )\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/* ##### ELEMENT TYPE ##### */\r\n\t\t\t/* ######################## */\r\n\t\t\t\r\n\t\t\t/* ################### */\r\n\t\t\t/* ##### ERRORS ###### */\r\n\t\t\t\r\n\t\t\t# Check for errors\r\n\t\t\t$error_msg = NULL;\r\n\t\t\tif( array_key_exists( $name, $errors ) )\t\r\n\t\t\t\t$error_msg = \"<small class='error'>$errors[$name]</small>\";\r\n\t\t\t\t\r\n\t\t\t/* ##### ERRORS ###### */\r\n\t\t\t/* ################### */\r\n\t\t\t\r\n\t\t\t/* ################### */\r\n\t\t\t/* ##### CAPTION ##### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( !empty( $caption ) )\t\r\n\t\t\t\t$error_msg .= \"<div class='caption mbs'>&uarr; $caption</div>\";\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t/* ##### CAPTION ##### */\r\n\t\t\t/* ################### */\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t/* ############## ELEMENT ################ */\r\n\t\t\t/* ####################################### */\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( isset( $_POST[$name] ) )\r\n\t\t\t{\r\n\t\t\t\t$output = $_POST[$name];\r\n\t\t\t\t$error_field = \"<style>input.$name, textarea.$name{ border-color: #c60f13; background-color:rgba(198,15,19,0.1);}</style>\".$element;\r\n\t\t\t\tif( empty( $errors ) )\r\n\t\t\t\t\t$valid = TRUE;\r\n\t\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t\t$valid = FALSE;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$output = FALSE;\r\n\t\t\t\t$valid = FALSE;\r\n\t\t\t\t$error_msg = FALSE;\r\n\t\t\t\t$error_field = FALSE;\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\t \r\n\t\t\t\t\r\n\t\t\treturn array( 'element' => $element.$error_msg,\r\n\t\t\t\t\t\t 'e' => $element.$error_msg,\r\n\t\t\t\t\t\t 'field' => $element,\r\n\t\t\t\t\t\t 'f' => $element,\r\n\t\t\t\t\t\t 'error_field' => $error_field,\r\n\t\t\t\t\t\t 'ef' => $error_field,\r\n\t\t\t\t\t\t 'error_msg' => $error_msg,\r\n\t\t\t\t\t\t 'em' => $error_msg,\r\n\t\t\t\t\t\t 'output' => $output,\r\n\t\t\t\t\t\t 'o' => $output,\r\n\t\t\t\t\t\t 'valid' => $valid, \r\n\t\t\t\t\t\t 'v' => $valid,\r\n\t\t\t\t\t\t 'name' => $name,\r\n\t\t\t\t\t\t 'n' => $name );\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "a9de13bb5075f1c220da1372f5a30998", "score": "0.6077784", "text": "public function addElementAtStart(IElement $element): IFormBuilder;", "title": "" }, { "docid": "884f4efd3efed45628a40009a3b5a2da", "score": "0.6046646", "text": "function add() {\n\t\tif (True) {\n\n\t\t\t// create an empty product.\n\t\t\t$o =& new ufo_product(0);\n\t\t\t$this->addedObject =& $o;\n\t\t\n\t\t\t// create an entry in the db.\n\t\t\t$o->initialize();\n\t\t\t$o->create();\n\t\t\t$o->edit();\n\n\t\t\t// add it to the product array.\n\t\t\t$this->product[] = $o;\n\t\t}\n\t}", "title": "" }, { "docid": "1b0da0fcbb3462c3346f424788e8064a", "score": "0.60368526", "text": "public function push($el){\r\n\r\n array_push($this->data,$el);\r\n\r\n }", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.60141", "text": "public function add($item);", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.60141", "text": "public function add($item);", "title": "" }, { "docid": "899e2aafb7b728d7667e4c5df5bded1c", "score": "0.59975016", "text": "public function addElementInMiddle(IElement $element): IFormBuilder;", "title": "" }, { "docid": "708654b0ab3ee4558dd7bb3596325328", "score": "0.5980273", "text": "public function addElementClicked(SubmitButton $button)\n\t{\n\t\t$button->parent->createOne();\n\t}", "title": "" }, { "docid": "c973457471b8e23d4cf9dff4c2676f68", "score": "0.596006", "text": "public function add($value);", "title": "" }, { "docid": "c973457471b8e23d4cf9dff4c2676f68", "score": "0.596006", "text": "public function add($value);", "title": "" }, { "docid": "6db6bec47c4fd0c8808f88451463484e", "score": "0.59563875", "text": "public function addField(Element &$field)\n {\n $this->fields[] = $field;\n }", "title": "" }, { "docid": "c81799627050660dc50576c7fcf7b474", "score": "0.5930096", "text": "public function addElement(PageElement $element): bool {\n\t\treturn $this->insertElement($element, $this->elementCount());\n\t}", "title": "" }, { "docid": "224eec254cd14cc1d329d71f442c22cd", "score": "0.5908824", "text": "public function addElement($tag = '')\n {\n $htmlTag = (\n is_object($tag) && $tag instanceof self ?\n $tag :\n new static($tag)\n );\n $htmlTag->top = $this->getTop();\n $htmlTag->parent = &$this;\n $this->content[] = $htmlTag;\n return $htmlTag;\n }", "title": "" }, { "docid": "b475c3a507a8a01901cddb87fe124069", "score": "0.59067476", "text": "function addTag($line)\n{\n\t$elem = $this->parser->parseLine($line);\n\n\tif (isset($elem['after'])) {\n\t\t$this->elements = $this->insertAfter($this->elements, \n\t\t\tarray($elem['id'] => $elem), $elem['after']\n\t\t);\n\t}\n\telse {\n\t\t$this->elements[$elem['id']] = $elem;\n\t}\n}", "title": "" }, { "docid": "e5b9ece7e342a779ab8d06d225086aaf", "score": "0.5902455", "text": "public function addElement(SVGElement $elementObject) {\n\n $this->elementsList[] = $elementObject;\n\n return $this;\n }", "title": "" }, { "docid": "e4c37bd5469dd9ce7be6cb0666857cd9", "score": "0.5887968", "text": "public function addElement($elementType, $name) {\n $elementTypes = $this->getElementTypes(TRUE);\n\n if(!array_key_exists($elementType, $elementTypes)) {\n throw new formWizardException(\n 'unknown elementtype',\n $this->name,\n $name\n );\n }\n\n $className = $elementTypes[$elementType];\n\n $element = array(\n 'name' => $name,\n 'object' => new $className()\n );\n\n $interfaceCheck = ($element['object'] instanceof formElementHandles) ? TRUE : FALSE;\n\n if(!$interfaceCheck) {\n throw new formWizardException('formelement does not implement required interface');\n }\n\n /* new element was added, count id */\n $this->elementCounter++;\n\n $element['object']->name = $name;\n $element['object']->form = $this;\n $element['object']->id = $this->name.'_'.$this->elementCounter;\n\n if($this->isSubmitted() && isset($_REQUEST[$name])) $element['object']->setValue($_REQUEST[$name]);\n\n $this->elements[] = $element;\n\n\n return $element['object'];\n }", "title": "" }, { "docid": "32cf8a7a738ed83c8dcd62aeb27f946b", "score": "0.58780164", "text": "public function addCategoryRegisterElement ($element) {\n $this->categoryRegisterElements[] = $element;\n }", "title": "" }, { "docid": "bbd3131a97a5f293036bd58635a7496b", "score": "0.5866252", "text": "public function AddElement(Request $request,User $user,Room $room,Element $element) \n {\n logger()->info(__METHOD__);\n $this->model->addModel($room,'elements',$element);\n return $this->getView();\n }", "title": "" }, { "docid": "aa9c8efeb424457e8c8d7e4d5b4f4f7a", "score": "0.58554304", "text": "public function add($content);", "title": "" }, { "docid": "491da0b17358cc00cb836ab22df48fbd", "score": "0.585199", "text": "function dynamical_add_elements($element)\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t$output .= '<div class=\"ace_dynamical_add_elements_container\">';\n\t\t$output .= '\t<span class=\"ace_style_wrap ace_dynamical_add_elements_style_wrap\">';\n\t\t$output .= '<span class=\"ace_select_unify\"><select class=\"'.$element['class'].' ace_dynamical_add_elements_select\">';\n\t\t$output .= '<option value=\"\">Select Element</option> ';\n\t\n\n\t\t//gets the option array with available elements\n\t\tif(! @include(ACE_BASE.$element['options_file']))\n\t\t{\n\t\t\t@include($element['options_file']);\n\t\t}\n\n\t\tforeach ($elements as $dynamic_element)\n\t\t{\n\t\t\tif(empty($dynamic_element['name'])) $dynamic_element['name'] = $dynamic_element['id'];\n\t\t\t$output .= \"<option value='\". $dynamic_element['id'].\"'>\". $dynamic_element['name'].\"</option>\";\n\t\t}\n\t\t\n\t\t$output .= '</select>';\n\t\t$output .= '<span class=\"ace_select_fake_val\">Select Element</span></span>';\n\t\t$output .= '\t<a href=\"#\" class=\"ace_button ace_dynamical_add_elements\" title=\"'.$element['name'].'\" id=\"ace_'.$element['id'].'\">Add Element</a>';\n\t\t$output .= '\t<span class=\"ace_loading ace_beside_button_loading\"></span>';\n\t\t$output .= '\t</span>';\n\t\t$output .= '\t<input class=\"ace_dynamical_add_elements_parent\" type=\"hidden\" value=\"'.$element['slug'].'\" />';\n\t\t$output .= '\t<input class=\"ace_dynamical_add_elements_config_file\" type=\"hidden\" value=\"'.$element['options_file'].'\" />';\n\t\n\t\t$output .= '</div>';\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "5f16376204367c5a269ce8f5376b1787", "score": "0.5849282", "text": "function add_element($name, $table) {\n\t$dbh = db_connect(); #DATABASE CONNEXION\n\n\t$name = strtolower($name); // ex: 'Pop' -> 'pop'\n\n\tif (exist($name, $table) == 0) { // Test if the element already exist\n\t\t# TABLE - CAT / SUB-CAT / ARTIST -----------------------\n\t\t$sql = \"INSERT INTO \" . $table . \" (NAME) VALUES (?)\";\n\t\t$stmt = $dbh->prepare($sql);\n\t\t$stmt->execute([$name]);\n\t} else return false;\n}", "title": "" }, { "docid": "8ca4aafbfa4810b4ec252843d7f253af", "score": "0.5848855", "text": "public function add($element): self\n {\n $collection = clone $this;\n $collection->cursor = 0;\n $collection->items[] = $element;\n $collection->length++;\n\n return $collection;\n }", "title": "" }, { "docid": "a2608e0db531be64b6ce5183ccd1709c", "score": "0.5840154", "text": "abstract public function add_item();", "title": "" }, { "docid": "af148e82bccb3d6e758c8266b9f112f5", "score": "0.58387846", "text": "public function add(){\n $this->edit();\n }", "title": "" }, { "docid": "ff1e15e42c0a93acdfb9ffdd558bb90d", "score": "0.5806949", "text": "public function set_element($elm) {\n $this->elements[$elm->id] = $elm;\n }", "title": "" }, { "docid": "c2ba489c57fcf84ee1cab7e298ea6558", "score": "0.58028126", "text": "public function push_back($newElement) {\n $newNode = new Node();\n $newNode->data = $newElement;\n $newNode->next = null; \n if($this->head == null) {\n $this->head = $newNode;\n } else {\n $temp = new Node();\n $temp = $this->head;\n while($temp->next != null) {\n $temp = $temp->next;\n }\n $temp->next = $newNode;\n } \n }", "title": "" }, { "docid": "ba8f4503122411aa73a6dfcaaacf6fab", "score": "0.57948405", "text": "public function addElementAtEnd(IElement $element): IFormBuilder;", "title": "" }, { "docid": "084ee9cb1478e5d8ea93cf24fbdd8be2", "score": "0.5785722", "text": "public function addArray($element){\n array_push($this->array,$element);\n }", "title": "" }, { "docid": "f89775077ff4ccb708bdc15f0fc99150", "score": "0.57842237", "text": "protected function addElements() \n {\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'nombre',\n 'options' => [\n 'label' => 'Usuario Adicional',\n ],\n ]);\n \n \n // Add \"telefono\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'telefono',\n 'options' => [\n 'label' => 'Teléfono',\n ],\n ]);\n \n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'email',\n 'options' => [\n 'label' => 'Mail',\n ],\n ]);\n \n // Add \"usuario\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'skype',\n 'options' => [\n 'label' => 'Skype',\n ],\n ]);\n \n // Add \"id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'id',\n 'options' => [\n 'label' => 'id',\n ],\n ]);\n \n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [\n 'value' => 'Create'\n ],\n ]);\n\n }", "title": "" }, { "docid": "ec7f38436abe09b1aafb916233a02e96", "score": "0.5782304", "text": "public function addWidget()\r\n {\r\n }", "title": "" }, { "docid": "52618f9013e8ecea2dfb2716ac4146fd", "score": "0.5781916", "text": "public function addItem($name, $value)\n {\n $this->elements[] = ['name' => $name, 'value' => $value];\n }", "title": "" }, { "docid": "7b627b65fadbf814a4a5ab0fe540e6b2", "score": "0.57807666", "text": "public function add(array $elements);", "title": "" }, { "docid": "31baeec94bac10b50914d7e831090cdb", "score": "0.5778368", "text": "public function enqueue($element) {\n $this->queue[] = $element;\n }", "title": "" }, { "docid": "5b620cd60a6b2cd8729f75a6518349c5", "score": "0.5777779", "text": "function add($str) {\n\t $this->xml .= $str;\n\t}", "title": "" }, { "docid": "f808cca5973f2da84c4b3bd8e6b04df3", "score": "0.57768905", "text": "public function addElements()\n {\n $this->add(array(\n 'name' => 'place',\n 'type' => 'Zend\\Form\\Element\\Text',\n 'attributes' => array(\n 'required' => true,\n 'id' => 'name',\n 'class' => 'form-control',\n 'placeholder' => 'Enter type name'\n ),\n 'options' => array(\n 'label' => 'Name',\n 'label_attributes' => array(\n 'class' => 'control-label'\n ),\n\n ),\n ));\n }", "title": "" }, { "docid": "d715b1829751df6128294596ab8def3b", "score": "0.5774963", "text": "public function push($item): void\n {\n $this->elements[] = $item;\n }", "title": "" }, { "docid": "a277b7c41b8be9630cab1dc23fb0beb5", "score": "0.57666814", "text": "public function add(string $name, $element, array $dependencies = []) {\n $this->addElement($element, [self::INFO_INDEX_KEY=>$name, $name, $dependencies]);\n $this->noteCollectionChanged();\n }", "title": "" }, { "docid": "3b277c0641b26782353e70b06ac8bdd3", "score": "0.57628363", "text": "protected function addElements() \n {\n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'title',\n 'options' => [\n 'label' => 'Title',\n ],\n ]);\n \n // Add \"parent_id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'parent_id', \n 'options' => [\n 'label' => 'Full Name',\n ],\n ]);\n \n if ($this->scenario == 'create') {\n \n\n }\n \n // Add \"status\" field\n $this->add([ \n 'type' => 'select',\n 'name' => 'status',\n 'options' => [\n 'label' => 'Status',\n 'value_options' => [\n 1 => 'Active',\n 2 => 'Retired', \n ]\n ],\n ]);\n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Create'\n ],\n ]);\n }", "title": "" }, { "docid": "6c98042af562129afb5470113519a111", "score": "0.5762149", "text": "public function addElement( $tagName, $params = array() ) {\n $elt = new Element( $tagName, $params );\n $elt->closeTag = $this->closeTags;\n $this->elements[] = $elt;\n return $elt;\n }", "title": "" }, { "docid": "71f1dba85a40b884f71cd98c2d6a4e7e", "score": "0.57596254", "text": "function addEntry($newentry) {\n\t\t$this->data[] = $newentry;\n\t}", "title": "" }, { "docid": "8bf4d3657dc72f49f98aa620efd1e9ba", "score": "0.57570815", "text": "private function pushNode(\\DOMElement $node)\r\n {\r\n $this->currentNode = $this->currentNode->appendChild($node);\r\n }", "title": "" }, { "docid": "5ad26a0135145040b272a10984b9259a", "score": "0.57564396", "text": "public function addCategory(CategoryElementInterface $category);", "title": "" }, { "docid": "d2150e31524a1061b63af39e73c83731", "score": "0.5723094", "text": "function add($element, $controller)\r\n\t\t{\r\n\t\t\t//go through each element in the node\r\n\t\t\tfor ($i = 0; $i < count($this->elements); $i++)\r\n\t\t\t{\r\n\t\t\t\t//if we get to a key that's greater than this element's key, we insert\r\n\t\t\t\t//the element right before it\r\n\t\t\t\tif ($controller->compare($this->elements[$i]->key, $element->key) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_splice($this->elements, $i, 0, array($element));\r\n\t\t\t\t\treturn $i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if we still haven't found an element greater than the new one, insert the\r\n\t\t\t//new one at the end.\r\n\t\t\t$this->elements[] = $element;\r\n\t\t\treturn count($this->elements) - 1;\r\n\t\t}", "title": "" }, { "docid": "824c4c0663cac8bc51918994f569502d", "score": "0.57209325", "text": "protected function addElem($element)\r\n\t{\r\n\t\tforeach($this->getPools() as $pool) {\r\n\t\t\t$pool->add($element);\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "a6fdfddd2c43435eb0ec618618405b1f", "score": "0.57198125", "text": "public function add($object): void;", "title": "" }, { "docid": "32dbbb800e23fe69b3b2389f091256ed", "score": "0.5710502", "text": "public function add( $text ) {\n\t\t$this->page->append( $text );\n\t}", "title": "" } ]
4dd646fb4cf0354569dd6417f1d4b977
get region by circle id
[ { "docid": "25f12a35be8f4d18f6e99cc8f4529f23", "score": "0.68139374", "text": "function fetch_region()\n\t{\n\t if($this->input->post('circle_id'))\n\t {\n\t echo $this->site->fetch_region($this->input->post('circle_id'));\n\t }\n\t}", "title": "" } ]
[ { "docid": "c137bad64fe8fe8610f43def50c80c9d", "score": "0.67431056", "text": "function getRegion();", "title": "" }, { "docid": "34b18ede17d0bb1c23a079727cdf3124", "score": "0.66251487", "text": "function get_region_by_id($id)\n {\n if(!$this->base)\n return false;\n return $this->base[4][intval(array_search(intval($id),$this->base[1]))];\n }", "title": "" }, { "docid": "b8fd66eafab41027ab8781459f506e2f", "score": "0.6401438", "text": "public function getRegion();", "title": "" }, { "docid": "b8fd66eafab41027ab8781459f506e2f", "score": "0.6401438", "text": "public function getRegion();", "title": "" }, { "docid": "5582a7d55778bd8fe688cde4dcd814cc", "score": "0.6094905", "text": "public function getCircleId()\n {\n return $this->circle_id;\n }", "title": "" }, { "docid": "9f14f26b933fb5f17c4a9c507006d654", "score": "0.6033297", "text": "public function getImageRegion ($width, $height, $x, $y) {}", "title": "" }, { "docid": "dc7c3540d445bb619eadcbbdc161442c", "score": "0.6015322", "text": "public function getRegion($idRegion){\r\n $this->conexion->conectar();\r\n $consultaRegion = \"SELECT * FROM region WHERE id_region = $idRegion\";\r\n $query = $this->conexion->ejecutar($consultaRegion);\r\n $region = new Region();\r\n while(ocifetch($query)){\r\n $region->setIdPais(ociresult($query, \"ID_REGION\"));\r\n $region->setNombrePais(ociresult($query, \"NOMBRE_REGION\"));\r\n $region->setIdPais(ociresult($query, \"ID_PAIS\"));\r\n }\r\n return $region;\r\n }", "title": "" }, { "docid": "889c5a2b923111118921af4aa8619c99", "score": "0.6011297", "text": "function city_by_region($id)\r\n{\r\n\tif(!isset($id))\r\n\t{\r\n\t\t$filtro = null;\r\n\t}else{\r\n\t\t$filtro['RegionId'] = $id;\r\n\t}\r\n\t\r\n\t$campos[]= 'CityId';\r\n\t$campos[]= 'City';\r\n\t\r\n\t$data = get_city($campos,$filtro);\r\n\t\r\n\treturn $data;\r\n}", "title": "" }, { "docid": "e274aebf5f5cce7bf988da1c9b8a42f8", "score": "0.5988894", "text": "public function getRegion($id)\n {\n if ($id == \"all\") {\n return response()->json([\"result\" => Region::all()], 200);\n }\n else {\n return response()->json(\n [\"result\" => Region::where('Regioncode' , $id)->get()], 200);\n }\n }", "title": "" }, { "docid": "fa3246dbc7f9c67c11bf5f71c5c22dcb", "score": "0.5923281", "text": "function find_regions($u, $lid, $xl, $xh, $yl, $yh, $s, $f) {\n global $con;\n $xl = $xl * $f / $s;\n $xh = $xh * $f / $s;\n $yl = $yl * $f / $s;\n $yh = $yh * $f / $s;\n $sql = \"SELECT * FROM 2Dregion WHERE deleted_at IS NULL AND (owner='$u' OR owner='admin') AND layer_id='$lid' AND scale='$f' AND ((tl_x >= '$xl' AND tl_x <= '$xh' AND tl_y >= '$yl' AND tl_y <= '$yh') OR (br_x >= '$xl' AND br_x <= '$xh' AND br_y >= '$yl' AND br_y <= '$yh') OR (tl_x < '$xl' AND br_x > '$xh' AND ((br_y >= '$yl' AND br_y <= '$yh') OR (tl_y >= '$yl' AND tl_y <= '$yh') OR (tl_y < '$yl' AND br_y > '$yh'))) OR (tl_y < '$yl' AND br_y > '$yh' AND ((br_x >= '$xl' AND br_x <= '$xh') OR (tl_x >= '$xl' AND tl_x <= '$xh') OR (tl_x < '$xl' AND br_x > '$xh'))))\";\n if (!($temp = mysql_query($sql, $con))) {\n die_error(-2, json_encode(mysql_error()));\n }\n return $temp;\n}", "title": "" }, { "docid": "39035f818703bfa1116c785ec6e1ad65", "score": "0.5916581", "text": "public function get_by_coords_category($id)//$c1, $c2, $c3, $c4, $id)\r\n {\r\n /*$totales = $this->db->query('select * from negocios where (negocioLatitud between ' . $c1 . ' and ' . $c2 . ') and (negocioLongitud between ' . $c3 . ' and ' . $c4 . ') and negocioGiro = ' . $id);*/\r\n $totales = $this->db->query('select * from negocios where negocioGiro = ' . $id);\r\n return $totales->result();\r\n }", "title": "" }, { "docid": "7635e47acdb6e69687727924c259cde7", "score": "0.58863807", "text": "public function getRegionByID($id) {\n\t\t$region = $this->region->find($id);\n\t\tif ($region) {\n\t\t\treturn $region;\n\t\t}\n\t\tthrow new NotFoundHttpException('Invalid URL.');\n\t}", "title": "" }, { "docid": "5dd9f60c63282a1b093d6bc4c870fbad", "score": "0.5872007", "text": "public function get_by_coords_subcategory($id)//$c1, $c2, $c3, $c4, $id)\r\n {\r\n /*$totales = $this->db->query('select * from negocios where (negocioLatitud between ' . $c1 . ' and ' . $c2 . ') and (negocioLongitud between ' . $c3 . ' and ' . $c4 . ') and negocioSubgiro = ' . $id);*/\r\n $totales = $this->db->query('select * from negocios where negocioSubgiro = ' . $id);\r\n return $totales->result();\r\n }", "title": "" }, { "docid": "d35234a8374ba1643129947795e56e46", "score": "0.5853124", "text": "public function findWithRegion($id) {\n return $this->createQueryBuilder('m')\n ->select('m', 'v', 'd', 'r')\n ->join('m.ville', 'v')\n ->join('v.departement', 'd')\n ->join('d.region', 'r')\n ->where('m.id = :id')\n ->setParameter('id', $id)\n ->getQuery()\n ->getSingleResult();\n }", "title": "" }, { "docid": "5a3b72232062813c43dcfd17e8d80ff7", "score": "0.57653564", "text": "function regions_get($id = null) {\n\t\t//print_r($id);\n\t\t//print_r();\n\n\t\t$this->load->model('Regions_model');\n\t\t$regions = $this->Regions_model->get_regions($id);\n\n\t\tif ($regions) {\n\t\t\t$this->response($regions, 200); // 200 being the HTTP response code\n\t\t} else {\n\t\t\t$this->response(array('error' => 'Couldn\\'t find any region!'), 404);\n\t\t}\n\t}", "title": "" }, { "docid": "58d0feabe5bfd3d8b2f53688e107af0b", "score": "0.5758108", "text": "public function getRegion()\n {\n if (!in_array($this->session->userdata('user_level_8'), $this->common->csiUserRole())) {\n redirect('auth');\n }\n\n $divisionId = $this->input->get('id');\n $rows = $this->common->find('csi_region', 'division_id', $divisionId, 'region_name');\n echo json_encode($rows);\n }", "title": "" }, { "docid": "25b7fe0e8357e3d3c20c949e5b4d12c2", "score": "0.57169694", "text": "public static function region($id)\r\n\t{\r\n\t\tswitch ($id)\r\n\t\t{\r\n\t\t\tcase 1:\r\n\t\t\t\treturn 'North America';\r\n\t\t\tcase 2:\r\n\t\t\t\treturn 'South America';\r\n\t\t\tcase 4:\r\n\t\t\t\treturn 'Antarctica';\r\n\t\t\tcase 8:\r\n\t\t\t\treturn 'Africa';\r\n\t\t\tcase 16:\r\n\t\t\t\treturn 'Europe';\r\n\t\t\tcase 32:\r\n\t\t\t\treturn 'Asia';\r\n\t\t\tcase 64:\r\n\t\t\t\treturn 'Oceania';\r\n\t\t\tdefault:\r\n\t\t\t\treturn 'Unknown';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "aeb0de6b55e0b041918ea7d91e8b8201", "score": "0.571148", "text": "public static function Get_City_State_ByID($id){\n\t\t\n\t\t$connection=Yii::app()->db;\n\t\t$sql = '\n\t\t\tSELECT confini_comunali.gid, confini_comunali.id, confini_comunali.nome, confini_comunali.the_geom\n FROM confini_comunali\n WHERE st_intersects(\n \t\t\tconfini_comunali.the_geom,\n \t\t\tST_Transform(( SELECT centroids.centroid\n \t\t\t\tFROM centroids\n \t\t\t\tWHERE centroids.id = '.$id.'),\n \t\t\t '.Yii::app()->params['geoserver']['citystate_layer_srid'].')\n \t\t);';\n\t\t$command=$connection->createCommand($sql);\n\t\t$dataReader=$command->query();\n\t\t// calling read() repeatedly until it returns false\n\t\t//while(($row=$dataReader->read())!==false) { \t\t}\n\t\t// using foreach to traverse through every row of data\n\t\t//foreach($dataReader as $row) { }\n\t\t// retrieving all rows at once in a single array\n\t\t$rows=$dataReader->readAll();\n\t\t//Yii::log(print_r($rows) , CLogger::LEVEL_INFO, 'Query.DB'); // DEBUG\n\t\tif(count($rows)>1)\n\t\t\treturn Geometry::Get_City_State_ByID_all($id); // Caso MOLTO particolare\n\t\telse\n\t\t\treturn $rows;\n\t\t\n\t}", "title": "" }, { "docid": "8e5d767ea0bdec7d4c0a756a572ed4d1", "score": "0.5650005", "text": "public function area($id);", "title": "" }, { "docid": "a1b62b826d352cc1009afba05706277e", "score": "0.56314534", "text": "function getAreas ();", "title": "" }, { "docid": "7530eecd0b119b6fd9cc6cf314943ed9", "score": "0.5609615", "text": "public function show($id, Request $request)\n\t{\n\t\t$region = Region::find($id);\n\n\t\tif($request->ajax()){\n\t\t\treturn $region;\n\t\t}\n\t}", "title": "" }, { "docid": "c2b1f9471ebc4a009789a531bf173a48", "score": "0.55861217", "text": "public function getCurrentRegion();", "title": "" }, { "docid": "8fcb19affd1cd213163310849fb1b4ba", "score": "0.5514308", "text": "public function getIdRegion()\n\t{\n\t\treturn $this->_idRegion;\n\t}", "title": "" }, { "docid": "05d449012a2989da2dbe07b9b7b3e1e4", "score": "0.5501105", "text": "public function regions($id)\n\t{\n\t\t$region = Region::with(['districts', 'crops'])->find($id);\n\t\treturn view('website.regions.show', compact('region'));\n\t}", "title": "" }, { "docid": "4d49af07595fb2ccd24b83e2a5d99c95", "score": "0.5499255", "text": "function getRegionCode();", "title": "" }, { "docid": "4715464cf9f0641eb2fe235001a4b1ce", "score": "0.5468758", "text": "public function getOne($ID)\n {\n return DB::table('regions')\n ->where('ID', $ID)\n ->first();\n }", "title": "" }, { "docid": "47286eba237fcb84d5826f5128b4cefd", "score": "0.54527265", "text": "public function get_regioni() {\n\n $dati = $this->db->query(\"select r.nome as denominazione_regione, r.latitudine as lat, r.longitudine as lon, sum(ricoverati + terapia_intensiva + isolamento_domiciliare + guariti + deceduti) as totale_casi from datiregioni dr inner join regioni r on dr.codReg = r.codReg group by r.nome, r.latitudine, r.longitudine;\");\n $dati = $dati->result();\n\n return $dati;\n }", "title": "" }, { "docid": "4fe159d8d4f0dd7bf39211829727f957", "score": "0.5437618", "text": "public function getRegion()\n {\n return $this->_get(self::REGION);\n }", "title": "" }, { "docid": "d584a5662bbfd2556d089838a2258af6", "score": "0.5435162", "text": "protected static function getRegionById($id)\n {\n if ( ( $model = Region::findOne(['id'=>$id]) ) !== null) {\n return $model;\n } else {\n throw new \\yii\\web\\HttpException('500','The server is busy. Please try again later.');\n }\n }", "title": "" }, { "docid": "ca0252578b63fecdf41c3cf084387e19", "score": "0.54320025", "text": "public function getById($id, $lazyLoading = false) {\n\t\treturn $this->tdbmService->getObject('salon_une_region', $id, 'coiffuresenegal\\Dao\\Bean\\SalonUneRegionBean', $lazyLoading);\n\t}", "title": "" }, { "docid": "1347df2a2144b6752e0fcc2da5360d54", "score": "0.5420939", "text": "public function createCircle() {\n\t\treturn $this->objectManager->get('Tx_Sfsvgapi_Domain_Model_Circle');\n\t}", "title": "" }, { "docid": "5028db174dfe99b9f790baba3051ccb7", "score": "0.5410203", "text": "abstract function getAreas ();", "title": "" }, { "docid": "ee02ec7d9fea269726133728336dcd71", "score": "0.54002196", "text": "public static function Get_Service_Area_ByID($id){\n\t\n\t\t$connection=Yii::app()->db;\n\t\t$sql = '\n\t\tSELECT service_areas.gid, service_areas.area, service_areas.desc_area, service_areas.the_geom\n\t\tFROM service_areas\n\t\tWHERE st_intersects(\n\t\t\tservice_areas.the_geom,\n\t\t\tST_Transform(( SELECT centroids.centroid\n\t\t\t\t\t\t\tFROM centroids\n\t\t\t\t\t\t\tWHERE centroids.id = '.$id.'),\n\t\t\t\t\t\t\t'.Yii::app()->params['geoserver']['service_areas_layer_srid'].')\n\t\t\t);';\n\t\t$command=$connection->createCommand($sql);\n\t\t$dataReader=$command->query();\n\t\t$rows=$dataReader->readAll();\n\t\t/*\n\t\tif(count($rows)>1)\n\t\t\treturn Geometry::Get_Service_Area_ByID_all($id); // Caso MOLTO particolare\n\t\telse\n\t\t*/\n\t\t\treturn $rows;\n\t\n\t}", "title": "" }, { "docid": "5188a212e59ce14c574943da5c4e0dc4", "score": "0.53829074", "text": "function getRegion($uid) {\n\t\t\n\t\t$crazyRecursionLimiter = 999;\n\t\t$res = $GLOBALS ['TYPO3_DB']->exec_SELECTquery ( 'tx_chtrip_region.*', 'tx_chtrip_region', 'pid=' . $this->lConf ['sysfolder'] . ' AND tx_chtrip_region.deleted=0 AND tx_chtrip_region.hidden=0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t AND tx_chtrip_region.uid=' . intval ( $uid ) );\n\t\twhile ( $crazyRecursionLimiter > 0 && $this->region [$this->recursionLevel] = $GLOBALS ['TYPO3_DB']->sql_fetch_assoc ( $res ) ) {\n\t\t\tif ($this->region [$this->recursionLevel] ['parent_uid'] != 0) {\n\t\t\t\t$parent_uid = $this->region [$this->recursionLevel] ['parent_uid'];\n\t\t\t\t$this->recursionLevel --;\n\t\t\t\t$nextLevel = $this->getRegion ( $parent_uid );\n\t\t\t} else {\n\t\t\t\tsort ( $this->region );\n\t\t\t\tforeach ( $this->region as $k => $v ) {\n\t\t\t\t\t$this->regionTitle [] = $v ['title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$crazyRecursionLimiter --;\n\t\t}\n\t}", "title": "" }, { "docid": "e9f93b6cb3cd7e9894979bf2072b01fa", "score": "0.5373555", "text": "public function getRegion() : ?Region;", "title": "" }, { "docid": "71ba6e01866710a7b25088e6243fb8c5", "score": "0.53656983", "text": "function getRegionByID($codeReg) {\n $returnArray = null;\n\n $db = connexionBD();\n\n $sql = \"SELECT *\n\t\tFROM regions R\n\t\tWHERE R.num_region = :region\";\n\n $response = $db->prepare($sql);\n\n// Change ? into the correct value\n $response->bindValue(':region', $codeReg, PDO::PARAM_INT);\n\n $response->execute();\n\n if ($response->rowCount() == 1) {\n $row = $response->fetch();\n $returnArray = array(\n \"region\" => $row[\"nom_r\"],\n \"code_region\" => $row[\"num_region\"]\n );\n } // else NO DATA FOUND\n// close the cursor\n $response->closeCursor();\n\n return $returnArray;\n}", "title": "" }, { "docid": "544696b01401dd686ff85ab0e50c92c4", "score": "0.53581035", "text": "function regions_by_country($id = null)\r\n{\r\n\tif(!isset($id))\r\n\t{\r\n\t\t$filtro = null;\r\n\t}else{\r\n\t\t$filtro['CountryId'] = $id;\r\n\t}\r\n\t\r\n\t$campos[]= 'RegionId';\r\n\t$campos[]= 'Region';\r\n\t\r\n\t$data = get_load_regions($campos,$filtro);\r\n\t\r\n\treturn $data;\r\n}", "title": "" }, { "docid": "736756c5cd7e65d5ebe02875e6709f49", "score": "0.53432584", "text": "public function getCirclesByUserId($id){\r\n\t\t$ucs = $this->query(\"SELECT circle_id as id FROM user_circles as UserCircle WHERE UserCircle.user_id = $id;\");\r\n\t\t$circlesId = array();\r\n\t\tforeach ($ucs as $key => $uc) {\r\n\t\t\tarray_push($circlesId, $uc['UserCircle']['id']);\r\n\t\t}\r\n\t\t$circles = $this->find('all', array(\r\n\t\t\t'conditions' => array(\r\n\t\t\t\t'Circle.id' => $circlesId,\r\n\t\t\t\t'Circle.active' => 1\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\t\treturn $circles;\r\n\t}", "title": "" }, { "docid": "dae21c54200acd4e52b15f6bfe086195", "score": "0.53236914", "text": "function object_region($object,$bounds)\r\n{\r\n\t$rectangle_margin = {'x':0.25,'y':0.25}", "title": "" }, { "docid": "17b4f53cdd5cd4a4c3ae1eb61ad1d1c1", "score": "0.5321817", "text": "public function getCerclesOfRegion(Request $request, $id)\n {\n $query = Location::query()->cercle()->searchByName($request->query('name'));\n return response()->json(['status' => 'succes', 'cercles' => $query->where('parent_id', $id)->get()]);\n }", "title": "" }, { "docid": "a471e7d12cb139d63308526934408e5f", "score": "0.53185946", "text": "public function showRegion($id)\n\t{\n\t\t$region = Region::with('districts')->find($id);\n\t\treturn view('website.regions.show' , ['region' => $region]);\n\t}", "title": "" }, { "docid": "3bfcf9526dd3305e89db17986269d13c", "score": "0.5307202", "text": "public static function Get_City_State_ByID_all($id){\n\t\t\n\t\tif(gettype($id)!=\"integer\")\n\t\t\treturn;\n\t\t\n\t\t$connection=Yii::app()->db;\n\t\t$sql = '\n\t\t\n SELECT intersezioni.nome, st_area(intersezioni.clipped_geom) / st_area(lotto.lotto) * 100::double precision AS percentuale\n FROM ( \n \t\tSELECT toccano.gid, toccano.id, toccano.nome, toccano.the_geom,\n \t\t\tst_intersection(toccano.the_geom, ST_Transform(( SELECT water_request_geometries.geom\n \t\t\t\t\t\t\t\t\t\t\tFROM water_request_geometries\n \t\t\t\t\t\t\t\t\t\t\tWHERE water_request_geometries.id = '.$id.'),\n \t\t\t\t\t\t\t\t\t\t '.Yii::app()->params['geoserver']['citystate_layer_srid'].')\n \t\t\t) AS clipped_geom\n FROM ( \n \t\tSELECT confini_comunali.gid, confini_comunali.id, confini_comunali.nome, confini_comunali.the_geom\n FROM confini_comunali\n WHERE st_intersects(\n \t\t\tconfini_comunali.the_geom,\n \t\t\tST_Transform(( SELECT water_request_geometries.geom\n \t\t\t\tFROM water_request_geometries\n \t\t\t\tWHERE water_request_geometries.id = '.$id.'),\n \t\t\t '.Yii::app()->params['geoserver']['citystate_layer_srid'].')\n )\n ) toccano\n ) intersezioni, ST_Transform(( SELECT water_request_geometries.geom\n \t\t\t\t\t\t\t\tFROM water_request_geometries\n \t\t\t\t\t\t\t\tWHERE water_request_geometries.id = '.$id.'),\n \t\t\t\t\t\t\t'.Yii::app()->params['geoserver']['citystate_layer_srid'].') lotto(lotto) ORDER BY percentuale DESC;\n\t\t';\n\t\t$command=$connection->createCommand($sql);\n\t\t$dataReader=$command->query();\n\t\t// retrieving all rows at once in a single array\n\t\t$rows=$dataReader->readAll();\n\t\t//Yii::log(print_r($rows) , CLogger::LEVEL_INFO, 'Query.DB'); // DEBUG\n\t\treturn $rows;\n\t\t\n\t}", "title": "" }, { "docid": "fa2ee1102b12cd92076a9cbde8120359", "score": "0.5304445", "text": "public function getBoundsForRegion($id, $filter = null)\n {\n $boundController = new BoundsController($this->getAuth(), $filter);\n return $boundController->getResource('for', array('region', $id));\n }", "title": "" }, { "docid": "dcf0743c6d580b89ca94a207c2637cc9", "score": "0.5296768", "text": "public function circle ($ox, $oy, $px, $py) {}", "title": "" }, { "docid": "86aff69f722ef469df8421515eb7b155", "score": "0.5260282", "text": "public function getAreaById($id){\t\n\t\t$this->db->where('id', $id);\n\t\t$query = $this->db->get(AREA);\n\t\treturn $query->row_array();\n\t}", "title": "" }, { "docid": "94a8f60f99eed184431dee069a3974c5", "score": "0.5252927", "text": "public function getIdUsersFromCircleId($id){\r\n\t\tif($id == 0){\r\n\t\t\t\r\n\t\t\t$userId = $_SESSION['UserAuth']['User']['id'];\r\n\t\t\t$ucs = $this->query(\"SELECT user_id as id FROM user_circles as UserCircle WHERE UserCircle.user_id = $userId;\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$ucs = $this->query(\"SELECT user_id as id FROM user_circles as UserCircle WHERE UserCircle.circle_id = $id;\");\r\n\t\t}\r\n\t\t\r\n\t\t$circlesId = array();\r\n\t\tforeach ($ucs as $key => $uc) {\r\n\t\t\tarray_push($circlesId, $uc['UserCircle']['id']);\r\n\t\t}\r\n\t\treturn $circlesId;\r\n\t}", "title": "" }, { "docid": "af8fa288d0f4f1192c82112774d6bdd3", "score": "0.52513146", "text": "public function getRegion()\n {\n if ($this->_region === null) {\n switch ($this->name) {\n case static::NAME_DNIPROPETROVSK:\n case static::NAME_KIROVOHRAD:\n case static::NAME_POLTAVA:\n case static::NAME_CHERKASY:\n $this->_region = Region::get(Region::NAME_CENTER);\n break;\n case static::NAME_KIEV:\n case static::NAME_SUMY:\n case static::NAME_CHERNIHIV:\n case static::NAME_ZHYTOMYR:\n $this->_region = Region::get(Region::NAME_NORTH);\n break;\n case static::NAME_DONETSK:\n case static::NAME_KHARKIV:\n case static::NAME_LUHANSK:\n $this->_region = Region::get(Region::NAME_EAST);\n break;\n case static::NAME_ARC:\n case static::NAME_ZAPORIZHIA:\n case static::NAME_MYKOLAIV:\n case static::NAME_KHERSON:\n case static::NAME_ODESSA:\n $this->_region = Region::get(Region::NAME_SOUTH);\n break;\n case static::NAME_IVANO_FRANKIVSK:\n case static::NAME_VOLYN:\n case static::NAME_LVIV:\n case static::NAME_RIVNE:\n case static::NAME_ZAKARPATTIA:\n $this->_region = Region::get(Region::NAME_WEST);\n break;\n case static::NAME_VINNYTSIA:\n case static::NAME_KHMELNYTSKYI:\n case static::NAME_TERNOPIL:\n case static::NAME_CHERNIVTSI:\n $this->_region = Region::get(Region::NAME_SOUTH_WEST);\n break;\n }\n }\n return $this->_region;\n }", "title": "" }, { "docid": "63b5e3d2b7deebdfaa72ebdaa40c817a", "score": "0.52414405", "text": "function find_group($ident=\"\")\n\t{\n\tGLOBAL $CircleGroups;\n\t\n\t$group = \"\";\n\t\n\tforeach($CircleGroups as $circle)\n\t {\n\t if ( $circle[0] == $ident )\n\t { $group = $circle[2]; break; }\n\t }\n\t \n\t//IPS_LogMessage(\"...\",$ident.\"-\".$group);\n\treturn $group;\n\t}", "title": "" }, { "docid": "f1d42f63c40170f18b24618e57b0768f", "score": "0.5240148", "text": "public function actionGetregion($id){\n $rows = \\common\\models\\Region::find()->where(['country_id' => $id, 'is_status' => 1])->all();\n echo \"<option value=''>\".Yii::t('app', '-- Select Region --').\"</option>\";\n \n if(count($rows)>0){\n foreach ($rows as $row){\n echo \"<option value='$row->id'>$row->region</option>\";\n }\n }else{\n echo \"\";\n }\n }", "title": "" }, { "docid": "aa6f8a01bbc123ef0d98042a51a4c989", "score": "0.52358216", "text": "public function findByRegion(Request $request, $id)\n {\n return District::where('region_id', $id)->get()->toArray();\n }", "title": "" }, { "docid": "fe6d43329e97925237039384018a5cc3", "score": "0.5232356", "text": "public function getPolygon();", "title": "" }, { "docid": "829ea948c6f8820a0b350602b7b43e15", "score": "0.5204624", "text": "function getRegion() {\n $returnArray = null;\n $i = 0;\n\n $db = connexionBD();\n\n $sql = \"SELECT *\n\t\tFROM regions R\n\t\tORDER BY nom_r\";\n\n $response = $db->prepare($sql);\n\n $response->execute();\n\n if ($response->rowCount() > 0) {\n while ($row = $response->fetch()) {\n $returnArray[$i ++] = array(\n \"region\" => $row[\"nom_r\"],\n \"code_region\" => $row[\"num_region\"]\n );\n }\n } // else NO DATA FOUND\n// close the cursor\n $response->closeCursor();\n\n return $returnArray;\n}", "title": "" }, { "docid": "370248d48413fbbeebb1825b2683c3d3", "score": "0.5204301", "text": "public function oilPaintImage ($radius) {}", "title": "" }, { "docid": "53c8f6cade865c2208c7d9ed5958e7d0", "score": "0.52042955", "text": "public function getRegionById($regionId) {\n\t\tself::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' begin' );\n\n\t\t$region = new Region ();\n\n\t\t$query = ClaimsDB::getRegionById ( $regionId );\n\n\t\t$connectionManager = ConnectionManager::getInstance ();\n\n\t\t$rs = $connectionManager->select ( $query );\n\n\t\tforeach ( $rs as $element ) {\n\t\t\t$region->setId ( $element ['id'] );\n\t\t\t$region->setName ( $element ['name'] );\t\t\t\n\t\t\t$region->setCoordinates ( explode ( ';', $element ['coordinates'] ) );\n\t\t\t$region->setPosition ( $element ['position'] );\n\t\t}\n\n\t\tself::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' end' );\n\n\t\treturn $region;\n\t}", "title": "" }, { "docid": "62fd4c6bb3de454486fe1c279e15935d", "score": "0.51967275", "text": "function getRegions($int_uid = null, $int_country_id = null)\n {\n printf(\"getRegions: This function is not implemented yet.\\n\");\n }", "title": "" }, { "docid": "559699506f8750edb78242ba5c23cbce", "score": "0.51862305", "text": "public function lookup_group($id);", "title": "" }, { "docid": "14e58a43084f8b473b961e335374b37d", "score": "0.5184829", "text": "public function getRegionCode();", "title": "" }, { "docid": "14e58a43084f8b473b961e335374b37d", "score": "0.5184829", "text": "public function getRegionCode();", "title": "" }, { "docid": "16094ea878e0e5f6c10cce927c5e966c", "score": "0.5183471", "text": "public function getRegion()\n {\n return $this->hasOne(Region::className(), ['id' => 'region_id']);\n }", "title": "" }, { "docid": "4fa124df2c93d6bc91ccb7e398095e28", "score": "0.51779187", "text": "public function regionByIdAction()\n {\n $ids = explode(',', $this->get('request')->query->get('id'));\n\n $regionList = $this->getDoctrine()\n ->getRepository('ListsRegionBundle:Region')\n ->findBy(array('id' => $ids));\n\n $result = array();\n\n foreach ($regionList as $region) {\n $result[] = $this->serializeObject($region);\n }\n\n return new Response(json_encode($result));\n }", "title": "" }, { "docid": "86f4a82fb74c4472ec097a3fce5419d8", "score": "0.5165199", "text": "public function index($id)\n {\n $location = new Location;\n $parents = $location->country();\n $locations = $location->location();\n return view('user.region.region',compact('id','parents','locations','location'));\n }", "title": "" }, { "docid": "b446ddd5085df836b5f5f678629c89c4", "score": "0.5154734", "text": "function getCoordFromId($id) {\n\t\t$id=intval($id);\n\t\t$x=$id%MAX_X-intval(MAX_X/2);\n\t\t$y=intval(MAX_Y/2)-intval($id/MAX_X);\n\t\treturn array('x'=>$x,'y'=>$y);\n\t}", "title": "" }, { "docid": "328a5375e6fd37f34f41f97328a480e3", "score": "0.51485187", "text": "public function getRegionId()\n {\n return $this->region_id;\n }", "title": "" }, { "docid": "328a5375e6fd37f34f41f97328a480e3", "score": "0.51485187", "text": "public function getRegionId()\n {\n return $this->region_id;\n }", "title": "" }, { "docid": "f93e61099370b9d1f4a8ee13ab432046", "score": "0.5142118", "text": "public function getSalonUneRegionById($id, $lazyLoading = false) {\n\t\treturn $this->getById($id, $lazyLoading);\n\t}", "title": "" }, { "docid": "4af88f4b00d43ee28da3ac316b571131", "score": "0.51378334", "text": "public function getRegions(string $layout): array;", "title": "" }, { "docid": "c016516ca9971b8ebbda55b7105cc421", "score": "0.5132097", "text": "function find_id_toshow()\n\t{\n\tGLOBAL $CircleGroups;\n\tGLOBAL $ExterneStromzaehlerGroups;\n\n\t$id_result = array();\n\n\t$id = false;\n\t$maxleistung = 0;\n\t$info = \"\";\n\t$objectname = \"\";\n\t$idleistung = 0;\n\t$idgesamt = 0;\n\t$idkosten = 0;\n\t$type = \"\";\n\t$parent = 0;\n\t$objectident = \"\";\n\n\t\n\t$CircleVisuPath = \"Visualization.WebFront.Hardware.Plugwise.MENU.Stromzaehler\";\n \t$CircleIdCData = get_ObjectIDByPath($CircleVisuPath);\n\n\t$CircleDataPath = \"Program.IPSLibrary.data.hardware.Plugwise.Circles\";\n \t$CircleIdData = get_ObjectIDByPath($CircleDataPath);\n\n\t$GruppenVisuPath= \"Visualization.WebFront.Hardware.Plugwise.MENU.Gruppen\";\n \t$GroupsIdData = get_ObjectIDByPath($GruppenVisuPath);\n\n\t$OthersDataPath = \"Program.IPSLibrary.data.hardware.Plugwise.Others\";\n \t$GroupsIdOData = get_ObjectIDByPath($OthersDataPath);\n\n\t//***************************************************************************\n\t// Welcher Stromzaehler soll dargestellt werden\n\t//***************************************************************************\n\tif ( $id == false ) // noch nichts gefunden\n\t\tforeach ( IPS_GetChildrenIDs($CircleIdCData) as $child )\n\t\t\tif ( GetValueInteger($child) == 1 )\n\t \t{ // gefunden\n\t\t\t\t$id = true;\n\t\t\t\t$type = \"ZAEHLER\";\n\t \t\t$object = IPS_GetObject($child);\n\t \t$info = $object['ObjectInfo'];\n\t \t$objectname = $object['ObjectName'];\n\t\t\t\t\n\t \t// suche in Circles\n\t \t$parent = @IPS_GetObjectIDByIdent($info,$CircleIdData);\n\t \tif ( $parent )\n\t \t{\n\t\t\t\t\t$idleistung = IPS_GetObjectIDByName('Leistung',$parent);\n\t\t\t\t\t$idgesamt = IPS_GetObjectIDByName('Gesamtverbrauch',$parent);\n\t\t\t\t\t$idkosten = IPS_GetObjectIDByName('Kosten',$parent);\n\n\t\t\t\t\tforeach ($CircleGroups as $circle )\n\t \t\t\t\t{\t// Maxwert fuer Circle aus Config\n\t \t\t\t\tif ( $info == $circle[0] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$maxleistung = $circle[4];\n\t \t\t\t\tbreak;\n\t \t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t $id = false ; //Doch kein Circle\n\t\t}\n\t\t\n\t//***************************************************************************\n\t// Welcher externe Stromzaehler soll dargestellt werden\n\t//***************************************************************************\n\tif ( $id == false ) // noch nichts gefunden\n\t\tforeach($ExterneStromzaehlerGroups as $extern)\n\t\t\tif ( $extern[0] == $info ) // $info wird bei Circlesuche gefunden\n\t\t\t\t{\n\t\t\t\t$type = \"EXTERN\";\n\t\t\t\t$id = true;\n\t\t\t\t$objectname = $extern[0];\n\t\t\t\t$idleistung = $extern[2];\n\t\t\t\t$idgesamt = $extern[3];\n\t\t\t\t$maxleistung = $extern[4];\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t}\n\n\t//***************************************************************************\n\t// kein Stromzaehler oder Extern , dann Gruppe suchen\n\t//***************************************************************************\n\tif ( $id == false ) // noch nichts gefunden\n\t\tforeach ( IPS_GetChildrenIDs($GroupsIdData) as $child )\n\t\t\tif ( GetValueInteger($child) == 1 )\n\t \t{\n\t\t\t\t$id = true;\n\t\t\t\t$type = \"GRUPPE\";\n\t\t\t\t\n\t\t\t\t$object = IPS_GetObject($child);\n\t \t$ident = $object['ObjectIdent'];\n\t \t$idleistung = IPS_GetObjectIDByIdent('Leistung',IPS_GetObjectIDByIdent($ident,$GroupsIdOData));\n\t \t$idgesamt = IPS_GetObjectIDByIdent('Gesamtverbrauch',IPS_GetObjectIDByIdent($ident,$GroupsIdOData));\n\t \t$idkosten = IPS_GetObjectIDByIdent('Kosten',IPS_GetObjectIDByIdent($ident,$GroupsIdOData));\n\n\t\t\t\t$objectname = $object['ObjectName'];\n\t\t\t\t$objectident = $object['ObjectIdent'];\n\t\t\t\t$maxleistung = 0;\n\t\t\t\tbreak;\n\t\t\t\t}\n\n\t//***************************************************************************\n\t// kein Stromzaehler oder Extern oder Gruppe dann Gesamt\n\t//***************************************************************************\n\tif ( $id == false ) // noch nichts gefunden dann Gesamt\n\t\t{ // Erst mal diese Daten nehmen\n\t\t$id = true;\n\t\t$type = \"GESAMT\";\n\t\t$idgesamt = IPS_GetObjectIDByIdent('SYSTEM_MAIN',$GroupsIdOData);\n\t\t$idleistung = IPS_GetObjectIDByName('Leistung',$idgesamt);\n\t\t$idkosten = IPS_GetObjectIDByIdent('Kosten',$idgesamt);\n\t\t$idgesamt = IPS_GetObjectIDByName('Gesamtverbrauch',$idgesamt);\n\t\t\n\t\t$objectname = \"Gesamt\";\n\t\t}\n\n\n\n\tif ( $objectname == \"SYSTEM_REST\" )\n $objectname = \"Sonstiges\";\n\n\t//***************************************************************************\n\t// \n\t//***************************************************************************\n\t$id_result['TYPE'] = $type;\n\t$id_result['ID'] = $id;\n\t$id_result['IDLEISTUNG'] = $idleistung;\n\t$id_result['IDGESAMT'] = $idgesamt;\n\t$id_result['IDKOSTEN'] = $idkosten;\n\t$id_result['MAXLEISTUNG'] = $maxleistung;\n\t$id_result['INFO'] = $info;\n\t$id_result['OBJECTNAME'] = $objectname;\n\t$id_result['PARENT'] = $parent;\n\t$id_result['OBJECTIDENT'] = $objectident;\n\t\n\treturn $id_result;\n\t}", "title": "" }, { "docid": "0915579d09365011c18d1e4d8ba9174f", "score": "0.5125551", "text": "function getRegionById($regionId) {\n\t\t\tif (!isset( $this->_regions[$regionId] )) {\n\t\t\t\treturn $this->getRegion( )->load( $regionId );\n\t\t\t}\n\n\t\t\treturn $this->_regions[$regionId];\n\t\t}", "title": "" }, { "docid": "513b50ce34f100488e3924b22f75791e", "score": "0.5121415", "text": "protected function getPOIByID($id) {\r\n\t\t$pdo = $this->getPDO();\r\n\t\t$sql = \"SELECT * FROM POI WHERE id=:id\";\r\n\t\t$stmt = $pdo->prepare($sql);\r\n\t\t$stmt->bindValue(\":id\", $id);\r\n\t\t$stmt->execute();\r\n\t\tif ($row = $stmt->fetch()) {\r\n\t\t\tif (empty($row[\"dimension\"]) || $row[\"dimension\"] == 1) {\r\n\t\t\t\t$poi = new POI1D($row);\r\n\t\t\t} else if ($row[\"dimension\"] == 2) {\r\n\t\t\t\t$poi = new POI2D($row);\r\n\t\t\t} else if ($row[\"dimension\"] == 3) {\r\n\t\t\t\t$poi = new POI3D($row);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception(\"Invalid dimension: \" . $row[\"dimension\"]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $poi;\r\n\t}", "title": "" }, { "docid": "53d003a3857885fe6b544c476951bbde", "score": "0.51208085", "text": "public static function regionCenter(){\n global $Database, $Session, $Core, $Logs;\n\n $output = '';\n $where = $Session->filter_region_center('','','','');\n $where = !empty($where) ? 'WHERE '.$where : '';\n\n $q = \"SELECT * FROM \".DB_PREFIX.\"centers $where ORDER BY region, center\";\n $result = $Database->result(array(__LINE__, __METHOD__, __FILE__), $q);\n\n if(count($result)>0){\n $b=$c=0;\n $old_region='';\n for($a=0; $a<count($result); $a++){\n $row = $result[$a];\n // Region\n if($old_region!=$row[\"region\"]){\n $output .= ($b>0) ? ']},' : '';\n $output .= '{\"region\":\"'.$row[\"region\"].'\",\"centers\":[';\n $b++;\n $c=0;\n }\n $output .= ($c>0) ? ',' : '';\n $c++;\n\n $output .= '{\n \"name\":\"'.$row[\"center\"].'\",\n \"bm\":\"'.$row[\"bm\"].'\",\n \"km\":\"'.$row[\"km\"].'\",\n \"bst\":\"'.$row[\"bst\"].'\",\n \"kst\":\"'.$row[\"kst\"].'\",\n \"campus\":\"'.$row[\"campus\"].'\",\n \"goshti\":\"'.$row[\"goshti\"].'\",\n \"lam\":\"'.$row[\"lam\"].'\",\n \"id\":\"'.$row[\"center_id\"].'\"\n }';\n \n $output .= ($a==(count($result)-1)) ? ']}' : '';\n $old_region=$row[\"region\"];\n }\n }\n return '['.$output.']';\n }", "title": "" }, { "docid": "9b9854f805906f97d5202d9a7b356cff", "score": "0.51189923", "text": "function selectHotspotCoordinates($id)\n\t{\n\t\treturn $this->hotspot_coordinates[$id];\n\t}", "title": "" }, { "docid": "f420c715691d5095b8265333ae7a1854", "score": "0.5097112", "text": "public function show($id)\n {\n $ville = Ville::findOrFail($id);\n\n return view('regions.show', compact('ville'));\n }", "title": "" }, { "docid": "4c1a1eaf21ff743717aa8814fdf1591c", "score": "0.5093798", "text": "public function show($id)\n {\n $region = Region::with('area')->find($id);\n // return $region;\n return view('admin.regions.show',['region' => $region]);\n }", "title": "" }, { "docid": "9559f58a2c716aa4a6c2f3570791b01e", "score": "0.50902635", "text": "public function edit_circle($id)\n\t{\n\t\t$data['title'] = 'Traffic Police | Dashboard';\n\t\t$data['heading'] = 'Traffic Wardens';\n\t\t$data['page_name'] = 'admin/traffic_wardens/edit_circle';\n\n\t\t$data['edit'] = $this->common_model->getAllData('traffic_warden_circles', '*', 1, array('id' => $id));\n\n\t\tview('template', $data);\n\t}", "title": "" }, { "docid": "15286a7fdeda5a1b0bbd93e1060eea4e", "score": "0.5088087", "text": "function getRegion() {\r\n\t\treturn $this->getData('region');\r\n\t}", "title": "" }, { "docid": "0517c60c1ae0eca5a3094680e85f5162", "score": "0.5079284", "text": "function get_geotag_by_geopress_id ($id) {\n\t\t \tif ($id) {\n\t\t \tglobal $wpdb;\n\t\t\t\t$table = $wpdb->prefix . GEOPRESS_TABLE_NAME;\n\n\t \t\t$sql = \"SELECT * FROM $table WHERE geopress_id = $id\";\n\t\t \t$res = $wpdb->get_row ($sql);\n\t\t \treturn $res;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f8918c0691adefa729042c5e0579a0b0", "score": "0.50626105", "text": "public function edgeImage ($radius) {}", "title": "" }, { "docid": "9ceb021657bea0236db03cb0c72d6bef", "score": "0.5061798", "text": "public function findMapasimagenesById($id)\r\r\n\t{\r\r\n\t\treturn Mapasimagenes::find($id);\r\r\n\t}", "title": "" }, { "docid": "a8d1f1adb5f5bfeb83fcbdb54222aeed", "score": "0.50599384", "text": "public function _getAdministrativeRegionById( $id ) {\n\t\tif (! is_numeric ( $id ) ) {\n\t\t\tthrow new EErroConsulta ();\n\t\t} else {\n\t\t\t//nothing to do here\n\t\t}\n\t\t$administratveRegions = $this->administrativeRegionDAO->idFind ( $id );\n\t\treturn $administratveRegions;\n\t}", "title": "" }, { "docid": "b1b5b17929bf0d1f7ffa427821c27853", "score": "0.50557476", "text": "function getRegionID() \n {\n return $this->getAccountGroupID();\n }", "title": "" }, { "docid": "a638b7e5810064c494782fc948e38121", "score": "0.5053573", "text": "public static function get_area(){\n\t\t\n\t}", "title": "" }, { "docid": "ae1c261db62c19424fe04ebf9176a871", "score": "0.5049491", "text": "public function getRegion()\r\n {\r\n return $this->region;\r\n }", "title": "" }, { "docid": "1e35b87526f7fd5f60f13c4734470831", "score": "0.5027523", "text": "function areas_get($id = null) {\n\t\t//print_r($id);\n\t\t//print_r();\n\t\t//$region_id = $this->get('region_id');\n\n\t\t$this->load->model('Areas_model');\n\t\t$areas = $this->Areas_model->get_areas($id, $this->get('region_id'));\n\n\t\tif ($areas) {\n\t\t\t$this->response($areas, 200); // 200 being the HTTP response code\n\t\t} else {\n\t\t\t$this->response(array('error' => 'Couldn\\'t find any area!'), 404);\n\t\t}\n\t}", "title": "" }, { "docid": "7bf7a8f273e25f357d060efefe6ec2ed", "score": "0.50272113", "text": "public function getRegion() { return $this->Region; }", "title": "" }, { "docid": "c759a3d04a30798aaa2aae39915195c7", "score": "0.502235", "text": "public function getRegion()\n {\n return $this->hasOne(Regions::className(), ['regionId' => 'regionId']);\n }", "title": "" }, { "docid": "5f3bb4d7419164f03c312f308bb21924", "score": "0.5010485", "text": "public function show($id)\n {\n\t\t\n return view('eacharts.polygonal',compact('id'));\n }", "title": "" }, { "docid": "511e054cceca0582675857299c09ce0e", "score": "0.5006657", "text": "public static function findInArea($find) {\n global $wpdb;\n $table_name = $wpdb->prefix . self::TABLE_NAME;\n //$sql = \"SELECT id, area, ( %d * acos( cos(radians(%s)) * cos(radians(lat)) * cos( radians(lng) - radians(%s) ) + sin( radians(%s) ) * sin( radians(lat) ) ) ) AS distance FROM $table_name HAVING distance < %d ORDER BY distance\";\n $sql = \"SELECT * FROM $table_name WHERE MBRContains(LineFromText(CONCAT(\n '('\n , @lng + d% / ( 111.1 / cos(RADIANS(@lng)))\n , ' '\n , @lat + d% / 111.1\n , ','\n , @lng - d% / ( 111.1 / cos(RADIANS(@lat)))\n , ' '\n , @lat - d% / 111.1\n , ')' )\n ,mypoint)\";\n return $wpdb->get_results($wpdb->prepare($sql, $find));\n }", "title": "" }, { "docid": "209aa676d2b99bd9e7cf808c80331a8b", "score": "0.49962386", "text": "public function get($id)\n {\n return response()->json($this->regionService->get($id, true));\n }", "title": "" }, { "docid": "580176a1c4da348d168f91863629bae8", "score": "0.49929157", "text": "public function getArea()\n {\n if (!in_array($this->session->userdata('user_level_8'), $this->common->csiUserRole())) {\n redirect('auth');\n }\n\n $regionId = $this->input->get('id');\n $rows = $this->common->find('csi_area', 'region_id', $regionId, 'area_name');\n echo json_encode($rows);\n }", "title": "" }, { "docid": "1cbda4e20ddd53e3cc275600234033c2", "score": "0.498838", "text": "abstract function getArea();", "title": "" }, { "docid": "7f0f12a2a2a8540fead995470f494400", "score": "0.4987906", "text": "public function selectOneWithLocationById(int $id)\n {\n $statement = $this->pdo->prepare(\"SELECT \" .self::TABLE . \".id, firstname, lastname, email,\n phone_number, city.name as user_city, department.name as user_department\n FROM \". self::TABLE .\n \" JOIN city ON \" .self::TABLE . \".city_id = city.id\n JOIN department ON city.department_id = department.id\n WHERE \" .self::TABLE . \".id=:id\");\n $statement->bindValue('id', $id, \\PDO::PARAM_INT);\n $statement->execute();\n\n return $statement->fetch();\n }", "title": "" }, { "docid": "e695e8ce36fa9789298fcf86a13f843d", "score": "0.49869964", "text": "public function getRegion()\n {\n return $this->region;\n }", "title": "" }, { "docid": "e695e8ce36fa9789298fcf86a13f843d", "score": "0.49869964", "text": "public function getRegion()\n {\n return $this->region;\n }", "title": "" }, { "docid": "e695e8ce36fa9789298fcf86a13f843d", "score": "0.49869964", "text": "public function getRegion()\n {\n return $this->region;\n }", "title": "" }, { "docid": "e695e8ce36fa9789298fcf86a13f843d", "score": "0.49869964", "text": "public function getRegion()\n {\n return $this->region;\n }", "title": "" }, { "docid": "e695e8ce36fa9789298fcf86a13f843d", "score": "0.49869964", "text": "public function getRegion()\n {\n return $this->region;\n }", "title": "" }, { "docid": "8995b4e950ce46ff15b212079827a392", "score": "0.49754128", "text": "public function area($id)\n {\n return $this->factory->area($id);\n }", "title": "" }, { "docid": "8c7c7a4817a0e0d3c344bb7fb0eb4805", "score": "0.49746537", "text": "public function getEntityRegionCityMap_get()\n\t{\n\t\t$entity_id = $this->get('entityid');\n\t\t$fields = array('fk_region_id','fk_city_id','fk_entity_id','entity_region_map_id','isactive');\n\t\t$where_condition_array = array('fk_entity_id' => $entity_id);\n\t\t$records = $this->Entity_Management_Model->selectCustomRecords($fields,$where_condition_array,ENTITYREGION);\n\t\tif($records != null || $records != \"\")\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\t$data['dataStatus'] = true;\n\t\t\t\t\t$data['status'] = REST_Controller::HTTP_OK;\n\t\t\t\t\t$data['records'] = $records;\n\t\t\t\t\t$this->response($data,REST_Controller::HTTP_OK);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\t$data['dataStatus'] = false;\n\t\t\t\t\t$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;\n\t\t\t\t\t$data['msg'] = 'Records Not Found';\n\t\t\t\t\t$this->response($data,REST_Controller::HTTP_OK);\n\t\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "8417d50fcb223847cc5969d8f487eaed", "score": "0.49673584", "text": "public function getRegions($id = null, $filter = null)\n {\n $regionController = new RegionsController($this->getAuth(), $filter);\n return $regionController->getResource($id);\n }", "title": "" }, { "docid": "8035fd77340bbb6a0b154454fbe46a3b", "score": "0.49597088", "text": "public function getRegionByUuid($uuid) {\n if(!\\Helper::isValidUuid($uuid)) {\n throw new \\Exception('Invalid UUID provided', 1);\n }\n return isset($this->regions[$uuid]) ? $this->regions[$uuid] : FALSE;\n }", "title": "" } ]
c00868c957d8728314e8d50ce8eb21cc
update accessor with data from current record
[ { "docid": "4763414b17c4b3160be17f36ec6e3abc", "score": "0.0", "text": "public function updateRowData()\n\t\t{\n\t\t\t$this->row = array();\n\n\t\t\t// check that cursor points to valid record\n\t\t\tif( $this->cursor < count($this->rows) && $this->cursor > -1 )\n\t\t\t{\n\t\t\t\t// fill record values with values from records using cursor\n\t\t\t\t$this->row = $this->rows[$this->cursor];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// fill record fields with empty values\n\t\t\t\tforeach( $this->fields as $field )\n\t\t\t\t{\n\t\t\t\t\t$this->row[$field] = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "c26680f866550a96641bbbb3c6829211", "score": "0.65179765", "text": "public function update() {\r\n\t\t$this->getMapper()->update($this);\r\n\t}", "title": "" }, { "docid": "aa86becd0272f2a05d7ff80a9acc6a6e", "score": "0.63346255", "text": "function update() {\r\n CRUD::update(self::table(), $this->as_array(), $this->id);\r\n }", "title": "" }, { "docid": "4bb392fbaf4bfdb05f69b08c4fe49056", "score": "0.62633055", "text": "public function update()\n\t{\n\t\t$key = isset($this->fieldnames[$this->key]) ? $this->fieldnames[$this->key] : $this->key;\n\t\t$rows_affected = $this->dataSource->update($this->tablename, $this->toArray(true), array(array($key, $this->data->{$this->key})), 1);\n\t\tif($rows_affected)\n\t\t{\n\t\t\treturn $this;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->E->throwErr(3, \"Update had no effect\");\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "bb358ef33a04d3285ffeab7c5184573e", "score": "0.6188389", "text": "public function update()\n\t{\n\t\t$data = $this->loadIntoArray();\n\t\t$query = \"identifier = '\".$this->getIdentifier().\"'\";\n\t\treturn parent::updateQuery($data,$query);\n\t}", "title": "" }, { "docid": "778ebea4aa9ba42403cfc817ccf09c98", "score": "0.61852145", "text": "public function setToUpdate() {\r\n $this->model->id = $this->id; //id or row to be updated\r\n\r\n $this->model->getInfoById(); \r\n \r\n $this->car = $this->model->car;\r\n $this->drive = $this->model->drive;\r\n $this->kmh = $this->model->kmh;\r\n $this->cost = $this->model->cost;\r\n }", "title": "" }, { "docid": "5e423b7300dded124f9d6d84726d2a8b", "score": "0.60712814", "text": "public function updateData();", "title": "" }, { "docid": "e787b0264eb217f7ad107d9e950d0629", "score": "0.5953911", "text": "function update()\r\n\t{\r\n\t $FD = getInstance();\r\n $FD->Connection->DB->update_object($this);\r\n return $this;\r\n\t}", "title": "" }, { "docid": "5e8895bba1d5936713e31b9e8942f579", "score": "0.58926505", "text": "public function update()\n\t{\n\t\tDB::update($table)->where('id', '=', $this->get('id'))->set($this->data)->execute($this->_db);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f426d099b7366a7ce7e767e01b998892", "score": "0.5797748", "text": "function update_records() {\n\t\t$fields = func_get_args();\n\t\t\n\t\tif(isset($this->records)) {\n\t\t\tforeach($this->records as $record_key=>$record) {\n\t\t\t\tforeach($fields as $field) {\n\t\t\t\t\t$this->records[$record_key]->$field = $this->{$field};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1fd25e1e3807dc7f492d52ff34ed7f48", "score": "0.57726824", "text": "public function update(){\r\n\t\t$class = get_class($this);\r\n\t\t$mapper = new ObjectMapper($class);\r\n\t\t$mapper->update($this);\r\n\t}", "title": "" }, { "docid": "e850f9e7734be07fdf55464290c7d1bc", "score": "0.5760888", "text": "public function update() {\n\n //create attributes pairs, ex : column=:column\n $attribute_pairs = [];\n foreach(static::$attributes as $key) {\n $attribute_pairs[] = \"{$key} = :{$key}\";\n }\n\n //construct sql that will update a record\n $sql = \"UPDATE \" . static::$table_name . \" SET \";\n $sql .= join(\", \", $attribute_pairs);\n $sql .= \" WHERE \" . static::$primary_key . \"= :\" . static::$primary_key;\n $sql .= ' LIMIT 1';\n\n //prepare the query\n $stmt = self::$conn->prepare($sql);\n\n //bind values to params\n $attributes = static::$attributes;\n foreach ($attributes as $attribute) {\n if(property_exists($this,$attribute)) {\n $stmt->bindParam(':' . $attribute, $this->$attribute);\n }\n }\n\n //bind the primary key\n $id = static::$primary_key;\n $stmt->bindParam(':' . static::$primary_key, $this->$id);\n\n\n return $stmt->execute();\n\n }", "title": "" }, { "docid": "2010439b38bc107a1dc339fc2f20f348", "score": "0.57604915", "text": "public function updateRecord() {\n if(isset($this->id_user))\n $model = self::model()->findByPk(array('id_order' => $this->id_order, 'id_order_state' => $this->id_order_state, 'id_user' => $this->id_user));\n else\n $model = self::model()->findByPk(array('id_order' => $this->id_order, 'id_order_state' => $this->id_order_state));\n\n //model is new, so create a copy with the keys set\n if (null === $model) {\n //we don't use clone $this as it can leave off behaviors and events\n $model = new self;\n $model->id_order = $this->id_order;\n $model->id_order_state = $this->id_order_state;\n if(isset($this->id_user)) $model->id_user = $this->id_user;\n else $model->id_user = null;\n }\n $model->save(false);\n return $model;\n }", "title": "" }, { "docid": "9d7c2f4c38fa6cf92e2ee2fe2067acf6", "score": "0.57483536", "text": "protected abstract function update();", "title": "" }, { "docid": "f049df5735eb382d11716e718aa78af5", "score": "0.5710159", "text": "public function update()\n {\n\n $insert = Dao_Slides::update();\n\n foreach ($this as $fieldname => $value) {\n if (property_exists($this, $fieldname)) $insert->set($fieldname, $value);\n }\n\n $insert->where('id', '=', $this->id);\n\n $insert->execute();\n\n return self::get($this->id);\n }", "title": "" }, { "docid": "c1de2bbbe05cad45dff9c4c5bd950b4f", "score": "0.57058066", "text": "public function refreshFromEmbedded()\n {\n foreach ($this->getEmbeddedValues() as $name => $value) {\n $this->$name = $value;\n }\n }", "title": "" }, { "docid": "073758da3f223e76df437436574d4e15", "score": "0.5700266", "text": "function refresh()\n\t\t{\n\t\t\t$id = $this->getId();\n\t\t\t$res = Database::query(\n\t\t\t\t\"SELECT * \".\n\t\t\t\t\"FROM `\". static::$_tableName .\"` \".\n\t\t\t\t\"WHERE `\". static::$_keyField .\"` = '$id'\");\n\t\t\t\n\t\t\tif ($res && Database::getRowCount($res) == 1) {\n\t\t\t\t// Fetch the row from the DB.\n\t\t\t\t$row = Database::fetchMap($res);\n\t\t\t\t$this->_recordExists = true;\n\t\t\t\t\n\t\t\t\tif (method_exists($this, 'recordLoaded')) {\n\t\t\t\t\t$this->recordLoaded($row);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($row as $column => $value) {\n\t\t\t\t\t$this->$column = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Nothing found; this empty record remains intact.\n\t\t\t\t$this->_recordExists = false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d737f513204464a0ce4636695b967740", "score": "0.56717676", "text": "public function update()\r\n {\r\n $data = $this->toArray();\r\n // print_r($data);\r\n $upd = '';\r\n foreach ($data as $key => $value) {\r\n if($key != 'id'){\r\n if ($upd != '') {\r\n $upd .= ' , ';\r\n }\r\n $upd .= \"`{$key}` = '{$value}'\";\r\n }\r\n }\r\n $sql = \"UPDATE `{$this->getTable()}` SET {$upd} WHERE `id` = {$this->id}\";\r\n // echo $sql;\r\n self::nonQuery($sql);\r\n return self::id($this->id);\r\n }", "title": "" }, { "docid": "b2b420fa6e6b14d1250932dd9551a2ba", "score": "0.5657469", "text": "public function test__set()\n {\n $this->_fixture->setup();\n $model = $this->_catalog->getModel('users');\n $params = array(\n 'cols' => array('handle', 'id', 'created', 'updated'),\n 'order' => 'handle',\n );\n $coll = $model->fetchAssoc($params);\n \n // get a record, make sure it's the right one\n $record = $coll->handle_1;\n $this->assertEquals($record->handle, 'handle_1');\n \n // clone it and replace within the collection\n $clone = clone $record;\n $clone->handle = 'zim-zim';\n $coll->handle_1 = $clone;\n \n // make sure it was really replaced\n $this->assertSame($coll->handle_1, $clone);\n $this->assertNotSame($coll->handle_1, $record);\n \n $clone->free();\n $record->free();\n $coll->free();\n }", "title": "" }, { "docid": "65af506fd4d6b905248f52f562bc531e", "score": "0.5638654", "text": "function updateRecord()\r\n {\r\n if (($this->State!=dsEdit) && ($this->State!=dsInsert) && ($this->State!=dsSetKey)) DatabaseError(_(\"Dataset not in edit or insert mode\"), $this);\r\n $this->DataEvent(deUpdateRecord,0);\r\n }", "title": "" }, { "docid": "93a827791903fca5a77cadf428f814d8", "score": "0.5614944", "text": "public function populate($record) {\n\t\tforeach($record as $field=>$value) {\n\t\t\tif ($field == 'id') {\n\t\t\t\t$this->instance->id = $value;\n\t\t\t} else {\n\t\t\t\t$this->$field = $value;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0bf68a160ccad9cf328cff8eea130edd", "score": "0.5614452", "text": "public final function setFromDaoRecord(Mmi_Dao_Record $record) {\n\t\treturn $this->setFromArray($record->toArray());\n\t}", "title": "" }, { "docid": "5c9e2f972f73da39bedb95e3d93657c9", "score": "0.55915534", "text": "public function updateFromArray($data, $use_setters = true){\n\n foreach(self::_getFields() as $field) {\n if(array_key_exists($field, $data)){\n // Handle the case where we get a model instance back from the validator instead of [object_name]_id\n $value = ($data[$field] instanceof self) ? $data[$field]->id : $data[$field];\n\n if($use_setters) {\n $this->$field = $value;\n }\n else {\n $this->_data[$field] = $value;\n }\n }\n }\n\n }", "title": "" }, { "docid": "f13e0f72b9b4fdb86ba0eb06aa727e5c", "score": "0.5575598", "text": "public function updateObject() {\n\t\t// need to set the where clause\n\t\t$id = $this->valueObject->getDataItem('id');\n\t\t$where[] = array('id'=>$id);\n\t\t$this->valueObject->getQueryObject()->setWhere($where);\n\n\t\t//$sql = $this->getSQLFactory()->prepUpdateStatement($this->valueObject);\n\t\treturn $this->getDBFactory()->doUpdate($this->valueObject);\n\n\t}", "title": "" }, { "docid": "7bbad88e89d8cefaf625dd4fd8373e34", "score": "0.5553273", "text": "private function setValDb() {\n $reflectionObj = new \\ReflectionObject($this->tableObj);\n foreach ($this->arrFields as $name => $fieldObj) {\n $nameGeter = 'get' . ucfirst($name);\n if ($reflectionObj->hasMethod($nameGeter)) {\n /* @var $fieldObj \\admin\\form\\Field */\n $fieldObj->setValueDb($this->tableObj->$nameGeter());\n $this->arrFields[$name] = $fieldObj;\n }\n }\n }", "title": "" }, { "docid": "c82b7fd239a3b0121ae56493ae6f5bbf", "score": "0.5545294", "text": "public function update() {\n\t\tOrderPerson::$rawOrderPersons[$this->idOrderPerson]['address'] = $this->address;\n\t\tOrderPerson::$rawOrderPersons[$this->idOrderPerson]['email'] = $this->email;\n\t\tOrderPerson::$rawOrderPersons[$this->idOrderPerson]['firstName'] = $this->firstName;\n\t\tOrderPerson::$rawOrderPersons[$this->idOrderPerson]['lastName'] = $this->lastName;\n\t}", "title": "" }, { "docid": "a5b79dad0ee12ca64984ce91d4ee4272", "score": "0.554332", "text": "public function update()\n\n {\n //\n\n }", "title": "" }, { "docid": "5e5d27efeb195d48420f3af9cc333d9f", "score": "0.55311656", "text": "abstract protected function update ();", "title": "" }, { "docid": "e5f31b83c78fa9b7c123f380e478f2a5", "score": "0.55112773", "text": "public function refresh()\n\t{\n\t\t$key_field = (array) $this->_parent_model->key_field();\n\t\tforeach($key_field as $key)\n\t\t{\n\t\t\t$where[$key] = $this->$key;\n\t\t}\n\t\t\n\t\t$data = $this->_parent_model->find_one($where, NULL, 'array');\n\t\t$this->fill($data);\n\t}", "title": "" }, { "docid": "e5f31b83c78fa9b7c123f380e478f2a5", "score": "0.55112773", "text": "public function refresh()\n\t{\n\t\t$key_field = (array) $this->_parent_model->key_field();\n\t\tforeach($key_field as $key)\n\t\t{\n\t\t\t$where[$key] = $this->$key;\n\t\t}\n\t\t\n\t\t$data = $this->_parent_model->find_one($where, NULL, 'array');\n\t\t$this->fill($data);\n\t}", "title": "" }, { "docid": "e1782cd499f0fe4aa3b48166cdae32ee", "score": "0.55048907", "text": "public function updatetData(){\n }", "title": "" }, { "docid": "03982c31bf19148ba565bff687f0aac6", "score": "0.5500161", "text": "protected function update()\n {\n \n }", "title": "" }, { "docid": "7bcc0c190b52f4680fc71a4a508cb37c", "score": "0.5497118", "text": "protected function update(){\n $this->setUpdated();\n }", "title": "" }, { "docid": "b0cb87ce46fa90c1110686de8ec06b68", "score": "0.5491028", "text": "public function update(){\n\n\t}", "title": "" }, { "docid": "5ad4aeeb6767548a1cc43b3e1980ef10", "score": "0.54793197", "text": "public function editAction() {\n $bean = new SugarApiBean;\n if ($this->id) {\n $res = $this->_getApi()->getRecord($this->module, $this->id);\n $bean->loadFromArray($res);\n }\n $this->bean = $bean;\n\n $obj = $this->_getApi()->getMetadataObject($this->platform);\n $this->metadata = $obj->getModuleFieldsForView($this->module, 'record');\n }", "title": "" }, { "docid": "c830e266caf75a140885db6308ec6dce", "score": "0.5478558", "text": "public function update()\n {\n $s = new static();\n\n $where = \"id = {$s::$ID}\";\n\n self::$db->update($s::$entity_table, $this->db_fields, $where);\n }", "title": "" }, { "docid": "c37580590cfb1b1fabab8a3db5c6b913", "score": "0.54682535", "text": "protected function update()\n {\n }", "title": "" }, { "docid": "9c4bcd5ecab88e917c54d4c19b68782c", "score": "0.5462373", "text": "public function update($idx, $data)\n {\n return $this->setId($idx)->setData($data)->processEvent(ModelEvents::UPDATE)->getData();\n }", "title": "" }, { "docid": "52925d0872111e5894fd83800e1f07fe", "score": "0.5453579", "text": "protected function _update()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "9942a83723a66959afff64d60cb09ede", "score": "0.54291767", "text": "protected function _applyObjectProperty()\r\n\t{\r\n\t\t$table_id = Core_Array::getGet('table_id', NULL);\r\n\t\t$this->_object->table_id = $table_id;\r\n\t\tparent::_applyObjectProperty(); // saving row, now we can get Table_Row id\r\n\t}", "title": "" }, { "docid": "ee7b64ea568e669f8086eb4cbfb3154f", "score": "0.5412352", "text": "function update($data) {}", "title": "" }, { "docid": "5225830de2156851ddc4b8f328b41210", "score": "0.54039603", "text": "public function update(){ }", "title": "" }, { "docid": "45d12f4b06cc92411e016f2c942bddba", "score": "0.539568", "text": "public function update(){\n\t}", "title": "" }, { "docid": "0a1d3c0bf32525cc151b1669d46d0e2f", "score": "0.53955483", "text": "public function update( &$data );", "title": "" }, { "docid": "c4678d3a881d22431fa6769303f3ba15", "score": "0.5392506", "text": "public function updateRecord($tablename, $d, $keyField, $keyValue, $now = false){\n$this->updateRecordHelper($tablename, $d, $keyField, $keyValue, $now);\n}", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.53822327", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.53822327", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "f7074bf9419276787f006707206fa7f4", "score": "0.5374344", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "e4b523aeed35efa91d04c9492d7796dd", "score": "0.5360614", "text": "private function update_record()\n\t{\n\t\tif ($this->is_frozen() || $this->is_read_only()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!$this->is_dirty()) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (!$this->run_callback('before_update')) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->touch_date_attributes('updated_at', 'updated_on');\n\t\t\n\t\t$quoted_attributes = $this->get_attributes_with_quotes();\n\t\t\n\t\tif (!empty($quoted_attributes)) {\n\t\t\t$result = self::$connection->update(\n\t\t\t\t'UPDATE ' . $this->get_quoted_table_name() . ' ' .\n\t\t\t\t'SET ' . SqlBuilder::quoted_comma_pair_list($quoted_attributes) . ' ' .\n\t\t\t\t'WHERE ' .\n\t\t\t\t\tself::$connection->quote_column_name($this->primary_key()) .\n\t\t\t\t\t' = ' .\n\t\t\t\t\t$this->get_quoted_attribute($this->primary_key())\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->run_callback('after_update');\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.53412133", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "23c1d672f8b04b523c8bff48586b4d01", "score": "0.53408074", "text": "public function update() {\n }", "title": "" }, { "docid": "3f7abbb2804266d90c1148e0cbc3751d", "score": "0.53336495", "text": "public function update(){\n }", "title": "" }, { "docid": "c9dc74fe81b6bb16c1d2353d01ca6160", "score": "0.5332029", "text": "private function update()\n {\n // Assign\n foreach ($this->properties as $key => $value)\n if (array_key_exists($key, $this->table_data) && $key != 'id')\n $update[] = \"`\".$key.\"` = '\".$this->sanitize_query($value).\"'\";\n // Assemble\n $sql = \"UPDATE `\".$this->table.\"` SET \".implode(\",\",$update).\" WHERE `id` = '\".$this->id.\"'\";\n // Query\n $data = $this->query($sql);\n }", "title": "" }, { "docid": "1f74ec36cd41ec5023403cdbd48e6f37", "score": "0.532774", "text": "public function update(){\n }", "title": "" }, { "docid": "1a899aeba25156554a83cdceaa9f5945", "score": "0.53115654", "text": "public function reload()\n {\n if (!$this->exists) {\n return;\n }\n $model = static::find($this->getKey());\n $this->attributes = $model->getAttributes();\n $this->syncOriginal();\n }", "title": "" }, { "docid": "51721799def9f75202fd763a50f731ba", "score": "0.5306745", "text": "public function update()\n {\n $tripod = $this->getTripod();\n if(isset($this->stat))\n {\n $tripod->setStat($this->stat);\n }\n $tripod->getComposite($this->operation)->update($this);\n }", "title": "" }, { "docid": "f46126afbc467aa1532327857842eeca", "score": "0.53054446", "text": "public function update()\n {\n global $dbh;\n\n $sql = \"UPDATE \" . static::$tableName . \" SET $this->prepareAttributes() WHERE id=:id\";\n\n $stm = $dbh->prepare($sql);\n\n $this->data['id'] = $this->id;\n\n return $stm->execute($this->data);\n\n }", "title": "" }, { "docid": "9c69e373d32ce34437ce03a291041442", "score": "0.528694", "text": "public function reload()\n {\n $this->data = (array)$this->db->select($this->table, $this->__get($this->primaryKey));\n $this->isModified = false;\n $this->modifiedData = array();\n return $this;\n }", "title": "" }, { "docid": "e35a50bcba4be56e3093342e359ad614", "score": "0.5279744", "text": "protected function update() {\n if (!$this->table_object->aikey) {\n return false;\n } else {\n $set_fields = \"\";\n $values = array();\n\n foreach ($this->table_object->fields as $field) {\n if ($field->Field != $this->table_object->aikey) {\n $attr_name = $field->Field;\n $set_fields .= \", `$attr_name`=?\";\n $values[] = $this->$attr_name;\n }\n }\n $set_fields = substr($set_fields, 2);\n\n $ai_attr_name = $this->table_object->aikey;\n $where = \"`$ai_attr_name`=?\";\n $values[] = $this->$ai_attr_name;\n\n $sql = \"UPDATE `{$this->prefix}{$this->table_name}` SET $set_fields \"\n .\"WHERE $where\";\n $rs = $this->mydb->exec_query($sql, $values);\n return $rs;\n }\n }", "title": "" }, { "docid": "45d516fa77077a80d8fe16d077c73c1f", "score": "0.52785397", "text": "private function update(){\n\n$list = array(\"QuoteId\"=>$this->quoteId, \"ProductId\"=>$this->productId, \"products_model\"=>$this->productsModel, \"products_name\"=>$this->productsName, \"QuoteProductPrice\"=>$this->quoteProductPrice, \"final_price\"=>$this->finalPrice, \"products_tax\"=>$this->productsTax, \"QuoteProductQuantity\"=>$this->quoteProductQuantity, \"onetime_charges\"=>$this->onetimeCharges, \"products_priced_by_attribute\"=>$this->productsPricedByAttribute, \"product_is_free\"=>$this->productIsFree, \"products_discount_type\"=>$this->productsDiscountType, \"products_discount_type_from\"=>$this->productsDiscountTypeFrom, \"products_prid\"=>$this->productsPrid);\n$where = \"`ProductId`='$productId' AND `QuoteId`='$quoteId'\";\nreturn $this->dao->updateRecord($list, $where);\t\n\t\t\n}", "title": "" }, { "docid": "1cbf4417533b9d48710a130acb9cf813", "score": "0.52734524", "text": "abstract public function update($obj);", "title": "" }, { "docid": "f27204988750319b2ae32421ada26e97", "score": "0.5268938", "text": "public function Modify(){\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "fd83b39ef29b40965e4a0ba86a1d900c", "score": "0.5259884", "text": "public function update() {\n\t\t}", "title": "" }, { "docid": "1fa3ef12a6301a8b2306f0dc4fbec6b9", "score": "0.52574277", "text": "public function set($column, $value)\n\t{\n\t\tif ( ! isset($this->_object_name))\n\t\t{\n\t\t\t// Object not yet constructed, so we're loading data from a database call cast\n\t\t\t$this->_cast_data[$column] = $value;\n\t\t\t\n\t\t\treturn $this;\n\t\t}\n\t\t\n\t\tif (in_array($column, $this->_serialize_columns))\n\t\t{\n\t\t\t$value = $this->_serialize_value($value);\n\t\t}\n\n\t\tif (array_key_exists($column, $this->_object))\n\t\t{\n\t\t\t// Filter the data\n\t\t\t$value = $this->run_filter($column, $value);\n\n\t\t\t// See if the data really changed\n\t\t\tif ($value !== $this->_object[$column])\n\t\t\t{\n\t\t\t\t$this->_object[$column] = $value;\n\n\t\t\t\t// Data has changed\n\t\t\t\t$this->_changed[$column] = $column;\n\n\t\t\t\t// Object is no longer saved or valid\n\t\t\t\t$this->_saved = $this->_valid = FALSE;\n\t\t\t}\n\t\t}\n\t\telseif (isset($this->_belongs_to[$column]))\n\t\t{\n\t\t\t// Update related object itself\n\t\t\t$this->_related[$column] = $value;\n\n\t\t\t// Update the foreign key of this model\n\t\t\t$this->_object[$this->_belongs_to[$column]['foreign_key']] = ($value instanceof ORM)\n\t\t\t\t? $value->pk()\n\t\t\t\t: NULL;\n\n\t\t\t$this->_changed[$column] = $this->_belongs_to[$column]['foreign_key'];\n\t\t}\n\t\telseif (isset($this->_has_many[$column]))\n\t\t{\n\t\t\tif (Arr::get($this->_has_many[$column], 'update', FALSE))\n\t\t\t{\n\t\t\t\t$model = $this->_has_many[$column]['model'];\n\t\t\t\t$pk = ORM::factory($model)->primary_key();\n\t\t\t \n\t\t\t\t$current_ids = $this->get($column)->find_all()->as_array(NULL, 'id');\n\n\t\t\t\t$new_ids = array_diff($value, $current_ids);\n\t\t\t\tif (count($new_ids) > 0)\n\t\t\t\t{\n\t\t\t\t\t$objects = ORM::factory($model)->where($pk, 'IN', $new_ids)->find_all();\n\t\t\t\t\tforeach ($objects as $object)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->add($column, $object);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$delete_ids = array_diff($current_ids, $value);\n\t\t\t\tif (count($delete_ids) > 0)\n\t\t\t\t{\n\t\t\t\t\t$objects = ORM::factory($model)->where($pk, 'IN', $delete_ids)->find_all();\n\t\t\t\t\tforeach ($objects as $object)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->remove($column, $object);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Kohana_Exception('The :property: property is a to many relation in the :class: class',\n\t\t\t\t\t[':property:' => $column, ':class:' => get_class($this)]);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Kohana_Exception('The :property: property does not exist in the :class: class',\n\t\t\t\t[':property:' => $column, ':class:' => get_class($this)]);\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e8fcc89cb45ada02dbaf6ae5fa9a0712", "score": "0.5248679", "text": "public function updated();", "title": "" }, { "docid": "9178451f424d9ede82d7108dc4aec044", "score": "0.52449465", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set price=\\\"$this->price\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "9e940182d22ee61334a51ec90b389073", "score": "0.5244542", "text": "public function update()\n {\n $this->crud->setRequest($this->crud->validateRequest());\n $this->crud->unsetValidation(); // validation has already been run\n\n return $this->traitUpdate();\n }", "title": "" }, { "docid": "a3ee1aac8d2e8fe7bc1d02c8ba18e7f8", "score": "0.52438295", "text": "public function apply_changes() {\n\t\t$this->data = $this->current_data;\n\t}", "title": "" }, { "docid": "148131036bd580adca1f33664aef81c2", "score": "0.52433366", "text": "public function update()\n {\n try {\n $this->model->setModificationDate(time());\n $document = get_object_vars($this->model);\n\n foreach ($document as $key => $value) {\n // check if the getter exists\n $getter = \"get\" . ucfirst($key);\n if (!method_exists($this->model, $getter)) {\n continue;\n }\n\n // get the value from the getter\n if (in_array($key, $this->getValidTableColumns(\"documents\")) || in_array($key, $this->validColumnsPage)) {\n $value = $this->model->$getter();\n } else {\n continue;\n }\n\n if (is_bool($value)) {\n $value = (int)$value;\n }\n if (in_array($key, $this->getValidTableColumns(\"documents\"))) {\n $dataDocument[$key] = $value;\n }\n if (in_array($key, $this->validColumnsPage)) {\n $dataPage[$key] = $value;\n }\n }\n\n $this->db->insertOrUpdate(\"documents\", $dataDocument);\n $this->db->insertOrUpdate(\"documents_printpage\", $dataPage);\n\n $this->updateLocks();\n } catch (\\Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "9e6b5188eecf499f920a95d188536123", "score": "0.52310723", "text": "public function update($data){\n }", "title": "" }, { "docid": "a64a64ca226d788e952325630329db08", "score": "0.52279955", "text": "final public function reload(){\n\t\tif(!$this->{self::primaryKeyNameFromClassName($this->__class_name__)} || !($row = self::find($this->__class_name__,$this->{self::primaryKeyNameFromClassName($this->__class_name__)})))\n\t\t\treturn false;\n\t\tforeach($row as $key => $value)\n\t\t\t$this->{$key} = $value;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3f95882b5785a1eefb05692c9555cc9a", "score": "0.5226565", "text": "public function map($record)\n {\n foreach ($record as $key => $value) {\n $this->$key = $value;\n }\n }", "title": "" }, { "docid": "4398f69f7c90f5c16428ce24fb69ebe3", "score": "0.5220444", "text": "private function refresh()\n {\n $data = $this->driver->find($this->attributes['id']);\n\n $this->setAttributes($data, true);\n\n return $this;\n }", "title": "" }, { "docid": "e33b1cd4d96c17f83c8bb0abd771d063", "score": "0.5218021", "text": "public function save()\n {\n $field = static::$primary;\n if ($this->new) {\n $data = $this->data;\n $save = [];\n foreach ($data as $k => $val) {\n $save[ $k ] = $val;\n }\n\n $id = $this->insert($save);\n\n if ($this->{$field} === null and $id) {\n $this->{$field} = $id;\n }\n\n $this->new = false;\n\n static::$records[ $this->{$field} ] = $this;\n } else {\n $data = $this->changed;\n $save = [];\n foreach ($data as $k => $val) {\n $save[ $k ] = $val;\n }\n $this->changed = [];\n $this->update($save);\n }\n\n }", "title": "" }, { "docid": "eb53dbd23c2a0d8bb130c8cc97577378", "score": "0.52117735", "text": "final public function update ()\n\t{\n\t\t$primary_keys = self::primary_keys_from_class_name($this->class_name);\n\t\t\n\t\t$sql = \"UPDATE \";\n\t\t$sql .= self::tableNameFromClassName($this->class_name);\n\t\t$sql .= \" SET \";\n\t\t$values = array();\t\t\t\n\t\t$keys = array();\n\n\t\tforeach ($this->toArray() as $key => $value) {\n\t\t\tif (!in_array($key, $primary_keys)) {\n\t\t\t\t$keys[] = $key.\" = ?\";\n\t\t\t\t$values[] = $value;\n\t\t\t}\n\t\t}\n\n\t\t$sql .= implode(\",\", $keys); \n\t\t$sql .= \" WHERE \";\n\n\t\tforeach ($primary_keys as $i => $primary_key) {\n\t\t\tif ($i > 0) {\n\t\t\t\t$sql .= \" AND \";\n\t\t\t}\n\t\t\t$sql .= $primary_key.\" = ?\";\n\t\t\t$values[] = $this->{$primary_key};\n\t\t}\n\n\t\t$statement = Model::connection()->prepare($sql);\n\n\t\tforeach ($values as $key => $value) {\n\t\t\t$statement->bindValue(($key + 1), $value);\n\t\t}\n\n\t\t$response = self::execute_query($statement);\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.52109593", "text": "public function update()\n {\n }", "title": "" }, { "docid": "dfb898753bc2b3f7dd69bfc539c33ec7", "score": "0.5209279", "text": "public function update(RecordInterface $_record)\n {\n throw new NotImplemented(__METHOD__ . ' is not implemented');\n }", "title": "" }, { "docid": "4f1cf717d5f441d302a9ca7437b9472a", "score": "0.5201546", "text": "public function updateAction()\n {\n $id = $this->params()->fromRoute('id');\n $data = $this->params()->fromPost();\n $this->setEntity($this->getMapper()->findOneById($id));\n\n if($this->getEntity()) {\n $this->getMapper()->setEntity($this->getEntity());\n foreach($data as $field => $value) {\n $inflector = new Inflector(':field');\n $inflector->setRules(array(\n ':field' => array('Word\\UnderscoreToCamelCase')\n ));\n if(preg_match('/_id$/',$field)) {\n $field = str_replace('_id', '', $field);\n if($field == 'admin') $dataSource = 'User';\n else {\n $dataSource = $inflector->filter(array('field' => $field));\n }\n $mapperClass = \"\\\\Townspot\\\\$dataSource\\\\Mapper\";\n $mapper = new $mapperClass($this->getServiceLocator());\n $value = $mapper->findOneById($value);\n }\n\n $method = \"set\".$inflector->filter(array('field' => $field));\n if(method_exists($this->getEntity(),$method)) {\n $this->getEntity()->{$method}($value);\n }\n }\n $this->getMapper()->save();\n $this->getResponse()\n ->setCount(1)\n ->setData($this->getMapper()->getEntity()->toArray());\n } else {\n $this->getResponse()->setCode(404)\n ->setSuccess(false)\n ->setMessage($this->getModel().\" record was not found\");\n }\n\n\n return new JsonModel($this->getResponse()->build());\n }", "title": "" }, { "docid": "72479dfbec2fc7525fd40be216fb71cc", "score": "0.52011615", "text": "public function updated(IPersistTo $model)\n {\n $this->useReadTable($model);\n }", "title": "" }, { "docid": "3d09bf8ec25a9fe891b92a375684acf6", "score": "0.52001715", "text": "function updateDataField($value)\n {\n if ($this->_datafield!=\"\")\n {\n if ($this->_datasource!=null)\n {\n if ($this->_datasource->Dataset!=null)\n {\n //Check here for the index fields\n $keyfields=$this->Name.\"_key\";\n $keys=$this->input->$keyfields;\n // check if the keys were posted\n if (is_object($keys))\n {\n $fname=$this->DataField;\n\n //Set in Edit State\n $this->_datasource->Dataset->edit();\n\n\n $values=$keys->asStringArray();\n\n //Sets the key values\n reset($values);\n while (list($k,$v)=each($values))\n {\n $this->_datasource->Dataset->$k=$v;\n }\n\n //Set the field value\n $this->_datasource->Dataset->$fname=$value;\n }\n else $this->_datasource->Dataset->{$this->_datafield}=$value;\n }\n }\n }\n }", "title": "" }, { "docid": "7314d342835dd720217a24e9102e055f", "score": "0.51964736", "text": "public function update()\n\t{\t\t\n\t\t$data = GridFieldBulkEditingHelper::unescapeFormFieldsPOSTData($this->request->requestVars());\n\t\t$record = DataObject::get_by_id($this->gridField->list->dataClass, $data['ID']);\n\t\t\t\t\n\t\tforeach($data as $field => $value)\n\t\t{\t\t\t\t\t\t\n\t\t\tif ( $record->hasMethod($field) )\n\t\t\t{\t\t\t\t\n\t\t\t\t$list = $record->$field();\n\t\t\t\t$list->setByIDList( $value );\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$record->setCastedField($field, $value);\n\t\t\t}\n\t\t}\t\t\n\t\t$record->write();\n\n\t\treturn json_encode(array(\n 'done' => 1,\n 'recordID' => $data['ID'],\n 'title' => $record->getTitle()\n\t\t), JSON_NUMERIC_CHECK);\n\t}", "title": "" }, { "docid": "daa0a7fe66ad01ee8d15a188d10aceff", "score": "0.51934665", "text": "public function update()\n\t{\n\n\t}", "title": "" }, { "docid": "de40db38cdbb2dbefced4afea435bdc8", "score": "0.51752645", "text": "public function update($data)\n {\n $this->fromArray($data);\n $this->save();\n return $this;\n }", "title": "" }, { "docid": "4424512ce8cd6cf6880f42128c06b450", "score": "0.5174961", "text": "public function update($data) {\n $data = $this->beforeUpdate($data);\n\n // Only update uniqueId when is appropriated\n if( $this->uniqueIdField && !$this->isSavingUniqueId ) {\n unset($data[ $this->uniqueIdField ] );\n }\n\n if( !$data[$this->idField] ) throw new ModelException(\"Didn't find table id\");\n\n $sql = \"UPDATE \" . $this->tableName . \" SET \";\n\n $bind = [];\n $fieldSet = [];\n\n foreach( $data as $field=>$value ) {\n\n if( in_array($field,$this->fields) ) {\n\n if( $field == $this->modifiedAtField ) {\n $fieldSet[] = $field . \" = now()\";\n continue;\n }\n\n $bind[':'.$field] = $value;\n if( $field == $this->idField ) continue; // Don't update id\n\n $fieldSet[] = $field . \" = :\" . $field; \n }\n }\n\n $sql .= implode(\", \", $fieldSet);\n\n $sql .= \" WHERE \" . $this->idField . \" = :\" . $this->idField;\n\n $this->execute($sql,$bind);\n\n $savedData = $this->findFirstById($data[$this->idField]);\n $savedData = $this->saveUniqueIdIfNotSet($savedData);\n \n return($this->afterUpdate($savedData));\n }", "title": "" }, { "docid": "d2bed2225207a89fea4dfbe3a56678d3", "score": "0.5173327", "text": "public function updating();", "title": "" }, { "docid": "8be82d243384b61a7209b301d90a9bc6", "score": "0.5168762", "text": "function set(Record &$item);", "title": "" }, { "docid": "949ce8e64448b6bdbdbd23cab62b9a7c", "score": "0.51639867", "text": "public function refresh()\n\t{\n\t\tYii::trace(get_class($this).'.refresh()','system.db.ar.CActiveRecord');\n\t\tif(($record=$this->findByPk($this->getPrimaryKey()))!==null)\n\t\t{\n\t\t\t$this->_attributes=array();\n\t\t\t$this->_related=array();\n\t\t\tforeach($this->getMetaData()->columns as $name=>$column)\n\t\t\t{\n\t\t\t\tif(property_exists($this,$name))\n\t\t\t\t\t$this->$name=$record->$name;\n\t\t\t\telse\n\t\t\t\t\t$this->_attributes[$name]=$record->$name;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "4c3359087325ff50f566fda0cf17bcd4", "score": "0.51617956", "text": "final private function update()\n\t{\n\t\t// method not allowed\n\t}", "title": "" }, { "docid": "d25bfe2b5488efa0aeb4d7ef114e20c0", "score": "0.51616794", "text": "function update($data=array()){\r\n\t\t// $data will be appended to values already set with Controller::set() or Model::set()\r\n\t\tif(empty($data)&&($this->owner instanceof Form))$data=$this->owner->getAllData();\r\n\t\t$this->getModel()->update($data);\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "2e74b8766f2c116b08446c75d131267d", "score": "0.51586366", "text": "public function mapData() {\n $this->_data['subscription_id'] = $this->_subscriptionId;\n\n return $this;\n }", "title": "" } ]
d47e1b22e35ca6b4ed3e49a5715e56ce
Affiche image + texte OK
[ { "docid": "29e0790d32bc7e1460d85871c219ef3e", "score": "0.6397625", "text": "function ok($msg) {\n\techo \"<br /><br /><br /><br /><br /><br /><br /><h2><img src=\\\"./images/ok.gif\\\" alt=\\\"\\\" /><br /><br />$msg</h2><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />\";\n}", "title": "" } ]
[ { "docid": "b4bf09ea2843dcd0a54e914b8ae7a7f3", "score": "0.6996417", "text": "public function afficheImage()\n {\n \t\techo \"<br><img src=\\\"\".$this->filename.\"\\\"\\>\";\n\t\n }", "title": "" }, { "docid": "5d363abe451adae1537d35ec30a1b8da", "score": "0.66921103", "text": "public function display() {\n //Header\n header('Content-type: image/png');\n\n //Size\n $width = $this->width ? $this->width : ($this->length * $this->fontSize + 20);\n $height = $this->height ? $this->height : ($this->fontSize + 10);\n\n //Image\n $image = imagecreate($width, $height);\n $bgColor = imagecolorallocate($image, array_get($this->bgColor, 0, 255), array_get($this->bgColor, 1, 255), array_get($this->bgColor, 2, 255));\n $strColor = imagecolorallocate($image, array_get($this->strColor, 0, 255), array_get($this->strColor, 0, 255), array_get($this->strColor, 0, 255));\n\n if ($this->transparent) {\n imagecolortransparent($image, $bgColor);\n }\n\n imagefill($image, 0, 0, $bgColor);\n\n if ($this->simple) {\n imagettftext(\n $image,\n $this->fontSize,\n 0,\n 10,\n $this->fontSize + (($this->height - $this->fontSize) / 2),\n $strColor,\n $this->font(),\n $this->str\n );\n } else {\n $this->signs($image, $this->font());\n\n for ($i = 0; $i < strlen($this->str); $i++) {\n imagettftext(\n $image,\n $this->fontSize,\n mt_rand(-15, 15),\n ($i * $this->fontSize + 10),\n mt_rand(30, 70),\n $strColor,\n $this->font(),\n $this->str[$i]\n );\n }\n }\n\n if ($this->noise) {\n $this->noise($image, $this->noise);\n }\n\n if ($this->blur) {\n $this->blur($image, $this->blur);\n }\n\n imagepng($image);\n imagedestroy($image);\n\n exit();\n }", "title": "" }, { "docid": "f7c72d8bdac3c492f89c1d5da0c920fc", "score": "0.66909015", "text": "private function showErrorImage()\n {\n header('Content-type: image/png');\n $errImg = ImageCreate(220, 25);\n $bgColor = imagecolorallocate($errImg, 0, 0, 0);\n $fgColor1 = imagecolorallocate($errImg, 255, 255, 255);\n $fgColor2 = imagecolorallocate($errImg, 255, 0, 0);\n imagestring($errImg, 3, 6, 6, 'Error:', $fgColor2);\n imagestring($errImg, 3, 55, 6, $this->errmsg, $fgColor1);\n imagepng($errImg);\n imagedestroy($errImg);\n }", "title": "" }, { "docid": "cd9dd71d78355332a42b42a91c62cc64", "score": "0.6501529", "text": "public function viewImg()\n {\n $this->createImg();\n $this->setPx();\n $this->outText();\n $this->outImg();\n }", "title": "" }, { "docid": "d0558e427beaf562515afd3f50c6f497", "score": "0.6451691", "text": "function create_imagetext(){\n\t\t// Check if the graphic mode is enabled or the GD Library Extension is available\n\t\tif($this->graphic && $this->check_gdlibrary()){\n\t\t\t// Call the function to create the temporary image verfication\n\t\t\t$this->create_image();\n\t\t\t$this->imagetext = \"<img src=\\\"\".$this->tmp_img.\".png\\\" border=\\\"0\\\" alt=\\\"secret code\\\" title=\\\"secret code\\\" />\";\n\t\t\t$this->write_log(\"Starts create IMAGE verification !\");\n\t\t}else{\n\t\t\t// Text mode\n\t\t\t$this->imagetext = \"<div style=\\\"\";\n\t\t\tforeach($this->style as $key => $value){\n\t\t\t\t$this->imagetext .= \"$key:$value; \";\n\t\t\t}\n\t\t\t$this->imagetext .= \"\\\">$this->sess_value</div>\";\n\t\t\t$this->write_log(\"Starts create TEXT verification !\");\n\t\t}\n\t}", "title": "" }, { "docid": "e60acecc11b82864e2276637a4a18bdc", "score": "0.6406147", "text": "function dispMesgImg($type, $path, $img)\n\t{\n\t\t//declare var\n\t\t$data\t= '';\n\t\t\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'NORMAL':\n\t\t\t\t$data\t= $this->imgDisplayR($path, $img, 15, 15, 0, 'padR10', '', '');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'SUCCESS':\n\t\t\t\t$data\t= $this->imgDisplayR($path, $img, 15, 15, 0, 'padR10', '', '');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'ERROR':\n\t\t\t\t$data\t= $this->imgDisplayR($path, $img, 15, 15, 0, 'padR10', '', '');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'ALERT':\n\t\t\t\t$data\t= $this->imgDisplayR($path, $img, 15, 15, 0, 'padR10', '', '');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t$data\t= $this->imgDisplayR($path, $img, 15, 15, 0, 'padR10', '', '');\n\t\t\t\tbreak;\n\t\t\t\n\t\t}//switch\n\t\t\n\t\t//return the result\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a6e827a4f2f70989dd71e2698fbeb80f", "score": "0.6395875", "text": "function displayImage($data) {\n\n\t //\techo \"at display image <br />\";\n\t \theader(\"Content-type: image/png\");\n\t\techo $data;\n\t\texit(0);\n\t}", "title": "" }, { "docid": "2384cb5849554f36e23386dc364bb612", "score": "0.63847584", "text": "public function display()\n\t{\n\t\t//allow ouput or save with optional image format\n\t\t\n\t\t\n\t\t$image = $this->generate();\n\t\theader(\"Content-type: image/png\");\n\t\timagepng($image);\n\t}", "title": "" }, { "docid": "3b62aec890e78622a3dbf6194464b081", "score": "0.6351429", "text": "function testImage() {\n\t\tif ( 'Automattic_Latex_WPCOM' != $this->options['method'] ) return false;\n\n\t\tif ( is_array( $this->options ) ) extract( $this->options, EXTR_SKIP );\n\n\t\t$latex_object = $this->latex( '\\displaystyle P_\\nu^{-\\mu}(z)=\\frac{\\left(z^2-1\\right)^{\\frac{\\mu}{2}}}{2^\\mu \\sqrt{\\pi}\\Gamma\\left(\\mu+\\frac{1}{2}\\right)}\\int_{-1}^1\\frac{\\left(1-t^2\\right)^{\\mu -\\frac{1}{2}}}{\\left(z+t\\sqrt{z^2-1}\\right)^{\\mu-\\nu}}dt', $bg, $fg, 3 );\n\t\tif ( ! empty( $wrapper ) ) $latex_object->wrapper( $wrapper );\n\n\t\t$message = '';\n\n\t\t$r = false;\n\n\t\t$url = $latex_object->url();\n\n\t\tif ( is_wp_error( $url ) ) {\n\t\t\t$code = $url->get_error_code();\n\t\t\t$message = '<div class=\"error\"><p>' . $url->get_error_message() . \"</p></div>\\n\";\n\t\t\techo $message;\n\t\t} else {\n\t\t\t$alt = esc_attr( __( 'Test Image', 'pb-latex' ) );\n\t\t\techo \"<img class='test-image' src='\" . esc_url( $url ) . \"' alt='$alt' />\\n\";\n\t\t\techo \"<p class='test-image'>\" . __( 'If you can see a big integral, all is well.', 'pb-latex' ) . '</p>';\n\t\t\t$r = true;\n\t\t}\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "1b8f89877b161ef5587bbeb13093525d", "score": "0.6342655", "text": "private function error($text, $width = 100, $height = 100) {\n $image = new Imagick();\n $draw = new ImagickDraw();\n $color = new ImagickPixel('#000000');\n $background = new ImagickPixel('white'); // Transparent\n\n /* Font properties */\n //$draw->setFont('Arial');\n $draw->setFontSize(15);\n $draw->setFillColor($color);\n $draw->setStrokeAntialias(true);\n $draw->setTextAntialias(true);\n\n /* Get font metrics */\n $metrics = $image->queryFontMetrics($draw, $text);\n\n /* Create text */\n $draw->annotation(0, $metrics['ascender'], $text);\n\n /* Create image */\n $image->newImage($width, $height, $background);\n $image->setImageFormat('jpeg');\n //$image->drawImage($draw);\n $draw->setGravity (Imagick::GRAVITY_CENTER);\n $image->annotateImage($draw, 0, 0, 0, $text);\n \n header(\"Content-type: image/jpeg\");\n \n echo $image;\n return;\n }", "title": "" }, { "docid": "10cb80999f4ab266ef42af0fec36daaf", "score": "0.6333436", "text": "function GeraImagem(){\r\n\tglobal $Chave;\r\n\t$Chave=GeraChave(6);//cria a chave (no caso com 6 caracteres)\r\n\t$Imagem=ImageCreate(100,40);//cria uma imagem 100x40\r\n\t$CorFundo=ImageColorAllocate($Imagem,0,0,0);//Cor de fundo (preto, no caso)\r\n\t$CorTexto=ImageColorAllocate($Imagem,255,255,255);//Cor do texto (branco, no caso)\r\n\r\n\tImageString($Imagem,5,23,10,$Chave,$CorTexto);\r\n\tImageJpeg($Imagem,\"chave.jpg\");//salva a imagem (troque o nome, se quiser)\r\n\tImageDestroy($Imagem);//apaga a imagem da memória do servidor\r\n}", "title": "" }, { "docid": "97d669b393bfed36992e82256f962c3b", "score": "0.6255108", "text": "public function afficheImage() {\n global $bdd;\n $id = $this->getId();\n $result = $bdd->prepare('select image_acc from actualite where id_acc=:id');\n $result->execute(array('id' => $id));\n $don = $result->fetch();\n $im = $don['image_acc'];\n $file_name = 'uploads_imgs/image_' . $id . '.bin';\n $image = fopen($file_name, 'w');\n fwrite($image, $im);\n /* un prob : la premiere image stocker est la seule qui se lire */\n echo '<img class=\"image_acc\" src=\"' . $file_name . '\" />';\n fclose($image);\n $result->closeCursor();\n }", "title": "" }, { "docid": "4d1c4f896ad801fe85d759d1f3fc5a5e", "score": "0.62539715", "text": "function showFPImg($path, $type)\n\t{\n\t\t//declare var\n\t\t$img\t= '';\n\t\t\n\t\t//swich\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'Y':\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'active-status.gif', 15, 15, 0, '', 'Not Abused', '');\n\t\t\t\tbreak;\n\t\t\tcase 'N':\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'inactive-status.gif', 15, 15, 0, '', 'Abused', '');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'no-status.gif', 15, 15, 0, '', 'Not Known', '');\n\t\t\t\tbreak;\n\t\t}//switch\n\t\t\n\t\t//return result\n\t\treturn $img;\n\t}", "title": "" }, { "docid": "5024f95af99cf23f2df6b58cb5fe4580", "score": "0.6244867", "text": "function view_image($imagefile)\n{\n global $self, $bad;\n \n $imagefile = str_replace($bad, '', $imagefile);\n $imagedir = dirname($imagefile);\n $filename = basename($imagefile);\n if (file_exists($imagefile) and is_file($imagefile) and is_readable($imagefile))\n {\n list($width, $height, $type, $attr) = @getimagesize($imagefile);\n switch ($type)\n {\n case 1:\n $type = 'GIF';\n break;\n case 2:\n $type = 'JPEG';\n break;\n case 3:\n $type = 'PNG';\n break;\n default:\n $type = 'Unsupported'; // This had better not happen\n }\n\n if ($type === 'Unsupported')\n {\n $body = \"\\n\\t\\t\" . '<div class=\"notice\">' .\n \"\\n\\t\\t\\t\" . '<p>Image file is not supported</p>' .\n \"\\n\\t\\t\\t\" . '<a class=\"dir\" href=\"' . $self . '?dir=' . $imagedir . '\">Return to index</a>' .\n \"\\n\\t\\t\" . '</div>';\n $html = template('Image viewer error: ' . $imagedir,\n $self . '?style&amp;imageview=' . $_GET['imageview'],\n $body, false);\n $file_info = array(NULL, NULL, NULL, NULL, $html);\n }\n else\n { \n $minwidth = $width < 250 ? 250 : $width;\n $body = \"\\n\\t\\t\" . '<div class=\"image\">' .\n \"\\n\\t\\t\\t\" . '<img alt=\"' . $imagefile . '\" src=\"' . $imagefile . '\" ' . $attr . ' />' . '<hr />' .\n \"\\n\\t\\t\\t\" . 'Filename: ' . $filename . '<br />' .\n \"\\n\\t\\t\\t\" . 'Dimensions: ' . $width . ' x ' . $height . ' px<br />' .\n \"\\n\\t\\t\\t\" . 'Filetype: ' . $type . '<br />' .\n \"\\n\\t\\t\\t\" . 'Filesize: ' . fsize_unit_convert(filesize($imagefile)) . '<br />';\n if (!empty($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], 'submitsearch=Search'))\n {\n $body .=\n \"\\n\\t\\t\\t\" . '<a style=\"margin-left: ' . ($minwidth/2 - 50) . 'px\" class=\"dir\" href=\"' . $_SERVER['HTTP_REFERER'] . '\">Return to index</a>';\n }\n else\n {\n $body .=\n \"\\n\\t\\t\\t\" . '<a style=\"margin-left: ' . ($minwidth/2 - 50) . 'px\" class=\"dir\" href=\"' . $self . '?dir=' . $imagedir . '\">Return to index</a>';\n }\n \n $body .= \"\\n\\t\\t\" . '</div>';\n\n $html = template('Image viewer: ' . $imagedir,\n $self . '?style&amp;imageview=' . $_GET['imageview'],\n $body, false);\n $file_info = array($width, $height, $type, $attr, $html);\n }\n }\n else\n {\n $body = \"\\n\\t\\t\" . '<div class=\"notice\">' .\n \"\\n\\t\\t\\t\" . '<p>Image file ' . $imagefile . ' does not exist</p>' .\n \"\\n\\t\\t\\t\" . '<a class=\"dir\" href=\"' . $self . '?dir=' . $imagedir . '\">Return to index</a>' .\n \"\\n\\t\\t\" . '</div>';\n $html = template('Image viewer error: ' . $imagedir,\n $self . '?style&amp;imageview=' . $_GET['imageview'],\n $body, false);\n $file_info = array(NULL, NULL, NULL, NULL, $html);\n }\n \n return $file_info;\n}", "title": "" }, { "docid": "105b89acf8d0fe35754fb368c2e21d1d", "score": "0.6236544", "text": "function create_image(){\n \t\t$image=imagecreatetruecolor(170, 60);\n \t\t$black=imagecolorallocate($image, 0, 0, 0);\n \t\t$color=imagecolorallocate($image, 200, 100, 90);\n \t\t$white=imagecolorallocate($image, 255, 255, 255);\n \t\timagefilledrectangle($image, 0, 0, 200, 100, $white);\n \t\timagettftext($image, 30, 0, 10, 40, $color, $dir.\"icomoon.ttf\", $_SESSION['randon_code']);\n\n \t\theader(\"Content-type:img/png\");\n \t\timagepng($image);\n \t}", "title": "" }, { "docid": "0c1f2fb0244025b7ab65b1eb6bf2d7d1", "score": "0.6231154", "text": "function write_msg($type, $msg) {\n echo '<img src=\"resources/'.$type.'.png\"> '.$msg;\n}", "title": "" }, { "docid": "60fb5c8b0383052aa348703f4260fc13", "score": "0.62063646", "text": "public function testImage()\n {\n $exception = new ImageException('My Message');\n $exception->setImage('my_image.png');\n\n $formatter = new ExceptionFormatter($exception);\n\n $messages = [\n $formatter->getMessage(),\n $formatter->getHtmlMessage()\n ];\n\n foreach ($messages as $message) {\n $this->assertContains('Html2Pdf Error ['.ImageException::ERROR_CODE.']', $message);\n $this->assertContains('My Message', $message);\n $this->assertContains('my_image.png', $message);\n }\n }", "title": "" }, { "docid": "c1028536cb6d348d15dc98d28e153a7a", "score": "0.6205121", "text": "function display_img($img, $fmt){\n\t\t\t\t\t$mime = $fmt;\n\t\t\t\t\tswitch($fmt){\n\t\t\t\t\t\tcase 'jpe' :\n\t\t\t\t\t\tcase 'jpg' : $mime = 'jpeg'; break;\n\t\t\t\t\t\tcase 'svg' : $mime = 'svg+xml'; break;\n\t\t\t\t\t\tcase 'ico' : $mime = 'vnd.microsoft.icon'; break;\n\t\t\t\t\t}\n\t\t\t\t\theader(\"Content-type: image/$mime\");\n\t\t\t\t\t//\t\theader(\"Content-Length: \" . filesize($img) .\"; \");\n\t\t\t\t\techo $img;\n\t\t\t\t}", "title": "" }, { "docid": "2bc1b4f21a0655c19e393a73cf68f9cc", "score": "0.6146209", "text": "public function msg($msg){\n\t\t\t\n\t\t\t$container = imagecreate(300,200);\n\t\t\t$black = imagecolorallocate($container, 0, 0, 0);\n\t\t\t$white = imagecolorallocate($container,255,255,255);\n\t\t\t$font = 'fonts/dali.ttf';\n\t\t\t//imagefilledrectangle($container, 0, 0, 50, 60, $white);\n\t\t\timagefttext($container, 30, 5, 10, 90, $white, $font, $msg);\n\t\t\t//header('Content-Type: image/png');\n\t\t\timagejpeg($container, \"images/captcha.jpg\");\n\t\t\timagedestroy($container);\n\t\t\t\n\t\t\t//remove header in the blog model replace null with image\n\t\t}", "title": "" }, { "docid": "f618c4e52930d0ecda08cfbc54a3703f", "score": "0.6114051", "text": "public function display() {\n header ('Content-type: image/png');\n\n /* Write the image to standard out - in the case of the web server to the network to the browser\n and free up any memory used by the image */\n imagepng($this->im);\n imagedestroy($this->im);\n }", "title": "" }, { "docid": "f618c4e52930d0ecda08cfbc54a3703f", "score": "0.6114051", "text": "public function display() {\n header ('Content-type: image/png');\n\n /* Write the image to standard out - in the case of the web server to the network to the browser\n and free up any memory used by the image */\n imagepng($this->im);\n imagedestroy($this->im);\n }", "title": "" }, { "docid": "f618c4e52930d0ecda08cfbc54a3703f", "score": "0.6114051", "text": "public function display() {\n header ('Content-type: image/png');\n\n /* Write the image to standard out - in the case of the web server to the network to the browser\n and free up any memory used by the image */\n imagepng($this->im);\n imagedestroy($this->im);\n }", "title": "" }, { "docid": "35d21d9ad5ab217b9e56907ab82bc345", "score": "0.6102716", "text": "public function image()\n {\n if (!empty($this->document['document_set']['template']['image'])) {\n $this->builder->image(\n $this->document['document_set']['template']['image'],\n $this->printer->dotWidth,\n $this->printer->imageType\n );\n $this->linebreak();\n } elseif (!empty($this->company['image'])) {\n $this->builder->image($this->company['image'], $this->printer->dotWidth, $this->printer->imageType);\n $this->linebreak();\n }\n }", "title": "" }, { "docid": "39141d8157e6361935686c7aa4648554", "score": "0.6079319", "text": "function show_error($file,$drawuserdef,$imgmaxx,$imgmaxy,$type,$section)\n{\n\t$im = ImageCreateTrueColor($imgmaxx,$imgmaxy);\n\t$black = ImageColorAllocate($im, 0, 0, 0);\n\t$bg2p = ImageColorAllocate($im, 175,198,219);\n\t$white = ImageColorAllocate($im, 255, 255, 255);\n\t$red = ImageColorAllocate($im, 255, 0, 0);\n\n\tImageFill($im, 0, 0, $bg2p);\n\tImageRectangle($im, 0, 0, $imgmaxx-1, $imgmaxy-1, $white);\n\n\tinclude \"../config.php\";\n\t$bg3p = ImageColorAllocate($im, $fontcol_grap_R,$fontcol_grap_G,$fontcol_grap_B);\n \t$text=\"There is a new supported $type-Device but no Logfile $file\";\n $fontsize=9;\n $txtcolor=$bg3p;\n ImageTTFText ($im, $fontsize, 0, 5, 17, $txtcolor, $fontttf, $text);\n \t$text=\"Please check the userdef[$section] of <pgm3>/config.php and refresh your browser\";\n ImageTTFText ($im, $fontsize, 0, 5, 45, $txtcolor, $fontttf, $text);\n\n\theader(\"Content-type: image/png\");\n\timagePng($im);\n\texit;\n}", "title": "" }, { "docid": "409be82c0acba3d727dbe35952c9f998", "score": "0.6078125", "text": "function show() {\n\t\t$this->_image->show($this->getFormat());\n\t}", "title": "" }, { "docid": "29fdec774f788f86bdeeae43982b7d6f", "score": "0.6067904", "text": "static function ImageUploadTop($text){\n ?>\n <fieldset title=\"<?=$text['IMAGE'];?>\">\n <legend><img src=\"images/icons/pictures.png\" alt=\"<?=$text['IMAGE'];?>\" title=\"<?=$text['IMAGE'];?>\" border=\"0\"><?=$text['IMAGE'];?></legend>\n <?\n\n }", "title": "" }, { "docid": "d38945c3f2342e8077dd95ee2601b84a", "score": "0.6056279", "text": "function captcha_display($code, $width, $height, $which = 0) {\n $image = @imagecreatetruecolor($width, $height) or die(\"imagecreate failed\");\n imagefill($image, 0, 0, imagecolorallocate($image, 255, 255, 255));\n\n captcha_picka($image, $code, $which);\n\n // send some good headers\n header(\"Content-Type: image/png\");\n header(\"Cache-Control: no-cache, must-revalidate\");\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n header(\"Content-Disposition: inline; filename=captcha.png\");\n\n // send & cleanup\n imagepng($image);\n imagedestroy($image);\n }", "title": "" }, { "docid": "d106d4657a17682699f99886aa83a517", "score": "0.60452163", "text": "function VerifyImage()\r\n\t\t{\r\n\t\t\t/* check that GD is installed */\r\n\t\t\tif ( ! function_exists('imagecreatefromstring') )\r\n\t\t\techo '<!-- The GD image library is not installed. -->';\r\n\r\n\t\t\t/* check if it contains html stuff\r\n\t\t\t * handier than a binary check to rescan redirects for\r\n\t\t\t * favicon content tags\r\n\t\t\t * */\r\n\t\t\tif (strpos(strtolower(\"-\".$this->GetData()),strtolower('<html')) &&\r\n\t\t\t\tstrpos(strtolower(\"-\".$this->GetData()),strtolower('<body'))) {\r\n\t\t\t\t\t$this->BlockFoundIcon();\r\n\t\t\t}\r\n\r\n\t\t\t/* check the filetype */\r\n\t\t\tLog::F($this,'[VERIFY] check image type');\r\n\t\t\t$filetype = $this->GetFileType();\r\n\t\t\tif ('' != $filetype)\r\n\t\t\t{\r\n\t\t\t\t$this->SetType($filetype);\r\n\t\t\t\t$this->SetFilters($this->GetFilters() . '|' . $filetype);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->BlockFoundIcon();\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "699e7323b39ea665fd8d8fae4f08547b", "score": "0.6033789", "text": "private function outImg()\n {\n if(imagetypes() & IMG_GIF)\n {\n header(\"Content-type:gif\");\n imagegif($this->img);\n }\n else if(imagetypes() & IMG_PNG)\n {\n header(\"Content-type:png\");\n imagepng($this->img);\t\n }\n else\n {\n header(\"Content-type:jpeg\");\n imagejpeg($this->img);\n }\n }", "title": "" }, { "docid": "fc883137a05815e45fba728aa5e148e6", "score": "0.6025512", "text": "public function renderImg($message = null, $barcodetype = null, $imagetype = null, $attribs = array());", "title": "" }, { "docid": "9577adf720abd158cc6b5dfb6ea5cfa2", "score": "0.6014915", "text": "public function displayImage() {\n\t\t\techo '┌', str_repeat('─', $this->getWidth()), '┐', \"\\n\";\n\t\t\tforeach ($this->lines as $line) {\n\t\t\t\techo '│', RasterImage::getLineForDisplay($line, $this->mirrored), '│', \"\\n\";\n\t\t\t}\n\t\t\techo '└', str_repeat('─', $this->getWidth()), '┘', \"\\n\";\n\t\t}", "title": "" }, { "docid": "258e6c8fc3006e64b76fcf3646cfb593", "score": "0.598902", "text": "protected function serveErrorMessageImage($msg)\n {\n if ($this->options['add-content-type-header']) {\n $this->header('Content-type: image/gif');\n }\n\n // TODO: handle if this fails...\n $image = imagecreatetruecolor(620, 200);\n imagestring($image, 1, 5, 5, $msg, imagecolorallocate($image, 233, 214, 291));\n // echo imagewebp($image);\n echo imagegif($image);\n imagedestroy($image);\n }", "title": "" }, { "docid": "ab7c7d534cf490527595a752fe677186", "score": "0.5975685", "text": "function textImage($image, $textSize, $textColor, $textFont, $text, $textH){\n\t\t//Tamanho do texto\n\t\t$textWidth = getTextWidth($textSize, $textFont, $text);\n\n\t\t//Tamanho horizontal da imagem\n\t\t$imageWidth = imagesx($image);\n\n\t\t//Posição x do texto\n\t\t$textX = ($imageWidth / 2) - ($textWidth / 2);\n\n\t\t//Coloca o texto na imagem\n\t\timagettftext($image, $textSize, 0, $textX, $textH, $textColor, $textFont, $text);\n\t}", "title": "" }, { "docid": "aee72f26e5d1c6550d6f679afcb4f35f", "score": "0.59571695", "text": "public function output() {\n\t\t$image = $this->getImage();\n\t\n\t\tHeader('Content-type: image/png');\n\t\timagepng($image);\n\t\timagedestroy($image);\n\t}", "title": "" }, { "docid": "54055be09b6462a752a0a3cb44ffbb28", "score": "0.5943807", "text": "function _output() {\r\n\t\t\t// initialize the image\r\n\t\t\t$this->init();\r\n\t\t\t// draw the image\r\n\t\t\t$this->draw();\r\n\t\t\t\r\n\t\t\theader(\"Content-type: image/png\");\t\t\t\r\n\t\t\timagepng($this->image);\r\n\t\t\t\r\n\t\t\t// destroy the image to free resources\r\n\t\t\timagedestroy($this->image);\r\n\t\t}", "title": "" }, { "docid": "de8277ca9068dd0b2364c87bb6a738ef", "score": "0.5906038", "text": "function display($type = '', $quality = 75)\n {\n \t$this->remake();\n $image_data = @imagick_image2blob( $this->handle );\n header( \"Content-type: \" .@imagick_getmimetype( $this->handle ). \"\\n\\n\" ) ;\n \n\t\tprint $image_data ;\n }", "title": "" }, { "docid": "4466905cd60d478e9ed061599b5ec5f9", "score": "0.59000236", "text": "function show($quality = 100, $name = '')\n {\n switch ($this->format) {\n case 'GIF':\n if ($name != '') {\n @ImageGif($this->newImage, $name) or $this->error = true;\n } else {\n header('Content-type: image/gif');\n ImageGif($this->newImage);\n }\n break;\n case 'JPG':\n if ($name != '') {\n @ImageJpeg($this->newImage, $name, $quality) or $this->error = true;\n } else {\n header('Content-type: image/jpeg');\n ImageJpeg($this->newImage, NULL, $quality);\n }\n break;\n case 'PNG':\n if ($name != '') {\n @ImagePng($this->newImage, $name) or $this->error = true;\n } else {\n header('Content-type: image/png');\n ImagePng($this->newImage);\n }\n break;\n }\n }", "title": "" }, { "docid": "9bef79f9f5c82d156da20afe1d36a1c9", "score": "0.5893698", "text": "public static function verResultados(){\n $conexion = conexion(\"root\", \"\");\n $id_estudiante = $_GET['id'];\n $result= $conexion->query(\"SELECT * from datos WHERE id_estudiante = '$id_estudiante'\");\n $mostrar= $result->fetch();\n\nif ($mostrar['id_estudiante'] == \"\") {\n echo \"No se ha realizado aún el Test\";\n}else { \n $puntos = $mostrar['puntos'];\n if(($puntos == 0) || ($puntos <= 21))\n{\n $mensaje=\"Ansiedad muy baja\";\n $img= \"<img src='https://1.bp.blogspot.com/-uVpCu7Ifrtk/YL_JSG9LOlI/AAAAAAAAM9w/sbjuD8eHS-kP6IF6_WBlCCM6W5C1PQ9tQCLcBGAsYHQ/s0/3.png' border='0' width='300' height='300'>\";\n \n} else if (($puntos == 4) || ($puntos <= 35))\n{\n $mensaje=\"Ansiedad Moderada\";\n $img= \"<img src='https://1.bp.blogspot.com/-S2PvWDH9fiE/YL_JSOJW0eI/AAAAAAAAM94/NRMqmAcLiKok_FY51DOsxs_mB0X9lKhdQCLcBGAsYHQ/s0/2.png' border='0' width='300' height='300'>\";\n} else if (($puntos == 8) || ($puntos <= 63))\n{\n $mensaje=\"Ansiedad Severa\";\n \n $img= \"<img src='https://1.bp.blogspot.com/-xo0qdE5kajk/YL_JSb0pISI/AAAAAAAAM90/JNoc7xTMvNYGsLjU0DHc51pG5F5P4_BXQCLcBGAsYHQ/s0/1.png' border='0' width='300' height='300'>\";\n}\necho \"Resultado: $puntos puntos <br> $mensaje <br><br><br> $img \";\n}\n}", "title": "" }, { "docid": "f97f018e340046feba78f05ece7a207b", "score": "0.5892542", "text": "function loadpng($imgname,$title)\n{\n $im = imagecreatefrompng($imgname);\n\n //assign color\n $black = imagecolorallocate($im, 0, 0, 0);\n $white = imagecolorallocate($im, 255, 255, 255);\n\n //set all black color in image to transparent\n imagecolortransparent($im, $black);\n\n //genrate random color\n $random_color = imagecolorallocate($im, rand(1,128), rand(1,128), rand(1,128));\n\n $font_size = 30;\n // $font_size = 45; // For details image\n $font_path = __DIR__ . '/arial.ttf';\n\n\t$word = $title;\n $word = wordwrap($word,15, \"|\");\n $word = explode(\"|\",$word);\n\n $angle = 0;\n\n $width = imagesx($im);\n\t$height = imagesy($im);\n\n\timagefilledrectangle($im, 0, 70, $width, $height, $random_color);\n\n\t$height = $height - (count($word)-1)*$font_size*0.7;\n\n\tforeach ($word as $k => $v) {\n\t\t$bbox = imagettfbbox($font_size, $angle, $font_path, $v );\n\n\t\t$font_width = $bbox[4] / 2;\n\t\t$font_height = $bbox[5] / 2;\n\n\t\t$x = $width / 2 - $font_width;\n\t\t$y = $height / 2 - $font_height;\n\t\t$y = $y + $k*$font_size*1.3;\n\n\t\timagettftext($im, $font_size, $angle, $x, $y, $white, $font_path, $v);\t\n\t}\n\treturn $im;\n}", "title": "" }, { "docid": "ae73af24e2d0e1b474b0c04c14eb39dc", "score": "0.58841556", "text": "function sendImage() {\n\n switch ($this->type) {\n\n case 1:\n header ('Content-Type: image/jpg');\n imagejpeg($this->image,null,80);\n break;\n default:\n header ('Content-Type: image/png');\n imagepng($this->image);\n }\n imagedestroy($this->image);\n }", "title": "" }, { "docid": "74c02c10b9a9da55f571da7f1bb02e5e", "score": "0.5877417", "text": "function logo()\r\n{ echo\"<div align='center'>\";\r\n $con=mysql_query(\"select * from contenido where tipo='tema'\");\r\n $r=mysql_fetch_object($con);\r\n $tema=$r->subtipo; \r\n if(file_exists(\"../archivos/logo_$tema.jpg\")) echo\"<img src='../archivos/logo_$tema.jpg'>\"; \r\n if(file_exists(\"../archivos/logo_$tema.gif\")) echo\"<img src='../archivos/logo_$tema.gif'>\"; \r\n if(file_exists(\"../archivos/logo_$tema.swf\")) echo\"<img src='../archivos/logo_$tema.swf'>\"; \r\n echo\"</div>\";\r\n}", "title": "" }, { "docid": "829e4711e56b72a34477661ce197348d", "score": "0.58722365", "text": "public function render()\r\n {\r\n\r\n imagepng($this->image);\r\n imagedestroy($this->image);\r\n }", "title": "" }, { "docid": "e836f19066c98f02fe04bccf588b593f", "score": "0.5851872", "text": "private static function validationImage(): string\n {\n if (!isset($_FILES[0])) {\n return '';\n }\n if (!file_exists($_FILES[0]['tmp_name'])) {\n return '{\"ok\": \"image\"}';\n }\n if (preg_replace('/(image\\/).+/', '', $_FILES[0]['type']) !== '') {\n return '{\"ok\": \"noImage\"}';\n }\n return '';\n }", "title": "" }, { "docid": "f69ca3e52e5ab95033558d99ac13f1a4", "score": "0.58244723", "text": "function showImage()\n {\n if (!$this->_imageStream) {\n throw new Lms_ImageProcessor_Exception('image not loaded');\n }\n\n switch ($this->_type) {\n case 1:\n imagegif($this->_imageStream);\n break;\n case 2:\n imagejpeg($this->_imageStream);\n break;\n case 3:\n imagepng($this->_imageStream);\n break;\n default:\n throw new Lms_ImageProcessor_Exception('invalid imagetype');\n }\n }", "title": "" }, { "docid": "fd6a95890b49ad730e3fa1b3fcbd8e30", "score": "0.5819214", "text": "private function outputEmptyImageCode(){\t\n\t\t\techo \"empty image\";\n\t\t\texit();\n\t\t}", "title": "" }, { "docid": "dbb2f81deb4bc81c1355c989b6421239", "score": "0.58188885", "text": "function preview()\n {\n header(\"Content-type: {$this->_mimetype}\");\n $this->showImage();\n }", "title": "" }, { "docid": "cdc1b896adcf2963f0e87025780db66b", "score": "0.5815723", "text": "public function output()\n {\n $image = imagecreate($this->config->width, $this->config->height);\n imagecolorallocate($image, 255, 255, 255);// background color\n\n // Add a few random lines\n $lineColor = imagecolorallocate($image, 196, 196, 196);\n for ($i = 0; $i < $this->config->stringLength; $i++) {\n imageline(\n $image,\n mt_rand(0, $this->config->width - 1),\n mt_rand(0, $this->config->height - 1),\n mt_rand(0, $this->config->width - 1),\n mt_rand(0, $this->config->height - 1),\n $lineColor\n );\n }\n\n $captchaCode = $this->generateCode();\n $_SESSION['captcha_code'] = $captchaCode;\n\n // Draw text\n $textColor = imagecolorallocate($image, 0, 0, 0);\n $widthPerText = $this->config->width / $this->config->stringLength;\n $fontFilepath = __DIR__ . '/ipaexg.ttf';\n for ($i = 0; $i < $this->config->stringLength; $i++) {\n $size = mt_rand(10, 18);\n $angle = mt_rand(-45, 45);\n $x = $widthPerText * $i + mt_rand(0, $widthPerText / 3);\n $y = mt_rand($this->config->height / 4, $this->config->height - $this->config->height / 4);\n\n imagettftext(\n $image,\n $size,\n $angle,\n $x,\n $y,\n $textColor,\n $fontFilepath,\n mb_substr(mb_convert_encoding($captchaCode, 'UTF-8'), $i, 1)\n );\n }\n\n $outputFuncName = 'image' . $this->config->type;\n header('Content-Type: image/' . $this->config->type);\n call_user_func($outputFuncName, $image);\n imagedestroy($image);\n }", "title": "" }, { "docid": "f63e4d4e18c4a8ff485163dc6ecd8c32", "score": "0.5815678", "text": "function showImage($type = 'jpg', $quality = 90, $name='')\n {\n if ($this->_imgFinal == null) {\n $this->_debug('There is no cropped image to show.');\n return false;\n }\n\n $type = strtolower($type);\n $func = 'image' . ($type == 'jpg' ? 'jpeg' : $type);\n $head = 'image/' . ($type == 'jpg' ? 'jpeg' : $type);\n \n if (!$this->_isSupported('[showing file]', $type, $func, false)) {\n return false;\n }\n\n header(\"Content-type: $head\");\n header(\"Content-Disposition: inline; filename=\\\"\".$name.\".\".$type.\"\\\"\");\n switch($type) {\n case 'gif':\n if ($this->gdInfo['Truecolor Support'] && imageistruecolor($this->_imgFinal)) {\n imagetruecolortopalette($this->_imgFinal, false, 255);\n }\n $func($this->_imgFinal);\n break;\n case 'png':\n $func($this->_imgFinal);\n break;\n case 'jpg':\n $func($this->_imgFinal, '', $quality);\n break;\n }\n\n return true;\n }", "title": "" }, { "docid": "ff635efc30ae738b271f5531b10ce5bf", "score": "0.5810177", "text": "public function setImage(Image $image): Text;", "title": "" }, { "docid": "ca44301a4f2c6c76f1a1b63467be38d5", "score": "0.5797638", "text": "function printImage() {\n\t\t\theader('Content-type: image/jpeg');\n\t\t\treturn imagejpeg($this->image);\n\t\t}", "title": "" }, { "docid": "19f846a06448b5a5a0239d546c719d3d", "score": "0.5792718", "text": "function EscalarImagen($ancho, $alto, $imagen, $guardar, $calidad)\n{\n $image = new Zebra_Image();\n\n // indicate a source image (a GIF, PNG or JPEG file)\n $image->source_path = $imagen;\n\n // indicate a target image\n // note that there's no extra property to set in order to specify the target\n // image's type -simply by writing '.jpg' as extension will instruct the script\n // to create a 'jpg' file\n $image->target_path = $guardar;\n\n // since in this example we're going to have a jpeg file, let's set the output\n // image's quality\n $image->jpeg_quality = $calidad;\n\n // some additional properties that can be set\n // read about them in the documentation\n $image->preserve_aspect_ratio = true;\n $image->enlarge_smaller_images = true;\n $image->preserve_time = true;\n\n // resize the image to exactly 100x100 pixels by using the \"crop from center\" method\n // (read more in the overview section or in the documentation)\n // and if there is an error, check what the error is about\n if (!$image->resize($ancho, $alto, ZEBRA_IMAGE_NOT_BOXED)) {\n\n // if there was an error, let's see what the error is about\n switch ($image->error) {\n\n case 1 :\n echo 'Source file could not be found!';\n break;\n case 2 :\n echo 'Source file is not readable!';\n break;\n case 3 :\n echo 'Could not write target file!';\n break;\n case 4 :\n echo 'Unsupported source file format!';\n break;\n case 5 :\n echo 'Unsupported target file format!';\n break;\n case 6 :\n echo 'GD library version does not support target file format!';\n break;\n case 7 :\n echo 'GD library is not installed!';\n break;\n }\n }\n}", "title": "" }, { "docid": "53da89bfa5049dcc83e133444e9ea33f", "score": "0.577858", "text": "function _imageFromString($target, $text, $font = 'AUGUSTUS.TTF', $fontsize = 24, $color = '000000', $bgcolor = 'FFFFFF')\n{\n\n\t$bbox = imagettfbbox($fontsize, 0, $font, $text);\n\t$w = abs($bbox[0]) + abs($bbox[2]); // distance from left to right\n\t$h = abs($bbox[1]) + abs($bbox[5]); // distance from top to bottom\n\n\t$image = imagecreatetruecolor($w, $h);\n\t$bg = _imageColor($image, $bgcolor);\n\t$color = _imageColor($image, $color);\n\timagefill($image, 0, 0, $bg);\n\n\timagefttext($image, $fontsize, 0, 0, ($h-1), $color, $font, $text);\n\n\treturn _imageDisplayType($image, $target);\n\n}", "title": "" }, { "docid": "b1836809bf627f2e9dae5c884c64dae3", "score": "0.5772502", "text": "function showStatusImg($path, $type)\n\t{\n\t\t//declare var\n\t\t$img\t= '';\n\t\t\n\t\t//swich\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'a':\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'active-status.gif', 15, 15, 0, '', 'active', '');\n\t\t\t\tbreak;\n\t\t\tcase 'd':\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'inactive-status.gif', 15, 15, 0, '', 'inactive', '');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'no-status.gif', 15, 15, 0, '', 'none', '');\n\t\t\t\tbreak;\n\t\t}//switch\n\t\t\n\t\t//return result\n\t\treturn $img;\n\t}", "title": "" }, { "docid": "1d61a53b2ad69e3845787eb4ec43febd", "score": "0.5769183", "text": "function createImage()\n {\n \n // make a string with all the characters that we \n // want to use as the verification code\n $alphanum = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n \n // generate the verication code \n $this -> rand = substr(str_shuffle($alphanum), 0, 5);\n \n // create an image object using the chosen background\n $image = imagecreatefromjpeg(\"miscs/images/Default/imageverificationbground.jpg\");\n \n \n $textColor = imagecolorallocate ($image, 0, 0, 0); \n \n // write the code on the background image\n imagestring ($image, 5, 5, 8, $this -> rand, $textColor); \n \n // send the image to the browser\n imagejpeg($image, \"miscs/images/Default/imageverification.jpg\");\n\n // destroy the image to free up the memory\n imagedestroy($image);\n \n return;\n }", "title": "" }, { "docid": "9a1c3a96c638f0b62fee0429127d999b", "score": "0.5762472", "text": "public static function createImage($image_options,$text_color = [], $text_options =[],$type = \"jpeg\"){\n $image = imagecreate($image_options['imageWidth'], $image_options['imageHeight']); \n \n // Set the background color of image \n $background_color = imagecolorallocate($image, $image_options['red-color'], $image_options['green-color'], $image_options['blue-color']); \n \n if(!empty($text_options)){\n\n // Set the text color of image \n $text_color = explode(\",\",$text_color);\n $text_color = imagecolorallocate($image, $text_color[0], $text_color[1], $text_color[2]); \n \n foreach($text_options as $lines => $line_arr){\n \n foreach($line_arr as $line){\n \n $position = explode(\",\",$line['position']);\n $text = $line['text']; \n \n // Function to create image which contains string.\n imagestring($image, $position[0],$position[1], $position[2] , $text, $text_color);\n \n }\n } \n\n } \n \n ob_start();\n $function = \"image$type\";\n $function($image);\n $image_data = ob_get_contents();\n ob_end_clean();\n return $image_data;\n \n }", "title": "" }, { "docid": "b2134590101f734b590edb6366a10b0f", "score": "0.57569", "text": "function showAbusedImg($path, $type)\n\t{\n\t\t//declare var\n\t\t$img\t= '';\n\t\t\n\t\t//swich\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'N':\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'active-status.gif', 15, 15, 0, '', 'Not Abused', '');\n\t\t\t\tbreak;\n\t\t\tcase 'Y':\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'inactive-status.gif', 15, 15, 0, '', 'Abused', '');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'no-status.gif', 15, 15, 0, '', 'Not Known', '');\n\t\t\t\tbreak;\n\t\t}//switch\n\t\t\n\t\t//return result\n\t\treturn $img;\n\t}", "title": "" }, { "docid": "b73fa5ebb06ec38055cd3147bfaca1a3", "score": "0.57556224", "text": "function graphic_title_code($title, $name, $preview = false) {\r\n global $CONFIG_PATHTITLES;\r\n global $CONFIG_URLTITLES;\r\n global $CONFIG_URLADMIN;\r\n\r\n if (!$preview) {\r\n /*obté el la imatge desti*/\r\n $dest_path = $CONFIG_PATHTITLES.'/'.$name.'.png';\r\n $dest_url = urlDir($CONFIG_URLTITLES).'/'.$name.'.png';\r\n\r\n /*genera el titol grafic*/\r\n $size = graphic_title_save($title, $dest_path);\r\n\r\n /*genera el codi per la imatge*/\r\n $codiimatge='<img src=\"'.$dest_url.'\" alt=\"'.$title.'\" width=\"'.$size['width'].'\" height=\"'.$size['height'].'\" border=\"0\" align=\"absmiddle\" />';\r\n }\r\n else {\r\n $codiimatge='<img src=\"'.$CONFIG_URLADMIN.'/php/preview-graphic-title.php?title='.$title.'\" alt=\"'.$title.'\" border=\"0\" align=\"absmiddle\" />';\r\n }\r\n\r\n return ($codiimatge);\r\n}", "title": "" }, { "docid": "e7fb7944bc95dde5d3cef84238b9ed29", "score": "0.5746689", "text": "private static function _textToImage($question, $height=15, $width=60) {\n\t\ttry {\n\t\t\t// create a new image of size 60x15 and test if we have GD library in the process\n\t\t\t@$image = imagecreate($width, $height);\n\t\t\tif (!isset($image)) throw new Fari_Exception('Can\\'t create an image.');\n\t\t} catch (Fari_Exception $exception) { $exception->fire(); }\n\t\t\t\n\t\t// white background\n\t\t$colorBackground = imagecolorallocate($image, 255, 255, 255);\n\t\t// black text\n\t\t$colorText = imagecolorallocate($image, 0, 0, 0);\n\t\t// color for noise (light gray)\n\t\t$colorNoise = imagecolorallocate($image, 190, 190, 190);\n\t\t\n\t\tfor ($i=0; $i<3; $i++) {\n\t\t\t// add noise first formed of question text\n\t\t\timagestring($image, 0, $i * ($width / 3), $i * ($height / 3), $question, $colorNoise);\n\t\t}\n\t\t// write question text (size, left, top)\n\t \timagestring($image, 4, 0, 0, $question, $colorText);\n\t\t\n\t\t// set image header\n\t\tif (!headers_sent()) @header('Content-type: image/png');\n\t\t\n\t\t// make PNG img\n\t\timagepng($image);\n\t\timagecolordeallocate($image, $colorText);\n\t\timagecolordeallocate($image, $colorBackground);\n\t\t\n\t\t// output the resulting image\n\t\timagedestroy($image);\n\t}", "title": "" }, { "docid": "236bdc7f00af884201629029c92adaa9", "score": "0.5745617", "text": "function verification_image($width = 120, $height = 40, $font = \"\") {\r\n\t\t\t$this->_w = $width;\r\n\t\t\t$this->_h = $height;\r\n\t\t\t\r\n\t\t\t$this->ttf_font = $font;\r\n\t\t}", "title": "" }, { "docid": "6a46961c85ae01209e185fed70030604", "score": "0.5733312", "text": "function makeImage($code) {\r\n // get path of font file\r\n $fontPath = realpath('.') . '/chaparral.ttf';\r\n\r\n $tsize = imagettfbbox(30, 0, $fontPath, $code);\r\n\r\n $width = abs($tsize[2] - $tsize[0]) + 10;\r\n $height = 40;\r\n\r\n $img = imagecreate($width, $height);\r\n\r\n $black = imagecolorallocate($img, 0x00, 0x00, 0x00);\r\n $white = imagecolorallocate($img, 0xFF, 0xFF, 0xFF);\r\n\r\n imagettftext($img, 30, 0, 5, $height - 10, $white, $fontPath, $code);\r\n\r\n $path = './images/cap/' . uniqid('cap', false) . '.gif';\r\n imagegif($img, $path);\r\n\r\n imagedestroy($img);\r\n\r\n $url = BASE_URL . substr($path, 2);\r\n\r\n return $url;\r\n}", "title": "" }, { "docid": "0d6fbd68c68e4a733d82510b8153cf8d", "score": "0.5731808", "text": "function show_image($image) {\r\n \t\tif($image != '' && file_exists($image) && is_file($image)) {\r\n \t\t\treturn $image;\r\n \t\t} else {\r\n \t\t\treturn \"images/no-profile-image.png\";\r\n \t\t}\r\n \t}", "title": "" }, { "docid": "b111185556d57c8e31f016fbc75acc9b", "score": "0.5728482", "text": "public function display() {\n ?>\n<h1>Vítame Vás na stránke nášho časopisu</h1>\n<div class=\"image\"><img src=\"images/skola.jpg\" alt=\"nasa_skola\"></div>\n <?php\n }", "title": "" }, { "docid": "d8c6e68bfd72e5aa24ea2514a7683f02", "score": "0.5717285", "text": "public function showImageFromGet(){\n\t\t\t\n\t\t\t$imageFilename = UniteFunctionsRev::getGetVar(\"img\");\n\t\t\t$maxWidth = UniteFunctionsRev::getGetVar(\"w\",-1);\n\t\t\t$maxHeight = UniteFunctionsRev::getGetVar(\"h\",-1);\n\t\t\t$type = UniteFunctionsRev::getGetVar(\"t\",\"\");\n\t\t\t\n\t\t\t//set effect\n\t\t\t$effect = UniteFunctionsRev::getGetVar(\"e\");\n\t\t\t$effectArgument1 = UniteFunctionsRev::getGetVar(\"ea1\");\n\t\t\t\n\t\t\tif(!empty($effect))\n\t\t\t\t$this->setEffect($effect,$effectArgument1);\n\t\t\t\n\t\t\t$this->showImage($imageFilename,$maxWidth,$maxHeight,$type);\n\t\t}", "title": "" }, { "docid": "ecfed8ce484174db28067dab9acb0e9a", "score": "0.5705608", "text": "public function generate_has_image()\n {\n }", "title": "" }, { "docid": "61d1bd2abd62b37ec61cbdb1864d6000", "score": "0.5704768", "text": "private function output(){\n\t\tif(headers_sent()) self::Error(\"EasyImage can't output the image, headers already set.\");\n\t\tif(is_array($this->gif_sources) && !empty($this->gif_sources)){\n\t\t\tlist($mimetype, $funct, $compression) = $this->getOutputDetails();\n\t\t\theader('Content-Type: '.$mimetype);\n\t\t\techo $this->encodeGIF();\n\t\t}if($this->outputAs === self::PDF){\n\t\t\t$this->outputPDF(\"I\");\n\t\t}else{\n\t\t\tlist($mimetype, $funct, $compression) = $this->getOutputDetails();\n\t\t\theader('Content-Type: '.$mimetype);\n\t\t\t$funct($this->image, null, $compression);\n\t\t}\n\t}", "title": "" }, { "docid": "2ef026ecaa4524a20e1caf426701429a", "score": "0.57026607", "text": "function printImage($row){\n\t\tif ($row['catchable'] == 1 and $row['owned'] == 0){\n\t\t\t?>\n\t\t\t<img src=\"images/site/wanted.png\">\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "9fe44b71c3986dd0307b18ea5a6d728d", "score": "0.5698509", "text": "function verFicha($name, $image, $email, $date, $lenguajes){\r\n ?>\r\n<div class=\"container mt-5\">\r\n <table border='3' bordercolor='orange' cellpadding='4' align='center'>\r\n <tr>\r\n <td>\r\n <table align='center' cellpadding='4' cellspacing='4' border=0>\r\n <tr>\r\n <td><b>Nombre</b></td>\r\n <td><?php echo $name ?></td>\r\n <td colspan='2' rowspan='3' align='center'>\r\n <?php\r\n if($image[0]==null){\r\n echo \"<img src='\".$image[1].\"' width='80px' height='80px' class='rounded'>\".PHP_EOL;\r\n }else{\r\n echo \"<font class='text-danger'>\".$image[0].\"</font>\".PHP_EOL;\r\n\r\n }\r\n ?>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td><b>Email: </b></td>\r\n <td><?php echo $email ?></td>\r\n </tr>\r\n <tr>\r\n <td><b>Fecha:</b></td>\r\n <td><?php echo $date ?></td>\r\n </tr>\r\n <tr>\r\n <td><b>Estudios :</b></td>\r\n <td>\r\n <?php\r\n if($lenguajes==null){\r\n echo \"<font class='text-info'>Sin estudios</font>\".PHP_EOL;\r\n }else{\r\n echo \"<ol>\".PHP_EOL;\r\n for($i=0;$i<count($lenguajes);$i++){\r\n echo \"<li>\".$lenguajes[$i].\"</li>\".PHP_EOL;\r\n }\r\n echo \"</ol>\".PHP_EOL;\r\n }\r\n ?>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>\r\n <?php\r\n }", "title": "" }, { "docid": "097d98c43e0924ebee74ee66fcbd33a0", "score": "0.5697277", "text": "function outputImg($img)\n{\n global $climate;\n\n cliImgDisplay($img);\n $name = basename($img);\n $climate->out(\"\");\n $climate->green()->out(\" Wallpaper saved to: \" . $name);\n $climate->out(\"\");\n}", "title": "" }, { "docid": "689321591f3e42785356b61b11432ac0", "score": "0.5695479", "text": "function say_sorry($upper, $lower) {\n echo \"<img alt=\\\"Sorry!\\\" src=\\\"https://memegen.link/custom/$upper/$lower.jpg?alt=http://i.imgur.com/A3ZR65I.png\\\"/>\";\n}", "title": "" }, { "docid": "01ba9c976716245c04a2ec8f7d249ed1", "score": "0.56781435", "text": "function fin1(){\n $r= \"<div id='main'>\\n\";\n $r.= \"<img id='pendu' src='images/10.png'/>\\n\"; //Affichage a la suite de la derniere image \n $r.=\"<form action='index.php'> \"; //Formulaire de redirection vers l'accueil pour rejouer\n $r.=\"<input type='submit' value='Accueil'/> \"; //Button de validation\n $r.=\"</form>\";\n return $r;\n}", "title": "" }, { "docid": "8de5d98da5391e908d1473e025d08e68", "score": "0.5676629", "text": "function __toString()\r\n {\r\n $result = '<img src=\"../img/cards/' . $this->palo . $this->figura . '.png\" atl=\"error de mierda\" width=\"5%\">';\r\n return $result;\r\n }", "title": "" }, { "docid": "8ef3c001017325a12fc4358b5d5c54b4", "score": "0.56698567", "text": "function display_image($data, $parent=\"\")\n {\n extract($data);\n if(!$URL) return;\n\n $this->retval .= \"<p>\";\n if($LINK) $this->retval .= \"<a href=\\\"$LINK\\\" target=\\\"_blank\\\">\";\n $this->retval .= \"<img src=\\\"$URL\\\"\";\n if($WIDTH && $HEIGHT) $this->retval .= \" width=\\\"$WIDTH\\\" height=\\\"$HEIGHT\\\"\";\n $this->retval .= \" border=\\\"0\\\" alt=\\\"$TITLE\\\">\";\n if($LINK) $this->retval .= \"</a>\";\n $this->retval .= \"</p>\\n\\n\";\n }", "title": "" }, { "docid": "51d713bcfde476a5fde9e4717275bcbf", "score": "0.5648347", "text": "function showOriginalImg($path, $type)\n\t{\n\t\t//declare var\n\t\t$img\t= '';\n\t\t\n\t\t//swich\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'Y':\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'active-status.gif', 15, 15, 0, '', 'Yes', '');\n\t\t\t\tbreak;\n\t\t\tcase 'N':\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'inactive-status.gif', 15, 15, 0, '', 'No', '');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$img\t= $this->imgDisplayR($path, 'no-status.gif', 15, 15, 0, '', 'none', '');\n\t\t\t\tbreak;\n\t\t}//switch\n\t\t\n\t\t//return result\n\t\treturn $img;\n\t}", "title": "" }, { "docid": "c33cb87e7a8ad0d0336eb19454a0e2c6", "score": "0.5647514", "text": "public function output() {\n $this->drawImage();\n header(\"Content-type: image/jpeg\");\n imagejpeg($this->im);\n }", "title": "" }, { "docid": "1b3a13ca9a6a32a44c83ecd602d9d55e", "score": "0.56294465", "text": "function photoMauvaisFormat() {\n\t\treturn '<div class=\"alert alert-warning\" role=\"alert\">\n\t\t\t\tSeuls les fichiers JPG, JPEG et PNG sont autorisés.\n\t\t\t</div>';\n\t}", "title": "" }, { "docid": "df10d86250e751a3263d078a080e7101", "score": "0.56265897", "text": "static function ShowSingleImage($items, $text, $lang = _LANG_ID) {\n $items_keys = array_keys($items);\n $items_count = count($items);\n if($items_count>0) {\n ?><div class=\"leftBlockHead\"><?=$text['SYS_IMAGE_GALLERY']?></div>\n <div class=\"image-block \" align=\"center\"><?\n for($i=0;$i<$items_count;$i++){\n $alt= $items[$items_keys[$i]]['name'][$lang]; // Заголовок\n $title= $items[$items_keys[$i]]['text'][$lang]; // Описание\n $path = $items[$items_keys[$i]]['path']; // Путь уменьшенной копии\n $path_org = $items[$items_keys[$i]]['path_original'];\n ?>\n <a href=\"<?=$path_org;?>\" class=\"highslide\" onclick=\"return hs.expand(this);\">\n <img src=\"<?=$path;?>\" alt=\"<?=$alt?>\" title=\"<?=$title;?>\">\n </a><?\n }\n ?></div><?\n }\n}", "title": "" }, { "docid": "192447dfafed69812aa16fbcb77b0eff", "score": "0.5617678", "text": "public function readImage(){\n\t\tif( file_exists( $this->getImage( ) ) ) {\n\t\t\t$this->setInfoImage( $this->getImage( ) );\n\t\t} else {\n\t\t\t//caso contrário, acessar a imagem através do caminho completo (pasta/imagem)\n\t\t\t$this->setInfoImage( $this->getFolder( ) . \"/\" . $this->getImage( ) );\n\t\t\t$this->setImage( $this->getFolder( ) . \"/\" . $this->getImage( ) );\n\t\t}\n\t}", "title": "" }, { "docid": "3aa0cfbe207eb131b4fa6c89bb5f863e", "score": "0.5616458", "text": "private function drawIniHtmlsmall( $img, $link )\n {\n return( \"<div style='width:100%;height:90%;'>\"\n .\"<a href='$link' target='_blank'>\"\n .\"<span style='display:inline-block;height:100%;vertical-align:middle'></span>\"\n .\"<img src='$img' style='max-width:100%;max-height:100%;vertical-align:middle;display:inline-block'/></a></div>\" );\n }", "title": "" }, { "docid": "92d16460df3ee9992dd1ebd4de1e5b93", "score": "0.56163627", "text": "function info($msg) {\n\techo \"<br /><br /><br /><br /><br /><br /><br /><h2><img src=\\\"./images/info.gif\\\" alt=\\\"\\\" /><br /><br />$msg</h2><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />\";\n}", "title": "" }, { "docid": "677437db8aadf1b455fdba385b3aeb13", "score": "0.56065047", "text": "private function flash()\n {\n \t$hinhAnhTable = Khcn_Api::_()->getDbTable('hinh_anh', 'default');\n\t\t$select = $hinhAnhTable->select()->where('slideshow = 1');\n\t\t$hinhAnhs = $hinhAnhTable->fetchAll($select);\n\t\t$text = '<photos>';\n\t\tforeach ($hinhAnhs as $hinhAnh){\n\t\t\t$text .= '<photo image=\"images/' . $hinhAnh['ten_file'] . '\" colorboxImage=\"images/' . $hinhAnh['ten_file'] . '\" colorboxInfo=\"\" colorboxClass=\"image\" url=\"\" target=\"_blank\"><![CDATA[<head></head><body></body>]]></photo>';\n\t\t}\n\t\t$text .= '</photos>';\n\t\t$path = BASE_PATH . '/flash/image-scroller/images.xml';\n\t\t$fp = fopen($path, 'w');\n\t\tfwrite($fp, $text);\n\t\tfclose($fp);\n }", "title": "" }, { "docid": "8dc8e60dd1c463b4e3031ecbee007b8e", "score": "0.5601377", "text": "function pr_metabox_img_text() {\n add_meta_box(\n 'pr_img_text_sets',\n 'Image with Text',\n 'pr_img_text_metabox_content',\n 'page',\n 'normal',\n 'default'\n );\n}", "title": "" }, { "docid": "3f986e4b76f13964f4f6a0f495d32f5c", "score": "0.55994385", "text": "function _previewImageSize()\n {\n $arr = explode(',', $this->getData);\n $this->_objImage->loadImage($this->path.$this->getFile);\n $this->_objImage->resizeImage($arr[0], $arr[1], $arr[2]);\n\n $time = time();\n $this->_objImage->saveNewImage($this->path.$time);\n $size = @filesize($this->path.$time);\n\n @unlink($this->path.$time);\n $size = $this->_formatSize($size);\n\n $width = strlen($size) * 7 + 10;\n $img = imagecreate($width, 20);\n $colBody = imagecolorallocate($img, 255, 255, 255);\n ImageFilledRectangle($img, 0, 0, $width, 20, $colBody);\n $colFont = imagecolorallocate($img, 0, 0, 0);\n imagettftext($img, 10, 0, 5, 15, $colFont, self::_getIconPath().'arial.ttf', $size);\n\n header(\"Content-type: image/jpeg\");\n imagejpeg($img, '', 100);\n }", "title": "" }, { "docid": "9f476dae99f0fb70fd16bcbe739d069a", "score": "0.5596361", "text": "public function flopImage();", "title": "" }, { "docid": "f9747acdb4e3bd60debb130273665f06", "score": "0.55877334", "text": "function imageDisplay($id, $img, $name){\n return \"<div class='rec'>\n <button type=submit name=view value='\" . $id . \"'>\n <div class='img__wrap'>\n <img src= 'images/\" . $img . \"' alt='An image of \" . $name . \"'>\n <div class='img__description_layer'>\n <p class='img__description'>\" . $name . \"</p>\n </div>\n </div>\n </button></div>\";\n}", "title": "" }, { "docid": "6dd531874055c0cffe63385f3f89bb4b", "score": "0.5580331", "text": "function osc_image_submit($image, $alt = '', $parameters = '') {\n $image_submit = '<input type=\"image\" src=\"' . osc_output_string(DIR_WS_LANGUAGES . $_SESSION['language'] . '/images/buttons/' . $image) . '\" border=\"0\" alt=\"' . osc_output_string($alt) . '\"';\n\n if (osc_not_null($alt)) $image_submit .= ' title=\" ' . osc_output_string($alt) . ' \"';\n\n if (osc_not_null($parameters)) $image_submit .= ' ' . $parameters;\n\n $image_submit .= ' />';\n\n return $image_submit;\n }", "title": "" }, { "docid": "cecfc9ac26fcb98505e9f623af61d1ee", "score": "0.5580232", "text": "function print_imagetext(){\n\t\techo $this->imagetext;\n\t}", "title": "" }, { "docid": "2d8922fed69ffd12e91ad7b5c2194ecd", "score": "0.55755174", "text": "public function renderJpeg()\n {\n header('Content-Type: image/jpeg');\n $this->_imFile->setImageFormat('jpg');\n echo $this->_imFile;\n die();\n }", "title": "" }, { "docid": "69c87f117dd670617c393f9c65b37ed1", "score": "0.55742306", "text": "public function validate_image(){\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "224d284983b4721d27b06495dfc5a85c", "score": "0.5566717", "text": "function drawImage($imgname, $jpeg,$head_png,$body_png, $leg_png,$xtra_png,$jpeg,$bkgd_width, $bkgd_height, $head_width, $head_height,$body_width, $body_height,$leg_height, $leg_width,$xtra_width, $xtra_height)\r\n{\r\n\tif (file_exists ( $imgname))\r\n\t{\r\n\t\t// already exists\r\n\t\t//echo 'found ' . $imgname . '<br>';\r\n\t\treturn;\r\n\t}\r\n\r\n\ttry {\r\n\t\t$out = imagecreatetruecolor($bkgd_width, $bkgd_height);\r\n\r\n\t\timagecopyresampled($out, $jpeg, 0, 0, 0, 0, $bkgd_width, $bkgd_height, $bkgd_width, $bkgd_height);\r\n\t\timagecopyresampled($out, $head_png, 159,00, 0, 0, $head_width, $head_height, $head_width, $head_height);\r\n\t\timagecopyresampled($out, $body_png, 34,150, 0, 0, $body_width, $body_height, $body_width, $body_height);\r\n\t\timagecopyresampled($out, $leg_png, 34,510, 0, 0, $leg_width, $leg_height, $leg_width, $leg_height);\r\n\t\timagecopyresampled($out, $xtra_png, 134,20, 0, 0, $xtra_width, $xtra_height, $xtra_width, $xtra_height);\r\n\t\timagejpeg($out, $imgname,100);\r\n\t\t//header('Content-Type: image/jpg');\r\n\r\n\t\t//imagejpeg($out);\r\n\t\timagedestroy($out);\r\n\t\t//echo 'created ' . $imgname . '<br>';\r\n\t\t// success\r\n\t\t//$istatus[\"errorcode\"] = 0;\r\n\t\t//$istatus[\"errormsg\"] = \"Created User Weirdoid Image!\";\r\n\t\t//$istatus[\"serverUrl\"] = $serverUrl;\r\n\t\t//echo json_encode($istatus);\r\n\t\t//exit;\r\n\t}\r\n\tcatch (Exception $e)\r\n\t{\r\n\t\t$istatus[\"errorcode\"] = 1;\r\n\t\t$istatus[\"errormsg\"] = \"Exception caught writing images (phase 2): \". $e->getMessage();\r\n\t\techo json_encode($istatus);\r\n\t\tdie();\r\n\t}\r\n}", "title": "" }, { "docid": "b5acd424ca8d1cdb91ea90dd7dd58f36", "score": "0.55658126", "text": "function resImg($name, $p = 'align=\"center\"', $pre = '<br />', $post = '<br />') {\n\t\tif ($this->dontPrintImages)\n\t\t\treturn '<br />';\n\t\t$imgRel = $this->path_resources () . $name;\n\t\t$imgInfo = @getimagesize ( PATH_site . $imgRel );\n\t\treturn $pre . '<img src=\"' . $this->wizard->siteBackPath . $imgRel . '\" ' . $imgInfo [3] . ($p ? ' ' . $p : '') . ' vspace=\"5\" border=\"1\" style=\"border:solid 1px;\" />' . $post;\n\t}", "title": "" }, { "docid": "36de9002ec662a7a255f222e75e9ba84", "score": "0.55526054", "text": "private function uploadAndResizeDisplayImage()\n {\n\n $imgPath = 'images/display';\n\n if (!$_FILES['lanceDisplayImg']) {\n return false;\n }\n\n $fileTypes = array('image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/pjpeg');\n $upload = new Upload('lanceDisplayImg', $fileTypes, $imgPath);\n\n $returnFile = $upload->isUploaded();\n\n if (!$returnFile) {\n $result['uploadMsg'] = $upload->msg;\n $result['ok'] = false;\n return $result;\n }\n\n $fileName = basename($returnFile);\n $filePath = $imgPath . '/' . $fileName;\n\n $imgInfo = getimagesize($returnFile);\n\n if ($imgInfo[0] > 300 || $imgInfo[1] > 300) {\n $resizeObj = new ResizeImage($filePath, 300, $imgPath, '');\n if (!$resizeObj->resize()) {\n echo 'Unable to resize image to 300 pixels';\n }\n }\n\n if (file_exists($filePath)) {\n $result['lanceDisplayImg'] = basename($filePath);\n $result['ok'] = true;\n return $result;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "918a199958ddf6251a662f3d35a7f2e2", "score": "0.5544294", "text": "function resImg($name, $p = 'align=\"center\"', $pre = '<br />', $post = '<br />') {\n\t\tif ($this->dontPrintImages) {\n\t\t\treturn '<br />';\n\t\t}\n\t\t$imgRel = $this->path_resources() . $name;\n\t\t$imgInfo = @getimagesize(PATH_site . $imgRel);\n\t\treturn $pre . '<img src=\"' . $this->wizard->siteBackPath . $imgRel . '\" ' . $imgInfo[3] . ($p ? ' ' . $p : '')\n\t\t. ' vspace=\"5\" border=\"1\" style=\"border:solid 1px;\" />' . $post;\n\t}", "title": "" }, { "docid": "949a9fd763aa0e2aaeb7542511b3fabb", "score": "0.554384", "text": "public function run()\n {\n $image = 'iVBORw0KGgoAAAANSUhEUgAAAK0AAAC4CAYAAACRtGxrAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAACQ6SURBVHhe7d1ntyxHdcZxv1Ti6l5llHPOCYFQToiMjQkGG9tgewEmR7FAgEEkSQibJAQSCiCEJGSSP994/0Zni6JXzUzPnJ45p8+pF886c2e6u6p2/eupXdU9c//mwIEDk6amMalB2zQ6NWibRqcGbdPo1KBtGp0atE2jU4O2aXRq0DaNTg3aptGpQds0OjVom0anBm3T6NSgbRqdGrRNo1ODtml0atA2jU4N2qbRqUHbNDo1aJtGpwZt0+jUoG0anRq0TaNTg7ZpdGrQNo1ODdqm0alB2zQ6NWibRqcGbdPo1KBtGp0atCvo4MGDk2OOOWZy4oknTk455ZTJ6aefPjn77LMn55133uT888+fXHjhhZOLLrror+S9Cy64YHLuuedOjz3jjDOm57rGscceO73m0UcfXS2v6a/VoJ2jhPO4446bwnXyySdPTj311ClwCSkYL7nkkslll102ueKKKyZXXnnl5KqrrppcffXVU11zzTVTee19xzjWOWAGeULs2spQljKVDeQG81+rQTtDQOGAJ5100uTMM8+cwgm46667bvK6171ucvPNN09uvfXWqW677bapbr/99ld0xx13vKI777zzldflMc5x/k033TS95rXXXjstgyMrU9nANXhqddyvatBuCaSHDh2anHDCCdNpm/NxUo7IIV/zmtdMXv/6109Bu+uuuyZveMMbeuvee+99Rd33vL7nnnumYLu2MpSlTGWrA4A58PHHH/+K+9basF/UoA2BgJuZls8666zp9H3DDTdM3ZQ7gvTuu++eCmAJ3nbUhdh1SRnKAzE3vuWWWybXX3/9tE7gVUeDaz+Du6+hTWeVS55zzjlTZ5N/mqprjppQAdm0Duobb7xx8trXvnbqjuCSPpjmKfPZ/LfPHONY53BV11AWSJVXDoosT1nqJC9WR3VVZ867HwHet9DqaIsd7sXFwFe6aglPAuQzx8hByylcDgokKcVpp502TS9M569+9aun8tp7PstFnAXYpZdeOgUxXZ2zzio7AXYM4NXZ9YDboN3jSncFj8UVaBLYBCbF/UzP5SIJpIBLSHPFb9HkuiAyGCzi5J/+kvd85pjciQCdQWMbDPiurQxlKZPD5iBKgL3mzOm8diDUwzX3y7bZvoJWhwLHvqqtKe4GTIB2nQ0cPjedg6m7mh8KDtdJuTb4lKVMZQM361irpzpqC/fO/d5aOXtJ+wZaDsfZOBMnM8WDoXSxdFZT/+WXX/7K1pOp3fkJxVDAduXawFWWMi0K1UFdAKxuZd7rb6Yr2nTxxRdPB2QOrFoZe0F7HtoEwRQqhzStZhqQHe/fgOVaOh8oclGQrgvQPlK2dAbAUhJ1A24Oti686q+NUg/pyE7WfZ3a09DqNFO6/NMUarVuIaOTE9Z0qswPOWsCuxvcShvURZ3UTR3tSGhLmTbkItGgtECULnBs0NeuO2btWWh1lvwVsDqZC2UHZycD2CIsOxngu7WT03XlvBZu5SDMxVrZLp+DfC8u0PYktDqIM5nmAZtTagksiO2b2kGQ63IlacRu7lx1y8Wa3FXdtS8Xa8Clsn3uqDl+LznunoNW5wCQG+XiJWGlzP10duauzlkG1oOhQ6HjQieGTgmdHjrrwKsmZx/9qsm5Rx+YnFPR2aEz4rjTQq8OnRA6JuR6R4dqZdWU8Ko7KMFZLiy101+OK+0x2+QsspsHZV/tKWh1iM4Bo0VLd7uIA0kH7IVKBzjQsu4KMLCeHDo3AL0y9PrQPaF3HDxq8q7QP2zpvVt6T+jdB181eWfoTaHb49jrQxeHTg+QwWsQrAKu9koD7DAYjAZl2V6DFtQG8V5x3D0DbTosVwGsDtRpOWVyHW4EWFtJju0DK5AS0nMCsstDrw3dFfCB9B9DHw599uCRk/sPHTn5RujboW9t6YEtfePQUZOvhb4Y+kQc+8E4B+D3xnVujutdHbooxIm5d1/3la/aKdAmublB2U0VDN7cy9XusW+H7QlowZeLLh1Xbgul8tanrS+d3KfjQMMBz4hpn6NyyX8P0L4cEH7/mCMnPw09EXrqmCMmvw49F3p+hn67pWdDvwr9MvRY6Idx/jfjep8MceRbohwOfHyUqexavUppu7Zov7tz2qj9HDfbLhaZEmX7l5lddptGD63g6wQLEy7adZp0WNOnDuM0teuUOjbEWS8MeG4IveXooyb/GkDdF2A9EnoyYPtd6I+h/+voz6E/hXzWlfd9nsf69+9DgP9JiEt/IsqRUtwRZV4VZcuT+zgvcKULUgWuautLHHK28dpug31csdrpPejtaPTQSgtsvtu/zL3LBLbMYXWmTl3ksMCwsLosgHlbwPO5mM4fDpieCXHK/z3m8Mkf4m8CmALl7w8dMXkp9GK8TndNp30h3v9dCKQlwAm49533XDjvo6HvRHkGyi0B7/lRl1yw1eqcyhlHPLS5u6tgAIsHN5YLjzVNGDW0gs45LbwsNjxIkh2UuwTSBfneibEIqV2DgAqIhPXuEGC+EuAA6NlQCdlLod+EHo/3fxTHPBSSt341ctUvhYD+mfj3p7b06dDntz77WryW83LsR0NPB8igLgcCF5dCPBiffyrO+fuoy40Br4Wf/HoevGLCRaVKdg7MMum2/oqRXRULs7GCO1pouQrnlMfJ1fL514S2XDUvclgQSAkAC5CvBHScNVOAdEZ/Oemv4rMfh74a+kgc+57Idd8YuiV0/cEDsVg7MLkkZGFFl4RM9VKN2+MYDv7PIYu378U1fhF6PsRtlZPyb0D/ID77ZBzLdW2XqWutHSmxMUgNVjEo0wTKwWxhJja1a+xmjRZaaQFgpQVl/uavaZCbcGBT5azcjcNyLrsCt4aA9F8BiAUSN01YXwg9HeKOX45jPhJ6L1DjnJtCVv4XB6T2Z88InRKyD3vSlrw+Nd47M2SqNzheE7oj9I64zr/E9T4d4tbcV47LeZXvL9f9nxgsXPftAa5FoVlBylBrF4GRk4qP53WlCuJDmSbIb+31jg3cUUILQlOgh0jy8b2yQziJvI3bzNuXtDq34HpdQPCZgObRAEPO+ufQH7f0h5DdAbsF/xGuemdAdlHAZ3HE8RYtkGbJOXmD4qy43rVRB/u490U9pBwvHjp8Whd1+NNWPZ6N+n03PntHgMu97e/Wrp3SdosujznmAjXj5LXYyfX7bv/tFo0SWs7gSSaLDYDKX7Mz5HA59c1aIQPm+NB50fGm9Y8HjJzMdtTvAw76Xejn8R7346xvi+PAfUEAli63KrCpBNcA4MIclPu+L8r7bOiRKP83W3UB7YuhJ+K9r0ed/ik+vy6OdSdu1taYtgMSmPLb3ApLaIGcuypjym1HB62O4KCg9Nxr6RxkKsxFxiz3AJxNfFP7FwLYxwNWYHA1wD4feibeA4c7W6ZyYM2bjodQ5tYXBsC3hj4Wdftx1ENdXtqqG9llsKPxrhhIcmWOO2vwJLiZJmTuT/kNCM8wMIJZ8dptGh20HIEzcIic8khaYMuL+8pjZ7lsAvuGmGJt6P8wAMitLOBytofDzT4asL4lxP3O3Dpv3qp9CAFPGXJgzyq4U2bP1i7GY1Gn57agVdcn49/uuHHcK+I47l8DVwwAKU2Qw4oRtxUzf6VWYim3FbPu+btRo4I2O8ACi2vknS/K3QJ5rpsNtfMBcWpI/vjxWNT8bArsyyBwsl+FfhQw/Gd8dmMcY2Fl6t1OCrAdgZfrut1rp+JnUbcXoo6gpRci730g3jO4LO64dK2uBrr9W7sJ8lgOm+CSuC3aFtxNGhW0+XxB3qrM4BPX9XUTjxnWFl8606IHjPZgH4zO5qoWPPRsvP5evGcHwa1Ui6N50+4mxN2By0nfFPX6QoBrsfhc1PelkJmBA98f8hyEh2+0sXsdg11MzEA5Q4ldQitFEFNuPIYUYVTQcgtQWlQkrNICHcBBuIVjaosKCy+3RE23VuCm12lKEJ3/TOi/498fDYeVv+r8VVMBnT5LteMXKQfbeVGnd0bdvxx1fCzq+/wWtGaKJ+O17TALM1tuteuQ2JRf20m3tZi1PrAWELtV67opjQpaOwa5zZXQAlae5n47J+EotaDr9Ftj4fL5ANYW1m91eshfOwf/FkDYq7WKB8kqDqtcna4O0piUf28HBgPIQlAK8Nao51ejvo9v1d0sAWCzhBnEDYxZdVcXg94WmJgZ8BlD4FqsOaY26HeTRgVtPhRjOktoOQaIrYClDt1zdLi81HaVxwEtsuSvgP1NyHT7hXCp2+Jzi59ldghACEg5tLItZgwcYKirBaO/5EaIz+WNHC/h6AuydkhXgPuBaIdclsPKa7XlF/Fv23NuPkgpanfNlKeebvHmDQfgpnJvW9265+4mjQJaHUuCDVB7sRnofILLXmRt9avzdOI7ozM9I/BEdPCLhw6bdvYTB4+Y3BfAuivlia5lHFZ9dG4+hG1xqNPtEZt+LW5MuerrtZTGgJN3m4bBPSuVmaVcSEph7BpIaZ6dgnvYdABKeT4c7fHMr9u93fNzkBlEbn2LHZcVRwag7n2fhNtJjQZawQaGRQR3FWgBz31GqYNjuufq5Msjl3WD4KnoVJ1rOpXHPhQdbB/2mnBYYHfPrUldDA6w6mB1AiMwPbMLBPXjYurnL5l+1R3IAAavQVjC69q1MksZhLbszAxmiJ9EO7TJIKT74723xgC9ND6vDUBlcHwDTH3TbUGbuy8+7563mzQKaHMK1tG5ayDQAg4CNxp8XnOtiwPYN0cnfiU6E6zEnX4cAH/+0FHTr8q4lTvrrlIpHc5dTfVg5VY5iLJOpYDQfS9BBre6g8cCclb9uwKiFMaD4rbC7OE+vdUu0MrPPxdt9XANZ66By0nBqf5pACRlUB/t656zmzQKaIEi1xLQhMNf7mUqNt0Bu3QqnUW+GvOR6MSHIhXQqTr3qZCvxng6y4MuffZiAaUO3NXgUa7FjHpkfr2MtAEwQOHUUoacLfo4rulf2z4U4P50K03Qtsfj9fejrW+b5rYv7912zzVApDTKFcOE1gA0C2hjnzrslEYBrSCbRgU5AwwW0MjDfNYNMgjB6M7Xd6Ij7Wdabdvj9PqD4bIeI/T0VXleTemwHDG/FZCDZwgBB7zSnL55Lhhtzb0xoH0wILUo0zbwekb3AzFQPVvhKbPuudoiZgZfd32QM5c271Zwdx20ApXpAGfjPrnQkXNlgE2xOjofr+tex6KKG70roLVDwF11qs61g/D26Gy7BfZvu+d2ZTrlPpwesOWUOoRy1jBd+0q4Ni8CxtSvjW6WfDZmjVyUJbgfC2g58Zmh7rniK7ZSBO4qluqgXf4NZlDL21fZ6Vi3dhW0CaxACRpn4z52B0zHAiq4GWDvgVkHdK8lT7049KGA9tfhRDozt7ikBjdHasCtdH733K6kHwlsTu1ZjyHkeq4LXE63zCa/Bdf7YtbwcM+vtqClL8W/7el6CL17jmtbTHJUA18s1QO8OXjs2Voo2r4TX+A2aAsJIjezANBhRrpUQPB0Yvmr2QKbwZUaCCzIu9f0kIu9WY7z7MEANqRTpQqei70mPpu1UEnpKPUycHSuMhO0rMcQymuCRzsNUrDU2tWV2cIzvh7+MZtwWW19IAaqh8s9BdY9J83BDCa+ZVyJOXifKUiHzGZc2WzDfXca4B2HVuOlAtwMrBlE7pP3xkt3y8DKv7ifQDq/e90LorP8poDvZv364GEB7mGTp0P3RWdKDezLds/pKtMCi5Nu+euSMuzt5hRdq1epkwPayyI3d8PBDQYDU3sfCXB9nUeKUDtP3MU8973L8sU7Y6/dBhPjYCRMgvP2XTCuQzsGbY52+Rt3NaK5WQZQ8AQsYekCw5E4AEeq3VRw5+jd0ZH2LacdGfplyBNcNwXMHojpntMV5zcw1Ktb/jrF6eTvpu9FcEyfqYi2eC7BE2raqL0/CnmQxtbXrN0Rscttu7L8buy9x0iAawBLHQAv7jsB7o5BmymBacc0JCg1R50l0KYbma661786oPU8wQMBqRsJ9IsQR7o0nIlDdc9J6Qj14yp5w6BWh3WJs4mHtMQsAtxaPQmQbu+aVXx7184IaH8W+na8vivaa8FWy90NSilWLi5rdSH9kSCn63p+wQK4Fvt1a0egBYXcCBSCBsBu0Px7nriDTp0VOL+VJZ/9XqQDz8RUKd97NORXXDwne+IcaEECFou8zKVrdVi3uDywaulPKrf2/D6Yr6e7aaK9BuhD8fqN9mujrbVnKhJaENbKT3X7xSA2EzANbt130TiUNg6txoGsu+fZB9QUiJwHqlwYdMvxtNOnA9qHA9qnoxOfCP0wOvJvA9rTohO5T/eclGnPYOAmOwUs5UKztjvSla0vt3Uf2Rqkj4e8dkvXXnTtJgNo9QFol2mnvgKutCn3lufNBkNr49CWQHBLwUpgve6rhHaW04L2M1vQPhULk8eiE+3PvjmmUc8ZzHuaSyfI2azis6NqdViXskxpU84mtXqW0l4/bGdm0V7Q/iAGqTtj9qtrg7QLbR9l3TImBhYD6jOwhtLGoc20QIdw2DIAy6gvtG7fPhmd+Gj89fD3vfG+HNCU2j0npQMsgnToKnUbQsq1spci9NlFkA55wuvbCW0Am9D6xm4NWtfNBXCtDrOUfcZsnKuOBrlZdBNpwkah1SB7g2UeVQtKHy2C1uN70oPpLc5wHffn/T6W35GdtTBJGVjuTFkp18relAABKnljrZ6lfO/NLzpaeGqvnPaRHtDaxloW2pT+kyboCwtq/SC/7ZYztDYGrcZolMYBNhc4q0igXGMRtL6CAtpfRif+JKD1G1p3z1lNp0CrnjsNrTaqQ19o7ZZ8cwvanwew318CWjGt1aGPwMttbV/Wth+H1sagBZZpNxc3grQdLYI2F2IvQ3tYrKoPn37lui+0rg2YWtmbkjbaRzX11upZKqH9xlZ7E1oLsb7QrqIEV6zMTmLXLWdobQzavLskSNnQWhD6ahlonwBtuI+vqNwdnXjcgZdv4XbPSY0dWu315ce+0LoLWSu/r/Sla+Tt53XntRuD1tThTooFWK3hy2oRtJkeWE0/Hp34o4D2W/H6nujERb+yvZugXTY9AK32Phb6S3rwch7fPQe0QNsutJTPK2ziscaNQSvwQ4xqkg/3gdbPY37XoiQ68Afx92vRoX5he5n0QFm1OmxCy0DrwRjfG7s/2qi97og9/IrTLoZ2u+10PnClCPLadS7INgatXYP8HpUGbleLofUfchwx+Y5FSXTiQ/H3iwHxzfH+rHvxqS60OyW5Zl9oPWvh6zceCOKyPw1gH1oS2u0o4TWbWrvU+mQorR1a04RRl89uGo21Ri8r1+rjtF+PTvSbAG7per7UT2Ry2b0GrS872qt9+be/7EkfPnkQtPFvP+CxCWj99RDTolvP29Xaoc2tLtPGUMCSDrUtNQ9ad4i46xcPHTn9n2n853N+9KJ7bFcJbT4XsVPSRnXoA20+OHNDtPP9h17+T02AC1o/QFL7hsaQ0JL+dT0GZeHdLW8orR1a96Q1AAQ2obNx25VAz4PWd//fHx3o5zDvCflJ+b4/1wla1wZMrexNaRmnzQdnDMxro71/F7B62N1P6i9yWnfeauWvIjdDGNQ6b+uuHVpJee4cgLbW0FWU0AKsBq2fQbr7YEyZIV8APD7UPWaWElodUCt7U1oG2pTU55ho6xXR7rtCV8Rrv/1Qe2BmaGj1r/r2fV5iVa0dWrmNoLupYPGkYUOohLb2hJFvofrV7unUGOpucUlbnOdvd3umhLZW9qakjbPSA3Wu1Z/jAteTXedvATtrt6SEtlb+KrKv7JHFUUPriSk3FSToQ0Obd2Bq0GbndRdcuTBUL1NYbXtmt0ALplnPHmTaRdowKwap7me0LmgZlNm1VuYQWju0gurRNfemh4RWoOelB1TrLJ0LVl/xMY0JrvNLtxqD05rBbCN6Ys5fzlabNeYpobUVWSt/Fe0ZaK0mBWcd0M5aiHWlQx0nmPnYofzLLMCpxgatuKqjGYwhGITq3W3LPIHWubl/XqvDMnKNPQVtOu1QWhZa6YDOl29lJ7mlvAjabrmb1Lz0QFylRz7PBZuZwx5pX8ftQjuE9hy0gltr6CrqC610IPPqBDY3wkFrap0FrdvOtbI3pT7Q5rac4/ObDmDU5kXwltAO0TeusedyWo0aSgKt02ZBq7MIgPI+AJrCyu0ZAZ7ntM6plb0paWNfp9UmAxHo6p2DsbvILAUs/QL2btmriuOPfvcgoZV7ydFqDV1Fi6D1XgmssjlsAssZuFTt+/vOc+3dAq0pv2wbcVJ5rLWCtmlT3rhxrngDV/xnue06oFXf0e/TCq7gDQ2tQM+DNsEDZnZmwup8dUkXc/5uhVYdZkGbaRd3dby2Jbz+nQtNKVIN3HVAq75iJ4bd8obSRqAVOHnOUNC6ziJodYgyHacTdWaemzC4tSy43dyvhHbIgbas5jmtNstJ1dMxjlVX4OYABTOwZ6UJJbRDtNM1XK/v195X1caglecIooYNoUXQ6mjQZYekdC73da5O16Hdc0GbOW157qaV0NZyWoMswXWLXJvK+ILIvwGkD2o3HxJauX1Z7qpSXpmWdMsbSmuHNm/jCuwmodWZ8j0dolwCgU5yHqjVreZACW3eLaqVvwnNg5aAC0ifyyO1NR03z18ELcgyRmXZq8g1mJN1gjK75Q2ltUPLyQAkqIKYAG1XAr0IWh0ir3O8shN0UNbOSXWh3Smp7zxoCbiABEp3kDp/GWi3KzHOveJRP08LDvkNWIaG1up5GWi9tpOxaCtot0Fby2lLAVd75fCZJuT5m4ZW3BaZwna1dmjBARILAkEcClwALgOtsnOLSydT95zUboJWXr0IWhIHLgfyPB+M4r5JaA0SLlsrbyitHVpwAFdyDqAEd7taBlrHrwptt9xNCkzLQut454KoL7QZo+1KjM1kypoX3+1q7dCSBoCFCwhkrcHLahG02SFAdfyy0Epnxgxtnr8paLvx7ZY1pDYCLXE+K0vgauB2tQy0jteBy0Kbe5g7pVWhdS6QloG2W/ayElvX6lPX7Wpj0AIBZEOBIEgN2r+oCy2BcRG0uXgry11FZqX8dnS3nKG1MWgFDjD5KzPbVR9oyw4ZI7SgGwu0riOfXeedsNTGoAVWbn0BiGqN7yPnSjOsVBdBm+nIWKHlYKtCq72bgFZsuazrrXN/NrUxaO0ggMtoFFiBSnhX0TLQlucsA630oixz00porQdq9SyV0Do+z18G2rLcZaWe+mLR/vdQ2hi0BBSu0Q3uKkpoAdYHWoEdG7Rg4va7GVoxFSdxBey8uA6ljUJLHqTIB2iAtKqWgbY8Z1loyzI3rVWhdS6gFkHrnG6MlpEyxCjXFt3rr0sbhxZgclvACfCqAVsFWp1owCxyBPXTEc4vy9y01L0vtNprkduFVjoG2tq0vR1oXdt5cln120Qum9o4tGARwHwyKYO8rJaFVif6686c4+flXjmodgO0nKwvtGYv6wXnltDOepptO9Bm3Vx/U7lsauPQEnClCaZqI5WbCIIg1wJUk85ZBG12Ynld0+WsTkypG7jzOdWy3E3KgDaw+0y9wAZgQktiqh2zoCqh7dtOxzlebMXSNVx73sw1tHYEWtJQwQSujgGugPTVImgFM53c8Rl054CyluOlTKc5oLrlblKAkltrY62eKcBY4JaDn8RIOjRrZkloc2D3kesrp08c16UdgzbTBA0XcEFIeAVRcMoOKIPmLxidI/A1aHW0h15MYeV1vMeVDJjuOSnXc115bVnuppRligenNIhq9SRxBI5BlvDldcRIGjbLCUtoa+WnvOcYsTSQpQQZ9006bGrHoE1l0EHGFXSU4Ah4F958TYugzbw0n3dI9QFBJ0shdE557qbFZaU58wZYzljqKkZmE+eKHQMwQGeBJXaZQnXLLmFNYA14g2PWwm5T2nFoSVCBx3V1ksDIlzidkS2wglbKe+ADZ22KEtgcBGVnOHfRlKs+OoVLOd4AKa+xbiUouYiaNwXPmhXUWU4unrXzSAzEl9uWsSXvOR+oBr9Yupa4qs9OOGxqV0CbSlgSYC4hWAAGmgCSQPu3tGLWoor7ON9xXSB0iA5YFHgwKEsnltdYtwCnTO1Tx3n1LAdnCa3zxWre4BRjA0OMtJMyxt7zGQMRh0WL101qV0FLCa7RDDydIrgcVQek/DtdqNap3nce4NO5SKeCQmcsysmUzW11YnmNdQpwZhHupp3z6keOUb9yYLkOiEEnBrXzKGPUjS15z2diLE76ZFFdNqVdB+1QSsfmQiAlnZk5H5hnpRYpn+k0aQgocpG4LmU9TfVmAmXX6kU5uM0m6ta9VjkT1c4fs/YstDqVdGrmxIBIN5Kv9VmZAwNAnC/vOK1L6sghcxZQdq1e5DN11waQmkH8zWuly84blGPVnoU2ZarjXAmcjgWt1wCRrwFg3tTHrcAPXPkwx004hpDrAVZOmYvLWj1KSZ2kLs7JXLa8FvABO69dY9Weh5YbmSZNlwlJOpPX0gfHLHI1zpfgdh0XKKvK+QYC+NSljzsC0WA06JyfeWx5rT4LzbFqz0MLNiCYLjlQpgmg1dk6mGNxrnmd7DNwA1c+DJh03VWkHs43AMwEnJHDLnL9TAsyV5ejl2lBurU2187fC9rz0AKAcwETIAlapgng9T7nmue2lI4LLtfj3pkvJ4glmLOUwALMYOKKBs2i8slxgFXnvDUNVtf110ygfupZO38vaM9DS8AFJUA4ZMIDXE9D+auz5beL8kCfpXtLO1yTU9p2cm0wARmUpbznM6CCnVuXe6DzyiSfA5bTK0edc7YAqzK8bzCpX58BMFbtC2gpHRKcnI50to7PKRZMi/JbAhABHHAGBFgSYGAmwOQ1qJXNJTmrchKuRcCSspynjursu1kJrAGoDOWrS5/rjVn7Blpw5Ipbx4Mp3RYEHNe/OWAfx03ldTkvYIDFgZVTikO6roED9L7Xd4zjXRf4IC3Tgkw1cqZQl9p19pL2DbQEAHCBKO8i6XCdn98sBTCogbLMFOvafVU7f5bUIYE1sPzurDoaYOov7cjFZN+BMHbtK2gp81HTNBB0ejou9wIGiIHLMTkXGGrXWpeAB1auLO8FZdav67Dq6Rht2g/A0r6DlgBhKs2Fmc4vHTd/BVAKweVyobQpKDLlyNvH6pQOm7AabOrumGVnhbFrX0ILPlDIQXV613FzoZPTsMWVnDQXaeuA1zVzFuCc6qRszk9ZlwQ2HVYb9ktakNqX0KZ0dum4YEh4TcN+kt1/MuJ15o2gypRhOwA7j1zDtVxTXaQtwOT0+bPw6bDqlttmBlufnY69qH0NLWjSccGSuwoAAa4tpXQ64sLAsVIHsPPKrauEOJVllCohNQASVM4KVmUaJJzeX2Wqi3INLK6vbPnufnPY1L6GNqXzE1zwpOuCCMCAlVPm/0EGLHCD1xQt73U+CEEsxyRg5mvvE9gcK93glgZK5q1cNf8rpUwH0l3VKctLh92PwFKDNqTzM58EU6YLYAENeDLXBTDAyGtuCGLHgNx5QCSumK9N6eniFnzp4nktymuVuwPOcT7Ac1G4Xx021aAtxL24IzjcZEjYEmAggRdsXDH/h8R04PzJeHCDL5Ww+6Fj5znWeXnuLGdVNvDNAHnjYD/DmmrQFgIEcLuuC9503UwZAJaOCTgu2XXO/Fn3lM8dRwl25qyu6/qUbp2wSgf2u7uWatBWlPCairmuPJLzcj05b+m+IEuIAQjEBLMGKdAdW07/6apAVYaBokz5by7yavXcr2rQzhFYypV+Lp6AVYKbSqcsXbP271SeZyCUD9MoC6zNXetq0PYQcABkmjZdu70LMI7IgQl06cRgTvcsX6eTkuOdZxBwVQPCrkIutGr1aHpZDdollGlDum9uYXHHBBmM3LOE1r/Lad+x4HcuSNNVXVsZzV3nq0G7otJ9AZf7sCAEbk77pdNy1ATVsaDPfLVBupwatAMo3ZG4bg1a75dOSrVrNS1Wg3ZggTMXWV1oG6jDqEE7sEpoy0VZg3Y4NWgHVgmt3YIG7fBq0A4scAIWqKDNFKFBO5watAPLDkGDdr1q0A4s0IIUrAkteb9BO4watAPLXS0LMMo7ZATa2vFNy6tBO7A8N+DOlztjKbdr3VSoHd+0vBq0A8tdLm7rVq27YHnL1h2w2vFNy6tBO7Dc9QIux7X4yie2vF87vml5NWjXIAsukLaHYNajBm3T6NSgbRqdGrRNo1ODtml0atA2jU4N2qbRqUHbNDo1aJtGpwZt0+jUoG0anRq0TaNTg7ZpdGrQNo1ODdqm0alB2zQ6NWibRqcGbdPo1KBtGp0atE2jU4O2aXRq0DaNTg3aptGpQds0OjVom0anBm3T6NSgbRqdGrRNo1ODtmlkOjD5f8E7g8Uk7cWqAAAAAElFTkSuQmCC';\n \n DB::table('slb_empleats_externs')->delete();\n\n // Añadimos una entrada a esta tabla\n EmpleatExtern::create(array(\n 'id_empleat' => '1',\n 'nom_empleat' => 'Empleat',\n 'cognom1_empleat' => 'Treballador',\n 'cognom2_empleat' => 'Treballador',\n 'sexe_empleat' => 'Home',\n 'nacionalitat_empleat' => 'Español',\n 'imatge_empleat' => $image,\n 'email_empleat' => 'empleat.treballador@gmail.com',\n 'dni_empleat' => '11111111A',\n 'telefon_empleat' => '666666666',\n 'direccio_empleat' => 'C/ home i dona que treballen',\n 'codi_postal_empleat' => '00666',\n 'naixement_empleat' => \\Carbon\\Carbon::create(2000, 1, 1),\n 'nss_empleat' => '666 999',\n 'iban_empleat' => 'ES666666666'\n ));\n\n EmpleatExtern::create(array(\n 'id_empleat' => '2',\n 'nom_empleat' => 'Fede',\n 'cognom1_empleat' => 'Granger',\n 'cognom2_empleat' => 'Profe',\n 'sexe_empleat' => 'Home',\n 'nacionalitat_empleat' => 'Español',\n 'imatge_empleat' => $image,\n 'email_empleat' => 'fede.treballador@gmail.com',\n 'dni_empleat' => '11111611A',\n 'telefon_empleat' => '666666666',\n 'direccio_empleat' => 'C/ home i dona que treballen',\n 'codi_postal_empleat' => '00666',\n 'naixement_empleat' => \\Carbon\\Carbon::create(2000, 1, 1),\n 'nss_empleat' => '666 899',\n 'iban_empleat' => 'ES666666666'\n ));\n\n EmpleatExtern::create(array(\n 'id_empleat' => '3',\n 'nom_empleat' => 'Esteban',\n 'cognom1_empleat' => 'Estebin',\n 'cognom2_empleat' => 'Jorge',\n 'sexe_empleat' => 'Home',\n 'nacionalitat_empleat' => 'Español',\n 'imatge_empleat' => $image,\n 'email_empleat' => 'esteban.treballador@gmail.com',\n 'dni_empleat' => '11111511A',\n 'telefon_empleat' => '666666666',\n 'direccio_empleat' => 'C/ home i dona que treballen',\n 'codi_postal_empleat' => '00666',\n 'naixement_empleat' => \\Carbon\\Carbon::create(2000, 1, 1),\n 'nss_empleat' => '666 699',\n 'iban_empleat' => 'ES666666666'\n ));\n\n EmpleatExtern::create(array(\n 'id_empleat' => '4',\n 'nom_empleat' => 'Kevons',\n 'cognom1_empleat' => 'Miguelus',\n 'cognom2_empleat' => 'Emilianus',\n 'sexe_empleat' => 'Dona',\n 'nacionalitat_empleat' => 'Español',\n 'imatge_empleat' => $image,\n 'email_empleat' => 'Kevons.treballador@gmail.com',\n 'dni_empleat' => '11111411A',\n 'telefon_empleat' => '666666666',\n 'direccio_empleat' => 'C/ home i dona que treballen',\n 'codi_postal_empleat' => '00666',\n 'naixement_empleat' => \\Carbon\\Carbon::create(2000, 1, 1),\n 'nss_empleat' => '666 799',\n 'iban_empleat' => 'ES666666666'\n ));\n\n EmpleatExtern::create(array(\n 'id_empleat' => '5',\n 'nom_empleat' => 'Ruperta',\n 'cognom1_empleat' => 'Derelleno',\n 'cognom2_empleat' => 'Yya',\n 'sexe_empleat' => 'Dona',\n 'nacionalitat_empleat' => 'Español',\n 'imatge_empleat' => $image,\n 'email_empleat' => 'Ruperta.treballador@gmail.com',\n 'dni_empleat' => '11112111A',\n 'telefon_empleat' => '666666666',\n 'direccio_empleat' => 'C/ home i dona que treballen',\n 'codi_postal_empleat' => '00666',\n 'naixement_empleat' => \\Carbon\\Carbon::create(2000, 1, 1),\n 'nss_empleat' => '666 199',\n 'iban_empleat' => 'ES666666666'\n ));\n }", "title": "" }, { "docid": "32b718aa75b616dccb639206f3f5a814", "score": "0.55377936", "text": "function _previewImage()\n {\n $arr = explode(',', $this->getData);\n $this->_objImage->loadImage($this->path.$this->getFile);\n $this->_objImage->resizeImage($arr[0], $arr[1], $arr[2]);\n $this->_objImage->showNewImage();\n }", "title": "" }, { "docid": "dba0954fa41af95085bcc94d4e8ad828", "score": "0.553744", "text": "function _imageTextWrite($source, $target, $text, $font = 'AUGUSTUS.TTF', $fontsize = 24, $color = 'FFFFFF', $bgcolor = false)\n{\n\t$source = _imageCreateType($source);\n\t$bbox = imagettfbbox($fontsize, 0, $font, $text);\n\t$x = $bbox[0] + (imagesx($source) / 2) - ($bbox[4] / 2);\n\t$y = $bbox[1] + (imagesy($source) / 2) - ($bbox[5] / 2);\n\n\tif(!empty($bgcolor))\n\t{\n\t\t// shadow text\n\t\t$bgcolor = _imageColor($source, $bgcolor);\n\t\timagettftext($source, $fontsize, 0, $x + 2, $y + 2, $bgcolor, $font, $text);\n\t}\n\n\t// main text\n\t$color = _imageColor($source, $color);\n\timagettftext($source, $fontsize, 0, $x, $y, $color, $font, $text);\n\n\treturn _imageDisplayType($source, $target);\n}", "title": "" }, { "docid": "b0c73f84074ab23858b203841ac90c16", "score": "0.5536058", "text": "public function action_image()\n\t{\n\t\t// Get image arguments\n\t\textract(arr::extract($_GET, array('width', 'height', 'font_size', 'border')));\n\n\t\t// Make sure server supports GD\n\t\tif ( ! function_exists('imagecreatetruecolor')) die('GD not supported on this server.');\n\n\t\t// Sanitize width, height, and border sizes\n\t\t$w = $width = is_numeric($width) ? (int) $width : 150;\n\t\t$h = $height = is_numeric($height) ? (int) $height : $width;\n\t\t$b = $border = is_numeric($border) ? (int) $border : 4;\n\t\t$font_size = is_numeric($font_size) ? (int) $font_size : 30;\n\n\t\t// Create the image\n\t\t$image = @imagecreatetruecolor($width, $height) OR die('Image creation failed.');\n\n\t\t// Create positions matrix\n\t\t$pos = array(\n\t\t\t'TL' => array('x' => $b,\t\t'y' => $b),\n\t\t\t'TC' => array('x' => $w/2,\t\t'y' => $b),\n\t\t\t'TR' => array('x' => $w-$b-1,\t'y' => $b),\n\t\t\t'ML' => array('x' => $b,\t\t'y' => $h/2),\n\t\t\t'MC' => array('x' => $w/2,\t\t'y' => $h/2),\n\t\t\t'MR' => array('x' => $w-$b-1,\t'y' => $h/2),\n\t\t\t'BL' => array('x' => $b,\t\t'y' => $h-$b-1),\n\t\t\t'BC' => array('x' => $w/2,\t\t'y' => $h-$b-1),\n\t\t\t'BR' => array('x' => $w-$b-1,\t'y' => $h-$b-1),\n\t\t);\n\n\t\t// Create the colors\n\t\t$colors = array(\n\t\t\t'black'\t\t=> imagecolorallocate($image, 0, 0, 0),\n\t\t\t'dark_gray'\t=> imagecolorallocate($image, 64, 64, 64),\n\t\t\t'lite_gray'\t=> imagecolorallocate($image, 224, 224, 224),\n\t\t\t'white'\t\t=> imagecolorallocate($image, 255, 255, 255)\n\t\t);\n\n\t\t// Create the border and background\n\t\timagefilledrectangle($image, 0, 0, $width, $height, $colors['black']);\n\t\timagefilledrectangle($image, $border, $border, $w-$b-1, $h-$b-1, $colors['lite_gray']);\n\n\t\t// Create the lines\n\t\timageline($image, $pos['TL']['x'], $pos['TL']['y'], $pos['BR']['x'], $pos['BR']['y'], $colors['white']);\n\t\timageline($image, $pos['TC']['x'], $pos['TC']['y'], $pos['BC']['x'], $pos['BC']['y'], $colors['white']);\n\t\timageline($image, $pos['TR']['x'], $pos['TR']['y'], $pos['BL']['x'], $pos['BL']['y'], $colors['white']);\n\t\timageline($image, $pos['ML']['x'], $pos['ML']['y'], $pos['MR']['x'], $pos['MR']['y'], $colors['white']);\n\n\t\t// Draw image label with an outline\n\t\t$font_file = MODPATH.'ipsum/ipsum.ttf';\n\t\t$image_text = $width.' x '.$height;\n\t\t$bounding_box = imagettfbbox($font_size, 0, $font_file, $image_text);\n\t\t$bbw = $bounding_box[2] - $bounding_box[0];\n\t\t$bbh = $bounding_box[7] - $bounding_box[1];\n\t\timagefilledrectangle($image, $w/2-$bbw/2-$b, $h/2+$bbh/2-$b, $w/2+$bbw/2+$b, $h/2-$bbh/2+$b, $colors['white']);\n\t\timagettftext($image, $font_size, 0, $w/2-$bbw/2, $h/2-$bbh/2, $colors['dark_gray'], $font_file, $image_text);\n\t\t\n\t\t// Display the image\n\t\theader(\"Content-type: image/png\");\n\t\timagepng($image);\n\t\timagedestroy($image);\n\t\tdie;\n\t}", "title": "" }, { "docid": "46741d9a2a704c339e9ee2e3912c59b2", "score": "0.5525527", "text": "function draw_label( $img, $title, $code, $x, $y, $width, $height, $ppi, $printf )\n{\n $mpi = 25.4;\n $ipm = 1 / $mpi;\n\n // convert x, y, width and height to pixels\n $x = round( $x * $ipm * $ppi );\n $y = round( $y * $ipm * $ppi );\n $width = round( $width * $ipm * $ppi );\n $height = round( $height * $ipm * $ppi );\n $f = 1/12;\n $white = imagecolorallocate( $img, 255, 255, 255 );\n $black = imagecolorallocate( $img, 0, 0, 0 );\n\n if( is_null( $code ) )\n {\n imagefilledrectangle( $img,\n $x - $f*$width, $y - $f*$height,\n $x + (1+$f)*$width, $y + (1+$f)*$height,\n $white );\n }\n else\n {\n $barcode = Image_Barcode2::draw( sprintf( $printf, $code ), 'code128', 'png', false );\n imagealphablending( $barcode, true );\n imagesavealpha( $barcode, true );\n\n // dimensions and settings\n $font = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf';\n $font_size = 8;\n $padding = 4;\n $dims = imagettfbbox( $font_size, 0, $font, $title );\n $tw = $dims[2] - $dims[0];\n $th = $dims[1] - $dims[7] + $padding;\n $bw = imagesx( $barcode );\n $bh = imagesy( $barcode );\n $tx = $x + ( $width - $tw ) / 2;\n $ty = $y + ( $height - $th - $bh ) / 2 - $padding;\n $bx = $x + ( $width - $bw ) / 2;\n $by = $y + ( $height - $th - $bh ) / 2 + $th;\n\n // paint barcode\n imagefill( $barcode, 0, 0, $white );\n imagecopy( $img, $barcode, $bx, $by, 0, 0, $width - 1, $height - 1 );\n\n // fill in black background\n imagefilledrectangle( $img,\n $x - $f*$width, $y - $f*$height,\n $x + (1+$f)*$width, $by,\n $white );\n imagefilledrectangle( $img,\n $x - $f*$width, $by + $bh,\n $x + (1+$f)*$width, $y + (1+$f)*$height,\n $white );\n imagefilledrectangle( $img,\n $x - $f*$width, $y - $f*$height,\n $bx, $y + (1+$f)*$height,\n $white );\n imagefilledrectangle( $img,\n $bx + $bw, $y - $f*$height,\n $x + (1+$f)*$width, $y + (1+$f)*$height,\n $white );\n \n // For debugging purposes\n imagerectangle( $img, $x, $y, $x + $width - 1, $y + $height - 1, $black );\n\n // paint text\n imagettftext( $img, $font_size, 0, $tx, $ty + $th, $black, $font, $title );\n }\n}", "title": "" }, { "docid": "96916b915fa23cef43467c276e08c1b4", "score": "0.5519443", "text": "function _show($case, $id = NULL, $type = NULL, $width = NULL, $height = NULL, $expire = NULL)\n\t{\n\t\t\n\t\t// Set expire header\n\t\tif ($expire)\n\t\t{\n\t\t\theader('Expires: ' . date('r', $expire));\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('Expires: Fri, 1 Jan 2100 00:00:00 GMT');\n\t\t}\n\t\t\n\t\t// Set image type in header\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'jpg':\n\t\t\t\theader('Content-Type: image/jpg');\n\t\t\t\tbreak;\n\t\t\tcase 'gif':\n\t\t\t\theader('Content-Type: image/gif');\n\t\t\t\tbreak;\n\t\t\tcase 'png':\n\t\t\t\theader('Content-Type: image/png');\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// Output the image\n\t\tswitch($case)\n\t\t{\n\t\t\tcase 'orig':\n\t\t\t\techo $this->orig['image'];\n\t\t\t\tbreak;\n\n\t\t\tcase 'thumb':\n\t\t\t\techo $this->thumb['image'];\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "8f8335c1ff2d3728114a62060890f3da", "score": "0.55078185", "text": "public function index(){\r\n $msg = array(); //Créer un tableau pour les messages d'erreurs\r\n $nb_error = 0;\r\n if(!empty($_FILES)){\r\n if(isset($_FILES['imgUpload']['error'])){\r\n switch($_FILES['imgUpload']['error']){ //ref : http://php.net/manual/fr/features.file-upload.errors.php\r\n case 1:\r\n $msg['msg'] = \"Votre fichier ne doit pas dépasser 12Mo\";\r\n $msg['type'] = \"error\";\r\n $nb_error++;\r\n break;\r\n case 2:\r\n $msg['msg'] = \"Votre fichier ne doit pas dépasser 12Mo\";\r\n $msg['type'] = \"error\";\r\n $nb_error++;\r\n break;\r\n case 3:\r\n $msg['msg'] = \"Une erreur est survenue lors du téléchargement\";\r\n $msg['type'] = \"error\";\r\n $nb_error++;\r\n break;\r\n case 4:\r\n $msg['msg'] = \"Veuillez sélectionner un fichier\";\r\n $msg['type'] = \"error\";\r\n $nb_error++;\r\n break;\r\n }\r\n }\r\n if($nb_error == 0){ //Si aucune erreur \r\n $ext = ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG', 'gif', 'GIF']; // Création d'une liste blanche des extensions autorisées\r\n $imgExt = substr($_FILES['imgUpload']['name'], strrpos($_FILES['imgUpload']['name'], '.') + 1);\r\n\r\n if(in_array($imgExt, $ext)){ //Renomme l'img\r\n $imgExt = substr($_FILES['imgUpload']['name'], strrpos($_FILES['imgUpload']['name'], '.') + 1);\r\n $imgName = 'mg_'.substr(md5($_FILES['imgUpload']['name']), 0, 5).microtime().'.'.$imgExt;\r\n\r\n $tmpName = $_FILES[\"imgUpload\"][\"tmp_name\"]; //Chemin temporaire de l'image\r\n $dir = ROOT . '\\app\\assets\\img_generated/' . $imgName; // Envoie l'image\r\n \r\n //Tableau des extensions\r\n $arrayJpg = array('jpg', 'JPG', 'jpeg', 'JPEG');\r\n $arrayPng = array('png', 'PNG');\r\n $arrayGif = array('gif', 'GIF');\r\n if(in_array($imgExt,$arrayJpg)){\r\n $im = imagecreatefromjpeg($tmpName);\r\n }elseif(in_array($imgExt,$arrayPng)){\r\n $im = imagecreatefrompng($tmpName);\r\n \r\n }elseif(in_array($imgExt,$arrayGif)){\r\n $im = imagecreatefromgif($tmpName);\r\n \r\n } else {\r\n $msg['msg'] = \"Format incorrect. Veuillez choisir une image PNG, JPG ou GIF.\";\r\n $msg['type'] = \"error\";\r\n }\r\n\r\n //Variable pour le texte.\r\n //Récupère la largeur et hauteur de l'image en cours\r\n $image_width = imagesx($im);\r\n $image_height = imagesy($im);\r\n //Récupère les valeurs des blocs où on écrit\r\n $text_top = strtoupper($_POST['textTop']);\r\n $text_bot = strtoupper($_POST['textBot']);\r\n //Rotation du texte\r\n $rotation = 0;\r\n //Margin\r\n $top_margin = 60;\r\n //Font family + font size\r\n $font_size = 16;\r\n $font = ROOT .'/app/assets/fonts/Roboto-Light.ttf';\r\n //Couleur\r\n $grey = imagecolorallocate($im, 128, 128, 128);\r\n $red = imagecolorallocate($im, 255, 0, 0);\r\n $white = imagecolorallocate($im, 255, 255, 255);\r\n $black = imagecolorallocate($im, 0, 0, 0);\r\n //Crée un rectangle qui entourera le texte.\r\n $text_bound_top = imageftbbox($font_size, $rotation, $font, $text_top);\r\n $text_bound_bot = imageftbbox($font_size, $rotation, $font, $text_bot);\r\n //Récupère les coordonnées des 4 coins du rectangle en X et Y\r\n //top\r\n $lower_left_x_top = $text_bound_top[0]; \r\n $lower_left_y_top = $text_bound_top[1];\r\n $lower_right_x_top = $text_bound_top[2];\r\n $lower_right_y_top = $text_bound_top[3];\r\n $upper_right_x_top = $text_bound_top[4];\r\n $upper_right_y_top = $text_bound_top[5];\r\n $upper_left_x_top = $text_bound_top[6];\r\n $upper_left_y_top = $text_bound_top[7];\r\n //bot\r\n $lower_left_x_bot = $text_bound_bot[0]; \r\n $lower_left_y_bot = $text_bound_bot[1];\r\n $lower_right_x_bot = $text_bound_bot[2];\r\n $lower_right_y_bot = $text_bound_bot[3];\r\n $upper_right_x_bot = $text_bound_bot[4];\r\n $upper_right_y_bot = $text_bound_bot[5];\r\n $upper_left_x_bot = $text_bound_bot[6];\r\n $upper_left_y_bot = $text_bound_bot[7];\r\n //Création du texte\r\n //Récupère la largeur du texte et sa hauteur\r\n //top\r\n $text_width_top = $lower_right_x_top - $lower_left_x_top;\r\n $text_height_top = $lower_left_y_top - $upper_left_y_top; \r\n //bot\r\n $text_width_bot = $lower_right_x_bot - $lower_left_x_bot;\r\n $text_height_bot = $lower_left_y_bot - $upper_left_y_bot; \r\n //Récupère la position ou le texte sera centré.\r\n $start_x_offset_top = ($image_width - $text_width_top) / 2; //Centre Horizontalement le texte.\r\n $start_y_offset_top = ($image_height - $text_height_top) / 2; //Centre verticalement le texte.\r\n $start_x_offset_bot = ($image_width - $text_width_bot) / 2; //Centre Horizontalement le texte.\r\n $start_y_offset_bot = ($image_height - $text_height_bot) / 2; //Centre verticalement le texte.\r\n $start_end_offset = $image_height - 20; //Place le texte en bas - 20px de la hauteur de l'image.\r\n\r\n//Param text top\r\n //Contour\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_top - 1.5, $top_margin - 1.5, $black, $font, $text_top);\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_top - 1.5, $top_margin + 2, $black, $font, $text_top);\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_top + 1.5, $top_margin - 2, $black, $font, $text_top);\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_top + 1.5, $top_margin + 1.5, $black, $font, $text_top);\r\n //Text\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_top, $top_margin, $white, $font, $text_top);\r\n //Param text bot\r\n //Contour\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_bot - 1.5, $start_end_offset - 1.5, $black, $font, $text_bot);\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_bot - 1.5, $start_end_offset + 2, $black, $font, $text_bot);\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_bot + 1.5, $start_end_offset - 2, $black, $font, $text_bot);\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_bot + 1.5, $start_end_offset + 1.5, $black, $font, $text_bot);\r\n //Text\r\n imagettftext($im, $font_size, $rotation, $start_x_offset_bot, $start_end_offset, $white, $font, $text_bot);\r\n\r\n \r\n if(isset($_POST['submit'])){\r\n if(in_array($imgExt, $arrayJpg)){\r\n imagejpeg($im,$dir);\r\n } elseif(in_array($imgExt, $arrayPng)){\r\n imagepng($im,$dir);\r\n } elseif(in_array($imgExt, $arrayGif)){\r\n imagegif($im,$dir);\r\n } else {\r\n $msg['msg'] = \"Impossible de crée votre meme, veuillez changer le type de fichier\";\r\n $msg['type'] = \"error\";\r\n } \r\n }\r\n\r\n imagedestroy($im);\r\n $msg['msg'] = \"Votre image a bien été upload.\";\r\n $msg['type'] = 'success';\r\n }\r\n }\r\n } \r\n\r\n\r\n $limit = $this->route['params'][\"limit\"];\r\n $recentMeme = Meme::displayLastGeneratedMeme($limit);\r\n\r\n $template = $this->twig->loadTemplate('/Page/index.html.twig');\r\n echo $template->render(array(\r\n 'meme' => $recentMeme\r\n ));\r\n }", "title": "" }, { "docid": "b5424d54652aa3008990ed341b3141cc", "score": "0.55050933", "text": "public function dataImage ();", "title": "" } ]
755bc6f0ffdc3510d59f1d0d99d725ee
Get the Service Type From Service Model.
[ { "docid": "e010fb1e6aab0af110d983e6343d6bee", "score": "0.0", "text": "public function servicetype()\n {\n return $this->hasOne('App\\Model\\Service','id','service_id');\n }", "title": "" } ]
[ { "docid": "1668d06d5b4b58fc9fb27650fcbfee77", "score": "0.771929", "text": "public function getServiceType()\n {\n return $this->serviceType;\n }", "title": "" }, { "docid": "f60ccf7fc48dd9785730f6a6d2f701b0", "score": "0.719883", "text": "function getServiceType($service)\n {\n $service = strtolower($service);\n return isset(self::$_serviceTypes[$service]) ? self::$_serviceTypes[$service] : null;\n }", "title": "" }, { "docid": "ac325eed24a61e5bf5973719d15fc6aa", "score": "0.67618346", "text": "public function getServiceTypeId() {\n\t\treturn $this->_serviceTypeId;\n\t}", "title": "" }, { "docid": "4a60bccb701911ae9dc3c0234d544804", "score": "0.67377305", "text": "public function getServiceTypeId() {\n return $this->_serviceTypeId;\n }", "title": "" }, { "docid": "35b814750ba107656223970aec92a7e7", "score": "0.65657306", "text": "public function getModelType() {}", "title": "" }, { "docid": "f2a671656c8722cc99b3cc0a15c20f31", "score": "0.6525295", "text": "public function getModelType();", "title": "" }, { "docid": "f2f0819e2ea64902bd1b6ac4e1b7ca0f", "score": "0.62904066", "text": "public function _getType() {\n $modelName = self::_getModelName();\n return $modelName::_getDataTypeName();\n }", "title": "" }, { "docid": "93857fa05ce6fa695aa00c31de8ad565", "score": "0.6242189", "text": "public function getModelType()\n {\n return $this->modelType;\n }", "title": "" }, { "docid": "93857fa05ce6fa695aa00c31de8ad565", "score": "0.6242189", "text": "public function getModelType()\n {\n return $this->modelType;\n }", "title": "" }, { "docid": "6db1cb7f479fccbdcb0a8176dba4ea6a", "score": "0.61999714", "text": "public static function getType() {\n\t\t$type = get_called_class();\n\t\t$parts = explode('\\\\', $type);\n\t\tif(count($parts) > 1) {\n\t\t\treturn $parts[count($parts)-1];\n\t\t} else {\n\t\t\treturn $parts[0];\n\t\t}\n\t}", "title": "" }, { "docid": "07c4904bf7aa10e47eddf4d2ed8d9e41", "score": "0.6187056", "text": "public function getType()\n {\n return strtolower(str_replace('App\\Models\\\\', '', __CLASS__));\n }", "title": "" }, { "docid": "518d487ceb3966e9f25237f744926537", "score": "0.6156595", "text": "public function type()\n {\n return self::model();\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61356837", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61354846", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61354846", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61354846", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61354846", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61354846", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61354846", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61354846", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.61354846", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.6135284", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.6135284", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.6135284", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "0dbe8752e0ff4733b031ba329856cfef", "score": "0.6135284", "text": "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "title": "" }, { "docid": "60fbe8bd6205d0bb88cf87d01a129be9", "score": "0.6129754", "text": "public function getType()\n\t{\n\t\t$types = $this->getValidTypes();\n\n\t\treturn $types[$this->type];\n\t}", "title": "" }, { "docid": "58de231b65301952b57f8e516f6d1e84", "score": "0.612219", "text": "public function getType()\n\t{\n\t\treturn $this->get('type');\n\t}", "title": "" }, { "docid": "6486be3ebcd30d64e0570ab0b1d92fc5", "score": "0.6103971", "text": "public function getType()\n { return $this->get('type'); }", "title": "" }, { "docid": "54bc438fcc2e24227781838faf1a68ec", "score": "0.6090027", "text": "public function getPropelType()\n {\n return $this->getType();\n }", "title": "" }, { "docid": "3e947ca28f7cd0f69f6dee318a558862", "score": "0.6076296", "text": "abstract protected function getModelType();", "title": "" }, { "docid": "550a09fa93d7fa9d37bd81874e926f59", "score": "0.60725296", "text": "function type() {\n\t\treturn Inflector::underscore(str_replace('model', '', strtolower(get_class($this))));\n\t}", "title": "" }, { "docid": "e80702fc74d62517518db876f6b96757", "score": "0.6038765", "text": "public function getServicePrincipalType()\n {\n if (array_key_exists(\"servicePrincipalType\", $this->_propDict)) {\n return $this->_propDict[\"servicePrincipalType\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "25432b1d08e1e04ef88cca4acd466e38", "score": "0.6012205", "text": "public function getType()\n {\n return self::TYPE;\n }", "title": "" }, { "docid": "789c389babd0dca9c1801d43a693113b", "score": "0.6002985", "text": "public function getType()\n\t{\n\t\treturn $this->getObject('type', null, 'type');\n\t}", "title": "" }, { "docid": "1d20e1d2c4f705fa25ebbf2e2bf61886", "score": "0.5973728", "text": "public function getType()\n {\n return $this->getParam('_type');\n }", "title": "" }, { "docid": "105b5aa89830cc4211826fad6a5c5073", "score": "0.5951584", "text": "public function getType()\n {\n\n return $this->type;\n\n }", "title": "" }, { "docid": "42d68a2903238661864afa50123a7cf1", "score": "0.5938275", "text": "function getType() {\n\t\treturn $this->getData('type');\n\t}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.5935842", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.5935842", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.5935842", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.59354067", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.59354067", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.59354067", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.59354067", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.59354067", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.5935016", "text": "public function getType() {}", "title": "" }, { "docid": "dca3b9c6af3897e709a48f3cea254898", "score": "0.5935016", "text": "public function getType() {}", "title": "" }, { "docid": "04a4c5ce3c87a00a4bf61788da5c4c12", "score": "0.5934453", "text": "public function getModelType()\n {\n return trans('offers::offers.type.' . $this->model_type);\n }", "title": "" }, { "docid": "f4266fa773722bc33893b526ecb26d36", "score": "0.5925431", "text": "protected function getType()\n\t{\n\t\treturn $this->type;\n\t}", "title": "" }, { "docid": "82cd8dac57b623be276ec109e142ab6e", "score": "0.5915686", "text": "public function getType() {\n\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" }, { "docid": "ac91fc7bfc580448512115ccc6929cff", "score": "0.591387", "text": "public function getType()\n {\n return $this->type;\n }", "title": "" } ]
51624938b1c69254ae8ff7ef3e6732a7
Gets the array version of the object.
[ { "docid": "74908f7385613ccdcc5ecbc6dfa77022", "score": "0.0", "text": "public function serialize(): array\n {\n return \\array_merge(parent::serialize(), [\n 'checkSum' => $this->hasChecksum() ? (string) $this->checkSum : null,\n 'index' => $this->index,\n ]);\n }", "title": "" } ]
[ { "docid": "9a500148c9b868c29de1867549747a29", "score": "0.73602587", "text": "public function getArray()\n\t{\n\t\treturn $this->array;\n\t}", "title": "" }, { "docid": "30a3fd6be8ac91f044658922d2c9ef9d", "score": "0.7342175", "text": "public function getArray();", "title": "" }, { "docid": "9fca211ce36f402346fbbabf7571a1fb", "score": "0.7332347", "text": "public function getArray()\n {\n return $this->get_array();\n }", "title": "" }, { "docid": "921299ed091eca99d67d4be049875b3b", "score": "0.7316501", "text": "public function getArray() {\n return $this->run('array');\n }", "title": "" }, { "docid": "0a83ea72e02219fccc266b01a46e2f71", "score": "0.71899056", "text": "public function toArray()\n {\n return $this->array;\n }", "title": "" }, { "docid": "6f8787716212b0fbd79efecc179ee488", "score": "0.7167244", "text": "public function toArray(){\n\n\t\treturn $this->array;\n\n\t}", "title": "" }, { "docid": "05aba8435502cb7522f2785e303fd44f", "score": "0.71244514", "text": "public function toArray() {\n return (array)$this;\n }", "title": "" }, { "docid": "e67bdb86daf038ea4928ce4583eec863", "score": "0.7118597", "text": "public function array_convert() {\n\t\treturn get_object_vars( $this );\n\t}", "title": "" }, { "docid": "e67bdb86daf038ea4928ce4583eec863", "score": "0.7118597", "text": "public function array_convert() {\n\t\treturn get_object_vars( $this );\n\t}", "title": "" }, { "docid": "2a334ade5b0731f4e7006bcb7fe3ed5c", "score": "0.7113112", "text": "public function toArray()\n {\n return (array)$this;\n }", "title": "" }, { "docid": "611cc897f372a3653f92820bc54cbe22", "score": "0.7110975", "text": "function toArray()\n {\n return (array)$this;\n }", "title": "" }, { "docid": "08986b13b62c67859221c569cf54aa3a", "score": "0.71004367", "text": "public function asArray()\r\n {\r\n return $this->_asArray();\r\n }", "title": "" }, { "docid": "672c65d08f4e46a735d00b21e43b1570", "score": "0.702105", "text": "public function toVersionableArray()\n {\n return $this->toArray();\n }", "title": "" }, { "docid": "708f6d0912ca649cc76be75e8f88fdc1", "score": "0.7017614", "text": "public function toArray()\n {\n return $this->arr;\n }", "title": "" }, { "docid": "d0aad9632457c983a550cb606c6e79e3", "score": "0.698611", "text": "public function getArrayInfos()\n\t{\n\t\treturn Util::object_to_array( $this );\n\t}", "title": "" }, { "docid": "afd2edf85120c4d088b104544b73e8a3", "score": "0.6962902", "text": "public function &toArray()\r\n\t{\r\n\t\treturn $this->arr;\r\n\t}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6960776", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6960776", "text": "public function toArray() {}", "title": "" }, { "docid": "bc1229e2fbfea2c53201fba7adff2a79", "score": "0.6952554", "text": "public function toArray(): array\n {\n return ($this->object instanceof Arrayable) ? $this->object->toArray() : [];\n }", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.69354445", "text": "public function toArray(): array;", "title": "" }, { "docid": "83ee30ad25c444686874e88ce92d9231", "score": "0.6913697", "text": "public function toArray()\n {\n return (array) $this;\n }", "title": "" }, { "docid": "a49866bcbe53b98390c76db3f84ba7ba", "score": "0.68991494", "text": "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "c7239bc47476c3b7941417b6fab8cfec", "score": "0.68816173", "text": "public function array(){\n\t\t\treturn &$this->_rawDataArray;\n\t\t}", "title": "" }, { "docid": "42aae5df862b474c7b4ee441ae3932a0", "score": "0.68768305", "text": "public function get()\n {\n $data = $this->arrayChangeCaseKey($this->parseData());\n\n return Conversion::arrayObject($data);\n }", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.68648916", "text": "public function toArray() : array;", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.68648916", "text": "public function toArray() : array;", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.68648916", "text": "public function toArray() : array;", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.68648916", "text": "public function toArray() : array;", "title": "" }, { "docid": "ad00ff794a41427fae39e29fc5048d4f", "score": "0.68648916", "text": "public function toArray() : array;", "title": "" }, { "docid": "5ca0d1d7cf134014453ec9983786e98a", "score": "0.686306", "text": "public function toArray() {\n\t\t\n\t\treturn parent::toArray();\n\t}", "title": "" }, { "docid": "39b70e2486b92e5c3df7b990da987b2e", "score": "0.68474233", "text": "public function toArray()\n {\n\n $array = (array) $this;\n return $array;\n }", "title": "" }, { "docid": "16861ac74a194d1136a931e7ed520651", "score": "0.684631", "text": "public function __toArray()\n\t{\n\t\treturn (array) $this->_data;\n\t}", "title": "" }, { "docid": "6f29a66908cc7904d151f83e1cb9ba47", "score": "0.6838596", "text": "public function get_array()\n {\n return $this->get_model()->get_array();\n }", "title": "" }, { "docid": "fa247be4c10c2927864ef0b98105086c", "score": "0.68062663", "text": "public function getArrayCopy() { return $this->to_array(); }", "title": "" }, { "docid": "1e99cde189e09e4251892dea4e0bae45", "score": "0.67932004", "text": "public function getArrayCopy() {\n return (array) $this->storage;\n }", "title": "" }, { "docid": "fa1ef8913f36a7bb21cef81ccb7f0f02", "score": "0.677662", "text": "public function get(): array;", "title": "" }, { "docid": "fa1ef8913f36a7bb21cef81ccb7f0f02", "score": "0.677662", "text": "public function get(): array;", "title": "" }, { "docid": "e8da37b6d09eac8938ff39b07cefe56f", "score": "0.6775506", "text": "public function toArray() {\n }", "title": "" }, { "docid": "7b50018de9ec1c8645a74310e77d08ed", "score": "0.6766004", "text": "public function as_array()\n\t{\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "7b50018de9ec1c8645a74310e77d08ed", "score": "0.6766004", "text": "public function as_array()\n\t{\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "a33947f062f0b0373a23ddbef6911143", "score": "0.6765051", "text": "public function toArray()\n {\n return $this->getArrayCopy();\n }", "title": "" }, { "docid": "df9f14818a7a83c047cf6387c4e79d71", "score": "0.6763096", "text": "public function toArray() {\n\t\treturn ( array ) $this->_data;\n\t}", "title": "" }, { "docid": "bb32ed006a4ae8256483394423595610", "score": "0.67560935", "text": "public function getArray()\n\t{\n\t\t\n\t\t$data = array();\n\t\t\n\t\tforeach ( get_object_vars( $this ) as $name => $value )\n\t\t{\n\t\t\tif ( $value !== null )\n\t\t\t{\n\t\t\t\t$data[ $name ] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "c746ab192137f3d18814d87c39249f1f", "score": "0.67455804", "text": "public function getArray() {\r\n return array(\r\n \"id\" => $this->id,\r\n \"name\" => $this->name,\r\n \"text\" => $this->text,\r\n \"example\" => $this->example,\r\n \"type\" => $this->Type->getArray(),\r\n \"url\" => $this->url->getURLs()\r\n );\r\n }", "title": "" }, { "docid": "8e1483b36a7ec1152cf21eb2cbfc075c", "score": "0.6732208", "text": "final public function toArray() {\n return $this->data;\n }", "title": "" }, { "docid": "340cb59a3674b832e774882d5f5b2a21", "score": "0.67299044", "text": "public function to_array() {\r\n\t\treturn get_object_vars( $this );\r\n\t}", "title": "" }, { "docid": "ee67a818f1a4ae4768a7e56cc259d4fe", "score": "0.6721992", "text": "public function as_array()\n\t{\n\t\treturn $this->orm_object->as_array();\n\t}", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.671997", "text": "public function toArray();", "title": "" }, { "docid": "6a5e1cb98442a81b33355e56901ddb47", "score": "0.668052", "text": "public function toArray() {\n return call_user_func('get_object_vars', $this);\n }", "title": "" }, { "docid": "d3200758f585b53d12f529d3d8fae201", "score": "0.6678081", "text": "public function to_array()\n\t{\n\t\treturn new CFArray(json_decode(json_encode($this), true));\n\t}", "title": "" }, { "docid": "b63a10423f09a14099970189f93d8461", "score": "0.66779196", "text": "public function toArray(): array\n {\n return json_decode(json_encode($this), true);\n }", "title": "" } ]
1921fc71be113efca4042e15aa793f70
Get all the sections assigned to this page
[ { "docid": "d0cb48d91077921df06d822a5a3f9c75", "score": "0.75460434", "text": "public function getSections()\n\t{\n\t\treturn $this->_sections;\n\t}", "title": "" } ]
[ { "docid": "8de68092f84cac14f0eeefa4bebf0772", "score": "0.7944956", "text": "public static function getsections() {\n\t\n\t}", "title": "" }, { "docid": "88ff08807accd43e60d0b675256ab2bf", "score": "0.7920959", "text": "public function all()\n {\n return $this->sections;\n }", "title": "" }, { "docid": "544b18cf0231065a9d1d8b40e2ca77e2", "score": "0.77941257", "text": "public function getSections()\n {\n return $this->sections;\n }", "title": "" }, { "docid": "e3d98202dc402f44ec84a75a43cc9a19", "score": "0.77938825", "text": "protected function getSections(): array\n {\n return $this->sections;\n }", "title": "" }, { "docid": "bbdc2e7de548ff50fa74a3634a53e7d1", "score": "0.7719861", "text": "public function getSections() {\n return $this->sections;\n }", "title": "" }, { "docid": "7d53f120cec346f63f1fe1aea7fd22fd", "score": "0.7687347", "text": "public function sections()\n {\n return $this->hasMany(Sections::class, 'page_id');\n }", "title": "" }, { "docid": "f843b566c2dde882ff1f764aecd2713d", "score": "0.7633695", "text": "public function getSections()\n\t\t{\n\t\t\treturn $this->sections;\n\t\t}", "title": "" }, { "docid": "704bc400ad4ee1c82b692209c9a53428", "score": "0.7580809", "text": "public function getSections() {\n $this->sortSections();\n return $this->sections;\n }", "title": "" }, { "docid": "69f184b569d9c754939ac23d21baaaba", "score": "0.74375665", "text": "protected function collectSections() {\n $sections = [];\n $this->moduleHandler->alter('ckeditor5_sections', $sections);\n return $sections;\n }", "title": "" }, { "docid": "26b878bc0d674136cd7a43db02f778e2", "score": "0.73527527", "text": "private function getSections()\n {\n $sections = $this->getDoctrine()->getRepository(Sections::class)->findAll();\n //put section results into an array\n $section_array = [];\n foreach ($sections AS $section){\n $section_array[$section->getId()] = $section->getTitle();\n }\n\n return $section_array;\n }", "title": "" }, { "docid": "631e112f6c00a280de87d16642909c70", "score": "0.7306485", "text": "public function get_sections_list() {\n\t\t$query = \"\tSELECT arts.section_id, arts.section_id, arts.section_title, arts.section_description,\n\t\t\t\t\t\t\tarts.section_icon, arts.priority, article_total.total\n\t\t\t\t\tFROM article_sections arts\n\t\t\t\t\t\tLEFT JOIN (\n\t\t\t\t\t\t\tSELECT a.section_id, COUNT(a.article_id) total\n\t\t\t\t\t\t\tFROM article a\n\t\t\t\t\t\t\tWHERE a.status_id != {$this->article_statuses['delete']}\n\t\t\t\t\t\t\tGROUP BY a.section_id\n\t\t\t\t\t\t) article_total USING (section_id)\n\t\t\t\t\tORDER BY arts.priority ASC\";\n\t\t$result = $this->sYra_help->query($query);\n\t\t$output = $result->fetchAll(PDO::FETCH_GROUP);\n\t\t$output = array_map('reset', $output);\n\n\t\t//Get guides and pushed count in section_id = 2\n\t\t$guide_section_id = 2;\n\t\t$query = \"\tSELECT COUNT(a.article_id) as total\n\t\t\t\t\tFROM article a\n\t\t\t\t\tWHERE a.status_id != {$this->article_statuses['delete']}\n\t\t\t\t\t\tAND a.section_id != {$guide_section_id}\n\t\t\t\t\t\tAND a.doc_type = 'guide' \";\n\n\t\t$result = $this->sYra_help->query($query)->fetch();\n\t\t$output[$guide_section_id]['total'] += $result['total'];\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "a99e64291d9a0675cdcb966640ad4ca3", "score": "0.72705954", "text": "public function getSections()\n {\n return $this->hasMany(Section::className(), ['building' => 'building', 'room_number' => 'room_number']);\n }", "title": "" }, { "docid": "40db96502991ded31cc9d4e927af2c28", "score": "0.725515", "text": "public function getSections()\n {\n\n if(empty($this->sections)) {\n\n if (!is_array($this->page_array['sections'])) {\n throw new Exception('No sections found');\n }\n\n $return = array();\n foreach ($this->page_array['sections'] AS $section) {\n $this->sections[$section['section_identifier']] = $section;\n if (!empty($section['type']) AND $section['type'] == 'mixed' AND !empty($section['elements'])) {\n $this->sections[$section['section_identifier']]['html'] = $this->parseElements($section['elements']);\n }\n }\n }\n\n return $this->sections;\n }", "title": "" }, { "docid": "706b9db7787224f0011e7ca698a70b3d", "score": "0.724544", "text": "private function getSections()\n\t{\n\t\tif($this->sections == null){\n\t\t\t$this->sections = Mage::getModel('adminhtml/config')->getSections();\n\t\t}\n\t\treturn $this->sections;\n\t}", "title": "" }, { "docid": "835b2df14afa27e4181e6a2549a8f70e", "score": "0.7168076", "text": "public static function getSections(){\n\t\treturn \\Illuminate\\View\\Environment::getSections();\n\t}", "title": "" }, { "docid": "e631e3094dce7452292d14bef9ad565f", "score": "0.7148161", "text": "public function getSectionList() {\n\t\t$query = \"\n\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\tsectionId, sectionName, sectionType\n\t\t\t\t\tFROM\t\tsc_section\n\t\t\t\t\tORDER BY\tsectionType, sectionName\";\n\t\treturn SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n }", "title": "" }, { "docid": "fa3c67cb99c126a4ceb3aab0c5346637", "score": "0.7137025", "text": "public static function sections() {\n $sections = LaravelDB()->select('module')->distinct('module')->get();\n $result = array();\n foreach ($sections as $section) {\n $result[] = $section->module;\n }\n\n return $result;\n }", "title": "" }, { "docid": "abfcfe7e2eaf07d06c528e9e5655c18a", "score": "0.6962185", "text": "public function get_sections() {\n\t\t$default_sections = array(\n\t\t\t'general' => __( 'General', 'edd-fm' ),\n\t\t\t'ip' => __( 'IP Addresses', 'edd-fm' ),\n\t\t\t'country' => __( 'Country', 'edd-fm' ),\n\t\t\t'email' => __( 'Email', 'edd-fm' ),\n\t\t\t'behavior' => __( 'Behavior', 'edd-fm' ),\n\t\t);\n\n\t\treturn apply_filters( 'eddfm_sections', $default_sections );\n\t}", "title": "" }, { "docid": "9ac71c3889ad485c8c785cfae457c634", "score": "0.69482726", "text": "public function Get_Sections()\n\t{\n\t\t$system_sql = ($this->system_id == NULL) ? \"\" : \"where s.system_id = \" . $this->system_id . \" \";\n\t\t$query = \"select\n\t\t\t\t\t\ts.name,\n\t\t\t\t\t\ts.description,\n\t\t\t\t\t\ts.active_status,\n\t\t\t\t\t\ts.system_id,\n\t\t\t\t\t\ts.section_id,\n\t\t\t\t\t\ts.section_parent_id,\n\t\t\t\t\t\ts.default_section_id,\n\t\t\t\t\t\ts.sequence_no,\n\t\t\t\t\t\ts.level\n\t\t\t\t\tfrom\n\t\t\t\t\t \tsection s\n\t\t\t\t\t{$system_sql}\n\t\t\t\t\torder by s.section_parent_id, s.sequence_no\";\n\n\t\t$result = $this->mysqli->Query($query);\n\t\t$sections = array();\n\t\twhile($row = $result->Fetch_Object_Row())\n\t\t{\n\t\t\t$sections[] = $row;\n\t\t}\n\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "8f616f2f9e196d88acf78ce254e6a5e6", "score": "0.6908321", "text": "public function sections()\n {\n return $this->belongsToMany(Section::class)->orderby('created_at', 'DESC');;\n }", "title": "" }, { "docid": "2f1b92738c95c961d2ed16809216422d", "score": "0.6895824", "text": "function getSectionsForSelect()\n {\n $aTranslations = array();\n $aSections = array();\n $sectionNodesArray = $this->nestedSet->getTree();\n if ($this->conf['translation']['container'] == 'db') {\n $lang = SGL_Translation::getLangID();\n $aTranslations = SGL_Translation::getTranslations('nav', $lang);\n }\n unset($sectionNodesArray[0]);\n foreach ($sectionNodesArray as $k => $sectionNode) {\n if ($sectionNode['trans_id']\n && array_key_exists($sectionNode['trans_id'], $aTranslations)) {\n $sectionNode['title'] = $aTranslations[$sectionNode['trans_id']];\n }\n $spacer = str_repeat('&nbsp;&nbsp;', $sectionNode['level_id']-1);\n $aSections[$sectionNode['section_id']] = $spacer . $sectionNode['title'];\n }\n return $aSections;\n }", "title": "" }, { "docid": "ed804ef4c189181f27c04efa19d20899", "score": "0.68917346", "text": "public function collect_sections() {\r\n\t\t$methods = get_class_methods( 'Stuff_Repeatable_Sections' );\r\n\t\tforeach ( $methods as $method ) {\r\n\t\t\tif ( false !== strpos( $method, 'repeatable_' ) ) {\r\n\t\t\t\t$section = $this->$method();\r\n\r\n\t\t\t\tif ( ! empty( $section ) ) {\r\n\t\t\t\t\t$this->sections[ $section['id'] ] = $section;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->sections = apply_filters( 'stuff_section_collection', $this->sections );\r\n\t}", "title": "" }, { "docid": "28c688709e54af176a728f1fe5057430", "score": "0.68802285", "text": "public static function get_sections() {\n\t\tif ( false === ( $sections = get_transient( 'ur_addons_sections' ) ) ) {\n\t\t\t$raw_sections = wp_safe_remote_get( 'https://raw.githubusercontent.com/wpeverest/extensions-json/master/user-registration/addon-section.json', array( 'user-agent' => 'UserRegistration Addons Page' ) );\n\t\t\tif ( ! is_wp_error( $raw_sections ) ) {\n\t\t\t\t$sections = json_decode( wp_remote_retrieve_body( $raw_sections ) );\n\n\t\t\t\tif ( $sections ) {\n\t\t\t\t\tset_transient( 'ur_addons_sections', $sections, WEEK_IN_SECONDS );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$addon_sections = array();\n\n\t\tif ( $sections ) {\n\t\t\tforeach ( $sections as $sections_id => $section ) {\n\t\t\t\tif ( empty( $sections_id ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$addon_sections[ $sections_id ] = new stdClass();\n\t\t\t\t$addon_sections[ $sections_id ]->title = ur_clean( $section->title );\n\t\t\t\t$addon_sections[ $sections_id ]->endpoint = ur_clean( $section->endpoint );\n\t\t\t}\n\t\t}\n\n\t\treturn apply_filters( 'user_registration_addons_sections', $addon_sections );\n\t}", "title": "" }, { "docid": "3816173686cf4b7b1f13cea001ac5d9c", "score": "0.68643045", "text": "public function getSections() {\n $data = array();\n\n $sections = get_object_vars($this);\n foreach ($sections as $keySec => $itmSec) {\n if (substr($keySec, 0, 1) != '_') {\n $data[$keySec] = $itmSec;\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "59ef7f3c7065739a28ba3fa7a11d8401", "score": "0.68406", "text": "public function index()\n {\n \\Gate::authorize('view', 'sections');\n $Section = Section::get();\n return SectionResource::collection($Section);\n }", "title": "" }, { "docid": "244aac27ef29d46000c18166bb3f9591", "score": "0.683167", "text": "public function getLibrarySections()\n {\n return $this->call('/library/sections');\n }", "title": "" }, { "docid": "ff46cce60a6f2b4520bbbd15e23e1243", "score": "0.6783316", "text": "function getSections()\n{\n return array(\n SECTION_DEFAULT => array(\n PROP_TITLE => \"Section Title\",\n PROP_DESCRIPTION => \"Optional section description\"\n )\n );\n}", "title": "" }, { "docid": "21f6bd2d284ff3065bd973915fd9c68f", "score": "0.6778189", "text": "public function getAgencySections()\n {\n return $this->sections->roleable();\n }", "title": "" }, { "docid": "a226c40d21c71bf3b0824b13bfd7b4f9", "score": "0.67516035", "text": "public function SectionsAll()\n {\n return $this->hasMany('App\\EtsySection', 'etsy_store_id');\n }", "title": "" }, { "docid": "5a47b228e510c9e666c4dd1129059351", "score": "0.67370653", "text": "public function subSections() {\n\t\treturn $this->hasMany(Section::class )->orderBy('order', 'asc');\n\t}", "title": "" }, { "docid": "65c3594700adc4f956634ffcc2b8aca3", "score": "0.6726927", "text": "public function charts()\n {\n return SectionResource::collection(\\App\\Page::where('id', 1)->first()->sections);\n }", "title": "" }, { "docid": "aeeae0c97748f96a71e7a8c4918e5529", "score": "0.67072153", "text": "public function sections(){\n return $this->hasMany('App\\Section', 'course_id')->orderBy('created_at', 'desc');\n }", "title": "" }, { "docid": "47b6fd08ee37de1cd84a379996134fd9", "score": "0.6663126", "text": "public function sections()\n {\n return $this->belongsToMany('App\\Section');\n }", "title": "" }, { "docid": "47ce34e9af5b25c6b702de773d4a3a2e", "score": "0.65900964", "text": "private function loadSections()\n {\n $sections = collect();\n\n foreach ($this->config->all() as $key => $section_config) {\n $sections[$key] = app()->makeWith(Section::class, [\n 'config' => $section_config,\n 'key' => $key,\n ]);\n }\n\n $this->sections = $sections;\n }", "title": "" }, { "docid": "631f7c9c942abc14ddd211850e195f8f", "score": "0.6533443", "text": "public function getAllSections($root_only = FALSE);", "title": "" }, { "docid": "1178b44a99d1178a87e87dc19f7ad7ca", "score": "0.64871377", "text": "public static function getHomePageRandomSections(){\n $random_sections = self::getHomePageRandomSectionData();\n //echopre($random_sections);\n if(is_array($random_sections) && count($random_sections) > 0){\n foreach($random_sections as $random_section_id => $random_section){\n if(trim($random_section->section_alias) <> \"\"){\n $random_section_content = self::getSectionRandomDataByAlias(trim($random_section->section_alias));\n $random_sections[$random_section_id]->data = $random_section_content;\n }\n }\n }\n return $random_sections;\n }", "title": "" }, { "docid": "d66d477f64efb99d548717563da8b768", "score": "0.6483922", "text": "public static function getHomePageSliderSections(){\n $slider_sections = self::getHomePageSliderSectionData();\n //echopre($random_sections);\n if(is_array($slider_sections) && count($slider_sections) > 0){\n foreach($slider_sections as $slider_section_id => $slider_section){\n if(trim($slider_section->section_alias) <> \"\"){\n $slider_section_content = self::getSectionHomeSliderDataByAlias(trim($slider_section->section_alias));\n $slider_sections[$slider_section_id]->data = $slider_section_content;\n }\n }\n }\n return $slider_sections;\n }", "title": "" }, { "docid": "2601c8e0b57d4c66ce003cc5640688dc", "score": "0.6472449", "text": "public function Sections()\n {\n return $this->hasMany('App\\EtsySection', 'etsy_store_id')\n ->where('updated_at', \">\", Carbon::now()->addHours(-config('etsy.expiry_hr')));\n }", "title": "" }, { "docid": "72092ae33c06c3097f852917ff6ee715", "score": "0.6462441", "text": "public function get_propsections()\n {\n if ( ! isset($this->_properties['propsections']))\n {\n $result = array();\n\n foreach ($this->propertysections as $propsection)\n {\n $result[$propsection->property_id]['active'] = $propsection->active;\n $result[$propsection->property_id]['filter'] = $propsection->filter;\n $result[$propsection->property_id]['sort'] = $propsection->sort;\n }\n\n $this->_properties['propsections'] = $result;\n }\n return $this->_properties['propsections'];\n }", "title": "" }, { "docid": "69b2d3b752828b38eb4c8f4b6a9b3fb1", "score": "0.64151484", "text": "public function activeSections()\n {\n return $this->belongsToMany(Section::class)->where('is_active', 1 )->orderby('created_at', 'DESC');\n }", "title": "" }, { "docid": "c7124181b330eb937c62f9defe1d9274", "score": "0.63987947", "text": "public function index()\n {\n return SectionResource::collection(SectionModel::paginate(25));\n }", "title": "" }, { "docid": "6505c320ddc787a25666c55e603a41e0", "score": "0.6395104", "text": "public function active_sections()\n {\n // $teachers = $employee->teachers();\n // $section_teacher_semester = new SectionTeacherSemester();\n // $activeSections = $section_teacher_semester->active_sections;\n // $available_sections = $section_teacher_semester->available_sections;\n\n // return view('section.active_section')->with('activeSections', $activeSections)->with('teachers', $teachers)->with('available_sections', $available_sections);\n }", "title": "" }, { "docid": "e15c0327b1dcb8f435aca587c2d8e706", "score": "0.6378206", "text": "private function splitSections($html)\n {\n $content = $html->find('div#page', 0)->innertext\n or returnServerError('Unable to find <div id=\"page\"/>!');\n\n $sections = [];\n\n $regex = implode(\n '',\n [\n \"\\<{$this->getInput('separator')}.+?(?=\\>)\\>\",\n \"(.+?)(?=\\<\\/{$this->getInput('separator')}\\>)\",\n \"\\<\\/{$this->getInput('separator')}\\>\",\n \"(.+?)((?=\\<{$this->getInput('separator')})|(?=\\<div\\sid=\\\"pagebottom\\\")){1}\"\n ]\n );\n\n preg_match_all(\n '/' . $regex . '/m',\n $content,\n $sections,\n PREG_SET_ORDER\n );\n\n // Some pages don't use headers, return page as one feed\n if (count($sections) === 0) {\n return [\n [\n $content,\n $html->find('title', 0)->innertext,\n $content\n ]\n ];\n }\n\n return $sections;\n }", "title": "" }, { "docid": "37b7a508ed6c6ba2ecca5c3e764fd8b6", "score": "0.63723004", "text": "public function sections(){\n return $this->hasMany('\\App\\Section');\n }", "title": "" }, { "docid": "d6ddffda7270390fecabb95b473ad0a6", "score": "0.6336419", "text": "public function index()\n {\n $sections = $this->paginateCollection($this->SectionsRepository->getAllSections(), self::PAGINATE);\n\n return view('sections', compact(self::viewShareVarsSections));\n }", "title": "" }, { "docid": "3fbfc3b121228b9fab3460d7bfc1e9e2", "score": "0.63186973", "text": "public function sections() {\n return $this->hasMany('App\\Models\\Section','surveyID','id');\n }", "title": "" }, { "docid": "8bed69efc203d9d57edea6a9af08b7f3", "score": "0.63027996", "text": "public function index()\n {\n // if (request()->expectsJson()) {\n // return HomeSection::all();\n // }\n\n return HomeSection::all();\n }", "title": "" }, { "docid": "062b24ca76dbcb179caf2762a2e1a2c1", "score": "0.6301435", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM core_acl_aro_sections';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "fedbc5722b70d647c7bf614b390e9eee", "score": "0.6288257", "text": "public function cmsSectionsListing()\n\t\t\t{\n\t\t\t\t$cls\t\t\t=\tnew adminUser();\n\t\t\t\t$cls->unsetSelectionRetention(array($this->getPageName()));\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}", "title": "" }, { "docid": "8a93d4ee129d161443b9b31d8a27c532", "score": "0.6235088", "text": "private function sections()\n {\n foreach (self::$sections as $section_group_id => $sections) {\n echo '<div id=\"moj-es-' . $section_group_id . '\" class=\"moj-es-settings-group\">';\n foreach ($sections as $section) {\n echo '<div id=\"moj-es-' . $section_group_id . '\" class=\"moj-es-settings-section\">';\n if ($section['title']) {\n echo \"<h2>{$section['title']}</h2>\\n\";\n }\n\n if ($section['callback']) {\n call_user_func($section['callback'], $section);\n }\n\n echo '<table class=\"form-table\" role=\"presentation\">';\n do_settings_fields($this->optionGroup(), $this->prefix . '_' . $section['id']);\n echo '</table>';\n\n echo '</div>';\n }\n echo '</div>';\n }\n echo '<hr/>';\n }", "title": "" }, { "docid": "e86e6d9b3e2dc543ca232fa2ed46a12a", "score": "0.62073475", "text": "public function index()\n {\n //\n $result = [];\n\n $sections = Section::where('parent_id',0)->get();\n\n\n foreach ($sections as $section) {\n\n $result[$section->id] = [\n 'id' => $section->id,\n 'name' => $section->name,\n 'parent_id' => $section->parent_id,\n ];\n\n $children = Section::where('parent_id',$section->id)->get();\n\n //TODO обход рекурсивный\n if ($children) {\n\n foreach ($children as $child) {\n $result[$section->id]['children'][$child->id] = [\n 'id' => $child->id,\n 'name' => $child->name,\n 'parent_id' => $child->parent_id,\n ];\n }\n }\n }\n\n return $result;\n //return SectionResource::collection($sections);\n }", "title": "" }, { "docid": "edbe2cb471fd74b558aaf4cc6a216dc7", "score": "0.6195508", "text": "public function sections(){\n return $this->hasMany('App\\Sections');\n }", "title": "" }, { "docid": "5d07c1a98d05def1c84c246052b5d4ad", "score": "0.61713415", "text": "public function setSections()\n {\n return [array_keys($this->parseFields($this->fields()))];\n }", "title": "" }, { "docid": "72fe7bf186fdf17d3668add8afe7fff3", "score": "0.61588186", "text": "function tokopress_get_customizer_sections() {\n\t$tk_sections = array();\n\n\treturn apply_filters( 'tokopress_customizer_sections', $tk_sections );\n}", "title": "" }, { "docid": "ef74a5ac6a078947dbf8c81a1c552433", "score": "0.6157941", "text": "public function getTextSections()\n {\n return $this->text_sections;\n }", "title": "" }, { "docid": "1b70e8f974752b50e54c0e50452a397d", "score": "0.615241", "text": "private function _getSectionsList(){\n\t\t$sectionsList = array();\n\t\t$path = DATA_PATH;\n\t\t$dirs = scandir($path);\n\t\tforeach ($dirs as $i => $dir){\n\t\t\tif (is_dir($path.DIRECTORY_SEPARATOR.$dir) and $dir != '.' and $dir != '..' and is_numeric(substr($dir, 0, 2))){\n\t\t\t\t$section = new Section($dir);\n\t\t\t\t$sectionsList[$section->order] = $section;\n\t\t\t}\n\t\t}\n\t\tksort ($sectionsList);\n\t\treturn $sectionsList;\n\t}", "title": "" }, { "docid": "41b55451bb5904fb250bca2f8a84b912", "score": "0.61407566", "text": "public function render_sections () {\n\t\tif ( 0 >= count( $this->_sections ) ) return;\n\t\t$html = '';\n\t\t$current_section = '';\n\t\tif ( isset( $_GET['tab'] ) && '' != $_GET['tab'] ) {\n\t\t\t$current_section = sanitize_title_with_dashes( $_GET['tab'] );\n\t\t} else {\n\t\t\t// Grab the key for the first section, using a short loop.\n\t\t\tif ( 0 < count( $this->_sections ) ) {\n\t\t\t\tforeach ( $this->_sections as $k => $v ) {\n\t\t\t\t\t$current_section = $k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $this->_sections[$current_section] ) ) {\n\t\t\t$html .= $this->render_single_section( $current_section, $this->_sections[$current_section] );\n\t\t}\n\n\t\techo $html;\n\t}", "title": "" }, { "docid": "9ce633ac56f86ce5404604cf38ba9550", "score": "0.6059678", "text": "public function index()\n\t{\n\t\treturn view('admin.section.index')->with('sections', $this->section->with('forums')->get());\n\t}", "title": "" }, { "docid": "c319310044888b1bd084f699d6c21a45", "score": "0.60416496", "text": "public function index()\n {\n $sections = Section::all();\n return \\response()->json($sections);\n }", "title": "" }, { "docid": "6ece11f98e3ebd713e35a346a044df53", "score": "0.60101336", "text": "public function index()\n {\n $sections = Section::orderBy('name')->paginate(Config::get('app.perPage'));\n return view('sections.index', compact('sections'));\n }", "title": "" }, { "docid": "0e18efe7151c228c36bc63a4ca5eb858", "score": "0.6005531", "text": "public function index()\n {\n return view('section.index')->with('sections', Section::withCount('students','school_classes')->with('employee','strand')->get());\n }", "title": "" }, { "docid": "a916b0f9a7537c6165c62ee80ddc509f", "score": "0.5983354", "text": "private static function searchSection()\n\t{\n\t\t$section = self::getHomeSection();\n\t\t\n\t\t// Zoeken naar onderliggende afdelingen voor iedere stap in de URL\n\t\twhile( self::$Path[0] )\n\t\t{\n\t\t\t/*\n\t\t\t\tZoek in de database of er een section is die\n\t\t\t\tvoldoet aan de gegeven urlName en die ligt onder de\n\t\t\t\tvorige geselecteerde section\n\t\t\t*/\n\t\t\t$search = self::getSearchSection($section[\"ID\"], self::$Path[0]);\n\t\t\t\t\t\t\n\t\t\tif($search)\n\t\t\t{\n\t\t\t\t// gevonden, dit stuk van de URL wordt gestript\n\t\t\t\t// en dit wordt de huidige section\n\t\t\t\tarray_shift(self::$Path); \n\t\t\t\t$section = $search;\n\t\t\t}\n\t\t\t\n\t\t\tif(! $search || !$section[\"childrenAllowed\"] )\n\t\t\t{\n\t\t\t\t// als er niet gevonden is, \n\t\t\t\t// >> OF er onder het gevondene geen kinderen liggen mogen\n\t\t\t\t// dan moet er sowieso worden gestopt met verder zoeken\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $section;\n\t}", "title": "" }, { "docid": "2b4156e9e29c2f260c085b8b98069103", "score": "0.5971449", "text": "public function pages()\n\t{\n\t\treturn $this->oneToMany('Page', 'course_id');\n\t}", "title": "" }, { "docid": "d134d0cffdec2c07f19e1bc3b84852f2", "score": "0.596377", "text": "public function sections(): Repository\n {\n return $this->hasMany('Neoflow\\\\CMS\\\\Model\\\\SectionModel', 'block_id');\n }", "title": "" }, { "docid": "88c7415cac79ca5af314b5dec9032ffa", "score": "0.5944885", "text": "public function index()\n {\n if (! Gate::allows('section_access')) {\n return abort(401);\n }\n $sections = Section::all();\n\n return view('sections.index', compact('sections'));\n }", "title": "" }, { "docid": "9216bbad3dbf2968c821d8a4de38984a", "score": "0.59145075", "text": "function getSection()\r\n {\r\n return $this->section;\r\n }", "title": "" }, { "docid": "9310ad39466462b1a2e32d91d8515a3f", "score": "0.59142196", "text": "public function Get_Allowed_Sections($agent_id)\n\t{\n\t\t$system_sql = ($this->system_id == NULL) ? \"\" : \"and s.system_id = \" . $this->system_id . \" \";\n\n\t\t$query = \"select\n\t\t\t\t\t\tacl.company_id,\n\t\t\t\t\t\ts.active_status,\n\t\t\t\t\t\ts.name,\n\t\t\t\t\t\ts.description,\n\t\t\t\t\t\ts.system_id,\n\t\t\t\t\t\ts.section_id,\n\t\t\t\t\t\ts.section_parent_id,\n\t\t\t\t\t\ts.default_section_id,\n\t\t\t\t\t\ts.sequence_no,\n\t\t\t\t\t\ts.level\n\t\t\t\t\tfrom\n\t\t\t\t\t \tsection s,\n\t\t\t\t\t\tagent a,\n\t\t\t\t\t\tacl,\n\t\t\t\t\t\tagent_access_group aag\n\t\t\t\t\twhere\n\t\t\t\t\t\ta.agent_id = {$agent_id}\n\t\t\t\t\tand a.active_status = 'Active'\n\t\t\t\t\tand a.agent_id = aag.agent_id\n\t\t\t\t\tand aag.active_status = 'Active'\n\t\t\t\t\tand aag.access_group_id = acl.access_group_id\n\t\t\t\t\tand acl.active_status = 'Active'\n\t\t\t\t\tand acl.section_id = s.section_id\n\t\t\t\t\tand s.active_status = 'Active'\n\t\t\t\t\t{$system_sql}\n\t\t\t\t\torder by s.sequence_no\n\t\t\t\t\t\t\";\n\n\t\t$result = $this->mysqli->Query($query);\n\t\t$sections = array();\n\t\twhile($row = $result->Fetch_Object_Row())\n\t\t{\n\t\t\t$sections[$row->company_id][$row->name] = $row;\n\t\t}\n\t\t\n\n\n\t\treturn $sections;\t\t\t\t\n\t}", "title": "" }, { "docid": "dc8cad6d9d4f852513265c9cfacddcc6", "score": "0.5898109", "text": "public function index()\n {\n $Sections = sections::all();\n return view('sections.sections' , compact('Sections'));\n }", "title": "" }, { "docid": "206d4b8f3cbaea676072f6fba09405b7", "score": "0.58714765", "text": "public function getSection()\n {\n return $this->section;\n }", "title": "" }, { "docid": "206d4b8f3cbaea676072f6fba09405b7", "score": "0.58714765", "text": "public function getSection()\n {\n return $this->section;\n }", "title": "" }, { "docid": "339f898bc2bfd235adc351e991b6e020", "score": "0.5867953", "text": "abstract protected function getSectionList(array $section_data);", "title": "" }, { "docid": "177a23181e49a265f6cbaa88fc6f3f06", "score": "0.5863199", "text": "public function getSection()\n {\n return $this->_section;\n }", "title": "" }, { "docid": "2c0b4e0388514bf6046d4c2cccdda01d", "score": "0.5856749", "text": "public function inactiveSections()\n {\n return $this->belongsToMany(Section::class)->where('is_active', 0 )->orderby('created_at', 'DESC');\n }", "title": "" }, { "docid": "682dd110138a5ca150d07d424994b35d", "score": "0.58566225", "text": "public function index()\n {\n $sections = Section::all();\n $navbar = true;\n return view('backoffice.section.all', compact('sections', 'navbar'));\n }", "title": "" }, { "docid": "269ca4f348edbcb89c32a307fae5e3d8", "score": "0.58559656", "text": "public function get_section_links () {\n\t\t$html = '';\n\t\t\n\t\t$total = 0;\n\t\t\n\t\t$sections = array(\n\t\t\t\t\t\t'all' => array( 'href' => '#all', 'name' => __( 'All', 'woodojo' ), 'class' => 'current all tab' )\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\tforeach ( $this->sections as $k => $v ) {\n\t\t\t$total += count( $this->components[$k] );\n\t\t\t$sections[$k] = array( 'href' => '#' . esc_attr( $this->config->token . '-' . $k ), 'name' => $v['name'], 'class' => 'tab', 'count' => count( $this->components[$k] ) );\n\t\t}\n\t\t\n\t\t$sections['all']['count'] = $total;\n\t\t\n\t\t$sections = apply_filters( $this->config->token . '_main_section_links_array', $sections );\n\t\t\n\t\t$has_upgrades = 0;\n\t\tif ( isset( $this->components['downloadable'] ) ) {\n\t\t\tforeach ( $this->components['downloadable'] as $k => $v ) {\n\t\t\t\tif ( isset( $v->has_upgrade ) && $v->has_upgrade == true ) {\n\t\t\t\t\t$has_upgrades++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( $has_upgrades > 0 ) {\n\t\t\t$sections['has-upgrade'] = array( 'href' => '#has-upgrade', 'name' => __( 'Updates Available', 'woodojo' ), 'class' => 'has-upgrade tab', 'count' => $has_upgrades );\n\t\t}\n\n\t\t$count = 1;\n\t\tforeach ( $sections as $k => $v ) {\n\t\t\t$count++;\n\t\t\tif ( $v['count'] > 0 ) {\n\t\t\t\t$html .= '<li><a href=\"' . $v['href'] . '\"';\n\t\t\t\tif ( isset( $v['class'] ) && ( $v['class'] != '' ) ) { $html .= ' class=\"' . esc_attr( $v['class'] ) . '\"'; }\n\t\t\t\t$html .= '>' . $v['name'] . '</a>';\n\t\t\t\t$html .= ' <span>(' . $v['count'] . ')</span>';\n\t\t\t\tif ( $count <= count( $sections ) ) { $html .= ' | '; }\n\t\t\t\t$html .= '</li>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $html;\n\t\t\n\t\tdo_action( $this->config->token . '_main_get_section_links' );\n\t}", "title": "" }, { "docid": "b8a7c0ffcfa6d2ec522aceb6a068edca", "score": "0.5849071", "text": "public static function getHomePageRandomSectionData(){\n $table = 'cms_page_sections';\n $db = new Db();\n $fileds = \" `section_id`,title,section_alias \";\n $where = \" `enabled` = 'Y' AND `show_homepage` = '1' AND `homepage_viewformat` = 'block' \";\n $orderby = ' ORDER BY `homepage_order` ASC';\n $result = $db->selectQuery(\"SELECT $fileds FROM $table WHERE $where $orderby\");\n return $result;\n }", "title": "" }, { "docid": "02d2dd68833a0a022dc1adade4908ce4", "score": "0.5848092", "text": "public function getSection()\n {\n return $this->_Section;\n }", "title": "" }, { "docid": "fef19d537effb9b51405b87bff59b66a", "score": "0.5837902", "text": "public function getSectionsSnapshot() {\n // Save terms\n $vid = $this->argueStructureConf->get('argue_vocabulary');\n /** @var \\Drupal\\taxonomy\\Entity\\Term[] $terms */\n $terms = $this->entityTypeManager->getStorage('taxonomy_term')\n ->loadTree($vid, 0, NULL, TRUE);\n $sections_values = [];\n foreach ($terms as $term) {\n $sections_values[] = [\n 'term_id' => $term->id(),\n 'term_parent_id' => $term->parent->target_id,\n 'name' => $term->label(),\n 'description' => $term->getDescription() ?: ''\n ];\n }\n return $sections_values;\n }", "title": "" }, { "docid": "9f1da334be0645fbddc986ab615f2349", "score": "0.58300906", "text": "function hermes_options_page_sections() {\r\n\t\r\n\t$sections = array();\r\n\t$sections['general_section'] \t= __('General Settings', 'hermes_textdomain');\r\n\t$sections['homepage_section'] \t= __('Homepage Settings', 'hermes_textdomain');\r\n\t$sections['rooms_section'] \t= __('Rooms Settings', 'hermes_textdomain');\r\n\t$sections['social_section'] \t= __('Social Media', 'hermes_textdomain');\r\n\t$sections['misc_section'] \t\t= __('Miscellaneous', 'hermes_textdomain');\r\n\t// $sections['banners_section']\t= __('Banners', 'hermes_textdomain');\r\n\t$sections['debug_section'] \t\t= __('Debug Information', 'hermes_textdomain');\r\n\t\r\n\treturn $sections;\t\r\n}", "title": "" }, { "docid": "7200d77bd3207f1603ba79cf393d9d20", "score": "0.5829973", "text": "public function gen_section(){\n $data = array(\n \"txtinicio\"=>\"Inicio\",\n \"rutainicio\" => \"/admin/inicio\",\n \"txtmodulo\" => \"Moneda\",\n \"section\" => \"Moneda\",\n \"rutamodulo\" => \"/adminmoneda\",\n \"ventana\" => \"moneda\"\n );\n return $data;\n }", "title": "" }, { "docid": "7a8391ccd2f3c52d09a06a8a57cac21d", "score": "0.5811888", "text": "public function mergeSectionsToPage() {\n\t\t\t$html = \"\n\t\t\t\t\t<div id=\\\"container\\\">\n\t\t\t\t\t\t<div id=\\\"leftSection\\\">$this->m_leftSection</div>\n\t\t\t\t\t\t<div id=\\\"mainSection\\\">$this->m_mainSection</div>\n\t\t\t\t\t\t<div id=\\\"rightSectionWrapper\\\"><div id=\\\"rightSection\\\">$this->m_rightSection</div></div>\n\t\t\t\t\t</div>\";\n\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "a6f38c7cd86c3a3970c86e4cfdd526ee", "score": "0.58011633", "text": "function getSection(){\n\t\treturn $this->section;\n\t}", "title": "" }, { "docid": "53fd9f62f4517b9f559bd6982aea496d", "score": "0.57902706", "text": "function outputSections () {\n $dc = array_shift (getDCs ());\n foreach (getAllClusterInfo ($dc['dc']) as $row) {\n $cluster = $row['name'];\n $description = $row['description'];\n\n $DCTabLinkItems = returnDCTabLinkItems ($cluster);\n $DCTabContent = returnDCTabContent ($cluster);\n\n print <<<EOF\n <section id=\"$cluster\">\n <div class=\"page-header\"> <!-- offset1 -->\n <h1>$cluster <small>$description</small></h1>\n </div>\n <div class=\"row\">\n <div class>\n <div class=\"tabbable tabs-left\">\n <ul class=\"nav nav-tabs nav-tabs-scrunched\">\n <!-- one link item for each data center -->\n $DCTabLinkItems\n </ul>\n <div class=\"tab-content\">\n <!-- one set of tab content for each dc -->\n $DCTabContent\n </div>\n </div>\n </div>\n </div>\n </section>\nEOF;\n }\n}", "title": "" }, { "docid": "9b18ab9ab4a7ed97644fa93747631c13", "score": "0.5773782", "text": "public function get()\n {\t\t\n\n \t$Courses = Course::all();\n \t$Sections= DB::table('sections')\n \t\t\t->leftjoin('courses', 'courses.id', '=', 'sections.course_id')\n \t\t\t->select('courses.name as CourseName', 'sections.id as SectonID', 'sections.name as SectionName', 'sections.max_num_of_students as MaxStudent','sections.created_at')\n \t\t\t->get();\n // dd($Sections);\n \treturn view('pages.Section')->with([\"Courses\" => $Courses,\"Sections\" => $Sections]);\n }", "title": "" }, { "docid": "afc8d6be35fd0629448d2b2d5124d06d", "score": "0.57671034", "text": "public function section()\n {\n return $this->section;\n }", "title": "" }, { "docid": "6ead353f47121ac393001ee2cd648e3d", "score": "0.5746557", "text": "public function getAllPages(){\n $data = $this->get();\n return $data;\n }", "title": "" }, { "docid": "2046f1d3498ae9d111fc2f5422f7339d", "score": "0.57451123", "text": "private function getSelectPages() {\n\t\treturn $this->page->all();\n\t}", "title": "" }, { "docid": "79eab0a6040b878503783fe749ba4d2c", "score": "0.57346743", "text": "function pages(): array { return $this->pages; }", "title": "" }, { "docid": "abfb8b03b11eb9021796c7cae4f57eaf", "score": "0.57241374", "text": "public function getArtistSections()\n {\n // return $this->artist_sections->roleable();\n }", "title": "" }, { "docid": "87d746e0bb96b362017adbc2a699616f", "score": "0.5720354", "text": "function showSections( $option ) {\n\tglobal $database, $my, $mainframe, $mosConfig_list_limit;\n\n\t$query = \"select * from jos_places_section order by name\";\n\t$database->setQuery( $query );\n\t$rows = $database->loadObjectList();\n\tif ($database->getErrorNum()) {\n\t\techo $database->stderr();\n\t\treturn false;\n\t}\n\n\t$count = count( $rows );\n\n\tfor ( $i = 0; $i < $count; $i++ ) {\n\t\t$aID = $rows[$i]->id;\n\t\t$aQuery = \"select count(id) from jos_places_lieu where section = '$aID'\";\n\t\t$database->setQuery($aQuery);\n\t\t$aCountLieu = $database->loadResult();\n\t\t$rows[$i]->lieux = $aCountLieu;\n\t}\n\n\tfor ( $i = 0; $i < $count; $i++ ) {\n\t\t$aID = $rows[$i]->id;\n\t\t$query = \"select distinct(ville) from jos_places_lieu WHERE section = '$aID'\";\n\t\t$database->setQuery( $query );\n\t\t$aVille = $database->loadObjectList();\n\t\t$rows[$i]->villes = count($aVille);\n\t}\n\n\tfor ( $i = 0; $i < $count; $i++ ) {\n\t\t$aID = $rows[$i]->id;\n\t\t$query = \"select distinct(v.pays) from jos_places_lieu as l\"\n\t\t. \" left join jos_places_ville as v on l.ville = v.id\"\n\t\t. \" where l.section = '$aID'\";\n\t\t$database->setQuery( $query );\n\t\t$aPays = $database->loadObjectList();\n\t\t$rows[$i]->pays = count($aPays);\n\t}\n\n\tsections_html::show( $rows, $option );\n}", "title": "" }, { "docid": "b3c95135c95b2756ddc31203d08538a3", "score": "0.5717848", "text": "public static function getHomePageSliderSectionData(){\n $table = 'cms_page_sections';\n $db = new Db();\n $fileds = \" `section_id`,title,section_alias \";\n $where = \" `enabled` = 'Y' AND `show_homepage` = '1' AND `homepage_viewformat` = 'slider' \";\n $orderby = ' ORDER BY `homepage_order` ASC';\n $result = $db->selectQuery(\"SELECT $fileds FROM $table WHERE $where $orderby\");\n return $result;\n }", "title": "" }, { "docid": "8cc49523d88e7c41d708428eba7afbab", "score": "0.5698406", "text": "public function index()\n\t\t\t\t{\n\t\t\t\t\t$sections= Section::join('tbllevel', 'tblsections.lvl_id', '=', 'tbllevel.lvl_id')\n\t\t\t\t\t->select('tblsections.sec_id', 'tblsections.section', 'tbllevel.level', 'tblsections.min', 'tblsections.max')\n\t\t\t\t\t->get();\n\n\t\t\t\t\treturn View::make('server.section.section')\n\t\t\t\t\t->with('sections', $sections);\n\n\t\t\t\t}", "title": "" }, { "docid": "b177eb0ab3f5c1c167de89c0d14874b4", "score": "0.5692512", "text": "public function pages () {\n\t\treturn DB::pairs (\n\t\t\t'select id, title from lemur_page where course = ? order by sorting asc',\n\t\t\t$this->id\n\t\t);\n\t}", "title": "" }, { "docid": "6885a56b8f59a657ff87d06e551f8ce7", "score": "0.5680053", "text": "public function findAll()\n {\n return $this->pages->all();\n }", "title": "" }, { "docid": "44b2c4c83c1ca5f5be960b1f39bc6962", "score": "0.567672", "text": "public function Pageslist()\n {\n $data = $this->model->getListAll();\n return compact('data');\n }", "title": "" }, { "docid": "e697217598e402c4614c4cb5e30ca1cd", "score": "0.56721056", "text": "public function SectionsForDisplay(): ?DataList\n {\n $sections = $this->data()->Sections()->filter('HideFromDisplay', 0)->sort('Sort ASC');\n\n $this->extend('updateSectionsForDisplay', $sections);\n\n return $sections;\n }", "title": "" }, { "docid": "06bb389e6ab9d73b4850431a93add011", "score": "0.5655237", "text": "public function GetSections ( $regex = null )\r\n\t {\r\n \t\t$result = array ( ) ;\r\n\t\t \r\n\t\t if ( $regex )\r\n\t\t\t $regex\t= \"/^ \\s* $regex \\s* $/imsx\" ;\r\n\r\n\t\tforeach ( $this -> Items as &$item )\r\n\t\t {\r\n\t\t\tif ( $item [ 'type' ] == self::INI_SECTION )\r\n\t\t\t {\r\n\t\t\t\tif ( $regex )\r\n\t\t\t\t {\r\n\t\t\t\t\t$match\t\t= array ( ) ;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( preg_match ( $regex, $item [ 'value' ], $match ) )\r\n\t\t\t\t\t\t$result\t[]\t= array ( 'name' => $item [ 'value' ], 'match' => $match ) ;\r\n\t\t\t\t }\r\n\t\t\t\telse\r\n\t\t\t\t\t$result [] = $item [ 'value' ] ;\r\n\t\t\t }\r\n\t\t }\r\n\r\n\t\treturn ( $result ) ;\r\n\t }", "title": "" }, { "docid": "0a37be38ee7d500b5b7aea61b58d09bc", "score": "0.56550485", "text": "function getpages()\n\t{\n\t\treturn Array(\n\t\t\t\tArray(\"name\"=>\"index\",\"title\"=>\"Основное\"),\n\t\t\t\tArray(\"name\"=>\"colors\",\"title\"=>\"Цветовая схема\")\n\t\t);\n\t}", "title": "" }, { "docid": "437dcf7681742b936562768ca3faa0be", "score": "0.56549376", "text": "public function getParentSections($section)\n {\n $pathIds = array_reverse(explode('/', $section->getPath()));\n $sections = Mage::getResourceModel('komaks_newsedit/section_collection')\n ->addAttributeToFilter('entity_id', array('in' => $pathIds))\n ->addAttributeToSelect('*');\n return $sections;\n }", "title": "" }, { "docid": "27ca198cedb8453508f8c29baa8cc7d8", "score": "0.56492937", "text": "protected function getPages()\n {\n return $this->pagesRepository->fetchAllActiveAndAddToMenu();\n }", "title": "" } ]
7927c597629a7f6a4988235953a94f25
Filter a header value Ensures CRLF header injection vectors are filtered. Per RFC 7230, only VISIBLE ASCII characters, spaces, and horizontal tabs are allowed in values; only one whitespace character is allowed between visible characters.
[ { "docid": "4bec95afa2907ff0286f1043186d2b06", "score": "0.5740243", "text": "public static function filter($value)\n {\n $value = (string) $value;\n $length = strlen($value);\n $string = '';\n for ($i = 0; $i < $length; $i += 1) {\n $ascii = ord($value[$i]);\n\n // Non-visible, non-whitespace characters\n // 9 === horizontal tab\n // 32-126, 128-254 === visible\n // 127 === DEL\n // 255 === null byte\n if (($ascii < 32 && $ascii !== 9)\n || $ascii === 127\n || $ascii > 254\n ) {\n continue;\n }\n\n $string .= $value[$i];\n }\n\n return $string;\n }", "title": "" } ]
[ { "docid": "7ba63882cc2f593c6e74db1cddcb002e", "score": "0.72286695", "text": "public static function filter($value)\n {\n $result = '';\n $tot = strlen($value);\n\n // Filter for CR and LF characters, leaving CRLF + WSP sequences for\n // Long Header Fields (section 2.2.3 of RFC 2822)\n for ($i = 0; $i < $tot; $i += 1) {\n $ord = ord($value[$i]);\n\n if (($ord < 32 || $ord > 126)\n && $ord !== 13\n ) {\n continue;\n }\n\n if ($ord === 13) {\n if ($i + 2 >= $tot) {\n continue;\n }\n\n $lf = ord($value[$i + 1]);\n $sp = ord($value[$i + 2]);\n\n if ($lf !== 10 || $sp !== 32) {\n continue;\n }\n\n $result .= \"\\r\\n \";\n $i += 2;\n continue;\n }\n\n $result .= $value[$i];\n }\n\n return $result;\n }", "title": "" }, { "docid": "fc34247ce967eb0b6b656d2c35bb15c6", "score": "0.72249097", "text": "private function sanitiseHeader(string $value): string\n {\n return preg_replace('/\\v/', '', $value);\n }", "title": "" }, { "docid": "1c751f4fa7ca3aeb5c1ff480c8f1d7ce", "score": "0.64238334", "text": "function filter($value) {\n\t$pattern = array(\"/\\n/\", \"/\\r/\", \"/content-type:/i\", \"/to:/i\", \"/from:/i\", \"/cc:/i\");\n\t$value = preg_replace($pattern, \"\", $value);\n\treturn $value;\n}", "title": "" }, { "docid": "5c252fa260c405eb2fe8f5633d185ca5", "score": "0.6390621", "text": "function filter($value) {\r\n\t$pattern = array(\"/\\n/\", \"/\\r/\", \"/content-type:/i\", \"/to:/i\", \"/from:/i\", \"/cc:/i\");\r\n\t$value = preg_replace($pattern, \"\", $value);\r\n\treturn $value;\r\n}", "title": "" }, { "docid": "ed35da3afb2b932727728f0cd82fbd4e", "score": "0.6333367", "text": "function smcf_filter($value) {\r\n\t$pattern = array(\"/\\n/\",\"/\\r/\",\"/content-type:/i\",\"/to:/i\", \"/from:/i\", \"/cc:/i\");\r\n\t$value = preg_replace($pattern, \"\", $value);\r\n\treturn $value;\r\n}", "title": "" }, { "docid": "1b36fbae27c61077ef7ee3fe1aecdf9c", "score": "0.6050545", "text": "public function filter($value)\n {\n $value = (string)$value;\n $length = strlen($value);\n $string = '';\n for ($i = 0; $i < $length; $i += 1) {\n $ascii = ord($value[$i]);\n\n // Detect continuation sequences\n if ($ascii === 13) {\n $lf = ord($value[$i + 1]);\n $ws = ord($value[$i + 2]);\n if ($lf === 10 && in_array($ws, [9, 32], true)) {\n $string .= $value[$i] . $value[$i + 1];\n $i += 1;\n }\n continue;\n }\n\n // Non-visible, non-whitespace characters\n // 9 === horizontal tab\n // 32-126, 128-254 === visible\n // 127 === DEL\n // 255 === null byte\n if (($ascii < 32 && $ascii !== 9) || $ascii === 127 || $ascii > 254) {\n continue;\n }\n\n $string .= $value[$i];\n }\n\n return $string;\n }", "title": "" }, { "docid": "370cc0a0908713417eaa63460ccf7de2", "score": "0.60171866", "text": "protected function _sanitizeHeaders($headers)\n {\n foreach (array_diff(array_keys($headers), array('_raw')) as $key) {\n $headers[$key] = preg_replace('=((<CR>|<LF>|0x0A/%0A|0x0D/%0D|\\\\n|\\\\r)\\S).*=i', '', $headers[$key]);\n }\n\n return $headers;\n }", "title": "" }, { "docid": "577131984d0afbfa2989928fa6ec5de2", "score": "0.581173", "text": "public function secureHeader($str) {\n return trim(str_replace([\"\\r\", \"\\n\"], '', $str));\n }", "title": "" }, { "docid": "792532027adbe2b91283ce27e7894ee9", "score": "0.5809494", "text": "function isSafeHttpHeader($header)\n {\n if (!is_string($header)) {\n return false;\n }\n\n /* Don't allow plain occurrences of CR or LF */\n if (strpos($header, chr(13)) !== false || strpos($header, chr(10)) !== false) {\n return false;\n }\n\n /* Don't allow (x times) url encoded versions of CR or LF */\n if (preg_match('/%(25)*(0a|0d)/i', $header)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "19c78803b55a84bcbcbbda3cf8b7f86f", "score": "0.56172717", "text": "function sanitize_mail_headers($str) {\r\n $badness = array(\"\\r\", \"\\n\", \"%0a\", \"%0d\", \"Content-Type\", \"bcc:\", \"to:\", \"cc:\");\r\n\r\n return str_ireplace($badness, '', $str);\r\n}", "title": "" }, { "docid": "f9618a730a161b9c35c03f5fa3d2bc2f", "score": "0.5616247", "text": "function has_header_injection($str) {\n return preg_match(\"/[\\r\\n]/\", $str);\n }", "title": "" }, { "docid": "60d389fd00079fc1c59e2df85561ae8d", "score": "0.5468033", "text": "function nsp_FilterForXss($_value){\n $_value=trim($_value);\n\n // Avoid XSS attacks\n $clean_value = preg_replace('/[^a-zA-Z0-9\\,\\.\\/\\ \\-\\_\\?=&;]/', '', $_value);\n if (strlen($_value)==0) {\n return array();\n }\n else {\n $array_values = explode(',',$clean_value);\n array_walk($array_values, 'nsp_TrimValue');\n return $array_values;\n }\n}", "title": "" }, { "docid": "3b6c1cb82903e0de51013fae5ef6d318", "score": "0.5457331", "text": "function has_header_injection($str){\r\n return preg_match(\"/[\\r\\n]/\", $str);\r\n }", "title": "" }, { "docid": "19ca37d76af6dc26a22cb1e230a72416", "score": "0.5433346", "text": "function fold_header(string $headerVal, int $numSpaces = 4): string\n {\n if (preg_match('/^(.{60,78})([\\r\\n\\t\\f\\v ,;]+)(.+)$/', $headerVal, $matches)) {\n [, $p1, $sep, $p2] = $matches;\n $headerVal = $p1;\n if (! empty(trim($sep))) {\n $headerVal .= $sep;\n }\n $headerVal .= \"\\n\";\n for ($i = 0; $i < $numSpaces; $i++) {\n $headerVal .= ' ';\n }\n if (strlen($p2) > 78) {\n $p2 = fold_header($p2, $numSpaces);\n }\n $headerVal .= $p2;\n }\n\n return $headerVal;\n }", "title": "" }, { "docid": "f061e24ad350b9212d00b98bc0da89cf", "score": "0.542651", "text": "public function isValidHeaderValue($value)\n {\n $value = (string)$value;\n\n // Any occurrence of \\r or \\n is invalid\n if (strpbrk($value, \"\\r\\n\") !== false) {\n return false;\n }\n\n $length = strlen($value);\n for ($i = 0; $i < $length; $i += 1) {\n $ascii = ord($value[$i]);\n\n // Non-visible, non-whitespace characters\n // 9 === horizontal tab\n // 10 === line feed\n // 13 === carriage return\n // 32-126, 128-254 === visible\n // 127 === DEL\n // 255 === null byte\n if (($ascii < 32 && ! in_array($ascii, [9, 10, 13], true)) || $ascii === 127 || $ascii > 254) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "b193e39581e5e8a083f4f8c728752fe4", "score": "0.5419994", "text": "public function stripIllegalHeaders($headers) \n {\n $headers = array_filter(array_map(\"trim\", $headers));\n foreach ($this->options['illegal_headers'] as $val) {\n unset($headers[key(preg_grep(\"/$val/i\", $headers))]);\n }\n return $headers;\n }", "title": "" }, { "docid": "866503ea40453ca5d16f63d6e3a4d057", "score": "0.5380631", "text": "function has_header_injection($str){\n return preg_match(\"/[\\r\\n]/\", $str);\n }", "title": "" }, { "docid": "e6d28c6b80ab2410cf91829331d9a220", "score": "0.5361489", "text": "public function testPreventsCRLFAttackViaFromString()\n {\n $this->expectException(InvalidArgumentException::class);\n $header = WWWAuthenticate::fromString(\"WWW-Authenticate: xxx\\r\\n\\r\\nevilContent\");\n }", "title": "" }, { "docid": "21a6174b98a06b6092be7ef03102bdca", "score": "0.5340567", "text": "public function decodeFilter(&$value)\n {\n $value = trim(rawurldecode($value));\n }", "title": "" }, { "docid": "b7a0930d6959e01579081db1360db026", "score": "0.5334649", "text": "private function parse_header()\r\n {\r\n $parts = explode($this->newline . $this->newline, $this->content);\r\n\r\n $this->header = array_shift($parts);\r\n $this->content = implode($parts, $this->newline . $this->newline);\r\n\r\n $parts = explode($this->newline, $this->header);\r\n foreach ($parts as $part)\r\n {\r\n if (preg_match(\"/(.*)\\: (.*)/\", $part, $matches))\r\n {\r\n $this->headers[$matches[1]] = $matches[2];\r\n } else if (preg_match(\"/[0-9][0-9]+/\", $part, $matches)) {\r\n $this->status = $matches[0];\r\n }\r\n }\r\n\r\n //if (eregi(\"Set-Cookie\", $this->header))\r\n if (preg_match(\"%Set-Cookie%i\", $this->header))\r\n {\r\n $this->parse_cookies();\r\n }\r\n }", "title": "" }, { "docid": "73372c05c5c7edd87bf25e446031c02b", "score": "0.5326005", "text": "public function filter($value)\n {\n $filtered = htmlentities((string) $value, $this->getQuoteStyle(), $this->getEncoding(), $this->getDoubleQuote());\n if (strlen((string) $value) && !strlen($filtered)) {\n if (!function_exists('iconv')) {\n require_once 'Zend/Filter/Exception.php';\n throw new Zend_Filter_Exception('Encoding mismatch has resulted in htmlentities errors');\n }\n $enc = $this->getEncoding();\n $value = iconv('', $enc . '//IGNORE', (string) $value);\n $filtered = htmlentities($value, $this->getQuoteStyle(), $enc, $this->getDoubleQuote());\n if (!strlen($filtered)) {\n require_once 'Zend/Filter/Exception.php';\n throw new Zend_Filter_Exception('Encoding mismatch has resulted in htmlentities errors');\n }\n }\n return $filtered;\n }", "title": "" }, { "docid": "e688bb3c33f1aeffced9fed5247262f4", "score": "0.53217745", "text": "public function filter($value)\n {\n if (! is_scalar($value) && ! is_array($value)) {\n return $value;\n }\n return str_replace([\"\\n\", \"\\r\"], '', $value);\n }", "title": "" }, { "docid": "0bf1a91e79ece9a10961ac1170ba9ddc", "score": "0.5318802", "text": "function normalize_header($header)\n{\n if (!is_array($header)) {\n return array_map('trim', explode(',', $header));\n }\n\n $result = [];\n foreach ($header as $value) {\n foreach ((array) $value as $v) {\n if (strpos($v, ',') === false) {\n $result[] = $v;\n continue;\n }\n foreach (preg_split('/,(?=([^\"]*\"[^\"]*\")*[^\"]*$)/', $v) as $vv) {\n $result[] = trim($vv);\n }\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "82d36459c1bb2076158f828d8374ccf1", "score": "0.5315989", "text": "function parse_header($header)\n{\n static $trimmed = \"\\\"' \\n\\t\\r\";\n $params = $matches = [];\n\n foreach (normalize_header($header) as $val) {\n $part = [];\n foreach (preg_split('/;(?=([^\"]*\"[^\"]*\")*[^\"]*$)/', $val) as $kvp) {\n if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {\n $m = $matches[0];\n if (isset($m[1])) {\n $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);\n } else {\n $part[] = trim($m[0], $trimmed);\n }\n }\n }\n if ($part) {\n $params[] = $part;\n }\n }\n\n return $params;\n}", "title": "" }, { "docid": "0ed9b0b8c172e60d91c29dfb59b97926", "score": "0.5311118", "text": "function RemoveSensitiveHeaders($file) {\n $patterns = array('/(cookie:[ ]*)([^\\r\\n]*)/i','/(authenticate:[ ]*)([^\\r\\n]*)/i');\n $data = gz_file_get_contents($file);\n $data = preg_replace($patterns, '\\1XXXXXX', $data);\n gz_file_put_contents($file, $data);\n}", "title": "" }, { "docid": "fa4bbf92215e4c2286a2482f8a2246c0", "score": "0.52580845", "text": "protected function parseHeaders()\n {\n $retVal = array();\n $fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $this->_headerString));\n foreach( $fields as $field ) {\n if( preg_match('/([^:]+): (.+)/m', $field, $match) ) {\n $match[1] = preg_replace_callback('/(?<=^|[\\x09\\x20\\x2D])./', \n create_function ('$matches', 'return strtoupper($matches[0]);'), \n strtolower(trim($match[1]))\n );\n if( isset($retVal[$match[1]]) ) {\n $retVal[$match[1]] = array($retVal[$match[1]], $match[2]);\n } else {\n $retVal[$match[1]] = trim($match[2]);\n }\n }\n }\n $this->_header=$retVal;\n }", "title": "" }, { "docid": "770626769166f19230ed8c8ecd5d302e", "score": "0.52384907", "text": "public static function sanitize($value)\r\n {\r\n if (!$value instanceof Zend_Filter) {\r\n $sanitizeChain = new Zend_Filter();\r\n $sanitizeChain->addFilter(new Zend_Filter_StringTrim())\r\n ->addFilter(new Zend_Filter_StripTags());\r\n }\r\n\r\n // filter out any line feeds / carriage returns\r\n $ret = preg_replace('/[\\r\\n]+/', ' ', $value);\r\n\r\n // filter using the above chain\r\n\r\n return $sanitizeChain->filter($ret);\r\n }", "title": "" }, { "docid": "3e5427c9fec1d5abf614cf6468811aa6", "score": "0.52307045", "text": "function get_header_data($value) {\n return substr($value, strpos($value, \": \") + 1);\n }", "title": "" }, { "docid": "41052c1922e126268d036a5054ffecec", "score": "0.5210085", "text": "function parseHeader($theHeader)\n\t {\n\t\t$this->m_caseless = array() ;\n\n\t\t$theArray = preg_split(\"/(\\r\\n)+/\", $theHeader) ;\n\n\t\t//\n\t\t// Ditch the HTTP status line.\n\t\t//\n\n\t\tif (preg_match('/^HTTP/', $theArray[0]))\n\t\t {\n\t\t\t$theArray = array_slice($theArray, 1) ;\n\t\t }\n\n\t\tforeach ($theArray as $theHeaderString)\n\t\t {\n\t\t\t$theHeaderStringArray = preg_split(\"/\\s*:\\s*/\", $theHeaderString, 2) ;\n\n\t\t\t$theCaselessTag = strtoupper($theHeaderStringArray[0]) ;\n\n\t\t\tif (!isset($this->m_caseless[$theCaselessTag]))\n\t\t\t {\n\t\t\t\t$this->m_caseless[$theCaselessTag] = $theHeaderStringArray[0] ;\n\t\t\t }\n\n\t\t\t$this->m_header[$this->m_caseless[$theCaselessTag]][] = $theHeaderStringArray[1] ;\n\t\t }\n\t }", "title": "" }, { "docid": "1cd45d190a8d7d21b9320e8a5f9184a8", "score": "0.51827574", "text": "private static function stripHeader( $text ) {\n\t\treturn preg_replace( '/' . self::HEADER_REGEX . '/um', '', $text );\n\t}", "title": "" }, { "docid": "8d1f16834178b6a3c6373ae138e106b9", "score": "0.5144002", "text": "public function filter(string $value): string\n {\n $filtered = htmlentities($value, $this->getQuoteStyle(), $this->getEncoding(), $this->getDoubleQuote());\n if (strlen($value) && !strlen($filtered)) {\n // @codeCoverageIgnoreStart\n if (!function_exists('iconv')) {\n throw new BaseException('Encoding mismatch has resulted in htmlentities errors');\n }\n $enc = $this->getEncoding();\n $value = iconv('', $enc . '//IGNORE', $value);\n $filtered = htmlentities($value, $this->getQuoteStyle(), $enc, $this->getDoubleQuote());\n if (!strlen($filtered)) {\n throw new BaseException('Encoding mismatch has resulted in htmlentities errors');\n }\n }\n // @codeCoverageIgnoreEnd\n return $filtered;\n }", "title": "" }, { "docid": "1fba90dc37ff63e809eadbd0d26a9f0e", "score": "0.51412845", "text": "private function cleanHeader($header)\n {\n return preg_replace('/\\[' . REGEX_DATETIME_PATTERN . '\\][ ]/', '', $header);\n }", "title": "" }, { "docid": "1ffa8eb8624664a9092292c9976729b1", "score": "0.511421", "text": "function has_header_injection($str)\n\t\t{\n\t\t\treturn preg_match(\"/[\\r\\n]/\", $str);\t//Look for a line break in case someone\n\t\t\t\t\t\t\t\t\t\t\t\t\t//tries to enter several emails\n\t\t}", "title": "" }, { "docid": "bba48fd78db5fd68e92c7f882872b149", "score": "0.5103038", "text": "public function filterWithEmptyStringError()\n {\n Filterer::filter(\n ['fieldOne' => [['strtoupper'], 'error' => \"\\n \\t\"]],\n ['fieldOne' => 'valueOne']\n );\n }", "title": "" }, { "docid": "07f5c649fa4e63231e8c3bdf8a355fcb", "score": "0.5101435", "text": "function spam_scrubber($value)\n {\n //List the very bad values\n $very_bad = ['to:', 'cc:', 'bcc:', 'content-type:', 'content-type:', 'mime-version:', 'multipart-mixed:', 'content-transfer-encording:'];\n\n //If any of the bad strings are in\n //the submitted value, return an empty string\n foreach($very_bad as $v)\n {\n if(stripos($value, $v) !== false) return '';\n }\n\n //Replace any newline character with spaces:\n $value = str_replace([\"\\r\", \"\\n\", \"%0a\", \"%0d\"], ' ', $value);\n\n //Return the value\n return trim($value);\n }", "title": "" }, { "docid": "3b14950c29ef521fcf78dfd05a9a4d48", "score": "0.5096679", "text": "protected function filterValue(?string $value): ?string\n {\n if (null !== $value) {\n $unquotedValue = preg_match('/^\\\".*\\\"$/', $value) ? trim($value, '\"') : $value;\n\n if (! preg_match('/^[^\\x00-\\x1f\\x7f\\x20,;\\\\\"]*$/', $unquotedValue)) {\n throw new InvalidArgumentException(\n 'Invalid cookie value! Cookie value must be compliant with the \"RFC 6265\" standart.'\n );\n }\n }\n\n return $value;\n }", "title": "" }, { "docid": "311203a0f0229ba769e90c27486214db", "score": "0.50900126", "text": "public function filter($value)\n {\n return filter_var($value, FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n }", "title": "" }, { "docid": "44ea676fac8e6bab4226debb19ab682a", "score": "0.5077718", "text": "public function filter($value) {\n return utf8_decode($value);\n }", "title": "" }, { "docid": "a820dc1b500c8e1bf2f87ad1fcf658ff", "score": "0.50532204", "text": "private function encodeHeader($value)\n {\n // There are many different encoding header options allowed and defined standards,\n // this makes supporting a wide range of values complex. Traditionally header fields\n // have been a source of security issues such as [Email Header Injection] due to the\n // complexity. Often the security issues of most concern (Remote Code Execution - RCE)\n // have been related to email headers with php [mail()] function or [sendmail]\n // program calls; those issues are avoided entirely by this class and the SmtpClient\n // because only SMTP with sockets is used.\n //\n // This class takes the approach to leave the header alone if it appears safe and short\n // otherwise safely encode it as UTF8/Base-64. Because data is validated for line breaks\n // and null characters prior to this call it's not possible to inject additional headers,\n // however a malicious user may try to send escape sequences which are handled by this code.\n //\n // All modern email SMTP servers can handle Unicode UTF8 values in header fields which\n // is why encoding is not needed for most characters. This makes viewing the header from\n // email clients much easier for admins or end users.\n //\n // If performed the value will be encode to chunked base64 with a 'folding white space'.\n // Based on RFC 2822, Section 2.2.3 'Long Header Fields':\n // http://www.faqs.org/rfcs/rfc2822.html\n //\n // A 'folding white space' starts any line after the first\n // line break with a space:\n // |Subject: This\n // | is a test\n $encode = strlen($value) > 76;\n $encode |= (strpos($value, '\\\\') !== false); // Escape Character for Mime fields\n $encode |= (strpos($value, '\"') !== false); // Quotes have to be escaped for Mime\n $encode |= (strpos($value, '%') !== false); // Possible URL Encoding\n $encode |= (strpos($value, '&') !== false); // Possible HTML Encoding\n $encode |= (strpos($value, 'U+') !== false); // Possible HTML Encoding\n if ($encode) {\n $value = trim(chunk_split(base64_encode($value), 76, \"\\r\\n \"));\n return '=?utf-8?b?' . $value . '?=';\n }\n return $value;\n }", "title": "" }, { "docid": "edc68780675110d352aae0cb12168812", "score": "0.5041797", "text": "protected function parseRawHeader()\n {\n $header_parts = explode(\"\\r\\n\", $this->getRawHeader());\n\n foreach($header_parts as $part) {\n if (strpos($part, ':') !== False) {\n $keyvaluepair = explode(':', $part, 2);\n\n $this->headers[trim($keyvaluepair[0])] = trim($keyvaluepair[1]);\n } else {\n $this->headers['http_status'] = trim($part);\n }\n }\n }", "title": "" }, { "docid": "9d51ed47c706623ffde64120d5ba8826", "score": "0.50413847", "text": "abstract protected function isValidHeader($string);", "title": "" }, { "docid": "5f50ea616b7476e65e11ba2d745172fc", "score": "0.5003016", "text": "public function filter($value, $row = null) {\n $arr = explode(' ', $value);\n return $this->_filter($arr[0], $row);\n }", "title": "" }, { "docid": "a7a3ab7bab1d876b6e1bc14479981725", "score": "0.49838868", "text": "private function _parseResponseHeaders($header) \n\t{\n $headers = array();\n $h = explode(\"\\r\\n\", $header);\n foreach ($h as $header) \n\t\t {\n if (strpos($header, ':') !== false) \n\t\t\t {\n list($type, $value) = explode(\":\", $header, 2);\n if (isset($headers[$type])) \n\t\t\t\t {\n if (is_array($headers[$type])) \n\t\t\t\t\t {\n $headers[$type][] = trim($value);\n }\n else \n\t\t\t\t\t {\n $headers[$type] = array($headers[$type], trim($value));\n }\n\t\t\t\t }\n else \n\t\t\t\t {\n $headers[$type] = trim($value);\n }\n }\n }\n return $headers;\n }", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.49707657", "text": "public function filter($value);", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.49707657", "text": "public function filter($value);", "title": "" }, { "docid": "2630b8f51f217c0f94d0f7597ea5fa4e", "score": "0.49567643", "text": "protected function parseHeader($header)\n {\n $res = preg_match_all('/(?:[^,\"]*+(?:\"[^\"]*+\")?)+[^,\"]*+/', $header, $matches);\n\n if (!$res) {\n throw new InvalidHeader(sprintf('Failed to parse accept header: \"%s\"', $header));\n }\n\n return array_values(array_filter(array_map('trim', $matches[0])));\n }", "title": "" }, { "docid": "9b2e136148f7f74220401fcc7276cf5e", "score": "0.4941973", "text": "public static function sanitizeString($value)\n {\n $flags = FILTER_FLAG_STRIP_LOW;\n return filter_var($value, FILTER_SANITIZE_STRING, $flags);\n }", "title": "" }, { "docid": "ab173cc5b7b570dd02116b08e5993286", "score": "0.49280632", "text": "public function parseHeaderLine($headerLine)\n {\n $headerLine = trim($headerLine, \"\\r\\n\");\n\n if ('' == $headerLine) {\n // empty string signals the end of headers, process the received ones\n if (!empty($this->headers['set-cookie'])) {\n $cookies = is_array($this->headers['set-cookie'])?\n $this->headers['set-cookie']:\n [$this->headers['set-cookie']];\n foreach ($cookies as $cookieString) {\n $this->parseCookie($cookieString);\n }\n unset($this->headers['set-cookie']);\n }\n foreach (array_keys($this->headers) as $k) {\n if (is_array($this->headers[$k])) {\n $this->headers[$k] = implode(', ', $this->headers[$k]);\n }\n }\n\n } elseif (preg_match('!^([^\\x00-\\x1f\\x7f-\\xff()<>@,;:\\\\\\\\\"/\\[\\]?={}\\s]+):(.+)$!', $headerLine, $m)) {\n // string of the form header-name: header value\n $name = strtolower($m[1]);\n $value = trim($m[2]);\n if (empty($this->headers[$name])) {\n $this->headers[$name] = $value;\n } else {\n if (!is_array($this->headers[$name])) {\n $this->headers[$name] = [$this->headers[$name]];\n }\n $this->headers[$name][] = $value;\n }\n $this->lastHeader = $name;\n\n } elseif (preg_match('!^\\s+(.+)$!', $headerLine, $m) && $this->lastHeader) {\n // continuation of a previous header\n if (!is_array($this->headers[$this->lastHeader])) {\n $this->headers[$this->lastHeader] .= ' ' . trim($m[1]);\n } else {\n $key = count($this->headers[$this->lastHeader]) - 1;\n $this->headers[$this->lastHeader][$key] .= ' ' . trim($m[1]);\n }\n }\n }", "title": "" }, { "docid": "aeca889ed5e97604864734492d04c1fb", "score": "0.4917585", "text": "function parseHeaders( $headerString ) {\n\t\t$retVal = array();\n\t\t$fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $headerString ));\n\t\tforeach( $fields as $field ) {\n\t\t\tif( preg_match('/([^:]+): (.+)/m', $field, $match) ) {\n\t\t\t\t$retVal[$match[1]] = trim($match[2]);\n\t\t\t}\n\t\t}\n\t\treturn $retVal;\n\t}", "title": "" }, { "docid": "a5a54d8d3d0679058c259d3c2e41caf5", "score": "0.48809892", "text": "private function is_headerinject($from){\r\n\t\t\treturn pos($var,\"%0D%0A\")||pos($var,\"%0D%0Abcc:\")||pos($var,\"telser\");\r\n\t\t}", "title": "" }, { "docid": "149580ca93f85fd696f5a2f60ae72b37", "score": "0.48645756", "text": "function getHeaders($string)\n{\n if (strpos($string, ':') == false) {\n return null;\n }\n\n $string = stristr($string, \"\\n\", false);\n $string = stristr($string, \"\\n\\r\", true);\n $string = removeFirstChar($string);\n\n $result = array();\n\n while (strpos($string, ':') != false) {\n if (strpos($string, \"\\n\") != false) {\n $substring = stristr($string, \"\\n\", true);\n $substring = removeUnnecessaryCharas($substring);\n $string = stristr($string, \"\\n\", false);\n $string = removeFirstChar($string);\n } else {\n $substring = $string;\n }\n\n $key = stristr($substring, ':', true);\n $value = stristr($substring, ' ', false);\n $value = removeUnnecessaryCharas($value);\n $result[$key] = $value;\n if ($string == $substring) {\n break;\n }\n }\n return $result;\n}", "title": "" }, { "docid": "34a04cb113ff97b2fe8b2e1b6fad287e", "score": "0.48606703", "text": "private function set_excluded_headings($value) {\n\t\t$this->exclude_headings = array_filter(array_map(function($item) {\n\t\t\treturn strtolower(trim($item));\n\t\t}, explode(',', trim($value))));\n\t}", "title": "" }, { "docid": "2ac83d85486d35c567ac774b16e115fe", "score": "0.48534572", "text": "public function setHeadersRaw($value){\n $this->_headers_raw[] = (string) $value;\n return $this;\n }", "title": "" }, { "docid": "fa2931405ae0017c91470f25dde8e61c", "score": "0.48484614", "text": "private function parseHeader($header) {\n if(!empty($header)) {\n $pos = strpos($header, \": \");\n\n if(false !== $pos) {\n $name = substr($header,0,$pos);\n $value = substr($header,$pos+2);\n\n $this->headers[$name] = $value;\n }\n }\n }", "title": "" }, { "docid": "6188e0392ddc2c81d0ac5d09f768081d", "score": "0.48135322", "text": "protected function parseHeader($responseHeader)\n {\n\n $filtered = [];\n\n foreach ((array)$responseHeader as $header) {\n if (stripos($header, 'http/')) {\n $filtered = [];\n }\n $filtered[] = $header;\n }\n\n return $filtered;\n }", "title": "" }, { "docid": "6cd36f0329c8ce2fbb70b469d882690f", "score": "0.4809202", "text": "public function chrFilter($value)\n {\n return chr($value);\n }", "title": "" }, { "docid": "11b3c76ee6fb29d09bd45e608410b7c2", "score": "0.4789751", "text": "private function mFilterHeaders($input) {\r\n //occurence of the assingment (to prevent spoofing), eg. the first From: field.\r\n $return = Array();\r\n $count = count($input);\r\n for ($i=0; $i<$count; $i++) {\r\n $key = $input[$i]['name'];\r\n $val = $input[$i]['value'];\r\n if (!isset($return[$key])) { \r\n $return[$key] = $val; \r\n } else { //field already assigned - detected second+ occurence of an assignment\r\n //flag the message as potentially unsafe (to be discussed)\r\n }\r\n }\r\n return $return;\r\n }", "title": "" }, { "docid": "633b87a67a04d5fc7dfedf4cab130bcf", "score": "0.47873604", "text": "public function filterWithNonStringError()\n {\n Filterer::filter(\n ['fieldOne' => [['strtoupper'], 'error' => new \\StdClass()]],\n ['fieldOne' => 'valueOne']\n );\n }", "title": "" }, { "docid": "5a238cdcc5566a42421a0c314f0b9320", "score": "0.47789606", "text": "public function testPreventsCRLFAttackViaFromString()\n {\n $this->expectException(InvalidArgumentException::class);\n WWWAuthenticate::fromString(\"WWW-Authenticate: xxx\\r\\n\\r\\nevilContent\");\n }", "title": "" }, { "docid": "66e9d9b92241212ee7b344523cd5771e", "score": "0.47747537", "text": "public function testViewsFieldHeaderEscaping() {\n // Test with a field header label having an html element wrapper.\n $this->drupalGet('test_field_header');\n\n // Assert that there are no escaped '<'s characters.\n $this->assertSession()->assertNoEscaped('<');\n\n // Test with a field header label having a XSS test as a wrapper.\n $this->drupalGet('test_field_header_xss');\n\n // Assert that harmful tags are escaped in header label.\n $this->assertSession()->responseNotContains('<script>alert(\"XSS\")</script>');\n }", "title": "" }, { "docid": "46da6e1045b8d3a05c0eaf8ff8591372", "score": "0.47473288", "text": "protected function scanFilter()\n {\n return $this->scanInput('/^:(\\w+)/', 'filter');\n }", "title": "" }, { "docid": "9c10cb5ed76d255f83aaec566648bbcf", "score": "0.474559", "text": "private function trimHeaderValues(array $values)\n {\n return array_map(function ($value) {\n return trim($value, \" \\t\");\n }, $values);\n }", "title": "" }, { "docid": "19f99db7f8b1dd5b441d6c02c02a37e3", "score": "0.47449413", "text": "public function set_header( $name, $value ) {\n\n\t\t$name = sanitize_text_field( $name );\n\n\t\t$this->headers[ $name ] = WP::sanitize_value( $value );\n\t}", "title": "" }, { "docid": "3e83cf92ed71aaae2d2887cb1dcf3c0d", "score": "0.47432047", "text": "function wpdynabox_decode_header($str) {\n $part = preg_split(\"/\\r?\\n/\", $str, -1, PREG_SPLIT_NO_EMPTY);\n $out = array();\n for ($h = 0; $h < sizeof($part); $h++) {\n if ($h != 0) {\n $pos = strpos($part[$h], ':');\n $k = strtolower(str_replace(' ', '', substr($part[$h], 0, $pos)));\n $v = trim(substr($part[$h], ( $pos + 1)));\n } else {\n $k = 'status';\n $v = explode(' ', $part[$h]);\n $v = $v[1];\n }\n\n if ($k == 'set-cookie') {\n $out['cookies'][] = $v;\n } else if ($k == 'content-type') {\n if (( $cs = strpos($v, ';') ) !== false) {\n $out[$k] = substr($v, 0, $cs);\n } else {\n $out[$k] = $v;\n }\n } else {\n $out[$k] = $v;\n }\n }\n return $out;\n}", "title": "" }, { "docid": "e79f115785778df8a224e69904a572f1", "score": "0.47276872", "text": "static function parseHttpHeaders($headers) {\n\t\t$retVal = array ();\n\t\t$fields = explode ( \"\\r\\n\", preg_replace ( '/\\x0D\\x0A[\\x09\\x20]+/', ' ', $headers ) );\n\t\tforeach ( $fields as $field ) {\n\t\t\tif (preg_match ( '/([^:]+): (.+)/m', $field, $match )) {\n\t\t\t\t$match [1] = preg_replace ( '/(?<=^|[\\x09\\x20\\x2D])./e', 'strtoupper(\"\\0\")', strtolower ( trim ( $match [1] ) ) );\n\t\t\t\tif (isset ( $retVal [$match [1]] )) {\n\t\t\t\t\t$retVal [$match [1]] = array (\n\t\t\t\t\t\t\t$retVal [$match [1]],\n\t\t\t\t\t\t\t$match [2] \n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$retVal [$match [1]] = trim ( $match [2] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $retVal;\n\t}", "title": "" }, { "docid": "320b847c73d9cd95f26cfde4b15aa751", "score": "0.472696", "text": "function encodeHeaders() {\n\t\t\t$headers = \"\";\n\t\t\tforeach ($this->headers as $head=>$value) {\n\t\t\t\t$headers .= $head.\": \".$this->EncodeUTF8($value).CRLF;\n\t\t\t}\n\n\t\t\t// Cut out last CRLF.\n\t\t\tif (substr($headers, -1 * strlen(CRLF)) == CRLF) {\n\t\t\t\t$headers = substr($headers, 0, -1 * strlen(CRLF));\n\t\t\t}\n\n\t\t\treturn $headers;\n\t\t}", "title": "" }, { "docid": "4c6d782fe3fde3bd2e5c2c14fe8713ea", "score": "0.4722122", "text": "private function parseIncomingRaw($header)\n {\n $retval = array();\n $content = \"\";\n $fields = explode(\"\\r\\n\", preg_replace('/\\x0D\\x0A[\\x09\\x20]+/', ' ', $header));\n foreach ($fields as $field)\n {\n if (preg_match('/([^:]+): (.+)/m', $field, $match))\n {\n $match[1] = preg_replace_callback('/(?<=^|[\\x09\\x20\\x2D])./',\n function ($matches)\n {\n return strtoupper($matches[0]);\n },\n strtolower(trim($match[1])));\n if (isset($retval[$match[1]]))\n {\n $retval[$match[1]] = array($retval[$match[1]], $match[2]);\n }\n else\n {\n $retval[$match[1]] = trim($match[2]);\n }\n }\n else\n {\n if (preg_match('!HTTP/1\\.\\d (\\d)* .!', $field))\n {\n $retval[\"status\"] = $field;\n }\n else\n {\n $content .= $field . \"\\r\\n\";\n }\n }\n }\n $retval['content'] = $content;\n return $retval;\n }", "title": "" }, { "docid": "074e16ac604590042dce32ef0f4e8d0a", "score": "0.46763077", "text": "function ppFilterText( $parameter ) {\n // Need to call addslashes again as COM_checkHTML stips it out\n $var = COM_checkHTML($parameter);\n $var = COM_checkWords($var);\n $var = COM_killJS($var);\n $var = addslashes($var);\n return $var;\n \n}", "title": "" }, { "docid": "85de120e1657f331e77b7ab7a60e1392", "score": "0.46741754", "text": "function sanitizer($raw_value)\r\n{\r\n return(filter_var($raw_value,FILTER_SANITIZE_STRING));\r\n}", "title": "" }, { "docid": "172d60e549e88322f82f7ab00bb4886d", "score": "0.46724993", "text": "abstract public function filter($value);", "title": "" }, { "docid": "da548609bf71ec6f87e2acdcfd59b0ce", "score": "0.4666756", "text": "function getHeader($ch, $header) {\n $i = strpos($header, ':');\n if (!empty($i)) {\n $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));\n $value = trim(substr($header, $i + 2));\n $this->http_header[$key] = $value;\n }\n return strlen($header);\n }", "title": "" }, { "docid": "0570e6547317929963c411b917eae5b1", "score": "0.46649098", "text": "public function filterAmfRequestHeaderHandler($handler, Amfphp_Core_Amf_Header $header) {\n if ($header->name == Amfphp_Core_Amf_Constants::CREDENTIALS_HEADER_NAME) {\n return $this;\n }\n }", "title": "" }, { "docid": "7b8d2e2a54fc06d97f43392b45d431e9", "score": "0.46508735", "text": "public function spamScrubber($value = '') {\n $notAllowed = array('to:', 'cc:', 'bcc:', 'content-type:', 'mime-version:', 'multipart-mixed:', 'content-transfer-encoding:');\n foreach ($notAllowed as $x) {\n if (stripos($value, $x) != false) {\n return '';\n }\n }\n $value = str_replace(array(\"\\r\", \"\\n\", \"%0a\", \"%0d\"), ' ', $value);\n return trim($value);\n }", "title": "" }, { "docid": "1cfa0bb42b3728d70e0dc028e6c42ca7", "score": "0.46493846", "text": "public function filter($buffer);", "title": "" }, { "docid": "ec75533cb1e41e6663cb66aac4a6f822", "score": "0.46430817", "text": "protected function doTransform($value)\n {\n $regex = '/^\\p{L}[\\p{L} \\'-]+\\p{L}$/u';\n if (!preg_match($regex,$value)) {\n $msg = 'is invalid: only letters, dash, space and apostrophe is permitted';\n throw new T_Exception_Filter($msg);\n }\n return $value;\n }", "title": "" }, { "docid": "593e2ef200e05123e0035296207001ab", "score": "0.46419358", "text": "function getHeader($ch, $header) { \n $i = strpos($header, ':'); \n if (!empty($i)) { \n $key = str_replace('-', '_', strtolower(substr($header, 0, $i))); \n $value = trim(substr($header, $i + 2)); \n $this->http_header[$key] = $value; \n } \n return strlen($header); \n }", "title": "" }, { "docid": "3bb04174b0bfbf47220b145c0f594f45", "score": "0.46286693", "text": "public function filter($value) {\n\n\t\treturn $this->_oPurifier->purify($value);\n\t}", "title": "" }, { "docid": "8f01949a68589cd3655b0ed854fbe408", "score": "0.46283692", "text": "private function check_param($value){\n return trim(strip_tags($value));\n }", "title": "" }, { "docid": "903c2fab9463b762019de81f1cd34ab4", "score": "0.46204615", "text": "private function purgeHtmlCharacters($value)\n {\n if (is_array($value)) {\n return filter_var_array($value, FILTER_SANITIZE_STRING);\n } else {\n return filter_var($value, FILTER_SANITIZE_STRING);\n }\n }", "title": "" }, { "docid": "48d3f96163c4794382300cef00ef726d", "score": "0.46175686", "text": "public function getRawHeader()\n\t{\n\t\t$_header = array();\n\t\tforeach($this->header as $key => $value)\n\t\t{\n\t\t\t$_header[] = $key.\": \".$value;\n\t\t}\n\t\treturn implode($this->headerSeparator, $_header);\n\t}", "title": "" }, { "docid": "9fa4d912f8d097621b1d8cfa02bbac1d", "score": "0.4616955", "text": "function darrens_head_content_filter($content) {\n\t$content = preg_replace('/ media=\"screen, projection\"/i', '', $content);\n\t$content = str_replace(\"\\n\", \"\\n\\t\", $content);\n\t$content = \"\\t\" . $content;\n\t$content = preg_replace('/\\t*<link rel=\"EditURI\" (.)* \\/>\\n*/i', '', $content);\n\t$content = preg_replace('/\\t*<script (.)*\\/wp-includes\\/js\\/l10n\\.js(.)*<\\/script>\\n*\\t*/i', '', $content);\n\treturn $content;\n}", "title": "" }, { "docid": "7445eb088068625ad65fb6153f243634", "score": "0.46147817", "text": "protected function parseAccept($header)\n {\n\n if (!preg_match_all('(\n (?P<value>[a-z*][a-z0-9_/*+.-]*)\n (?:;q=(?P<priority>[0-9.]+))?\n \\\\s*(?:,|$))ix', $header, $matches, PREG_SET_ORDER))\n {\n return false;\n }\n\n $accept = array();\n foreach ($matches as $values)\n {\n if (!isset($values['priority']) || (isset($values['priority']) && $values['priority'] == 1))\n {\n $accept[] = isset($values['value']) ? strtolower($values['value']) : null;\n }\n }\n\n return $accept;\n }", "title": "" }, { "docid": "54224f126d32231efda9781e28bea383", "score": "0.46138465", "text": "public function testPreventsCRLFAttackViaFromString()\n {\n $this->expectException(InvalidArgumentException::class);\n ContentDisposition::fromString(\"Content-Disposition: xxx\\r\\n\\r\\nevilContent\");\n }", "title": "" }, { "docid": "fe179602613669ca4e5ae18f02a3c71c", "score": "0.46121132", "text": "private function header_callback($cr, $header)\n\t{\n\t\t$_header = trim($header);\n\t\t$temp = explode(': ', $_header, 2);\n\n\t\t// set proper headers only\n\t\tif (isset($temp[0]) && isset($temp[1]))\n\t\t\t$this->headers[strtolower($temp[0])] = strtolower(trim($temp[1]));\n\n\t\t// return the length of what was passed unless you want a Failed writing header error ;)\n\t\treturn strlen($header);\n\t}", "title": "" }, { "docid": "3eb745bbdcb447e04669c0e0660cb209", "score": "0.4610527", "text": "private function sanitizeRequest($requestBody) {\n $res = preg_replace('/(password|cvv|last4)=[^&|]*/', '$1=XXXXX', $requestBody);\n $res = preg_replace('/(password|cvv)=\"[^\"]*\"/', '$1=\"XXXXX\"', $res);\n $res = preg_replace('/<card(.*) number=\"[^\"]*\"(.*)>/', '<card$1 number=\"XXXXX\"$2>', $res);\n $res = preg_replace('/(<password>).*(<\\/password>)/', '$1XXXXX$2', $res);\n $res = preg_replace('/(\\[(?:.*password|cvv|last4)\\] => ).*$/m', '$1XXXXX', $res);\n\n return $res;\n }", "title": "" }, { "docid": "ebc03ea707d4ef070df4733635effe93", "score": "0.45988867", "text": "protected function _sanitize($value)\n {\n return preg_replace('/[^a-z0-9\\-]/i', '', $value);\n }", "title": "" }, { "docid": "71c28e67031edb46d572d31ab505a542", "score": "0.45916536", "text": "protected function parseHttpHeader($header)\n {\n $parsedHeader = [];\n foreach (explode(\"\\n\", $header) as $line) {\n $splitLine = preg_split('/:\\s/', $line, 2, PREG_SPLIT_NO_EMPTY);\n\n if (2 == \\count($splitLine)) {\n $k = strtolower(trim($splitLine[0]));\n $v = trim($splitLine[1]);\n if (\\array_key_exists($k, $parsedHeader)) {\n $parsedHeader[$k] = $parsedHeader[$k] . ',' . $v;\n } else {\n $parsedHeader[$k] = $v;\n }\n }\n }\n\n return $parsedHeader;\n }", "title": "" }, { "docid": "4e3e142986fc34c654465c599cdfea67", "score": "0.45784646", "text": "protected function removeBasicCaptureChars($filter)\n {\n return substr($filter, 1, strlen($filter) - 2);\n }", "title": "" }, { "docid": "a573a334560beb5f273194bb8e771b54", "score": "0.4570526", "text": "function parse_filter() {\n if (!empty($this->http_request->params['filter'][0])) {\n $scrubbed_filters = array();\n foreach ($this->http_request->params['filter'] as $filter) {\n preg_match('/^([^:]*:)(.*)$/', $filter, $matches);\n $field = $matches[1];\n\t\t$value = '*';\n\n\t\tif (!empty($matches[2])){\n\t\t\t$value = $matches[2];\t\n\t\t}\n\n // If we have a range filter we don't want to escape the [ TO ]\n // TODO: Should we always be escaping? Not sure...\n if (! preg_match('/^\\[.+ TO/', $value)) {\n $value = solr\\utils::escape_solr_value($value);\n }\n \n // Test for list of id's\n if (($field == \"id:\") && (preg_match(\"/,/\", $value, $match))) {\n \t$ids = explode(\",\", $value);\n \t$id_string = \"\";\n \tforeach($ids as $id) {\n \t\t$id_string .= \"id:$id OR \";\n \t}\n \t// Remove initial \"id:\" and final orphan \" OR \"\n \t$id_string = preg_replace(\"/^id:/\", \"\", $id_string);\n \t$id_string = preg_replace(\"/\\sOR\\s$/\", \"\", $id_string);\n \t$value = $id_string;\n }\n \n // Test for list of collections\n if (($field == \"collection:\") && (preg_match(\"/,/\", $value, $match))) {\n \t$collections = explode(\",\", $value);\n \t$collection_string = \"\";\n \tforeach($collections as $collection) {\n \t\t$collection_string .= \"collection:$collection OR \";\n \t}\n \t// Remove initial \"collection:\" and final orphan \" OR \"\n \t$collection_string = preg_replace(\"/^collection:/\", \"\", $collection_string);\n \t$collection_string = preg_replace(\"/\\sOR\\s$/\", \"\", $collection_string);\n \t$value = $collection_string;\n }\n \n $scrubbed_filters[] = $field . $value;\n }\n $this->solr_data_store_request->params['fq'] = $scrubbed_filters;\n }\n }", "title": "" }, { "docid": "eaf7147587b9b41d923dafc44593965b", "score": "0.45561975", "text": "private function _processHeaders()\n {\n if ($this->options->HEADER) {\n if ($this->_response) {\n if ($this->info->HEADER_SIZE > 0) {\n $this->headers->process(substr($this->_response, 0, $this->info->HEADER_SIZE));\n\n if (!$this->options->NOBODY) {\n $this->_response = substr($this->_response, $this->info->HEADER_SIZE);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "0b087781568bdf2802b20c2fcf79a541", "score": "0.4556174", "text": "public static function cleanString($value)\n {\n if(CrypticBrain::app()->charset == 'UTF-8'){\n return preg_replace('/[^a-zа-яё]+/iu', '', $value);\n }else{\n return preg_replace('/[^a-zа-яё]+/i', '', $value);\n }\n }", "title": "" }, { "docid": "969c10f43a716200b884643108d8a00b", "score": "0.4549994", "text": "public function parseHeaders(){\n\t\t$arResult = array();\n\t\t#\n\t\t$strFields = $this->arProfile['PARAMS']['CUSTOM_EXCEL']['FIELDS'];\n\t\tif(is_null($strFields)){\n\t\t\t$strFields = $this->getDefaultFields();\n\t\t}\n\t\tif(strlen($strFields)){\n\t\t\t$arResult = explode(\"\\n\", $strFields);\n\t\t\tforeach($arResult as $key => $strItem){\n\t\t\t\t$strItem = trim($strItem);\n\t\t\t\tif(strlen($strItem)){\n\t\t\t\t\t$arResult[$key] = $strItem;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tunset($arResult[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$arResult = array_unique($arResult);\n\t\t#\n\t\t$arResultTmp = array();\n\t\tforeach($arResult as $strItem){\n\t\t\t$strCode = \\CUtil::translit($strItem, LANGUAGE_ID, array(\n\t\t\t\t'max_len' => 255,\n\t\t\t\t'change_case' => 'U',\n\t\t\t\t'replace_space' => '_',\n\t\t\t\t'replace_other' => '_',\n\t\t\t\t'delete_repeat_replace' => true,\n\t\t\t));\n\t\t\t$arResultTmp[$strCode] = $strItem;\n\t\t}\n\t\t$arResult = $arResultTmp;\n\t\tunset($arResultTmp);\n\t\t#\n\t\treturn $arResult;\n\t}", "title": "" }, { "docid": "b7347b4a6a0d6248f3d3add04f274ba7", "score": "0.4547453", "text": "public function filter($string);", "title": "" }, { "docid": "4cb42da7dba244e647da006ef7f4e771", "score": "0.454274", "text": "public function filter($value) {\r\n \r\n $value = parent::filter($value);\r\n return strtolower((string) $value); // zend library doesn't lowercase so we have to do it \r\n }", "title": "" }, { "docid": "365e86868a8904bf56fda5a0c0438177", "score": "0.45401067", "text": "function filter($str){\r\n\t//convert case to lower\r\n\t$str = strtolower($str);\r\n\t//remove special characters\r\n\t$str = preg_replace('/[^a-zA-Z0-9]/i',' ', $str);\r\n\t//remove white space characters from both side\r\n\t$str = trim($str);\r\n\treturn $str;\r\n}", "title": "" }, { "docid": "63f1e5e95a3495c0eb044689687443ff", "score": "0.45396933", "text": "function parse_headers($message) {\n $head_end = strpos($message, DOUBLE_ENTER);\n $headers = $this->get_headers_x(substr($message,0,\n $head_end + strlen(DOUBLE_ENTER)));\n if(!is_array($headers) || empty($headers)){\n return null;\n }\n if(!preg_match('%[HTTP/\\d\\.\\d] (\\d\\d\\d)%', $headers[0], $status_code)) {\n return null;\n }\n switch( $status_code[1] ) {\n case '200':\n $parsed = $this->parse_headers(substr($message,\n $head_end + strlen(DOUBLE_ENTER)));\n return is_null($parsed)?$headers:$parsed;\n break;\n default:\n return $headers;\n break;\n }\n }", "title": "" }, { "docid": "360f3ee0573b787f43f2fb3018b0686a", "score": "0.45348346", "text": "public static function _header_line(string $key) { \n $key = strtolower($key);\n return isset(self::$http_headers[$key]) ? implode(\", \", self::$http_headers[$key]) : '';\n}", "title": "" }, { "docid": "2523c1dcc4be61f05f09a2c4aeae88e5", "score": "0.45339108", "text": "public function testFilterMethodWithValidTokenUsingHeaders()\n {\n $encrypter = m::mock('\\Illuminate\\Contracts\\Encryption\\Encrypter');\n $session = m::mock('\\Illuminate\\Session\\SessionInterface');\n $route = m::mock('\\Illuminate\\Routing\\Route');\n $request = m::mock('\\Illuminate\\Http\\Request');\n\n $request->shouldReceive('session')->once()->andReturn($session)\n ->shouldReceive('header')->once()->with('X-XSRF-TOKEN')->andReturn('foobar')\n ->shouldReceive('input')->once()->with('_token')->andReturnNull();\n $encrypter->shouldReceive('decrypt')->once()->with('foobar')->andReturn('a');\n $session->shouldReceive('token')->once()->andReturn('a');\n\n $stub = new VerifyCsrfToken($encrypter);\n\n $this->assertNull($stub->filter($route, $request));\n }", "title": "" }, { "docid": "5c1c6a16949038c106ca5d9fd6c1af43", "score": "0.45305696", "text": "public function cleanHeaders() {\n if (empty($this->headers)) {\n return;\n }\n $driver = $this->mink->getSession()->getDriver();\n if ($driver instanceof BrowserKitDriver) {\n $client = $driver->getClient();\n foreach ($this->headers as $header) {\n $client->removeHeader($header);\n }\n }\n }", "title": "" }, { "docid": "cc114648f39d65a93d6e637b37e8d356", "score": "0.45231888", "text": "public function safeHeaderNames($new_value = null)\n {\n return $this->field('safe_header_names', 'bool', $new_value);\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "69f76b5d62aa195ecad064fb60ea5e3a", "score": "0.0", "text": "public function show($userID)\n {\n $user = User::find($userID);\n return view('pages.common.profile')\n ->with('user', $user);\n }", "title": "" } ]
[ { "docid": "165e2bbcf8f47c0adbed93548f33d6c1", "score": "0.8019291", "text": "public function show(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5e8acc247b28ba8722842dd97070847", "score": "0.74223363", "text": "abstract protected function makeDisplayFromResource();", "title": "" }, { "docid": "cf7a236473d0b19def52419220a82d95", "score": "0.7193305", "text": "public function show(Resource $resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.7159185", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "1981d87b70ebb966cb1a7214c5461ecf", "score": "0.7105166", "text": "function display($resource_name) {\n return include $resource_name;\n }", "title": "" }, { "docid": "815f5613a8189df2880c7c0be463594e", "score": "0.69159317", "text": "public function show(Resource $resource)\n {\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "1be3fb8370513aa7e96f7c3e96fdff88", "score": "0.6462615", "text": "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "title": "" }, { "docid": "bf9855687af595254565be84ecf08da3", "score": "0.6460327", "text": "public function show(Request $request, $resource, $id)\n {\n $command = $this->translator->getCommandFromResource($resource, 'show');\n\n $this->runBeforeCommands($command);\n\n $data = $this->dispatchFrom($command, $request, [\n 'modelClass' => $this->translator->getClassFromResource($resource),\n 'id' => $id\n ]);\n\n $this->fireEventForResource($resource, 'show', $data);\n\n return $this->success($data);\n }", "title": "" }, { "docid": "1cff5c8d606548f28e8af3af4e531294", "score": "0.6286817", "text": "protected function showAction()\n {\n $this->showAction\n ->setAccess($this, Access::CAN_SHOW)\n ->execute($this, NULL, NULL, NULL, __METHOD__)\n ->render()\n ->with(\n [\n 'user_log' => $this->userMeta->unserializeData(\n ['user_id' => $this->thisRouteID()],\n [\n 'login', /* array index 0 */\n 'logout', /* array index 1 */\n 'brute_force', /* index 2 */\n 'user_browser' /* index 3 */\n ]\n )\n ]\n )\n ->singular()\n ->end();\n }", "title": "" }, { "docid": "237d3c90b7035170d5fd20572d1e0dbb", "score": "0.6247061", "text": "public function display( Response $response );", "title": "" }, { "docid": "1e1b2e6a47cd86a471b2f6e43a786d4f", "score": "0.6238523", "text": "public function testShowResourceReturnsTheCorrectResource()\n {\n $items = factory(Item::class, 10)->create();\n $item = $items->get(6);\n\n $this->call('GET', sprintf('/api/v1/item/%s', $item->id));\n\n $this->seeJson([\n 'id' => $item->id,\n 'name' => $item->name,\n ]);\n }", "title": "" }, { "docid": "1b943006f882cdea6214d3238f5094bb", "score": "0.61226845", "text": "public function display($id);", "title": "" }, { "docid": "988fc9380f55f5086ebf1ea38e63511d", "score": "0.61054146", "text": "public function operate()\n {\n echo $this->resource.\"\\n\";\n }", "title": "" }, { "docid": "9cd2c7f88d644fa456e7453c3bb610d2", "score": "0.6069253", "text": "function show()\n {\n $this->display();\n }", "title": "" }, { "docid": "31c91777927cb1b0555e264f1cece7a9", "score": "0.6053162", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array('id' => array('HtmlEntities', 'StripTags', 'StringTrim')); \n $validators = array('id' => array('NotEmpty', 'Int'));\n\n // test if input is valid retrieve requested record attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams()); \n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.60360175", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "9c46cbbf718572f41d5fb18cb85408df", "score": "0.60352117", "text": "public function viewName($resource)\n {\n return $this->name.'::'.$resource;\n }", "title": "" }, { "docid": "4157890d7ce997c99fc951f60a368f8a", "score": "0.6034318", "text": "public function showResource()\n {\n return new ParceiroResource(Parceiro::find(2));\n }", "title": "" }, { "docid": "5f890361bf8d16515c9463c62dee48f3", "score": "0.602238", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/User/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "4b6584e73c632121e7d29d1a53288f08", "score": "0.600146", "text": "public function show(Request $request ,$id){\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])) {\n $resource = $request->session()->get('resources')[$id];\n $data = [];\n $data['resource'] = $resource;\n $data['enterprise'] = 'Resources Ltd.';\n \n return view('resource.show', $data); \n \n }\n \n return redirect('resource');\n \n }", "title": "" }, { "docid": "f4584c6fbf6732a4cc30c153518eac85", "score": "0.5962682", "text": "function displayResource($file) {\n\tglobal $mosConfig_lang;\n\t$file_lang = migratorBasePath() . '/resources/' . $file . '.' . $mosConfig_lang . '.html';\n\t$file = migratorBasePath() . '/resources/' . $file . '.english.html';\n\tif (file_exists($file_lang)) {\n\t\techo '<div align=\"left\" style=\"border: 1px solid black; padding: 5px; \">';\n\t\tinclude ($file_lang);\n\t\techo '</div>';\n\t} else if (file_exists($file)) {\n\t\techo '<div align=\"left\" style=\"border: 1px solid black; padding: 5px; \">';\n\t\tinclude ($file);\n\t\techo '</div>';\n\t}\n\telse\n\t\tdie(_BBKP_CRITINCLERR . $file);\n\techo __VERSION_STRING;\n}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.59581137", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "51df0e59505572a08a6c3c4ea6558bb4", "score": "0.5942475", "text": "public function showAction()\n\t{\n\t\t$this->loadLayout()->renderLayout();\n\t}", "title": "" }, { "docid": "d0d1f283ce410ec0d9c7e82af4062258", "score": "0.59333754", "text": "public function display(WebResource $res) {\n $view = $res->getView() ?: array();\n switch(count($view)) {\n case 0:\n case 1:\n $viewType = Config::get('view.defaultViewType', 'json');\n break;\n default:\n $viewType = $view[0];\n break;\n }\n $viewMappings = Config::get('view.mappings');\n if (!isset($viewMappings[$viewType])) {\n throw new Exception(\n \"Could not render view by type $viewType\",\n Exception::CODE_PRETTY_VIEW_NOTFOUND);\n }\n $viewName = $viewMappings[$viewType];\n $view = $this->classLoader->load($viewName, true);\n if (!$view) {\n throw new Exception(\"Could not render view by $viewName, view class not found.\",\n Exception::CODE_PRETTY_CLASS_NOTFOUND);\n }\n $view->render($res);\n }", "title": "" }, { "docid": "9c9f166dfbd4a1117126f1616068d929", "score": "0.590676", "text": "public function displayAction()\n {\n\n $domainName = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST');\n\n $shortenUrl = $this->urlRepository->findShortUrlByPage($this->currentPage);\n\n if (empty($shortenUrl)) {\n $shortenUrl = $this->generateShortUrl();\n }\n\n $this->view\n ->assign('display', $shortenUrl)\n ->assign('domain', $domainName);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e45bfcde7a17ab2a4f6f9e2caad01271", "score": "0.5883924", "text": "function display()\n\t{\n\t\t// Set a default view if none exists\n\t\tif ( ! JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar('view', 'category' );\n\t\t}\n\n\t\t$layout = JRequest::getCmd( 'layout' );\n\n\t\tif ($layout == 'form') {\n\t\t\tJError::raiseError( 404, JText::_(\"Resource Not Found\") );\n\t\t\treturn;\n\t\t}\n\n\t\t$view = JRequest::getVar('view');\n\n\t\tparent::display(true);\n\t}", "title": "" }, { "docid": "6f20a1779e33227cfc4451ace6ab29af", "score": "0.5864878", "text": "public function edit(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e278522937d7847767c9d2ff92455995", "score": "0.5863409", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams()); \n \n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Tripjacks_Model_News i')\n ->where('i.newsid = ?', $input->id);\n\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->news = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "8c62873548eaa44202c0ae405fd7d4b3", "score": "0.58593535", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n $this->prepareLines($resource, $attribute);\n }", "title": "" }, { "docid": "bf80668121276aa95e552b7e16de0410", "score": "0.58592206", "text": "public function display() \n\t{\n\t\t\n\t\tparent::display(); \n\t}", "title": "" }, { "docid": "f0ce504b8c6c28b59b1b83da05a1e7ee", "score": "0.58354145", "text": "public function show($imageResource) {\n\t\theader('Content-type: image/png');\n\t\theader('Content-disposition: inline');\n\t\timagepng($imageResource, null, 0);\n\t}", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "bcb7bd8aa9f807e36423f26674169bf6", "score": "0.5785241", "text": "public static function resource($resource, $controller, $options) {\n \n }", "title": "" }, { "docid": "06a412168984820a16a8be534a2d85f1", "score": "0.57841134", "text": "public function display()\n\t{\n\t\theader('Content-type: image/png');\n\t\timagepng($this->_imageResource , null , 5 );\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "2543e47f21a6d16ac7911a7ed2e24588", "score": "0.5771402", "text": "public function showAction()\n {\n //loads the artist\n $artist = $this->_getArtistById($this->_getParam('id'));\n \n //sends it to the view\n $this->view->artist = $artist;\n \n //loads and sends its albums to the view\n $this->view->albums = $artist->findDependentRowset('Model_Album');\n }", "title": "" }, { "docid": "a1ebeebfc498c76d0c8996e04e37ac78", "score": "0.5764601", "text": "public function show(){\n $this->init();\n $this->load(self::class);\n }", "title": "" }, { "docid": "41311b65a90295f931830bf21bc118c5", "score": "0.57608664", "text": "public function DisplayResources($resource_IDs) {\n \n //Variables for the pagination\n $limit_offset = $this->CPagination->limit_offset;\n $limit_maxNumRows = $this->CPagination->limit_maxNumRows;\n \n //Get resources\n $result = $this->MDatabase->GetResources((int) $limit_offset, (int) $limit_maxNumRows, $resource_IDs);\n \n //If nothing is returned, say so and end here\n if(!$result) {\n echo 'No results.';\n return;\n }\n \n //Initiate the variable that will contain all the output\n $output = '';\n \n //Display the resources one by one\n while($row = $result->fetch_array()) {\n $output .= '<div class=\"resource\">';\n \n $title = htmlspecialchars($row['title']);\n $resource_type = htmlspecialchars($row['resource_type']);\n $description = htmlspecialchars($row['description']);\n $publishing_date = htmlspecialchars($row['publishing_date']);\n \n $output .= \"<h3>\" . $title . \"</h3>\";\n $output .= \"<table class='resource_info'><tbody>\";\n $output .= \"<tr>Type: \" . ucwords(strtolower($resource_type)) . '</tr>';\n $output .= ' <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"#\" class=\"tooltip\">'\n . '<img src=\"img/information-icon-small.png\">'\n . '<span><img class=\"callout\" src=\"img/callout_black.gif\" />'\n . '<strong>Description</strong><br />' . $this->Parsedown->text($description)\n . '</span></a></tr>';\n \n /* Get and display the URLs */\n $output .= $this->DisplayURLs((int) $row['resource_id']); \n \n //Clear the float\n $output .= '<div class=\"clear\"></div>';\n \n /* Display the publishing date, if it exists */\n $output .= $publishing_date ? \"<tr>Publishing Date: {$publishing_date}</tr>\" : '';\n \n /* Get and display the authors */\n $output .= $this->DisplayAuthors((int) $row['resource_id']);\n\n /* Get and display the keywords */\n $output .= $this->DisplayKeywords((int) $row['resource_id']);\n \n $output .= '</div>'; //close the class=\"resource\" div\n }\n \n echo $output;\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "e9b2cd8fa004ddb7b0d9e03744f3126f", "score": "0.57506883", "text": "public function display()\n {\n $return = $this->fetch();\n echo $return;\n }", "title": "" }, { "docid": "2c3490c6d6b2073fd195968f652e07c5", "score": "0.57488596", "text": "public function render()\n {\n $rows = $this->resource->model()::all();\n\n $title = Str::of($this->resource->name())->plural();\n\n return view('moon::resources.index', [\n 'title' => $title,\n 'columns' => $this->resource->columns(),\n 'rows' => $rows\n ])->layout('moon::layouts.app', ['title' => $title]);\n }", "title": "" }, { "docid": "b817fe8afcad697af904cbcdb8688cef", "score": "0.57483834", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AVBundle:Reto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Reto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AVBundle:Reto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c0a70a08a2849ac13def6ed6304e58da", "score": "0.5743798", "text": "public function show(): UserResource\n {\n return $this->repository->show();\n }", "title": "" }, { "docid": "c952768f11b98a6aed12e59d779b7efa", "score": "0.57387173", "text": "public function display() { echo $this->render(); }", "title": "" }, { "docid": "9aee1654836904270de00365634a70fd", "score": "0.57323885", "text": "protected function show($param) {\n $method = 'show_' . $param;\n if (method_exists($this, $method)) {\n $this->$method();\n } else {\n $this->error('Invalid command argument!');\n $this->help();\n }\n }", "title": "" }, { "docid": "c7ce15d35acae8f764d0adba3a337cb0", "score": "0.57273036", "text": "public function display($file) \n {\n echo $this->fetch($file); \n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7fa9265465a0729600bbbce97f9e8303", "score": "0.57220465", "text": "function render(Request $Req, Response $Res, $resource);", "title": "" }, { "docid": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "3635f9e6312e7f3ef2e689432f8a3312", "score": "0.5705637", "text": "public function show( Patient $patient ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "a042815ce2283cc6c3688042abe87a56", "score": "0.56963277", "text": "public function show($id)\n\t{\n\t\t//\n \n \n\t}", "title": "" }, { "docid": "5bc1d8742885bcbc1dc675e2bcd69dd2", "score": "0.56894034", "text": "public function display(midgardmvc_core_request $request);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
697e61492d5bebfe8bd6bc41a6055cd0
Sorts indexes by priority
[ { "docid": "58e41bfacf0f7d5fd68d9acf14d3b5e6", "score": "0.6003776", "text": "public function sortIndexesByPriority(array $aIndexes): array\n {\n usort(\n $aIndexes,\n fn(Index $a, Index $b) => $a::getPriority() <=> $b::getPriority()\n );\n return $aIndexes;\n }", "title": "" } ]
[ { "docid": "9db3253c9de6351911651054fcb12130", "score": "0.7105264", "text": "protected function sort() {\r\n\t\tif (! $this->dirtyIndex) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$newIndex = array ();\r\n\t\t$index = 0;\r\n\t\t\r\n\t\tforeach ( $this->pages as $hash => $page ) {\r\n\t\t\t$order = $page->getOrder ();\r\n\t\t\tif ($order === null) {\r\n\t\t\t\t$newIndex [$hash] = $index;\r\n\t\t\t\t$index ++;\r\n\t\t\t} else {\r\n\t\t\t\t$newIndex [$hash] = $order;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tasort ( $newIndex );\r\n\t\t$this->index = $newIndex;\r\n\t\t$this->dirtyIndex = false;\r\n\t}", "title": "" }, { "docid": "bf48e893e2a9851b4838348b2939d8cf", "score": "0.6658772", "text": "function facetapi_sort_indexed(array $a, array $b) {\n $a_value = (isset($a['#indexed_value'])) ? $a['#indexed_value'] : '';\n $b_value = (isset($b['#indexed_value'])) ? $b['#indexed_value'] : '';\n if ($a_value == $b_value) {\n return 0;\n }\n return ($a_value < $b_value) ? -1 : 1;\n}", "title": "" }, { "docid": "8f0083248daecc736f71f72dfc990dcc", "score": "0.6148407", "text": "public function doSorting();", "title": "" }, { "docid": "300512a2e957d67b449a292155b011a1", "score": "0.60701126", "text": "public function sort();", "title": "" }, { "docid": "7384896f133ce93572257fbb50f60e4c", "score": "0.6058821", "text": "public function sortWithSortKeys( $arr ) {}", "title": "" }, { "docid": "d6b0425f53cf3f0b4f95f16434fabd8f", "score": "0.59717184", "text": "public function defaultSortCriterias();", "title": "" }, { "docid": "5dd9617824d575cebe295eeabd41aeea", "score": "0.5968514", "text": "public function krsort($sortFlags = SORT_REGULAR);", "title": "" }, { "docid": "5099abb5f501848e8142c085ab14d724", "score": "0.5952475", "text": "public function orderIndexes() {\n $result = $this->orderElements($this->indexes);\n if ($result) {\n $this->setIndexes($result);\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "e04b5a0ed03de183b1b9a3e9b362337e", "score": "0.5865945", "text": "public function sort( $arr, $sort_flags ) {}", "title": "" }, { "docid": "96eb3071c82ed7590a7cf2dab786ce7d", "score": "0.5863888", "text": "public function sortCriterias();", "title": "" }, { "docid": "e73b61c9a74972a3eb078b0cdb8638e7", "score": "0.58503497", "text": "public function sort ();", "title": "" }, { "docid": "d29709f511f9b253b66865376756005e", "score": "0.5817032", "text": "public function getSortOrder();", "title": "" }, { "docid": "4f02cbe0d3d6a9b8399c5b999b607d4f", "score": "0.58112454", "text": "public function asort( $arr, $sort_flags ) {}", "title": "" }, { "docid": "0b7d37917854fc61ddda79433d9b133f", "score": "0.57755905", "text": "public function sort(): void\n {\n ksort($this->map);\n }", "title": "" }, { "docid": "6dbf21003c138a188eafebe4483be0e0", "score": "0.57722414", "text": "function collator_asort( $coll, $arr, $sort_flags ) {}", "title": "" }, { "docid": "ec7de541b80ef721ca0810c9f042265a", "score": "0.5754436", "text": "function c4m_search_sort_taxonomy(array $a, array $b) {\n $a_count = (isset($a['#taxonomy_weight'])) ? $a['#taxonomy_weight'] : 0;\n $b_count = (isset($b['#taxonomy_weight'])) ? $b['#taxonomy_weight'] : 0;\n if ($a_count == $b_count) {\n return 0;\n }\n return ($a_count < $b_count) ? -1 : 1;\n}", "title": "" }, { "docid": "0e08a3a0b305bbdb5b57be45f673f30f", "score": "0.57194793", "text": "function collator_sort_with_sort_keys( $coll, $arr ) {}", "title": "" }, { "docid": "dab41f7fab1f4768528a2a8e7d803634", "score": "0.56611234", "text": "function sortByOrder($a, $b) {\n\treturn $a['priority'] - $b['priority'];\n}", "title": "" }, { "docid": "c6fc1170deea2f1483c435f6fc4af2e0", "score": "0.5650315", "text": "function dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)\n{\n\t// Clean parameters\n\t$order=strtolower($order);\n\n\t$sizearray=count($array);\n\tif (is_array($array) && $sizearray>0)\n\t{\n\t\t$temp = array();\n\t\tforeach(array_keys($array) as $key) $temp[$key]=$array[$key][$index];\n\n\t\tif (!$natsort) ($order=='asc') ? asort($temp) : arsort($temp);\n\t\telse\n\t\t{\n\t\t\t($case_sensitive) ? natsort($temp) : natcasesort($temp);\n\t\t\tif($order!='asc') $temp=array_reverse($temp,TRUE);\n\t\t}\n\n\t\t$sorted = array();\n\n\t\tforeach(array_keys($temp) as $key)\n\t\t{\n\t\t\t(is_numeric($key) && empty($keepindex)) ? $sorted[]=$array[$key] : $sorted[$key]=$array[$key];\n\t\t}\n\n\t\treturn $sorted;\n\t}\n\treturn $array;\n}", "title": "" }, { "docid": "34e2513808961c675f4c12185e67e3f7", "score": "0.5643657", "text": "function profiler_components_sort($a, $b) {\n $a = (array)$a + array('weight' => 0);\n $b = (array)$b + array('weight' => 0);\n return $a['weight'] < $b['weight'] ? -1 : 1;\n}", "title": "" }, { "docid": "144118874e9404c7ed0af2716dcfe0ad", "score": "0.56327194", "text": "static public function sortActions($x, $y)\n\t\t{\n\t\t\tif($x['priority'] == $y['priority']){return 0;}\n\t\t\treturn ($x > $y) ? 1 : -1;\n\t\t}", "title": "" }, { "docid": "d5806f6747f2b51ef787dd6adffaeab6", "score": "0.56303984", "text": "function collator_sort( $coll, $arr, $sort_flags ) {}", "title": "" }, { "docid": "9755af7135dc112248ea75b676eedec0", "score": "0.5623578", "text": "public function ksort($sortFlags = SORT_REGULAR);", "title": "" }, { "docid": "3798235b0beec3f29ad0e1eec5d169f3", "score": "0.5608587", "text": "protected function applyColumnsSort()\n\t{\n\t\tif (count($this->getShowedColumnsList()) > 0)\n\t\t{\n\t\t\t$this->arResult[\"COLUMNS\"] = array();\n\n\t\t\tforeach ($this->getShowedColumnsList() as $key => $item)\n\t\t\t{\n\t\t\t\t$this->arResult[\"COLUMNS\"][$item] = $this->arResult[\"COLUMNS_ALL\"][$item];\n\t\t\t\t$this->arResult[\"COLUMNS\"][$item][\"sort_index\"] = $key;\n\t\t\t}\n\n\t\t\tCollection::sortByColumn($this->arResult[\"COLUMNS\"], [\n\t\t\t\t\"sticked\" => SORT_DESC,\n\t\t\t\t\"sort_index\" => SORT_ASC\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "862b187e0fb2cae83c9d13c213a10a84", "score": "0.56064343", "text": "public function sort()\n\t\t{\n\t\t}", "title": "" }, { "docid": "8eb918e6ce76340cee2a22450bfb9c8b", "score": "0.5601016", "text": "public function sortie()\n {\n $this->index(1);\n }", "title": "" }, { "docid": "16f9558ca4f352882ba963f10030fd26", "score": "0.55679154", "text": "public function sort()\n {\n $buckets = [\n 'up_numeric' => [],\n 'up' => [],\n 'index' => [],\n 'numeric' => [],\n 'normal' => [],\n 'down_numeric' => [],\n 'down' => [],\n ];\n\n foreach ($this->children as $key => $entry) {\n $name = $entry->getNameForSort();\n\n if (!$name) {\n continue;\n }\n\n if ($name == 'index' || $name == '_index') {\n $buckets['index'][$key] = $entry;\n\n continue;\n }\n\n if ($name[0] == '-') {\n if (is_numeric($name[1])) {\n $exploded = explode('_', $name);\n $buckets['down_numeric'][abs((int) substr($exploded[0], 1))][$key] = $entry;\n\n continue;\n }\n\n $buckets['down'][$key] = $entry;\n\n continue;\n }\n\n if ($name[0] == '+') {\n if (is_numeric($name[1])) {\n $exploded = explode('_', $name);\n $buckets['up_numeric'][abs((int) substr($exploded[0], 1))][$key] = $entry;\n\n continue;\n }\n\n $buckets['up'][$key] = $entry;\n\n continue;\n }\n\n if (is_numeric($name[0])) {\n $exploded = explode('_', $name);\n $buckets['numeric'][abs((int) $exploded[0])][$key] = $entry;\n\n continue;\n }\n\n $buckets['normal'][$key] = $entry;\n }\n\n $final = [];\n foreach ($buckets as $name => $bucket) {\n if (substr($name, -7) == 'numeric') {\n ksort($bucket);\n foreach ($bucket as $subBucket) {\n $final = $this->sortBucket($subBucket, $final);\n }\n } else {\n $final = $this->sortBucket($bucket, $final);\n }\n }\n\n $this->children = $final;\n }", "title": "" }, { "docid": "79cd9d3d2c138477599e1fc38934fd48", "score": "0.55608356", "text": "function sort_array(&$array, $orderby)\n{\n $count = count($array);\n $keys = array_keys($orderby);\n for($i = 0; $i < $count; $i++)\n {\n for($j = $i; $j < $count; $j++)\n {\n $key = $keys[0];\n $item1 = $array[$i][$key];\n if(is_array($item1))\n {\n $item1 = $item1[0];\n }\n $item2 = $array[$j][$key];\n if(is_array($item2))\n {\n $item2 = $item2[0];\n }\n $data = strcasecmp($item1, $item2);\n switch($orderby[$keys[0]])\n {\n case 1:\n if($data > 0)\n {\n swap($array, $i, $j);\n }\n break;\n case 0:\n if($data < 0)\n {\n swap($array, $i, $j);\n }\n break;\n }\n }\n }\n}", "title": "" }, { "docid": "7b5a7affc78474330935a81c04798258", "score": "0.5540312", "text": "public function natsort()\n {\n return $this->callOnReference( 'natsort' );\n }", "title": "" }, { "docid": "66bc6e1bc20cabcf935e0f7e32cfa378", "score": "0.5521928", "text": "function perfSort($a, $b)\n{\n\t\tif($a[\"perf_id\"] < $b[\"perf_id\"])\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn -1;\n}", "title": "" }, { "docid": "97bcdf1bd214a36513d9f2c7cb83639c", "score": "0.5518554", "text": "public function sortByPriority( )\n {\n usort( $this->pages, function( $a, $b ) {\n /** @var Page $a */\n $a = $a->getPriority( );\n /** @var Page $b */\n $b = $b->getPriority( );\n if ($a == $b) {\n return 0;\n }\n return ($a > $b) ? -1 : 1;\n } );\n }", "title": "" }, { "docid": "4c368c41eaf7d185ef33a03544260afb", "score": "0.5488675", "text": "public function sort()\n\t{\n\t\t// Sorting\n\t\tasort($this->_all_begin);\n\t\tasort($this->_all_general);\n\t\tasort($this->_all_end);\n\n\t\t// The easy ones: just merge\n\t\t$all_entities = array_merge(\n\t\t\t$this->_all_begin,\n\t\t\t$this->_all_general,\n\t\t\t$this->_all_end\n\t\t);\n\n\t\t// Now the funny part, let's start with some cleanup: collecting all the entities we know and pruning those that cannot be placed somewhere\n\t\t$all_known = array_merge(array_keys($all_entities), array_keys($this->_all_after), array_keys($this->_all_before));\n\n\t\t$all = array(\n\t\t\t'before' => array(),\n\t\t\t'after' => array()\n\t\t);\n\n\t\tforeach ($this->_all_before as $key => $value)\n\t\t{\n\t\t\tif (in_array($value, $all_known))\n\t\t\t{\n\t\t\t\t$all['before'][$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->_all_after as $key => $value)\n\t\t{\n\t\t\tif (in_array($value, $all_known))\n\t\t\t{\n\t\t\t\t$all['after'][$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// This is terribly optimized, though it shouldn't loop over too many things (hopefully)\n\t\t// It \"iteratively\" adds all the after/before entities shifting priority\n\t\t// of all the other entities to ensure each one has a different value\n\t\twhile (!empty($all['after']) || !empty($all['before']))\n\t\t{\n\t\t\tforeach (array('after' => 1, 'before' => -1) as $where => $inc)\n\t\t\t{\n\t\t\t\tif (empty($all[$where]))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ($all[$where] as $entity => $reference)\n\t\t\t\t{\n\t\t\t\t\tif (isset($all_entities[$reference]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$priority_threshold = $all_entities[$reference];\n\t\t\t\t\t\tforeach ($all_entities as $key => $val)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tswitch ($where)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase 'after':\n\t\t\t\t\t\t\t\t\tif ($val <= $priority_threshold)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$all_entities[$key] -= $inc;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'before':\n\t\t\t\t\t\t\t\t\tif ($val >= $priority_threshold)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$all_entities[$key] -= $inc;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunset($all[$where][$entity]);\n\t\t\t\t\t\t$all_entities[$entity] = $priority_threshold;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasort($all_entities);\n\t\t$this->_sorted_entities = array_keys($all_entities);\n\n\t\treturn $all_entities;\n\t}", "title": "" }, { "docid": "7a86aa2408f3a1767bea0c34bf9f1a09", "score": "0.5445506", "text": "protected function _sort()\n {\n if ($this->_groupUpdated || !is_array($this->_elementOrder)) {\n $elementOrder = [];\n foreach ($this->getElements() as $key => $element) {\n $elementOrder[$key] = $element->getOrder();\n }\n\n $items = [];\n $index = 0;\n foreach ($elementOrder as $key => $order) {\n if (null === $order) {\n while (array_search($index, $elementOrder, true)) {\n ++$index;\n }\n $items[$index] = $key;\n ++$index;\n } else {\n $items[$order] = $key;\n }\n }\n\n $items = array_flip($items);\n asort($items);\n $this->_elementOrder = $items;\n $this->_groupUpdated = false;\n }\n }", "title": "" }, { "docid": "19f8c69da5ee00f0f0e664869a992bc7", "score": "0.5441188", "text": "function sortByIndex($records, $field, $reverse = false)\n{\n $hash = array();\n \n foreach($records as $record)\n $hash[$record[$field]] = $record;\n \n ($reverse) ? krsort($hash) : ksort($hash);\n \n $records = array();\n \n foreach($hash as $record)\n $records []= $record;\n \n return $records;\n}", "title": "" }, { "docid": "ce2c5a1453c3c2732095460596533507", "score": "0.54200137", "text": "function _sort_by_scores(&$tree) {\r\n uasort($tree, function($a, $b) {\r\n if ($a['#score'] == $b['#score']) {\r\n return 0;\r\n }\r\n return ($a['#score'] > $b['#score']) ? -1 : 1;\r\n });\r\n}", "title": "" }, { "docid": "d499802a303ea418edb40513688642fd", "score": "0.5398178", "text": "protected function setupSortOrder()\n\t{\n\n\t\t// Check for Ctrl pressed\n\t\t$ctrl = Get(\"ctrl\") !== NULL;\n\n\t\t// Check for \"order\" parameter\n\t\tif (Get(\"order\") !== NULL) {\n\t\t\t$this->CurrentOrder = Get(\"order\");\n\t\t\t$this->CurrentOrderType = Get(\"ordertype\", \"\");\n\t\t\t$this->updateSort($this->idProcess, $ctrl); // idProcess\n\t\t\t$this->updateSort($this->idCause, $ctrl); // idCause\n\t\t\t$this->updateSort($this->potentialCauses, $ctrl); // potentialCauses\n\t\t\t$this->updateSort($this->currentPreventiveControlMethod, $ctrl); // currentPreventiveControlMethod\n\t\t\t$this->updateSort($this->severity, $ctrl); // severity\n\t\t\t$this->updateSort($this->occurrence, $ctrl); // occurrence\n\t\t\t$this->updateSort($this->currentControlMethod, $ctrl); // currentControlMethod\n\t\t\t$this->updateSort($this->detection, $ctrl); // detection\n\t\t\t$this->updateSort($this->RPNCalc, $ctrl); // RPNCalc\n\t\t\t$this->updateSort($this->recomendedAction, $ctrl); // recomendedAction\n\t\t\t$this->updateSort($this->idResponsible, $ctrl); // idResponsible\n\t\t\t$this->updateSort($this->targetDate, $ctrl); // targetDate\n\t\t\t$this->updateSort($this->revisedKc, $ctrl); // revisedKc\n\t\t\t$this->updateSort($this->expectedSeverity, $ctrl); // expectedSeverity\n\t\t\t$this->updateSort($this->expectedOccurrence, $ctrl); // expectedOccurrence\n\t\t\t$this->updateSort($this->expectedDetection, $ctrl); // expectedDetection\n\t\t\t$this->updateSort($this->expectedRPNPAO, $ctrl); // expectedRPNPAO\n\t\t\t$this->updateSort($this->expectedClosureDate, $ctrl); // expectedClosureDate\n\t\t\t$this->updateSort($this->recomendedActiondet, $ctrl); // recomendedActiondet\n\t\t\t$this->updateSort($this->idResponsibleDet, $ctrl); // idResponsibleDet\n\t\t\t$this->updateSort($this->targetDatedet, $ctrl); // targetDatedet\n\t\t\t$this->updateSort($this->kcdet, $ctrl); // kcdet\n\t\t\t$this->updateSort($this->expectedSeveritydet, $ctrl); // expectedSeveritydet\n\t\t\t$this->updateSort($this->expectedOccurrencedet, $ctrl); // expectedOccurrencedet\n\t\t\t$this->updateSort($this->expectedDetectiondet, $ctrl); // expectedDetectiondet\n\t\t\t$this->updateSort($this->expectedRPNPAD, $ctrl); // expectedRPNPAD\n\t\t\t$this->updateSort($this->revisedClosureDatedet, $ctrl); // revisedClosureDatedet\n\t\t\t$this->updateSort($this->revisedSeverity, $ctrl); // revisedSeverity\n\t\t\t$this->updateSort($this->revisedOccurrence, $ctrl); // revisedOccurrence\n\t\t\t$this->updateSort($this->revisedDetection, $ctrl); // revisedDetection\n\t\t\t$this->updateSort($this->revisedRPNCalc, $ctrl); // revisedRPNCalc\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "1b783101da3379d66ad2645bd3735b29", "score": "0.5362474", "text": "function sort_matches_asc($left,$right) {\r\n global $sortkey;\r\n if(strtolower($left[\"$sortkey\"])==strtolower($right[\"$sortkey\"])) return 0;\r\n return strtolower($left[\"$sortkey\"]) < strtolower($right[\"$sortkey\"]) ? -1 : 1 ;\r\n}", "title": "" }, { "docid": "6fe08dc9ea707b6337e27ee03e670014", "score": "0.5353779", "text": "abstract public function sorts(): array;", "title": "" }, { "docid": "d7c23621d7feb0c8460e8cb62b173c17", "score": "0.5324115", "text": "protected function priority_sort( $a, $b ) {\n\n\t\tif ( $a->priority === $b->priority )\n\t\t\treturn $a->instance_number - $b->instance_number;\n\n\t\treturn $a->priority - $b->priority;\n\t}", "title": "" }, { "docid": "0e90557ec648380c3256762adfaeb15a", "score": "0.5308867", "text": "public function getDefaultSort()\n {\n return array('id', 'desc');\n }", "title": "" }, { "docid": "d0f09430c8f2d7a8b57505be9b7fc396", "score": "0.53073585", "text": "public function sort()\n\t{\n\t}", "title": "" }, { "docid": "b61bf252110b950fa5dc1d91c030c0b0", "score": "0.530624", "text": "public function u_sort(){usort($this->content, array(\"Html4_Ext_TD\", \"compare\"));}", "title": "" }, { "docid": "c008bcd916381b55a34794b9e5b52f5b", "score": "0.5304633", "text": "function wpmm_sort_by_order( $a, $b ) {\r\n\r\n if ($a['order'] == $b['order']) {\r\n return 1;\r\n }\r\n return ($a['order'] < $b['order']) ? -1 : 1;\r\n\r\n }", "title": "" }, { "docid": "f17c1c94a20f215a97f41a052cd5dcf9", "score": "0.5296325", "text": "function myScoreSort($a, $b) {\n \t\t\treturn ((int)$a['score']) > ((int)$b['score']) ? -1 : 1; //Compare the scores\n\t\t\t}", "title": "" }, { "docid": "5d0f9cbd1f07a6c25497f801d258de96", "score": "0.52861714", "text": "public function getNodeOrderBy();", "title": "" }, { "docid": "61d54ffe2cce4a0a5c702e930ee1adef", "score": "0.5281639", "text": "function cmpi($a, $b) \n { \n global $sort_field; \n return strcmp($a[$sort_field], $b[$sort_field]); \n }", "title": "" }, { "docid": "10ce2bdbbe72dc46ad90a70dbeeec2ce", "score": "0.52814287", "text": "public function getCompleteSorts() {\n\t\t//return array(array('field'=>'lastname','dir'=>'ASC'));\n\t\treturn $this->getSorts();\n\t}", "title": "" }, { "docid": "946c41f045a2c6813a2e459d15d97df0", "score": "0.5272592", "text": "private function sortItems() {\n usort($this->items, function($a, $b) {\n if ($a['sort'] == $b['sort']) {\n return 0;\n }\n return ($a['sort'] < $b['sort']) ? -1 : 1;\n });\n }", "title": "" }, { "docid": "3902ebc6dc0bee257763a8d6b71ddbd7", "score": "0.52716815", "text": "function getSort(){\n return 999;\n }", "title": "" }, { "docid": "fa970b5a38eedec5a78c5480aa236a71", "score": "0.52676", "text": "public function sort(): void\n {\n $this->list->sort();\n $this->update();\n }", "title": "" }, { "docid": "4d476306384b382544ec5b14b6529aec", "score": "0.52669513", "text": "public function getSortMenuSorts();", "title": "" }, { "docid": "57144200be313bc971931716d311cba5", "score": "0.5261105", "text": "function re_sort($qid)\n\t{\n\t// needed when : after deleting an item\n\t// needed when : after moving a branch to a new node\n\t\t$result = $this->db->query(\"SELECT id_vc FROM vote_content WHERE id_vo=$qid ORDER BY position_vc\");\n\t\tif($result->num_rows()){\n\t\t\t$order = 0;\n\t\t\tforeach($result->result() as $row):\n\t\t\t\t$order++; \n\t\t\t\t$this->db->query(\"UPDATE vote_content SET position_vc=$order WHERE id_vc=\".$row->id_vc.\" AND id_vo=$qid\");\n\t\t\tendforeach;\n\t\t}\n\t}", "title": "" }, { "docid": "57c94210ab5b04716f838ab9d78e1ff6", "score": "0.5260167", "text": "private function getOrdering()\n {\n return [[\n 'column' => 0,\n 'dir' => 'asc',\n ]];\n }", "title": "" }, { "docid": "164212f196e2cd0fb5da911454d0e244", "score": "0.5246753", "text": "private function usort_sorting ($p, $q) {\n if ($p->relevance == $q->relevance) return 0;\n return $p->relevance > $q->relevance ? -1 : 1;\n }", "title": "" }, { "docid": "f7b46cf6afefd8c792e55f00d091a0fe", "score": "0.5240835", "text": "private function sortAllTrips()\n {\n for ($i = 0; $i < $this->size - 1; $i++) {\n foreach ($this->trips as $index => $trip) {\n if (strcasecmp($this->trips[$i]['Arrival'], $trip['Departure']) == 0) {\n $nextIndex = $i + 1;\n $tempRow = $this->trips[$nextIndex];\n $this->trips[$nextIndex] = $trip;\n $this->trips[$index] = $tempRow;\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "03907ba57326bd72516260ecc2bfb600", "score": "0.5234874", "text": "public function getSort() {}", "title": "" }, { "docid": "178fcafd0ebf5ed1bd5b86e8808abb28", "score": "0.52332616", "text": "function feature_node_cmp($a, $b)\r\n{\r\n if ($a->i == $b->i)\r\n return 0;\r\n return ($a->i < $b->i) ? -1 : 1; //从小到大排序\r\n}", "title": "" }, { "docid": "bff82de80ca0dcf85e72574e9e999a4a", "score": "0.52331924", "text": "function getSort(){\r\n return 990; //was 990\r\n }", "title": "" }, { "docid": "bff82de80ca0dcf85e72574e9e999a4a", "score": "0.52331924", "text": "function getSort(){\r\n return 990; //was 990\r\n }", "title": "" }, { "docid": "4931d01f51200526a1f8c106bff5546d", "score": "0.52180725", "text": "public function order($index, $reverse = false)\n\t{\n\t//\ton extrait la colonne à trier\n\t\t$extract = $this->get_column($index);\n\t\t//uasort($extract, 'strcoll');\n\t\tif (empty($extract)) return $this;\n\t\t//sort($extract, SORT_LOCALE_STRING);\n\t\tnatcasesort($extract);\n\t//\ton récupère les index triés\n\t\t$sorted = array_keys($extract);\n\t\tif ($reverse === true) $sorted = array_reverse($sorted);\n\t//\ton réordonne le tableau\n\t\t$i = 0;\n\t\t// $this->set_index();\n\t\t$this->count();\n\t\twhile ($i < $this->count)\n\t\t{\n\t\t\t$tmp[$i] = $this->data[$sorted[$i]];\n\t\t\t$i++;\n\t\t}\n\t\t$this->data = &$tmp;\n\t\t$this->order = $index;\n\n\t\tarray_values($this->data);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "66d6413529168bf347744c7f3a2169fd", "score": "0.52086914", "text": "function sort_matches_desc($left,$right) {\r\n global $sortkey;\r\n if(strtolower($left[\"$sortkey\"])==strtolower($right[\"$sortkey\"])) return 0;\r\n return strtolower($left[\"$sortkey\"]) > strtolower($right[\"$sortkey\"]) ? -1 : 1 ;\r\n}", "title": "" }, { "docid": "4d4d89911cfa71d964878d081babde4a", "score": "0.51961356", "text": "public function sortCards()\n {\n usort($this->cards, function ($a, $b) {\n return $a->order > $b->order;\n });\n foreach ($this->cards as $key => $card) {\n $this->cards[$key]->controllerProperties['index'] = $key;\n }\n }", "title": "" }, { "docid": "05c355c5a0313219e2e1b469e4fcb6fb", "score": "0.51825947", "text": "function idu_drush_special_FixPrimarySort($pid) {\n static $mods_ns = 'mods';\n static $mods_nsU = 'http://www.loc.gov/mods/v3';\n\n $sort = \"/mods:mods/mods:extension/mods:primarySort\";\n $extension = \"/mods:mods/mods:extension\";\n\n $total = $count = 0;\n\n list($ns, $pidRange) = explode(':', $pid);\n list($p1, $p2) = explode(\"-\", $pidRange);\n if (!$p2) {\n $p2 = $p1;\n }\n\n $range = $p2 - $p1 + 1;\n\n idu_drush_print_progress(\"FixPrimarySort\" );\n $dryRun = drush_get_option('dryRun', FALSE);\n\n for ($i = $p1, $n = 0; $i <= $p2; $i++, $n++) {\n idu_drush_print_progress(\"FixPrimarySort\", $n, $range );\n $count = 0;\n $pid = \"$ns:$i\";\n\n // For any exception, report and skip this PID\n try {\n $object = _idu_Repository()->getObject($pid);\n } catch (Exception $e) {\n // idu_drush_log(__FUNCTION__ . \" ($pid) returned NO object!\", 'warning');\n continue;\n }\n\n $newValue = '99';\n\n if ($ds = $object['MODS']) {\n $xml = new DOMDocument;\n $xml->loadXML($ds->content);\n $mx = new DOMXPath($xml);\n $mx->registerNamespace($mods_ns, $mods_nsU);\n\n // First, test for a /mods/extension element. If none, add one and reset!\n $r = $mx->query($extension);\n if ($r->length < 1 ) {\n idu_drush_log(__FUNCTION__ . \" $pid has NO extension element!\", 'warning');\n $r0 = $mx->query('/mods:mods');\n foreach ($r0 as $parent) {\n $element = $xml->createElement('extension');\n $parent->appendChild($element);\n $content = $xml->saveXML();\n $object['MODS']->setContentFromString($content);\n }\n\n // Reset!\n $xml = new DOMDocument;\n $xml->loadXML($ds->content);\n $mx = new DOMXPath($xml);\n $mx->registerNamespace($mods_ns, $mods_nsU);\n }\n\n // Check for a /mods/extension/primarySort element.\n $results = $mx->query($sort);\n\n // Object has NO primarySort element...add one!\n if ($results->length < 1 ) {\n idu_drush_log(__FUNCTION__ . \" $pid has NO primarySort element!\", 'warning');\n\n // Find the MODS' /mods/extension element\n $r0 = $mx->query($extension);\n\n // The following should be IMPOSSIBLE!\n if ($r0->length < 1) { // no <mods:extension> found... create one\n idu_drush_log(__FUNCTION__ . \" $pid has NO extension element!\", 'error');\n break;\n }\n\n // Create a new /mods/extension/primarySort element\n foreach ($r0 as $parent) {\n $element = $xml->createElement('primarySort', '99');\n $parent->appendChild($element);\n idu_drush_log(__FUNCTION__ . \" primarySort=99 added to $pid!\", 'info');\n $count++;\n }\n\n } else { // Object has a primarySort...make sure it has a value of 99.\n\n foreach ($results as $node) {\n $old = $node->nodeValue;\n if ($old != $newValue) {\n $node->nodeValue = $newValue;\n $content = $xml->saveXML();\n idu_drush_log(__FUNCTION__ . \" $pid primarySort of $old has been updated!\", 'info');\n $count++;\n }\n else {\n idu_drush_log(__FUNCTION__ . \" $pid primarySort of $old did not require an update.\", 'info');\n }\n }\n }\n\n // Save changes/additions, if there are any. And self-transform the MODS, then re-index in Solr\n if ($count > 0) {\n $total += $count;\n if (!$dryRun) {\n $content = $xml->saveXML();\n $object['MODS']->setContentFromString($content);\n idu_drush_fix_SelfTransform($pid);\n idu_drush_fix_IndexSolr($pid);\n }\n }\n\n }\n }\n\n return $total;\n}", "title": "" }, { "docid": "9e9bbe8b7d88b35f1d216130925e3624", "score": "0.51769024", "text": "protected function sort_by_position( $a, $b ) {\n\t\t$a_position = isset( $a['position'] ) ? (int) $a['position'] : 10;\n\t\t$b_position = isset( $b['position'] ) ? (int) $b['position'] : 10;\n\t\t$a_index = isset( $a['index'] ) ? (int) $a['index'] : 10;\n\t\t$b_index = isset( $b['index'] ) ? (int) $b['index'] : 10;\n\n\t\tif ( $a_position === $b_position ) {\n\t\t\treturn ( $a_index < $b_index ) ? -1 : 1;\n\t\t}\n\n\t\treturn ( $a_position < $b_position ) ? -1 : 1;\n\t}", "title": "" }, { "docid": "964bbe84473a3519adb83e5731feebf0", "score": "0.51700354", "text": "public function sort() {\r\n\t\t\r\n\t\t$items = self::find_all_by_sql('SELECT id, page_sort_order FROM page ORDER BY page_sort_order ASC');\r\n\t\t\r\n\t\t$n = 1;\r\n\t\tforeach ($items as $item) {\t\t\t\r\n\t\t\t$item->page_sort_order = ($n+1)*10;\r\n\t\t\t$item->save();\r\n\t\t\t$n++;\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e567956fca6016b3d1c795bc03164aa1", "score": "0.51697236", "text": "function _apachesolr_sort_facets($a, $b) {\r\n return strcasecmp($a['info'], $b['info']);\r\n}", "title": "" }, { "docid": "7ecb870f41754079d0c39acfe47e70b7", "score": "0.5166733", "text": "function cluster_display_priority_append_sort_data($cluster_id_field, &$select, &$join) {\n global $CURMAN;\n\n //make sure we can get the field we need for ordering\n if($theme_priority_field = new field(field::get_for_context_level_with_name('cluster', CLUSTER_DISPLAY_PRIORITY_FIELD)) and\n $contextlevel = context_level_base::get_custom_context_level('cluster', 'block_curr_admin')) {\n\n $field_data_table = $CURMAN->db->prefix_table($theme_priority_field->data_table());\n\n //use this for easier naming in terms of sorting\n $select .= ', field_data.data AS priority ';\n\n $join .= \"LEFT JOIN ({$CURMAN->db->prefix_table('context')} context\n JOIN {$field_data_table} field_data\n ON field_data.contextid = context.id\n AND field_data.fieldid = {$theme_priority_field->id})\n\n ON context.contextlevel = {$contextlevel}\n AND context.instanceid = {$cluster_id_field} \";\n }\n}", "title": "" }, { "docid": "5679765b8734748a1711d8fec7cb1fb5", "score": "0.51592034", "text": "function sgp_order_candidates($candidates) {\n usort($candidates, function($a, $b) {\n return strcmp($a->order,$b->order);\n });\n return $candidates;\n}", "title": "" }, { "docid": "c4b2d47ac8156176c152bdb0dc0d41a7", "score": "0.5149764", "text": "protected function sort_configurations_by_priority( $a, $b ) {\n $priority_a = $a['priority'];\n $priority_b = $b['priority'];\n\n if ( $priority_a == $priority_b ) {\n\n $secondary_priority_a = $a['secondary_priority'];\n $secondary_priority_b = $b['secondary_priority'];\n\n if ( $secondary_priority_a == $secondary_priority_b )\n return 0;\n \n return $secondary_priority_a < $secondary_priority_b ? -1 : 1;\n }\n\n return $priority_a < $priority_b ? -1 : 1;\n }", "title": "" }, { "docid": "3047a671ea1d91ed2f803401849500a7", "score": "0.51358396", "text": "function getSort(){\n return 155;\n }", "title": "" }, { "docid": "3047a671ea1d91ed2f803401849500a7", "score": "0.51358396", "text": "function getSort(){\n return 155;\n }", "title": "" }, { "docid": "967f646767a43d30e314856a57e873fb", "score": "0.513369", "text": "function apply_sort( $in ) {\r\n $run2created2request = array();\r\n foreach( $in as $i ) {\r\n $run2created2request[$i->run][$i->created] = $i;\r\n }\r\n $out = array();\r\n $runs = array_keys( $run2created2request );\r\n sort( $runs );\r\n foreach( $runs as $r ) {\r\n $created = array_keys( $run2created2request[$r] );\r\n sort( $created );\r\n foreach( $created as $c ) {\r\n array_push( $out, $run2created2request[$r][$c] );\r\n }\r\n }\r\n return $out;\r\n}", "title": "" }, { "docid": "0fef7aaf7c39ed0fc699aae9b2aba398", "score": "0.51328224", "text": "public function getDefaultSort() {\n\t\treturn array('Title' => 'desc');\n\t}", "title": "" }, { "docid": "4441167c1b5fc5aa42041624035aa3cc", "score": "0.5129688", "text": "function array_order_by()\n {\n $args = func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field) {\n if (is_string($field)) {\n $tmp[$field] = array();\n foreach ($data as $key => $row)\n $tmp[$field][$key] = $row[$field];\n $args[$n] = &$tmp[$field];\n } else {\n $args[$n] = &$args[$n];\n }\n }\n $args[] = &$data;\n call_user_func_array('array_multisort', $args);\n return array_pop($args);\n }", "title": "" }, { "docid": "62e104990a3180eeda9d9a780f1b3572", "score": "0.51217216", "text": "function facetapi_sort_active(array $a, array $b) {\n $a_active = (isset($a['#active'])) ? $a['#active'] : 0;\n $b_active = (isset($b['#active'])) ? $b['#active'] : 0;\n if ($a_active == $b_active) {\n return 0;\n }\n return ($a_active < $b_active) ? -1 : 1;\n}", "title": "" }, { "docid": "94f3268d00e7f78fb15e8811d88d9f3a", "score": "0.5116346", "text": "public function getPriorityIndex(){\n\t\t$_priorities = self::getPriorityEnum();\n\t\tforeach ( self::$prioritySetup as $i=>$_p ) {\n\t\t\tif (mb_strtolower($_p) == $this->priority) return $i;\n\t\t}\n\t}", "title": "" }, { "docid": "7fd75b8f5fef8d552559a0bafd2d9467", "score": "0.5108433", "text": "function selection_sort(array $arr): array\n{\n if (!function_exists('swap_positions')) {\n function swap_positions($data, $left, $right)\n {\n $rightData = $data[$right];\n $data[$right] = $data[$left];\n $data[$left] = $rightData;\n return $data;\n }\n }\n\n for ($i = 0; $i < count($arr) - 1; $i++) {\n $min = $i;\n for ($j = $i + 1; $j < count($arr); $j++)\n if ($arr[$j] < $arr[$min]) $min = $j;\n $arr = swap_positions($arr, $i, $min);\n }\n return $arr;\n}", "title": "" }, { "docid": "d77299478e10698c4513f22036362f5d", "score": "0.5107618", "text": "private static function sortByUserOrder($a, $b) {\n global $valuesGlobal;\n\n $posA = array_search($a->ID, $valuesGlobal);\n $posB = array_search($b->ID, $valuesGlobal);\n\n if($posA != false && $posB != false) {\n return ($posA > $posB) ? 1 : -1;\n }\n else if($posA != false && $posB == false) {\n return 1;\n }\n else if($posA == false && $posB != false) {\n return -1;\n }\n else {\n return ($a->ID < $b->ID) ? -1 : 1;\n } \n }", "title": "" }, { "docid": "245c3558dda0df4527e31a0585d419cd", "score": "0.50865084", "text": "public function sortPages() : void\n {\n uasort($this->pages, function (Page $firstElement, Page $secondElement) {\n return (int)$firstElement->getImgCount() <=> (int)$secondElement->getImgCount();\n });\n }", "title": "" }, { "docid": "10813a19ce7f8ee88bd165227e587669", "score": "0.5079511", "text": "private function sort() : void\n {\n rsort($this -> queue);\n }", "title": "" }, { "docid": "2f43ca2096ac842736050bc1a751de12", "score": "0.5078424", "text": "public function asc();", "title": "" }, { "docid": "13fadd8c371aca603ffb534f6dd03866", "score": "0.50768596", "text": "function usort_reorder($a,$b){\r\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'name'; //If no sort, default to title\r\n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc\r\n $result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order\r\n return ($order === 'asc') ? $result : -$result; //Send final sort direction to usort\r\n }", "title": "" }, { "docid": "08a1ff29d7df90dfdfd3d8084ff60c88", "score": "0.5073952", "text": "function getSort(){\n return 10;\n }", "title": "" }, { "docid": "97a95894a12f27a9d6a0e71920aa0225", "score": "0.50737023", "text": "private function sortItemsByTitleAscending() {\n\t\t\t$items = $this->getItems();\n\t\t\t\n\t\t\t$pivot = 1;\n\t\t\t$stack[1]['low'] = 0;\n\t\t\t$stack[1]['high'] = count($items)-1;\n\t\t\t\n\t\t\tdo {\n\t\t\t\t$low = $stack[$pivot]['low'];\n\t\t\t\t$high = $stack[$pivot]['high'];\n\t\t\t\t$pivot--;\n\t\t\t\t\n\t\t\t\tdo {\n\t\t\t\t\t$i = $low;\n\t\t\t\t\t$j = $high;\n\t\t\t\t\t$tmp = $items[(int)(($low + $high) / 2)];\n\t\t\t\t\t\n\t\t\t\t\t// partion the array into low and high sections\n\t\t\t\t\tdo {\n\t\t\t\t\t\twhile ($items[$i]->getTitle() < $tmp->getTitle()) {\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\twhile ($tmp->getTitle() < $items[$j]->getTitle()) {\n\t\t\t\t\t\t\t$j--;\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// swap elements from the two sides\n\t\t\t\t\t\tif ($i <= $j) {\n\t\t\t\t\t\t\t$w = $items[$i];\n\t\t\t\t\t\t\t$items[$i] = $items[$j];\n\t\t\t\t\t\t\t$items[$j] = $w;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t$j--;\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\twhile ($i <= $j);\n\t\t\t\t\n\t\t\t\t\tif ($i < $high) {\n\t\t\t\t\t\t$pivot++;\n\t\t\t\t\t\t$stack[$pivot]['low'] = $i;\n\t\t\t\t\t\t$stack[$pivot]['high'] = $high;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t$high = $j;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\twhile($low < $high);\n\t\t\t\t\n\t\t\t}\n\t\t\twhile($pivot != 0);\n\t\t\t\n\t\t\t$this->setItems($items);\n\t\t}", "title": "" }, { "docid": "a36227d75701ed69228ee332fd655c2e", "score": "0.5073665", "text": "private function _sorting() {\n asort($this->arrayOfNumbers);\n $sortedNumbers = array_slice($this->arrayOfNumbers, -2);\n $highest = $sortedNumbers[1];\n $secondHighest = $sortedNumbers[0];\n return array($highest, $secondHighest);\n }", "title": "" }, { "docid": "1fb00ec3c60684e21bcaba17b77e769e", "score": "0.5070652", "text": "protected function setupSortOrder()\n\t{\n\n\t\t// Check for \"order\" parameter\n\t\tif (Get(\"order\") !== NULL) {\n\t\t\t$this->CurrentOrder = Get(\"order\");\n\t\t\t$this->CurrentOrderType = Get(\"ordertype\", \"\");\n\t\t\t$this->updateSort($this->id); // id\n\t\t\t$this->updateSort($this->fecha); // fecha\n\t\t\t$this->updateSort($this->hora); // hora\n\t\t\t$this->updateSort($this->audio); // audio\n\t\t\t$this->updateSort($this->st); // st\n\t\t\t$this->updateSort($this->fechaHoraIni); // fechaHoraIni\n\t\t\t$this->updateSort($this->fechaHoraFin); // fechaHoraFin\n\t\t\t$this->updateSort($this->telefono); // telefono\n\t\t\t$this->updateSort($this->agente); // agente\n\t\t\t$this->updateSort($this->fechabo); // fechabo\n\t\t\t$this->updateSort($this->agentebo); // agentebo\n\t\t\t$this->updateSort($this->IP); // IP\n\t\t\t$this->updateSort($this->actual); // actual\n\t\t\t$this->updateSort($this->completado); // completado\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "bfbfd51e34bd7dd92d2699aea15eced2", "score": "0.5058165", "text": "function getTasksSorted($column, $order) {\n global $allTasksSorted, $allTasks;\n $allTasksSorted = $allTasks;\n if ($column!=0) $column = $column-1; \n $keyArray = array_column($allTasks, $column);\n if ($order) {\n $keyOrder = SORT_DESC;\n } else {\n $keyOrder = SORT_ASC;\n }\n if ($column !=0 ) {\n $sortFlag = SORT_STRING;\n } else {\n $sortFlag = SORT_NUMERIC;\n } \n array_multisort($keyArray, $keyOrder, $sortFlag, $allTasksSorted);\n}", "title": "" }, { "docid": "3cd8286dc20d992c9adc7aac50b8b76f", "score": "0.5054756", "text": "function build_sorting_array($ids, $opt) {\n global $conf;\n\n $sort_array = array();\n $sort_opts = array();\n $group_opts = array();\n\n $dformat = array();\n $wformat = array();\n\n $cnt = 0;\n\n // look for 'abc' by title instead of name ('abc' by page-id makes little sense)\n // title takes precedence over name (should you try to sort by both...why?)\n $from_title = (isset($opt['sort']['title'])) ? true : false;\n\n // is it necessary to cache the abstract column?\n $get_abstract = ($opt['snippet']['type'] != 'none');\n\n // add any extra columns needed for filtering!\n $extrakeys = array_diff_key($opt['filter'], $opt['sort']);\n $col_keys = array_merge($opt['sort'], $extrakeys);\n\n // it is more efficient to get all the back-links at once from the indexer metadata\n if (isset($col_keys['backlinks'])) {\n $backlinks = idx_get_indexer()->lookupKey('relation_references', $ids);\n }\n\n foreach ($ids as $id) {\n\n // getting metadata is very time-consuming, hence ONCE per displayed row\n $meta = p_get_metadata($id, '', METADATA_DONT_RENDER);\n\n if ( ! isset($meta['date']['created'])) {\n $meta['date']['created'] = 0;\n }\n if ( ! isset($meta['date']['modified'])) {\n $meta['date']['modified'] = $meta['date']['created'];\n }\n // establish page name (without namespace)\n $name = noNS($id);\n\n // ref to current row, used through out function\n $row = &$sort_array[$cnt];\n\n // first column is the basic page id\n $row['id'] = $id;\n\n // second column is the display 'name' (used when sorting by 'name')\n // this also avoids rebuilding the display name when building links later (DRY)\n $row['name'] = $name;\n\n // third column: cache the display name; taken from metadata => 1st heading\n // used when sorting by 'title'\n $title = (isset($meta['title']) && ! empty($meta['title'])) ? $meta['title'] : $name;\n $row['title'] = $title;\n\n // needed later in the a, ab ,abc clauses\n $abc = ($from_title) ? $title : $name;\n\n // fourth column: cache the page abstract if needed; this saves a lot of time later\n // and avoids repeated slow metadata retrievals (v. slow!)\n $abstract = ($get_abstract) ? $meta['description']['abstract'] : '';\n $row['abstract'] = $abstract;\n\n // fifth column is the displayed text for links; set below\n $row['display'] = '';\n\n // reset cache of full date for this row\n $real_date = 0;\n\n // ...optional columns\n foreach ($col_keys as $key => $void) {\n $value = '';\n switch ($key) {\n case 'a':\n case 'ab':\n case 'abc':\n $value = $this->_first($abc, strlen($key));\n break;\n case 'name':\n case 'title':\n // name/title columns already exists by default (col 1,2)\n // save a few microseconds by just moving on to the next key\n continue 2;\n case 'id':\n $value = $id;\n break;\n case 'ns':\n $value = getNS($id);\n if (empty($value)) {\n $value = '[' . $conf['start'] . ']';\n }\n break;\n case 'creator':\n $value = $meta['creator'];\n break;\n case 'contributor':\n $value = implode(' ', $meta['contributor']);\n break;\n case 'mdate':\n $value = $meta['date']['modified'];\n break;\n case 'cdate':\n $value = $meta['date']['created'];\n break;\n case 'links':\n $value = $this->_join_keys_if(' ', $meta['relation']['references']);\n break;\n case 'backlinks':\n $value = implode(' ', current($backlinks));\n next($backlinks);\n break;\n default:\n // date sorting types (groupable)\n $dtype = $key[0];\n if ($dtype == 'c' || $dtype == 'm') {\n // we only set real date once per id (needed for grouping)\n // not per sort column--the date should remain same across all columns\n // this is always the last column!\n if ($real_date == 0) {\n $real_date = ($dtype == 'c') ? $meta['date']['created'] : $meta['date']['modified'];\n $row[self::MGROUP_REALDATE] = $real_date;\n }\n // only set date formats once per sort column/key (not per id!), i.e. on first row\n if ($cnt == 0) {\n $dformat[$key] = $this->_date_format($key);\n // collect date in word format for potential use in grouping\n $wformat[$key] = ($opt['spelldate']) ? $this->_date_format_words($dformat[$key]) : '';\n }\n // create a string date used for sorting only\n // (we cannot just use the real date otherwise it would not group correctly)\n $value = strftime($dformat[$key], $real_date);\n }\n }\n // set the optional column\n $row[$key] = $value;\n }\n\n /* provide custom display formatting via string templating {...} */\n\n $matches = array();\n $display = $opt['display'];\n $matched = preg_match_all('/\\{(.+?)\\}/', $display, $matches, PREG_SET_ORDER);\n\n // first try to use the custom column names as entered by user\n if ($matched > 0) {\n foreach ($matches as $match) {\n $key = $match[1];\n $value = null;\n if (isset($row[$key])) {\n $value = $row[$key];\n } elseif (isset($meta[$key])) {\n $value = $meta[$key];\n // allow for nested meta keys (e.g. date:created)\n } elseif (strpos($key, ':') !== false) {\n $keys = explode(':', $key);\n if (isset($meta[$keys[0]][$keys[1]])) {\n $value = $meta[$keys[0]][$keys[1]];\n }\n } elseif ($key == 'mdate') {\n $value = $meta['date']['modified'];\n } elseif ($key == 'cdate') {\n $value = $meta['date']['created'];\n }\n if ( ! is_null($value)) {\n if (strpos($key, 'date') !== false) {\n $value = utf8_encode(strftime($opt['dformat'], $value));\n }\n $display = str_replace($match[0], $value, $display);\n }\n }\n\n // try to match any metadata field; to allow for plain single word display settings\n // e.g. display=title or display=name\n } elseif (isset($row[$display])) {\n $display = $row[$display];\n\n // if all else fails then use the page name (always available)\n } else {\n $display = $row['name'];\n }\n $row['display'] = $display;\n\n $cnt++;\n }\n\n\n $idx = 0;\n foreach ($opt['sort'] as $key => $value) {\n\n $sort_opts['key'][] = $key;\n\n\n // now the sort direction\n switch ($value) {\n case 'a':\n case 'asc':\n $dir = self::MSORT_ASC;\n break;\n case 'd':\n case 'desc':\n $dir = self::MSORT_DESC;\n break;\n default:\n switch ($key) {\n // sort dates descending by default; text ascending\n case 'a':\n case 'ab':\n case 'abc':\n case 'name':\n case 'title':\n case 'id':\n case 'ns':\n case 'creator':\n case 'contributor':\n $dir = self::MSORT_ASC;\n break;\n default:\n $dir = self::MSORT_DESC;\n break;\n }\n }\n $sort_opts['dir'][] = $dir;\n\n\n // set the sort array's data type\n switch ($key) {\n case 'mdate':\n case 'cdate':\n $type = self::MSORT_NUMERIC;\n break;\n default:\n if ($opt['casesort']) {\n // case sensitive: a-z then A-Z\n $type = ($opt['natsort']) ? self::MSORT_NAT : self::MSORT_STRING;\n } else {\n // case-insensitive\n $type = ($opt['natsort']) ? self::MSORT_NAT_CASE : self::MSORT_STRING_CASE;\n }\n }\n $sort_opts['type'][] = $type;\n\n\n // now establish grouping options\n switch ($key) {\n // name strings and full dates cannot be meaningfully grouped (no duplicates!)\n case 'mdate':\n case 'cdate':\n case 'name':\n case 'title':\n case 'id':\n $group_by = self::MGROUP_NONE;\n break;\n case 'ns':\n $group_by = self::MGROUP_NAMESPACE;\n break;\n default:\n $group_by = self::MGROUP_HEADING;\n }\n if ($group_by != self::MGROUP_NONE) {\n $group_opts['key'][$idx] = $key;\n $group_opts['type'][$idx] = $group_by;\n $group_opts['dformat'][$idx] = $wformat[$key];\n $idx++;\n }\n }\n\n return array($sort_array, $sort_opts, $group_opts);\n }", "title": "" }, { "docid": "7758efa50e747b44c9317c82d345dc7d", "score": "0.5051266", "text": "function usort_reorder($a,$b) {\r\n\t\t\t\t$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'title'; /*If no sort, default to title*/\r\n\t\t\t\t$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; /*If no order, default to asc*/\r\n\t\t\t\t$result = strcmp($a[$orderby], $b[$orderby]); /*Determine sort order*/\r\n\t\t\t\treturn ($order==='asc') ? $result : -$result; /*Send final sort direction to usort*/\r\n\t\t\t}", "title": "" }, { "docid": "d6efcb2e8f7c93030c5e7d9d31f10ef7", "score": "0.50492245", "text": "public function AddSortInformation()\n {\n parent::AddSortInformation();\n $this->tableObj->orderList['active'] = 'DESC';\n $this->tableObj->orderList['start_date'] = 'ASC';\n }", "title": "" }, { "docid": "671bc7e58fcb0e24cbbf49eb689351f4", "score": "0.50484145", "text": "public function priorityAt($key);", "title": "" }, { "docid": "291bf5f474e3b99d278333e60b368f23", "score": "0.5044443", "text": "public static function sortByScore($pos_arr)\n {\n\tforeach ($pos_arr as $n => $pos_part)\n\t $pos_arr[$n] = sort2dArray($pos_part, 'pos_score', 'DESC');\n\n\treturn $pos_arr;\n\n }", "title": "" }, { "docid": "a757ba21df0cd26b9587c79d360f3db4", "score": "0.50299484", "text": "function cot_advboard_config_order() {\n global $cot_extrafields, $L, $db_advboard;\n\n $options_sort = array(\n 'sort' => cot::$L['advboard_by_sort_field'],\n 'id' => cot::$L['Id'],\n 'title' => cot::$L['Title'],\n 'desc' => cot::$L['Description'],\n 'text' => cot::$L['Body'],\n 'price' => cot::$L['advboard_price'],\n 'user' => cot::$L['Owner'],\n 'begin' => cot::$L['Begin'],\n 'expire' => cot::$L['Expire'],\n 'views' => cot::$L['Count'],\n 'created' => cot::$L['Date'],\n 'updated' => cot::$L['Updated'],\n );\n\n if(!empty($cot_extrafields[$db_advboard])) {\n foreach ($cot_extrafields[$db_advboard] as $exfld) {\n $options_sort[$exfld['field_name']] = isset(cot::$L['advboard_' . $exfld['field_name'] . '_title']) ?\n cot::$L['advboard_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];\n }\n }\n\n cot::$L['cfg_order_params'] = array_values($options_sort);\n return array_keys($options_sort);\n}", "title": "" }, { "docid": "430f00b3ca527c2ebe99b24310f09d3a", "score": "0.50291115", "text": "function soap_client_label_sort($data_info, $label_key = 'label') {\n $sort_info = array();\n foreach ($data_info as $key => $info) {\n $sort_info[$key] = $info[$label_key];\n }\n natcasesort($sort_info);\n foreach ($sort_info as $key => $label) {\n $sort_info[$key] = $data_info[$key];\n }\n return $sort_info;\n}", "title": "" }, { "docid": "18eda629a2d1d2a326a26930f255ba01", "score": "0.50275755", "text": "function tfuse_aasort ($array, $key) {\n $sorter=array();\n $ret=array();\n if (!$array){$array = array();}\n reset($array);\n foreach ($array as $ii => $va) {\n $sorter[$ii]=$va[$key];\n }\n asort($sorter);\n foreach ($sorter as $ii => $va) {\n $ret[$ii]=$array[$ii];\n }\n return $ret;\n }", "title": "" }, { "docid": "d95f1d239718c6d32d52bcf96cc30458", "score": "0.50230306", "text": "function arrange_array($results_array, $order, $ordered = \"\"){\n foreach($results_array as $key => $value) {\n $colomn[$key] = $value[$order];\n }\n if ($ordered == \"decreasing\"){\n array_multisort($colomn, SORT_DESC, $results_array); #ordre decroissant\n }else{\n array_multisort($colomn, SORT_ASC, $results_array); #ordre croissant\n }\n return $results_array;\n}", "title": "" }, { "docid": "22d78ceb0dfe6de8872ff8a3bb2fcd7d", "score": "0.50188303", "text": "function selectionSort($arr){\n $n = count($arr);\n for($i = 0; $i < $n; $i++){\n $minIndex = $i;\n for($j = $i; $j < $n; $j ++){\n if($arr[$j] < $arr[$minIndex]){\n $minIndex = $j;\n }\n }\n $tmp = $arr[$minIndex];\n $arr[$minIndex] = $arr[$i];\n $arr[$i] = $tmp;\n }\n return $arr;\n}", "title": "" }, { "docid": "1f48ffdf7f727519ae9bf6e1f841a365", "score": "0.5010558", "text": "public function sort($items)\n\t{\n\t\t$index = array();\n\t\t$c = 0;\n\t\tforeach ($items as $i => $item)\n\t\t{\n\t\t\tif (is_array($item) && isset($item['order']))\n\t\t\t{\n\t\t\t\t$index[$i] = $item['order'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$index[$i] = $c++;\n\t\t\t}\n\t\t}\n\t\tasort($index);\n\t\treturn array_keys($index);\n\t}", "title": "" }, { "docid": "70779b9b990f5758bd27b8ac90bca839", "score": "0.50026834", "text": "function testArraySort()\n{\n $array = array(\n 'a' => array(\n 'id' => 1,\n 'name' => 'Cherry',\n 'age' => 22\n ),\n 'b' => array(\n 'id' => 2,\n 'name' => 'Alma',\n 'age' => 23\n ),\n 'c' => array(\n 'id' => 3,\n 'name' => 'Peter',\n 'age' => 25\n ),\n 'd' => array(\n 'id' => 4,\n 'name' => 'John',\n 'age' => 20\n )\n );\n /*\n * $array = array( '100'=>array('id'=>1, 'name'=>'Cherry', 'age'=>22), '101'=>array('id'=>2, 'name'=>'Alma', 'age'=>23), '102'=>array('id'=>3, 'name'=>'Peter', 'age'=>25), '103'=>array('id'=>4, 'name'=>'John', 'age'=>20), );\n */\n echo '<pre>';\n print_r($array);\n // echo '<br/>按name排序:<br/>';\n // $array2 = Base::arraySort($array, 'name');\n // print_r($array2);\n echo '<br/>按age排序:<br/>';\n $array3 = Base::arraySort($array, 'age', SORT_DESC);\n print_r($array3);\n echo '</pre>';\n}", "title": "" }, { "docid": "0ebb4b13a37a3b259bb7f2b20b8ecc14", "score": "0.4992065", "text": "private function __sortOption(array &$options)\n {\n if (!empty($this->_options['order'])) {\n $options['sort'] = array_map(\n function ($v) {\n return strtolower((string)$v) === 'desc' ? -1 : 1;\n },\n Hash::get($options, 'sort', [])\n + Hash::normalize((array)$this->_options['order'])\n );\n }\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "774643a562c38e01f422de634fe9333d", "score": "0.0", "text": "public function store(SubjectStoreRequest $request)\n {\n $subject = new Subject();\n $subject->setAttribute('course_name', $request->input('course_name'));\n $subject->setAttribute('course_code', $request->input('course_code'));\n $subject->setAttribute('credit', $request->input('credit'));\n $subject->setAttribute('level', $request->input('level'));\n $subject->setAttribute('semester', $request->input('semester')); \n // $subject->setAttribute('is_active', $request->input('is_active'));\n $subject->save();\n\n return response()->redirectToRoute('syllabus.index');\n }", "title": "" } ]
[ { "docid": "d2d5025c41b1d2624f860d8ceab9e2ab", "score": "0.7168782", "text": "public function store()\n {\n // Use the parent API to save the resource\n $object = $this->api()->store();\n\n // Redirect back with message\n return $this->redirect('created', ['id' => $object->id])\n ->with('message', $this->message('created') );\n }", "title": "" }, { "docid": "d98a4fb282f0c755f010ee2f5ed4571d", "score": "0.7077314", "text": "protected function save()\n {\n $this->em->persist($this->resource);\n $this->em->flush();\n }", "title": "" }, { "docid": "57d765bdde5c5951746b777b6533d048", "score": "0.69856346", "text": "public function store(StoreResource $request)\n {\n $input = $request->all();\n \n $resource = new Resource;\n $resource->fill($input);\n \n $resource->save();\n\n // redirect\n Session::flash('message', 'Successfully saved resource!');\n \n return redirect('resources');\n }", "title": "" }, { "docid": "d952c501b2ff80d2bf8bb35cd4b5c7f7", "score": "0.6660094", "text": "public function store(StoreResource $request)\n {\n $data = request(['title', 'type', 'description', 'link', 'markdown', 'code']);\n \n $user = JWTAuth::parseToken()->authenticate();\n \n $resource = Resource::create([\n 'title' => $data['title'],\n 'type' => $data['type'],\n 'link' => $data['link'],\n 'code' => $data['code'],\n 'markdown' => $data['markdown'],\n 'user_id' => $user['id'],\n ]);\n \n return $resource;\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "4e5acd860dcda74c61d836d96050b079", "score": "0.66155946", "text": "public function put(Storage $storage);", "title": "" }, { "docid": "de5fc2070d9e5322839836dc750f4b80", "score": "0.6569558", "text": "public function store(StoragesStoreRequest $request)\n {\n $by_id = Auth::user()->id;\n\n $new_storage = Storage::create([\n 'maker' => $request->maker,\n 'model_number' => $request->model_number,\n 'serial_number' => $request->serial_number,\n 'size' => $request->size,\n 'types' => $request->types,\n 'supported_os' => $request->supported_os,\n 'recovery_key' => $request->recovery_key,\n 'storage_password' => $request->storage_password,\n 'updated_by' => $by_id,\n 'created_by' => $by_id,\n ]);\n\n return redirect()->route('storages.show', $new_storage->id)->with('information', 'レコードを作成しました。');\n }", "title": "" }, { "docid": "3fbbbe537a186e3aba9885c042be89ee", "score": "0.6486008", "text": "public function create_storage();", "title": "" }, { "docid": "5bfca839729027de5944143fb0dca04f", "score": "0.64471614", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'abstract' => 'required',\n 'content' => 'required',\n 'categories' => 'required|array',\n 'image' => 'required',\n ]);\n\n $resource = Resource::create([\n 'title' => $request->title,\n 'abstract' => $request->abstract,\n 'content' => $request->content,\n 'status' => $request->status,\n 'user_id' => auth()->user()->id,\n ]);\n $resource->categories()->sync($request->categories);\n\n $path = $request->image;\n $image = File::where('file_path', $path)->first();\n $resource->image()->sync($image->id);\n\n $request->session()->flash('flash.banner', 'Recurso creado exitosamente');\n\n return redirect()->route('resource.edit', $resource);\n }", "title": "" }, { "docid": "68f3fa80257f85b02954ae4ca8745d5f", "score": "0.6422112", "text": "public function store(Request $request)\n {\n $req = $request->all();\n if (Validator::make($req,\n [\n 'new_dir' => 'required',\n ])->fails()) return $this->failed(400000);\n if (Validator::make($req,\n [\n 'new_dir' => 'string',\n ])->fails()) return $this->failed(400001);\n\n $resource = new Resource();\n $resource->resource_name = $req['new_dir'];\n $resource->file = false;\n if ($req['current_path']) $resource->path = $req['current_path'];\n if (!$resource->save()) return $this->failed(500001);\n $request->user()->resource()->attach($resource->id);\n return response()->json($resource);\n }", "title": "" }, { "docid": "40718558d61a4c56dc5b2c2b6422e8cf", "score": "0.6419359", "text": "abstract public function createStorage();", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "634b03751c156f72e00ba740b789cf98", "score": "0.6369132", "text": "public function store()\n\t{\n\t\t//\n\n\n\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
3faeaccb4052f8d0e471e71e6d599f3d
added to "init" action
[ { "docid": "82fe44177eccb928e9fa6016234601ff", "score": "0.0", "text": "static function init() {\n\t\tif (is_admin()) {\n\t\t\t// Load up $cdn_scripts with list from cdnjs\n\t\t\tself::$cdn_scripts = (get_option('cdn_scripts')) ? get_option('cdn_scripts') : self::get_cdn();\n\t\t\t// add submenu item for plugin options page\n\t\t\tadd_action('admin_menu', array(__CLASS__,'submenu_page'));\n\t\t\t// add settings to db\n\t\t\tadd_action( 'admin_init', array(__CLASS__,'register_settings') );\n\t\t\tadd_action( 'admin_init', array(__CLASS__,'setup_cron') );\n\t\t\twp_register_style(self::$ID,plugins_url('load_cdn_style.css',__FILE__));\n\t\t} else {\n\t\t\t// override the scripts\n\t\t\tadd_action('get_header',array(__CLASS__,'override_scripts'));\n\t\t\t// Verify that the scripts got overridden\n\t\t\t//add_action('wp_head',array(__CLASS__,'check_override'));\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "4a98f6204951ea91a54e0cdc9fa7de03", "score": "0.84763324", "text": "abstract public function action_init();", "title": "" }, { "docid": "191bf4d26dffbfff5d16c531efde1810", "score": "0.83268166", "text": "protected function _init(){ /* Implement this function in final controller */ }", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.7928773", "text": "protected function init(){}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.7928773", "text": "protected function init(){}", "title": "" }, { "docid": "138c59558ddfb98c482064365e3db4f2", "score": "0.7877668", "text": "public function exp_onInit()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "297083b430616b1d2990a01260528dac", "score": "0.7856828", "text": "public function init() {\n\t\t\n\t\t\n }", "title": "" }, { "docid": "3605041a9b039df9fc1838aebc05c380", "score": "0.7843461", "text": "public function init()\r\n {\r\n\t\t\r\n }", "title": "" }, { "docid": "c26d9a308aa11ce2f0210f331e0a0090", "score": "0.783974", "text": "function init() { }", "title": "" }, { "docid": "cd5e635d1781b05ac49e7dc820a4d948", "score": "0.7836909", "text": "function init()\n\t{\n\t}", "title": "" }, { "docid": "2bb021c1c682aaae40417ae65d2c9ad1", "score": "0.7813988", "text": "public function init()\n {\n\n\n }", "title": "" }, { "docid": "e86f272f4d5dcc169b527409316cc43d", "score": "0.780538", "text": "function init() {\n \n }", "title": "" }, { "docid": "a4ee4ff43df9b11e43934907e6c6b479", "score": "0.7793086", "text": "protected function _init()\r\n\t{\r\n\t}", "title": "" }, { "docid": "2e74b32ba9658bccb84b76412099d2bd", "score": "0.77614033", "text": "public function init()\n {\t\t\t\n }", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7750815", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7750815", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7750815", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.7750815", "text": "protected function init() {}", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "7735fd96953d102d848a824617a6b27e", "score": "0.7743222", "text": "public function init()\r\n {\r\n }", "title": "" }, { "docid": "522adc4e0b25760f46a6a4522be3db38", "score": "0.7741259", "text": "public function init ()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "5770244757619e5d3e6b25f4032c1727", "score": "0.77401453", "text": "public function init()\n {\n //\n }", "title": "" }, { "docid": "97e6d732775ca239bc7504b43eebcee9", "score": "0.7727698", "text": "public function init()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "97e6d732775ca239bc7504b43eebcee9", "score": "0.7727698", "text": "public function init()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "35aa2716028027d9226622629b833077", "score": "0.7724507", "text": "public function init() \n {\n }", "title": "" }, { "docid": "cbd0f89b64e8805f78b313b88abc7a2c", "score": "0.77195626", "text": "protected function _init () { /* Implement me. */ }", "title": "" }, { "docid": "903890643e12d6dc1129d3316a1301cc", "score": "0.76913714", "text": "public function init()\n {\n\n }", "title": "" }, { "docid": "903890643e12d6dc1129d3316a1301cc", "score": "0.76913714", "text": "public function init()\n {\n\n }", "title": "" }, { "docid": "903890643e12d6dc1129d3316a1301cc", "score": "0.76913714", "text": "public function init()\n {\n\n }", "title": "" }, { "docid": "a206f45c8e763cc72eb0b9b7010eb0bd", "score": "0.7687403", "text": "public function init() {\r\n \r\n }", "title": "" }, { "docid": "d4597f53705403274f5a06a57062ddb4", "score": "0.76835465", "text": "protected function init()\n {\n\n }", "title": "" }, { "docid": "d4597f53705403274f5a06a57062ddb4", "score": "0.76835465", "text": "protected function init()\n {\n\n }", "title": "" }, { "docid": "d4597f53705403274f5a06a57062ddb4", "score": "0.76835465", "text": "protected function init()\n {\n\n }", "title": "" }, { "docid": "570702f4ba8fc6d2d83babe1e9ae710c", "score": "0.76805776", "text": "public function init()\r\n\t{\r\n\t}", "title": "" }, { "docid": "05b135ab3f6aedf2651984ce62cbf3a2", "score": "0.76791376", "text": "public function init() { }", "title": "" }, { "docid": "05b135ab3f6aedf2651984ce62cbf3a2", "score": "0.76791376", "text": "public function init() { }", "title": "" }, { "docid": "b344b11d906d9638e1eeab019e138892", "score": "0.76790935", "text": "public function init()\n {\n\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" }, { "docid": "d8710cd2620c3289ac3069ff6752f7de", "score": "0.7671162", "text": "public function init()\n {\n }", "title": "" } ]
921742383fc5996dedc767af94535850
Obtains the property list.
[ { "docid": "b8b515da6166b185ce20f45e12f9c1db", "score": "0.648416", "text": "public function getProperties() {\n\t\treturn parent::getProperties() + array('Phones', 'Fax', 'Email', 'WebSite', \n\t\t\t'Coordinates');\n\t}", "title": "" } ]
[ { "docid": "207547b76eb105bde60d08a1e487e0c7", "score": "0.76533747", "text": "public function getProperties() {\n return array($this->_property);\n }", "title": "" }, { "docid": "784e5e600df6088f280b6b2025c36aa7", "score": "0.7641538", "text": "public function getProperties ()\n {\n \treturn $this->_properties;\n }", "title": "" }, { "docid": "7fdedd8461c3be52b15b033f78586660", "score": "0.7612456", "text": "public function properties()\n {\n if ($this->properties === null) {\n $model = $this->proto();\n $props = $model->metadata()->properties();\n\n $collectionIdent = $this->collectionIdent();\n if ($collectionIdent) {\n $metadata = $model->metadata();\n $adminMetadata = isset($metadata['admin']) ? $metadata['admin'] : null;\n\n if (isset($adminMetadata['lists'][$collectionIdent]['properties'])) {\n // Flipping to have property ident as key\n $listProperties = array_flip($adminMetadata['lists'][$collectionIdent]['properties']);\n // Replacing values of listProperties from index to actual property values\n $props = array_replace($listProperties, $props);\n // Get only the keys that are in listProperties from props\n $props = array_intersect_key($props, $listProperties);\n }\n }\n\n $this->properties = $props;\n }\n\n return $this->properties;\n }", "title": "" }, { "docid": "8318505b5b3e0752b75b1819e43aec88", "score": "0.75151557", "text": "public function getProperties()\n {\n return $this->_properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "1a511f322d6ad53f08a8ecc449f609f8", "score": "0.7486712", "text": "public function getProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "a770771185056c02c62595c469d8a481", "score": "0.7475489", "text": "public function getProperties() {\n\t\treturn $this->properties;\n\t}", "title": "" }, { "docid": "55454b0055f443c5bc41cc7a11e1dc2f", "score": "0.7465767", "text": "public function propertyList($params = []) {\n return $this->executeRequest($this->host . '/apis/properties', $params, self::HTTP_METHOD_GET, array(), self::HTTP_FORM_CONTENT_TYPE_APPLICATION);\n }", "title": "" }, { "docid": "ffa0790223c8531f4fec619efbf5c5dc", "score": "0.7439121", "text": "public function getProperties() {\n return $this->properties;\n }", "title": "" }, { "docid": "ffa0790223c8531f4fec619efbf5c5dc", "score": "0.7439121", "text": "public function getProperties() {\n return $this->properties;\n }", "title": "" }, { "docid": "6797f9b9510293010ccdfd41a05450b6", "score": "0.74194634", "text": "public function getProperties()\n\t{\n\t\treturn $this->properties;\n\t}", "title": "" }, { "docid": "6797f9b9510293010ccdfd41a05450b6", "score": "0.74194634", "text": "public function getProperties()\n\t{\n\t\treturn $this->properties;\n\t}", "title": "" }, { "docid": "4ac19dec36f8c0fd25dbcd1fc7ac8a60", "score": "0.73497117", "text": "public function getListOfProperties()\n {\n return [\n 'id',\n 'name',\n ];\n }", "title": "" }, { "docid": "d79d5bb189c37ad1ab56025a53a05275", "score": "0.73425585", "text": "public function getProperties(): array\n {\n return $this->arr_properties;\n }", "title": "" }, { "docid": "fe6d29e34886f6b0110dab4d1c0a7eed", "score": "0.7337365", "text": "public function propertyList(){\n $value = null;\n\n $propertyListNotEmpty27 = null;\n\n\n $v=null;\n try {\n // Sparql10.g:218:5: ( ( propertyListNotEmpty )? ) \n // Sparql10.g:218:7: ( propertyListNotEmpty )? \n {\n // Sparql10.g:218:7: ( propertyListNotEmpty )? \n $alt44=2;\n $alt44 = $this->dfa44->predict($this->input);\n switch ($alt44) {\n case 1 :\n // Sparql10.g:218:8: propertyListNotEmpty \n {\n $this->pushFollow(self::$FOLLOW_propertyListNotEmpty_in_propertyList1336);\n $propertyListNotEmpty27=$this->propertyListNotEmpty();\n\n $this->state->_fsp--;\n\n $v = $propertyListNotEmpty27;\n\n }\n break;\n\n }\n\n\n }\n\n $value=$v?$v:new Erfurt_Sparql_Query2_PropertyList();\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return $value;\n }", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "e7c4ee5694ab9ec23a7ea6c258f32533", "score": "0.73321515", "text": "public function getProperties();", "title": "" }, { "docid": "65b2005e673952bc3295f89eb34a84cc", "score": "0.7315657", "text": "public function getAllProperties()\n {\n return $this->_properties;\n }", "title": "" }, { "docid": "65b2005e673952bc3295f89eb34a84cc", "score": "0.7315657", "text": "public function getAllProperties()\n {\n return $this->_properties;\n }", "title": "" }, { "docid": "13fb8be00112d1abf7346171faf82d4f", "score": "0.7308739", "text": "public function _getProperties() {\n return $this->_properties;\n }", "title": "" }, { "docid": "76ac21f44a3d06d49ae48d32ac113182", "score": "0.7299984", "text": "public function getAllProperties()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "64f03ae94b4400a74441d6508d964980", "score": "0.7294539", "text": "public function getProperties() {\n if (is_array($this->_props)) {\n return $this->_props;\n } else {\n return [];\n }\n }", "title": "" }, { "docid": "e4f9286abae301eda0943cf00c97796c", "score": "0.7252054", "text": "public function getProperties() {}", "title": "" }, { "docid": "e4f9286abae301eda0943cf00c97796c", "score": "0.7252054", "text": "public function getProperties() {}", "title": "" }, { "docid": "292a7a9c283763be0856d0b580e5b59f", "score": "0.7248422", "text": "public function getPropertiesSelect()\n {\n $pl = new PropertyList();\n $properties = $pl->get();\n $arr = [];\n foreach ($properties as $property) {\n /** @var $property Property */\n $arr[$property->getID()] = $property->getName();\n }\n return $arr;\n }", "title": "" }, { "docid": "ca10c96c2a40936cdf20858466cc727e", "score": "0.7195833", "text": "function getProperties() : array ;", "title": "" }, { "docid": "1253e670ca989d408984da11eaad6bd8", "score": "0.7189974", "text": "public function getProperties()\n {\n return $this->_propDict;\n }", "title": "" }, { "docid": "2a20f71680eb7ee274743d1bff672b24", "score": "0.7117925", "text": "function &getProperties() {\n\t\treturn $this->_properties;\n\t}", "title": "" }, { "docid": "e15d0622845f9b882d7508335bbf80ce", "score": "0.7105885", "text": "public static function getProperties(): array\n {\n return static::$properties;\n }", "title": "" }, { "docid": "9d142b2e4e74d80b0ffd5f6143e6f769", "score": "0.7102642", "text": "public function getProperties(): array;", "title": "" }, { "docid": "9d142b2e4e74d80b0ffd5f6143e6f769", "score": "0.7102642", "text": "public function getProperties(): array;", "title": "" }, { "docid": "ad6cc76d85578a7aac51bae033db4a64", "score": "0.7081896", "text": "public function propertiesIdents()\n {\n $metadata = $this->proto()->metadata();\n if (isset($metadata['admin']['lists'])) {\n $adminMetadata = $metadata['admin'];\n $collectionIdent = $this->collectionIdent();\n if (isset($adminMetadata['lists'][$collectionIdent]['properties'])) {\n return $adminMetadata['lists'][$collectionIdent]['properties'];\n }\n }\n\n return [];\n }", "title": "" }, { "docid": "03021f561584d40b16bf2c149245f1ab", "score": "0.70518726", "text": "public function getProperties() : array;", "title": "" }, { "docid": "4953c5107990ffcc2d7be47cfb511d67", "score": "0.70426095", "text": "public function properties() \n {\n $properties = $this->renderWith();\n\n if (is_null($properties)) {\n return [];\n }\n\n return $properties;\n }", "title": "" }, { "docid": "a2131c7a1c4638f348ab726b414f42cf", "score": "0.7028154", "text": "public function getProperties() : array {}", "title": "" }, { "docid": "a2131c7a1c4638f348ab726b414f42cf", "score": "0.7028154", "text": "public function getProperties() : array {}", "title": "" }, { "docid": "ba9c3101ebc8bba44a9f15957bcfeb2d", "score": "0.70157194", "text": "public function getProperty() {\n\t \treturn get_object_vars($this);\n\t }", "title": "" }, { "docid": "aa1eb8e15ad0e7ede7e8e64229ff48cc", "score": "0.6999284", "text": "public function getProperties() {\n\t\t$this->updateAllProperties();\n\t\treturn $this->properties;\n\t}", "title": "" }, { "docid": "28b8543cb88fb3d4b55cb10617428bb6", "score": "0.69677836", "text": "public function getProperties() {\n\t return array_keys($this->properties);\n\t}", "title": "" }, { "docid": "7094301671059eeb33bcc27fbbcfc5fd", "score": "0.69506806", "text": "public function getAllProperties();", "title": "" }, { "docid": "7094301671059eeb33bcc27fbbcfc5fd", "score": "0.69506806", "text": "public function getAllProperties();", "title": "" }, { "docid": "a7a208674bf0241017a81f4dce14118a", "score": "0.69429463", "text": "public function getProperty() {\n\t\treturn get_object_vars($this);\n\t}", "title": "" }, { "docid": "a7a208674bf0241017a81f4dce14118a", "score": "0.69429463", "text": "public function getProperty() {\n\t\treturn get_object_vars($this);\n\t}", "title": "" }, { "docid": "a7a208674bf0241017a81f4dce14118a", "score": "0.69429463", "text": "public function getProperty() {\n\t\treturn get_object_vars($this);\n\t}", "title": "" }, { "docid": "77d76119f1ca2b9e2bef97b8da90e98c", "score": "0.6927976", "text": "public function as_array()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "855829238887b747e04c96bbbdf8be41", "score": "0.69043493", "text": "public function _getProperties();", "title": "" }, { "docid": "807d8a6a7ce3e7d9957f902d2141feb4", "score": "0.68669194", "text": "function get_data() {\r\n \t\treturn $this->_properties;\r\n\t}", "title": "" }, { "docid": "b201e6133ad2e02b6e5057e224bbdb99", "score": "0.68403524", "text": "abstract public function getProperties();", "title": "" }, { "docid": "46332f6fb2d3ca3d9d9860b5b8efc06b", "score": "0.6780928", "text": "public function properties()\n {\n return array_keys($this->_properties);\n }", "title": "" }, { "docid": "1a51b5424dd014e1c96410797310f778", "score": "0.67593104", "text": "public function getList() {\n\t\treturn $this->list;\n\t}", "title": "" }, { "docid": "106bc060ca5427d2fbc584018ca45c59", "score": "0.6755994", "text": "public static function getPropertyNames() {\n\t\treturn self::$PROPERTY_NAMES;\n\t}", "title": "" }, { "docid": "106bc060ca5427d2fbc584018ca45c59", "score": "0.6755994", "text": "public static function getPropertyNames() {\n\t\treturn self::$PROPERTY_NAMES;\n\t}", "title": "" }, { "docid": "651e7df90d0fbd25021aee9a10e40c98", "score": "0.6755974", "text": "function getList() {\n\t\t return $this->list;\n\t\t}", "title": "" }, { "docid": "47b3932536dd24e7b0686d79d2a8370e", "score": "0.6714119", "text": "function _getProperties() : array ;", "title": "" }, { "docid": "41e97d71e68e6014b2a710a25f42b0f1", "score": "0.6713369", "text": "public function getObjectProperties() : array\n {\n return $this->{$this->propertyContainer};\n }", "title": "" }, { "docid": "5706ce7a066f7cb35f2fbec2296d291b", "score": "0.666996", "text": "public function _getProperties() : array {}", "title": "" }, { "docid": "b9709a9907d41022b572b48a9352e86c", "score": "0.66617775", "text": "public function getProperties():array;", "title": "" }, { "docid": "ffc275e39cba4e3f052a82735aac81b6", "score": "0.66531396", "text": "public function getList()\n {\n return $this->list;\n }", "title": "" }, { "docid": "ffc275e39cba4e3f052a82735aac81b6", "score": "0.66531396", "text": "public function getList()\n {\n return $this->list;\n }", "title": "" }, { "docid": "ffc275e39cba4e3f052a82735aac81b6", "score": "0.66531396", "text": "public function getList()\n {\n return $this->list;\n }", "title": "" }, { "docid": "ffc275e39cba4e3f052a82735aac81b6", "score": "0.66531396", "text": "public function getList()\n {\n return $this->list;\n }", "title": "" }, { "docid": "ba729538b314ab5db62f39dd79a7fad4", "score": "0.6639529", "text": "public function properties();", "title": "" }, { "docid": "5b3d1ca44a694769b8bf1708f15a861e", "score": "0.6638177", "text": "public function get_list()\n \t{\t\n \t\treturn $this->list;\n \t}", "title": "" }, { "docid": "b5ce9265bcc1a38f4f71366c71ac0b1c", "score": "0.6632391", "text": "public static function getAllProperties()\n {\n return self::getCreateProperties();\n }", "title": "" }, { "docid": "b5ce9265bcc1a38f4f71366c71ac0b1c", "score": "0.6632391", "text": "public static function getAllProperties()\n {\n return self::getCreateProperties();\n }", "title": "" }, { "docid": "ba45047fa9b4508be71e9630b9e7ee87", "score": "0.6631752", "text": "public static function getProperties()\n {\n return [\n 'ID' => [false, self::PROPERTY_TYPE_INT, null, false, false],\n 'Type' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'RelatedClient' => [false, self::PROPERTY_TYPE_OBJECT, 'PracticeManager\\\\Client\\\\RelatedClient', false, false],\n 'NumberOfShares' => [false, self::PROPERTY_TYPE_INT, null, false, false],\n 'Percentage' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'StartDate' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'EndDate' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }", "title": "" }, { "docid": "4845cc61b78d9ffc1d9ab93c46bcb1ca", "score": "0.6594384", "text": "function get_all($from_db = TRUE)\r\n\t{\r\n\t\tif($from_db){\r\n\t\t\t$cp_model = new ContentProperty_model ( );\r\n\t\t\t$cp_model->cid = $this->cid;\r\n\t\t\t$properties = $cp_model->load_all ();\r\n\t\t\tforeach ( $properties as $property ) {\r\n\t\t\t\t$this->properties [$property->name] = $property;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->properties;\r\n\t}", "title": "" }, { "docid": "d627557fe2220fe9d46106a510b430ae", "score": "0.657482", "text": "public function getProperties(): array\n {\n return array_map(function($xProperty) {\n return $xProperty->getName();\n }, $this->xReflectionClass->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED));\n }", "title": "" }, { "docid": "1909ce771551bead3e3f9aa24ef20ec4", "score": "0.6571876", "text": "public function getProphecies()\n {\n return $this->prophecies;\n }", "title": "" }, { "docid": "d070fe9255271fc5ce99902f7d13f946", "score": "0.6564893", "text": "public function getProperties()\n {\n $result = array_merge(\n $this->parsePublicProperties(), \n $this->parseMagicProperties()\n ); \n return $result;\n }", "title": "" }, { "docid": "4ceb93aea09c92a4fa77549b0a64de98", "score": "0.6551003", "text": "public function getPropertiesAsArray()\n\t{\n\t\treturn $this->model->getPropertiesAsArray();\n\t}", "title": "" }, { "docid": "29bb45fce3eb52442116bdfe141b13db", "score": "0.65494114", "text": "public function get()\n {\n return $this->list;\n }", "title": "" }, { "docid": "5df9c35ed0456842b7ef006db1e02257", "score": "0.6545715", "text": "public function getAllProperties()\n {\n $xpath = new DOMXPath($this->ownerDocument);\n $xpath->registerNamespace('ini', $this->namespaceURI);\n\n if ( ! $this->isRoot() ) {\n\n return $xpath->query('./ini:property', $this);\n\n }\n\n return $xpath->query('//ini:property', $this);\n }", "title": "" }, { "docid": "0856ebfab3d85e0f558b7d18a2cc2fce", "score": "0.6505346", "text": "public function getPropertyValues()\n\t{\n\t\t$propertyValues = new \\modules\\properties\\components\\propertiesValues\\lib\\PropertyValues();\n\t\t$propertyValues->setSubquery(' AND `propertyId`=?d ', (int)$this->id)->setOrderBy('`priority` ASC');\n\t\treturn $propertyValues;\n\t}", "title": "" }, { "docid": "b45cd8ad51bdef0dce4a99574b3e7665", "score": "0.65044165", "text": "public static function getProperties()\n {\n return [\n 'timesheetLineID' => [false, self::PROPERTY_TYPE_GUID, null, false, false],\n 'earningsRateID' => [true, self::PROPERTY_TYPE_GUID, null, false, false],\n 'date' => [true, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'numberOfUnits' => [true, self::PROPERTY_TYPE_INT, null, false, false],\n 'updatedDateUTC' => [false, self::PROPERTY_TYPE_TIMESTAMP, '\\\\DateTimeInterface', false, false],\n 'createdDateUTC' => [false, self::PROPERTY_TYPE_TIMESTAMP, '\\\\DateTimeInterface', false, false],\n ];\n }", "title": "" }, { "docid": "b00e9f8a9119eef3644819263451dfbc", "score": "0.65021676", "text": "protected function properties()\n {\n return [\n 'assigned_objects' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__POPUP__BROWSER__SELECTED_OBJECT',\n C__PROPERTY__INFO__DESCRIPTION => 'Assigned objects'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_share_access_list__isys_connection__id',\n C__PROPERTY__DATA__RELATION_TYPE => C__RELATION_TYPE__SHARE_ACCESS,\n C__PROPERTY__DATA__RELATION_HANDLER => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_share_access',\n 'callback_property_relation_handler'\n ], [\n 'isys_cmdb_dao_category_g_share_access',\n true\n ]\n ),\n C__PROPERTY__DATA__FIELD_ALIAS => 'access_object',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_connection',\n 'isys_connection__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__SHARE_ACCESS__ASSIGNED_OBJECTS',\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'connection'\n ]\n ]\n ]\n ),\n 'mountpoint' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__SHARE_ACCESS__MOUNTPOINT',\n C__PROPERTY__INFO__DESCRIPTION => 'Mountpoint'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_share_access_list__mountpoint'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__SHARE_ACCESS__MOUNTPOINT'\n ]\n ]\n ),\n 'shares' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__SHARES__SHARE_NAME',\n C__PROPERTY__INFO__DESCRIPTION => 'Share title'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_share_access_list__isys_catg_shares_list__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_shares_list',\n 'isys_catg_shares_list__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__SHARE_ACCESS__ASSIGNED_SHARE',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_share_access',\n 'callback_property_shares'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__SEARCH => false,\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'share_access'\n ]\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'LC__CMDB__LOGBOOK__DESCRIPTION'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_share_access_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__SHARE_ACCESS\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "538f1959cc5ffa36273e5b45341ac44b", "score": "0.6497416", "text": "public function getOrderProps()\n {\n //check order loaded\n $this->checkOrder();\n\n $ret = array();\n $this->properties = $this->order->getPropertyCollection();\n if(empty($this->properties))\n return $ret;\n foreach($this->properties->getArray()['properties'] as $prop)\n $ret[$prop['CODE']] = current($prop['VALUE']);\n return $ret;\n }", "title": "" }, { "docid": "01a6f1d04bddd5a9638b1a8470f51159", "score": "0.6494994", "text": "public function pullMLSProperties()\n {\n $properties = [];\n\n $latestPullDate = !$this->ignoreLatestPullDate ? $this->getLatestPullDate() : null;\n\n $query = $latestPullDate ?\n sprintf('(%s=%s+)', static::MLS_COLUMN_UPDATED_AT, $latestPullDate) :\n sprintf('(%s=%s)', static::MLS_COLUMN_STATUS, static::STATUS_ACTIVE_LOOKUP);\n\n foreach (static::CLASSES as $type) {\n $propertiesByType = $this->session->Search('Property', $type, $query)->toArray();\n $properties = array_merge($properties, $propertiesByType);\n\n Log::info('Number of properties retrieved for ' . $type . ': ' . count($propertiesByType));\n }\n\n\n $media = $this->pullMLSMedia($properties);\n\n // Map photos and thumbnails to each property\n forEach ($properties as &$property) {\n $mlsId = array_get($property, static::MLS_COLUMN_ID);\n\n $property['photos'] = array_get($media['photos'], $mlsId, '[]');\n $property['thumbnails'] = array_get($media['thumbnails'], $mlsId, '[]');\n }\n\n return $properties;\n }", "title": "" }, { "docid": "e2167b1c44043cdceb9fe129d68fa138", "score": "0.649227", "text": "protected function properties()\n {\n return [\n 'directory_number' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__DIRECTORY_NUMBER',\n C__PROPERTY__INFO__DESCRIPTION => 'Directory number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__directory_number'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__DIRECTORY_NUMBER',\n ]\n ]\n ),\n 'route_partition' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ROUTE_PARTITION',\n C__PROPERTY__INFO__DESCRIPTION => 'Route partition'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__route_partition'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ROUTE_PARTITION',\n ]\n ]\n ),\n 'description2' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__description2'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__DESCRIPTION',\n ]\n ]\n ),\n 'alerting_name' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ALERTING_NAME',\n C__PROPERTY__INFO__DESCRIPTION => 'Alerting name'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__alerting_name'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ALERTING_NAME',\n ]\n ]\n ),\n 'ascii_alerting_name' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ASCII_ALERTING_NAME',\n C__PROPERTY__INFO__DESCRIPTION => 'ASCII alerting name'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ascii_alerting_name'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ASCII_ALERTING_NAME',\n ]\n ]\n ),\n 'allow_cti_control' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ALLOW_CTI_CONTROL',\n C__PROPERTY__INFO__DESCRIPTION => 'Allow control of device from CTI'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__allow_cti_control'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ALLOW_CTI_CONTROL',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'associated_devices' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_list(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ASSOCIATED_DEVICES',\n C__PROPERTY__INFO__DESCRIPTION => 'Associated devices'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__id'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ASSOCIATED_DEVICES',\n C__PROPERTY__UI__PARAMS => [\n 'p_arData' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_voip_phone_line',\n 'callback_property_associated_devices'\n ]\n )\n ]\n ]\n ]\n ),\n 'voice_mail_profile' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__VOICE_MAIL_PROFILE',\n C__PROPERTY__INFO__DESCRIPTION => 'Voice mail profile'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__voice_mail_profile'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__VOICE_MAIL_PROFILE',\n ]\n ]\n ),\n 'calling_search_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALLING_SEARCH_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Calling search space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__calling_search_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALLING_SEARCH_SPACE',\n ]\n ]\n ),\n 'presence_group' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__PRESENCE_GROUP',\n C__PROPERTY__INFO__DESCRIPTION => 'Presence group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__presence_group'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__PRESENCE_GROUP',\n ]\n ]\n ),\n 'user_hold_moh_audio_source' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__USER_HOLD_MOH_AUDIO_SOURCE',\n C__PROPERTY__INFO__DESCRIPTION => 'User hold MOH audio source'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__user_hold_moh_audio_source'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__USER_HOLD_MOH_AUDIO_SOURCE',\n ]\n ]\n ),\n 'network_hold_moh_audio_source' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__NETWORK_HOLD_MOH_AUDIO_SOURCE',\n C__PROPERTY__INFO__DESCRIPTION => 'Network hold MOH audio source'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__network_hold_moh_audio_source'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__NETWORK_HOLD_MOH_AUDIO_SOURCE',\n ]\n ]\n ),\n 'auto_answer' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__AUTO_ANSWER',\n C__PROPERTY__INFO__DESCRIPTION => 'Auto answer'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__auto_answer'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__AUTO_ANSWER',\n ]\n ]\n ),\n 'call_forward_all' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALL_FORWARD_ALL',\n C__PROPERTY__INFO__DESCRIPTION => 'Call forward all'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__call_forward_all'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALL_FORWARD_ALL',\n ]\n ]\n ),\n 'sec_calling_search_space' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__SEC_CALLING_SEARCH_SPACE',\n C__PROPERTY__INFO__DESCRIPTION => 'Secondary Calling Search Space for Forward All'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__sec_calling_search_space'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__SEC_CALLING_SEARCH_SPACE',\n ]\n ]\n ),\n 'forward_busy_internal' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_BUSY_INTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward busy internal'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_busy_internal'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_BUSY_INTERNAL',\n ]\n ]\n ),\n 'forward_busy_external' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_BUSY_EXTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward busy external'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_busy_external'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_BUSY_EXTERNAL',\n ]\n ]\n ),\n 'forward_no_answer_internal' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_ANSWER_INTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward no answer internal'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_no_answer_internal'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_ANSWER_INTERNAL',\n ]\n ]\n ),\n 'forward_no_answer_external' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_ANSWER_EXTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward no answer external'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_no_answer_external'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_ANSWER_EXTERNAL',\n ]\n ]\n ),\n 'forward_no_coverage_internal' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_COVERAGE_INTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward no coverage internal'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_no_coverage_internal'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_COVERAGE_INTERNAL',\n ]\n ]\n ),\n 'forward_no_coverage_external' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_COVERAGE_EXTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward no coverage external'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_no_coverage_external'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_NO_COVERAGE_EXTERNAL',\n ]\n ]\n ),\n 'forward_on_cti_fail' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_ON_CTI_FAIL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward on CTI fail'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_on_cti_fail'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_ON_CTI_FAIL',\n ]\n ]\n ),\n 'forward_unregistered_internal' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_UNREGISTERED_INTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward unregistered internal'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_unregistered_internal'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_UNREGISTERED_INTERNAL',\n ]\n ]\n ),\n 'forward_unregistered_external' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_UNREGISTERED_EXTERNAL',\n C__PROPERTY__INFO__DESCRIPTION => 'Forward unregistered external'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__forward_unregistered_external'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__FORWARD_UNREGISTERED_EXTERNAL',\n ]\n ]\n ),\n 'no_answer_ring_duration' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__NO_ANSWER_RING_DURATION',\n C__PROPERTY__INFO__DESCRIPTION => 'No answer ring duration'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__no_answer_ring_duration'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__NO_ANSWER_RING_DURATION',\n ]\n ]\n ),\n 'call_pickup_group' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP',\n C__PROPERTY__INFO__DESCRIPTION => 'Call pickup group'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__call_pickup_group'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP',\n ]\n ]\n ),\n 'display' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__DISPLAY',\n C__PROPERTY__INFO__DESCRIPTION => 'Display'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__display'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__DISPLAY',\n ]\n ]\n ),\n 'ascii_display' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ASCII_DISPLAY',\n C__PROPERTY__INFO__DESCRIPTION => 'ASCII Display'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ascii_display'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ASCII_DISPLAY',\n ]\n ]\n ),\n 'line_text_label' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__LINE_TEXT_LABEL',\n C__PROPERTY__INFO__DESCRIPTION => 'Line text label'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__line_text_label'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__LINE_TEXT_LABEL',\n ]\n ]\n ),\n 'ascii_line_text_label' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__ASCII_LINE_TEXT_LABEL',\n C__PROPERTY__INFO__DESCRIPTION => 'ASCII Line text label'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ascii_line_text_label'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__ASCII_LINE_TEXT_LABEL',\n ]\n ]\n ),\n 'visual_message_indicator' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__VISUAL_MESSAGE_INDICATOR',\n C__PROPERTY__INFO__DESCRIPTION => 'Visual Message Waiting Indicator Policy'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__visual_message_indicator'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__VISUAL_MESSAGE_INDICATOR',\n ]\n ]\n ),\n 'audible_message_indicator' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__AUDIBLE_MESSAGE_INDICATOR',\n C__PROPERTY__INFO__DESCRIPTION => 'Audible Message Waiting Indicator Policy'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__audible_message_indicator'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__AUDIBLE_MESSAGE_INDICATOR',\n ]\n ]\n ),\n 'ring_settings_idle' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__RING_SETTINGS_IDLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Ring Setting (Phone idle)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ring_settings_idle'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__RING_SETTINGS_IDLE',\n ]\n ]\n ),\n 'ring_settings_active' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__RING_SETTINGS_ACTIVE',\n C__PROPERTY__INFO__DESCRIPTION => 'Ring Setting (Phone active)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__ring_settings_active'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__RING_SETTINGS_ACTIVE',\n ]\n ]\n ),\n 'call_pickup_group_idle' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP_IDLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Call pickup group audio alert setting (phone idle)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__call_pickup_group_idle'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP_IDLE',\n ]\n ]\n ),\n 'call_pickup_group_active' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP_ACTIVE',\n C__PROPERTY__INFO__DESCRIPTION => 'Call pickup group audio alert setting (phone active)'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__call_pickup_group_active'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALL_PICKUP_GROUP_ACTIVE',\n ]\n ]\n ),\n 'recording_option' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__RECORDING_OPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Recording option'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__recording_option'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__RECORDING_OPTION',\n ]\n ]\n ),\n 'recording_profile' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__RECORDING_PROFILE',\n C__PROPERTY__INFO__DESCRIPTION => 'Recording profile'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__recording_profile'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__RECORDING_PROFILE',\n ]\n ]\n ),\n 'monitoring_css' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__MONITORING_CSS',\n C__PROPERTY__INFO__DESCRIPTION => 'Monitoring calling search space'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__monitoring_css'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__MONITORING_CSS',\n ]\n ]\n ),\n 'log_missed_calls' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__LOG_MISSED_CALLS',\n C__PROPERTY__INFO__DESCRIPTION => 'Log missed calls'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__log_missed_calls'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__LOG_MISSED_CALLS',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'external_phone_number_mask' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__EXTERNAL_PHONE_NUMBER_MASK',\n C__PROPERTY__INFO__DESCRIPTION => 'External phone number mask'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__external_phone_number_mask'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__EXTERNAL_PHONE_NUMBER_MASK',\n ]\n ]\n ),\n 'max_number_of_calls' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__MAX_NUMBER_OF_CALLS',\n C__PROPERTY__INFO__DESCRIPTION => 'Maximum number of calls'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__max_number_of_calls'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__MAX_NUMBER_OF_CALLS',\n ]\n ]\n ),\n 'busy_trigger' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__BUSY_TRIGGER',\n C__PROPERTY__INFO__DESCRIPTION => 'Busy trigger'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__busy_trigger'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__BUSY_TRIGGER',\n ]\n ]\n ),\n 'caller_name' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALLER_NAME',\n C__PROPERTY__INFO__DESCRIPTION => 'Caller name'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__caller_name'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALLER_NAME',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'caller_number' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__CALLER_NUMBER',\n C__PROPERTY__INFO__DESCRIPTION => 'Caller number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__caller_number'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__CALLER_NUMBER',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'redirected_number' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__REDIRECTED_NUMBER',\n C__PROPERTY__INFO__DESCRIPTION => 'Redirected number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__redirected_number'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__REDIRECTED_NUMBER',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'dialed_number' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__VOIP_PHONE_LINE__DIALED_NUMBER',\n C__PROPERTY__INFO__DESCRIPTION => 'Dialed number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__dialed_number'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CATG__VOIP_PHONE_LINE__DIALED_NUMBER',\n C__PROPERTY__UI__TYPE => C__PROPERTY__UI__TYPE__CHECKBOX\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__LOGBOOK__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_voip_phone_line_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__VOIP_PHONE_LINE\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "99352ec8ef514d495c44fed3aa24a6cb", "score": "0.6463971", "text": "public function getPropertyMap() {\n return $this->propertyMap;\n }", "title": "" }, { "docid": "4d50f345be0c83efa2e918e6e640a5af", "score": "0.6463545", "text": "public function getPropeties() {\n return $this->properties->copy();\n }", "title": "" }, { "docid": "09db1839d2c7a29d810d0faf6a0f1bee", "score": "0.64387494", "text": "public function ownProperties()\n {\n \treturn array_keys( $this->properties );\n }", "title": "" }, { "docid": "70a9f19af01160033c998c7571c7fc88", "score": "0.642955", "text": "public function properties()\n {\n return $this->belongsToMany(Property::class);\n }", "title": "" }, { "docid": "322692b76e48c470a13f3d350efe5a1a", "score": "0.6428733", "text": "public static function getProperties()\n {\n return [\n 'timesheetID' => [false, self::PROPERTY_TYPE_GUID, null, false, false],\n 'payrollCalendarID' => [false, self::PROPERTY_TYPE_GUID, null, false, false],\n 'employeeID' => [false, self::PROPERTY_TYPE_GUID, null, false, false],\n 'startDate' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'endDate' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'status' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'totalHours' => [false, self::PROPERTY_TYPE_FLOAT, null, false, false],\n 'updatedDateUTC' => [false, self::PROPERTY_TYPE_DATE, '\\\\DateTimeInterface', false, false],\n 'lines' => [false, self::PROPERTY_TYPE_OBJECT, Line::class, true, true]\n ];\n }", "title": "" }, { "docid": "685f46f7312e357256d0e099305629b7", "score": "0.6428424", "text": "public function getList()\n {\n return $this->get(self::_LIST);\n }", "title": "" } ]
def7f2191a0c44e41335f5afec362120
Sets the query to the database object
[ { "docid": "1aaaa9ad9e440fc1670015a813036bf6", "score": "0.0", "text": "public function setQuery( $sql, $limit = 0, $offset = 0 )\r\n\t{\r\n\t\tif (! $sql ) return false;\r\n\t\t\r\n\t\tif ( is_integer( $limit ) ) {\r\n\t\t\t// Be sure to reset arguments\r\n\t\t\t$this->_arguments\t=\tarray();\r\n\t\t\t$this->_limit\t= (int) $limit;\r\n\t\t\t$this->_offset\t= (int) $offset;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->_arguments\t=\t(array) $limit;\t// Can be an array now\r\n\t\t}\r\n\t\t\r\n\t\t$this->_cursor\t=\tnull;\r\n\t\t$this->_sql\t\t=\t$sql;\r\n\t\t\r\n\t\treturn true;\r\n\t}", "title": "" } ]
[ { "docid": "2e9c2eed3b038072b4ea5b434e30947e", "score": "0.7390128", "text": "public function setQuery() : void;", "title": "" }, { "docid": "55918c2f9e52bb3f218ee4af83699884", "score": "0.71202105", "text": "protected function createQueryObject()\n {\n $this->query = Zig_Model_Query::create();\n }", "title": "" }, { "docid": "89e6a9a58123252a93ff776aef0ebb00", "score": "0.7083339", "text": "public static function set_query_builder() \n\t{\n\t\t// Set schema manager\n\t\tself::$query = self::$dbal->createQueryBuilder();\n\t}", "title": "" }, { "docid": "0dc369e0bbaf6a3d937ad130a747e5ef", "score": "0.70775825", "text": "public function setQuery($query) {}", "title": "" }, { "docid": "afb8a9474c4a8c8f2a7f2620ce8a2164", "score": "0.7024492", "text": "function Query($query){\r\n\r\n $this->query = $query;\r\n $this->execultaQuery();\r\n\r\n }", "title": "" }, { "docid": "ed3815de2f36ce9c9ede6cd738520772", "score": "0.69461334", "text": "public function setQuery($query) {\n $this->query = $query;\n }", "title": "" }, { "docid": "f96ebed42a779806c67300d0304decac", "score": "0.68791497", "text": "public function resetQuery()\n {\n $this->query = $this->createQuery();\n }", "title": "" }, { "docid": "8be51bde4a755d8329ae71acaaf0b4f3", "score": "0.6860603", "text": "abstract protected function initQuery();", "title": "" }, { "docid": "198d4cb1114852d70c7d0cf0ab8f3813", "score": "0.68237823", "text": "public function setQuery($query)\n {\n $this->query = $query;\n }", "title": "" }, { "docid": "0e09ef4dab652c17dd75064a790b8a44", "score": "0.67600656", "text": "public function query(DatabaseQuery $query);", "title": "" }, { "docid": "95c134467166a480cf308aa8865dba99", "score": "0.6747372", "text": "function setQuery($sql){ \n \t$this->_query=(string)$sql;\n \treturn $this;\n }", "title": "" }, { "docid": "6e4d072b07873a334af544d7d36690d0", "score": "0.6713251", "text": "public function initQuery()\n {\n return $this->getConn()->createQueryBuilder();\n }", "title": "" }, { "docid": "5de2cda7c2cfd25fdfef1fe58e9f1b3e", "score": "0.6711507", "text": "function setQuery($sql){}", "title": "" }, { "docid": "ebb74e14ae66d469e3832573e70fd26c", "score": "0.669523", "text": "public function setQuery($query){\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "f3add393527f0d323d6e10a2f34a06dc", "score": "0.66763246", "text": "public function query($query)\r\n {\r\n $this->statement = $this->database_handler->prepare($query);\r\n }", "title": "" }, { "docid": "9a80216dfbfe1cb7b724fcf5423fa960", "score": "0.66344774", "text": "function query() {\r\n $args = func_get_args();\r\n if (count($args) == 1 && is_array($args[0]) ) $args = $args[0];\r\n $this->_qs = call_user_func_array('_db_prepare', $args);\r\n\r\n return $this->_resolve_query($this->db_rw);\r\n }", "title": "" }, { "docid": "9d5d3411a3df4e24e65f3bc652780971", "score": "0.6609935", "text": "abstract protected function _initQueries();", "title": "" }, { "docid": "349858fdbb02e11f51024370b9fd5cec", "score": "0.6599388", "text": "function query(){}", "title": "" }, { "docid": "83df69a23ee7ff10dad1a50f31b0f7da", "score": "0.6588279", "text": "public function query($query) {\n $this->stmt = $this->dbh->prepare($query);\n }", "title": "" }, { "docid": "a823cee5809913cb30fc965dd6b4c2fa", "score": "0.6582674", "text": "public function query($query){\n\t\t$this->stmt = $this->dbh->prepare($query);\n\t}", "title": "" }, { "docid": "b73749898ff43e6abe206289119c2e3d", "score": "0.65780085", "text": "public function setQuery($query)\r\n\t{\r\n\t\t$this->query = $query;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "3d49eb458d42fd0ff759312f7f81b0e0", "score": "0.65777075", "text": "public function query($query)\n\t{\n\t\t$this->statement = $this->dbh->prepare($query);\n\t}", "title": "" }, { "docid": "00bea94611f464b813875eeb76c47a9e", "score": "0.65607125", "text": "protected function query()\n {\n $this->prepare($this->adapter->query(\n $this->table,\n $this->select,\n $this->distinct,\n $this->join,\n $this->in,\n $this->notIn,\n $this->where,\n $this->between,\n $this->notBetween,\n $this->groupBy,\n $this->having,\n $this->orderBy,\n $this->limit,\n $this->offset,\n $this->withTrashed\n ));\n if (!empty($this->between)) {\n $this->bind('value1', $this->between['value1']);\n $this->bind('value2', $this->between['value2']);\n }\n if (!empty($this->notBetween)) {\n $this->bind('value1', $this->notBetween['value1']);\n $this->bind('value2', $this->notBetween['value2']);\n }\n if (!empty($this->where)) {\n foreach ($this->where as $key => $value) {\n $this->bind($key, $value['value']);\n }\n }\n if (!empty($this->having)) {\n $this->bind($this->having['field'], $this->having['value']); \n }\n if (\\App::config('database.' . $this->connection . '.strict')) {\n $this->setSqlMode(\\App::config('database.' . $this->connection . '.strict'));\n }\n $this->execute();\n }", "title": "" }, { "docid": "55d7c3617f76f88552235a43d00cb3aa", "score": "0.6553405", "text": "public function query() {\n\t\treturn new Query(TableLoader::connectSQL(), $this);\n\t}", "title": "" }, { "docid": "dd57dab82d5f5795b20af1231e9d1087", "score": "0.65441686", "text": "public function setQuery(Zend_Db_Select $_query)\r\n {\r\n $this->_query = $_query;\r\n }", "title": "" }, { "docid": "47ab0418d95015f8d452f6d5fca737a2", "score": "0.65336895", "text": "public function initQuery()\n {\n if (!$this->table) {\n throw $this->exception('$table property must be defined');\n }\n $this->dsql = $this->db->dsql();\n $this->dsql->debug($this->debug);\n $this->dsql->table($this->table, $this->table_alias);\n $this->dsql->default_field = $this->dsql->expr('*,'.\n $this->dsql->bt($this->table_alias ?: $this->table).'.'.\n $this->dsql->bt($this->id_field))\n ;\n $this->dsql->id_field = $this->id_field;\n\n return $this;\n }", "title": "" }, { "docid": "57651b3f342e366dc0eea878e1b2a46a", "score": "0.6525488", "text": "protected function setQuery($query)\n {\n $this->checkIsLocked();\n\n $this->query = $query;\n }", "title": "" }, { "docid": "97b90d7e483bced263e2e92c6a048267", "score": "0.652107", "text": "public function query($query){\n \t$this->stmt = $this->dbh->prepare($query);\n\t}", "title": "" }, { "docid": "1e3c678090a55f7f201845393509ee91", "score": "0.65030473", "text": "public function query($query)\n {\n $this->stmt = $this->dbh->prepare($query);\n }", "title": "" }, { "docid": "bf32ddcd8b52544ac7ed5a441b2373c3", "score": "0.64942104", "text": "public function query($query){\n $this->stmt = $this->dbh->prepare($query); // PDO prepare\n }", "title": "" }, { "docid": "bb2e55bd0c9aa3fb7d01ec76470e8299", "score": "0.64588517", "text": "private function initialQueryBuilder()\n {\n $this->select = [];\n $this->from = '';\n $this->where = [];\n $this->orderBy = [];\n $this->limit = null;\n $this->offset = null;\n }", "title": "" }, { "docid": "519d680cffc97c9e19a98c1fdec65cc8", "score": "0.63973796", "text": "public function setQuery($query)\n {\n $this->query = $query;\n return $this;\n }", "title": "" }, { "docid": "969e5b9a1a7e29c10a574d27b57c49c2", "score": "0.6387612", "text": "public function setQuery($q)\n {\n $this->params['q'] = $q;\n return $this;\n }", "title": "" }, { "docid": "d17c74040fb607e677408130ea88a63f", "score": "0.638308", "text": "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "title": "" }, { "docid": "a44dbacd85f73daadf6e94c92c884f59", "score": "0.6371705", "text": "abstract protected function constructQuery();", "title": "" }, { "docid": "de595bc5ac61ad0cff973cbc476219d4", "score": "0.637095", "text": "public function createQuery()\n {\n return new Query($this);\n }", "title": "" }, { "docid": "2a73f2f0ee75f9087c2b2ff132dc47d4", "score": "0.6361992", "text": "public function __construct()\n {\n $this->db = DB::query();\n }", "title": "" }, { "docid": "8c9cb181ed8e0a85adeafc653c12509e", "score": "0.63601", "text": "protected function query()\n {\n if ($this->query == null) {\n $this->query = $this->model->newQuery();\n }\n\n return $this->query;\n }", "title": "" }, { "docid": "d999788be6302cdaae87d8af17ba7251", "score": "0.63535714", "text": "public static function setQuery($query)\n {\n /** @var \\Illuminate\\Database\\Eloquent\\Builder $instance */\n return $instance->setQuery($query);\n }", "title": "" }, { "docid": "afb393a43c02c020d88f6e3e213312e4", "score": "0.635299", "text": "public function createQuery()\n\t{\n\t}", "title": "" }, { "docid": "afb393a43c02c020d88f6e3e213312e4", "score": "0.635299", "text": "public function createQuery()\n\t{\n\t}", "title": "" }, { "docid": "8dc36043582c42ce972cda0d18bcab82", "score": "0.63463396", "text": "public function query()\n {\n $query = new Query();\n\n $query->setAB($this);\n\n $this->lastQuery = $query;\n\n return $query;\n }", "title": "" }, { "docid": "d411bfb81ff6e06d9c48bc7a0123856b", "score": "0.633052", "text": "public function setQuery($query)\n {\n $this->connect()->freeResult();\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "b4bb37a74c3b1be3c1deae79985644b4", "score": "0.6327679", "text": "function store() {\n //$dbo = Db::getInstance();\n $sql = $this->buildQuery();\n $this->db->doQuery($sql);\n }", "title": "" }, { "docid": "51ce0f8aff7a37478cca01f0af659872", "score": "0.63006353", "text": "public function set_query($_query)\n\t\t{\n\t\t\t$this->m_query = $_query;\n\t\t}", "title": "" }, { "docid": "7fce0fc4ac5be884ddaf328777364e9a", "score": "0.62989074", "text": "abstract public function newQuery();", "title": "" }, { "docid": "7fce0fc4ac5be884ddaf328777364e9a", "score": "0.62989074", "text": "abstract public function newQuery();", "title": "" }, { "docid": "f8df61fadd084bdfcf8038acb1f49e5a", "score": "0.62988776", "text": "function query() {\n }", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.62928236", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.62928236", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.62928236", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.62928236", "text": "public function query();", "title": "" }, { "docid": "2b2c2e0d677b4403c4fe2d87fc1e6558", "score": "0.62928236", "text": "public function query();", "title": "" }, { "docid": "87d89bef446b510de177f1c12b07d536", "score": "0.62805384", "text": "public function query()\n\t{\n\n\t}", "title": "" }, { "docid": "27ce4a408c536c1ad2e5aae95e859a2d", "score": "0.62699836", "text": "public function makeQuery():void;", "title": "" }, { "docid": "1c98d044f655ce1f57054871391a5803", "score": "0.62695044", "text": "public function setQuery( string $query )\n {\n $this->query = $query;\n }", "title": "" }, { "docid": "808a3093f69d98b92c41618544ceceb5", "score": "0.6263926", "text": "public function q()\n\t{\n\t\t$this->connect();\n\t\treturn new Atomik_Db_Query($this);\n\t}", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.62583494", "text": "public function query($query);", "title": "" }, { "docid": "417ba1e99a7dc59988a9d804633f648d", "score": "0.62583494", "text": "public function query($query);", "title": "" }, { "docid": "bec5826de5662c3cbab6f6beb5f9e02d", "score": "0.6250477", "text": "public function query()\n {\n return new QueryBuilder($this);\n }", "title": "" }, { "docid": "6af054627b4b9d0226655a07acd729f1", "score": "0.62489444", "text": "function DoQuery()\n {\n parent::DoQuery();\n }", "title": "" }, { "docid": "6af054627b4b9d0226655a07acd729f1", "score": "0.62489444", "text": "function DoQuery()\n {\n parent::DoQuery();\n }", "title": "" }, { "docid": "c39f6468400207f5f8b6edf9e0e71bf5", "score": "0.62463254", "text": "public static function withQuery($query): self;", "title": "" }, { "docid": "2ee3c4aff56980a75b8bfe26cea1f3c5", "score": "0.6241931", "text": "public function setQuery($val)\n {\n $this->_propDict[\"query\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "a26e33c7fc782363646ff663e8d19e46", "score": "0.6238161", "text": "public function query()\n {\n $args = func_get_args();\n $sql = $args[0];\n $this->stmt = parent::query($sql);\n return $this;\n }", "title": "" }, { "docid": "2cd04a23d62d1ea1c5bdb71c97012f0d", "score": "0.62286735", "text": "function ExecuteQuery($query) \n {\n parent::SetQuery($query);\n parent::DoQuery();\n }", "title": "" }, { "docid": "2cd04a23d62d1ea1c5bdb71c97012f0d", "score": "0.62286735", "text": "function ExecuteQuery($query) \n {\n parent::SetQuery($query);\n parent::DoQuery();\n }", "title": "" }, { "docid": "2cd04a23d62d1ea1c5bdb71c97012f0d", "score": "0.62286735", "text": "function ExecuteQuery($query) \n {\n parent::SetQuery($query);\n parent::DoQuery();\n }", "title": "" }, { "docid": "40b33fa34a44e973250cb8a72259d274", "score": "0.62283206", "text": "public function setQuery($sql)\n\t{\n\t\t$this->sql = $sql;\n\t}", "title": "" }, { "docid": "dc971ee96ca6eb6a8387b33794da94c2", "score": "0.6226007", "text": "public function setQuery(string $query, $final = true): Database\n {\n if (isset($this->query)) {\n $this->query .= $query;\n } else {\n $this->query = $query;\n }\n if ($final) {\n $this->query .= ' FROM ' . $this->table . ' '; \n }\n if (stristr($query, 'SELECT')) {\n $this->main = 'SELECT';\n }\n return $this;\n }", "title": "" }, { "docid": "cdce8211881aaf82d2e1bda55fc7ef6c", "score": "0.6223513", "text": "public function setQuery($name, $value = null)\n\t{\n\t $this->adapter->setQuery($name, $value);\n\t}", "title": "" }, { "docid": "19667e523491a2b2893321380cc95d8b", "score": "0.62200075", "text": "public function query($query){\n $q = $query;\n $this->statement = $this->db->prepare($q);\n if ($this->statement == false){echo 'query not prepared';}\n }", "title": "" }, { "docid": "7bbc515e50a831db066a2f37e4b0b8a2", "score": "0.6218634", "text": "public function query(SelectQuery $query = null)\n\t{\n\t\tif ($query !== null) {\n\t\t\t$this->query = $query;\n\t\t}\n\t\treturn $this->query;\n\t}", "title": "" }, { "docid": "334f3501ed1f7bb83d1b066bd472e633", "score": "0.61753047", "text": "public function setQuery(OutletQuery $q) {\n\t\tif ($this->q != $q) {\n\t\t\t$this->q = $q;\n\t\t\t$this->loaded = false;\n\t\t}\n\t}", "title": "" }, { "docid": "a49759a340719ce754fbe2a34fd0311e", "score": "0.61627644", "text": "public function createQuery() {\n $queryArr = array();\n\n $this->addSelect($queryArr);\n $this->addFrom($queryArr);\n $this->addWhere($queryArr);\n $this->addGroupBy($queryArr);\n $this->addSortBy($queryArr);\n $this->addHaving($queryArr);\n\n $this->query = implode(' ', $queryArr) . ';';\n }", "title": "" }, { "docid": "0c778cb16ae5784a25689c83d716d13c", "score": "0.61616856", "text": "function query() {\n $this->query->add_filter($this);\n }", "title": "" }, { "docid": "b67943b535805377d8b84f06af4f7b77", "score": "0.6160488", "text": "public function query() {}", "title": "" }, { "docid": "2cff969006b631ada7fa8c42d06d0812", "score": "0.61601377", "text": "function DB_Sql($query = \"\") {\r\n $this->query($query);\r\n }", "title": "" }, { "docid": "40fd9a222a3bafbed6e1eae16a061fb3", "score": "0.61471844", "text": "abstract public function prepareQueryBuilder();", "title": "" }, { "docid": "bde7dcb713a4971c9298a3da388ff9a7", "score": "0.6145884", "text": "public function setQuery(array $query) {\n $this->query = $query;\n }", "title": "" }, { "docid": "2d6df265013779eb608c4c2f994db3c8", "score": "0.6144171", "text": "public function query($query)\n\t{\n\t\t$this->parameters[':query'] = $query;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "89f6650075cbdbe3455ad682e82901a8", "score": "0.612251", "text": "public function setQuery($value)\n {\n return $this->set('Query', $value);\n }", "title": "" }, { "docid": "0a08fca904240db6e9bc0bf6839f2a77", "score": "0.6107772", "text": "function Query()\n {\n $this->id = 1;\n $this->query_string = \"\";\n $this->query_index = \"\";\n \t$this->first_hit = 1;\n $this->first_hit_shown = 1;\n }", "title": "" }, { "docid": "d3d5c3ca91fc4b0b33a8e21405949f1d", "score": "0.6090571", "text": "public static function setQuery(string $query)\n {\n self::$__query = $query;\n }", "title": "" }, { "docid": "dcd6b7809e1eaad65e9a28cd22a30f19", "score": "0.6080961", "text": "function query() {\n $this->ensure_my_table();\n\n // This isn't a real field, but we put it there nonetheless.\n $this->field_alias = $this->table_alias . '_is_current';\n\n $this->add_additional_fields();\n }", "title": "" }, { "docid": "ba5085a37581e35b58ed3629efc30113", "score": "0.6078278", "text": "public function query()\n {\n }", "title": "" }, { "docid": "d1a05db9732f1b719ed8ea3e24224116", "score": "0.6076965", "text": "public function query()\n {\n \t$class = Config::get('modeeling.database.builder.builder', Builder::class);\n return new $class( $this, $this->getQueryGrammar(), $this->getPostProcessor() );\n }", "title": "" }, { "docid": "705c3f56ad352e3e0e31e188a6d27e68", "score": "0.6074286", "text": "public function query (string $query) : self\n {\n Builder::query($query);\n return $this;\n }", "title": "" }, { "docid": "1f8e256892272891629c3dcc0a7bf851", "score": "0.60721993", "text": "public function __construct() {\n $this->db = JFactory::getDbo();\n // Create a new query object.\n $this->query = $this->db->getQuery(true);\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.6071297", "text": "function query() {\n }", "title": "" }, { "docid": "6b92abbb4d315675afd78a1b4ee52c4e", "score": "0.6065285", "text": "public function setQ($query)\n {\n $this->setQuery($query);\n\n return $this;\n }", "title": "" }, { "docid": "bf70e771fb5aeef4c0d742d8a43c525d", "score": "0.6041826", "text": "function query() {\n $this->field_alias = $this->real_field;\n }", "title": "" }, { "docid": "df8b040aed4dfec67b17e241927d56e5", "score": "0.6037339", "text": "public function query()\n {\n }", "title": "" }, { "docid": "d6630d65cf838bf6dcba57b8e8376d6d", "score": "0.603584", "text": "public function prepareQueryBuilder()\n {\n }", "title": "" }, { "docid": "9f44a9f5a04110ffbc8d79f179d32d98", "score": "0.6033433", "text": "public function setQuery(SelectInterface $query) {\n $this->query = $query;\n }", "title": "" }, { "docid": "59892d0298826f87c26db3fe2e481a98", "score": "0.6019087", "text": "protected function setQuery(string $query): ModelQueryResult\n\t{\n\t\t$this->query = $query;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b8ae09023108b7c4f64f638345e2adc4", "score": "0.6007433", "text": "protected function newQuery()\n {\n $this->query = $this->model->newQuery();\n return $this;\n }", "title": "" }, { "docid": "707dfc7ce1c5ec7412d7a7668fa61a55", "score": "0.59879315", "text": "public function query() {\n return $this->query;\n }", "title": "" }, { "docid": "d824b55f8b906c6a695fb1dd548abaa7", "score": "0.5985801", "text": "public function __construct()\n {\n $this->setDefaultQuery();\n }", "title": "" }, { "docid": "0e1124c8fe88e2e2c052f72470dee56e", "score": "0.59849954", "text": "public function query()\n {\n return $this->query;\n }", "title": "" }, { "docid": "b9a007db1c86c5e0952a4a751fd5c4c0", "score": "0.5978581", "text": "public function setQuery($StQuery) {\n $setQuery = $this->ObjConnection->query($StQuery);\n if( $setQuery === false ) {\n throw new ErrorHandler(EXC_DB_QUERY . ' Detalhes:' . $this->ObjConnection->error . '<br>' . $StQuery);\n }\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "735e465640db5c659ac193ab8af1f08c", "score": "0.75663006", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "1f9733369c1aaf55c73aa4d1a8a80882", "score": "0.74566424", "text": "public function create()\n {\n\n return view('resources.create');\n\n }", "title": "" }, { "docid": "1da53c4d224bfa3bc44c0fabd927bedd", "score": "0.7455584", "text": "public function create()\n {\n return view ('rol.form_create');\n }", "title": "" }, { "docid": "1b16c1f4677bd0ac799e087490d4d05b", "score": "0.73507345", "text": "public function create() {\n return view($this->className . '/form', [\n 'className' => $this->className,\n 'pageTitle' => $this->classNameFormatado . '- Cadastro de registro'\n ]);\n }", "title": "" }, { "docid": "edabb98341a0b5aadd47c2864942b8db", "score": "0.7339739", "text": "protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "6ed61a57fb61b517537e754054cffc2f", "score": "0.7257705", "text": "public function create()\n {\n return view(\"stok.form\");\n }", "title": "" }, { "docid": "42de9969dbd16cbf3f496acd505422d8", "score": "0.7249422", "text": "public function create()\n {\n // shows a view to create a new resource\n return view('dashboard.admin.create');\n \n }", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "8a257056a97a8ef04b6027c8bfb8cad1", "score": "0.723185", "text": "public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }", "title": "" }, { "docid": "f5f050d80230f2f0b6313a13b65e7a0b", "score": "0.72228223", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4b9c0332c0bc5feb4fa5c4c15ff4cda0", "score": "0.722023", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "29282129b8e24a976f037c589580f34b", "score": "0.7208537", "text": "public function create()\n {\n $this->page_title = trans('resource_sub_type.new');\n\n return view('resource_sub_type.new', $this->vdata);\n }", "title": "" }, { "docid": "85bc1c405768493e40df217a0040f018", "score": "0.7191366", "text": "function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }", "title": "" }, { "docid": "9493a84894964b34fd6021b3786bcc7a", "score": "0.71894634", "text": "public function create()\n {\n return view('crops.forms.create');\n }", "title": "" }, { "docid": "f6d3fc80bf700f89fa22e42e685b217d", "score": "0.7184248", "text": "public function create()\n {\n return view ('penilaiansmp.form');\n }", "title": "" }, { "docid": "68716ed8c8a7c02d13766dd274f478a3", "score": "0.718268", "text": "public function create()\n {\n return view('user_resources/create');\n }", "title": "" }, { "docid": "643073da4582f0c5ee209f1f696bb305", "score": "0.7166686", "text": "public function create()\n {\n return view('admin/records/forms/record-create-form');\n }", "title": "" }, { "docid": "86e44150333771a80ff3634ffc76f344", "score": "0.71529675", "text": "public function create()\n {\n return view('dashboard.form.create');\n }", "title": "" }, { "docid": "75889c35cd5f200bf02a5b21774293e1", "score": "0.7137003", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "7e262dd36752e23255d5ea03566e8de7", "score": "0.7122985", "text": "public function create()\n {\n $model = $this->model;\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "0a067c68f8000d9eb913daf36e5e607c", "score": "0.712034", "text": "public function create()\n {\n return view('FullForm.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "c88daeaad1f2ef73dd9534351ceea67a", "score": "0.70962554", "text": "public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a7352ebb77d0418eb30e8fe2e7bfb857", "score": "0.7087128", "text": "public function actionCreate()\n\t{\n\t\t$this->render('create');\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "8e0fde88926c98fb2c54ba67ab5b36a7", "score": "0.7061749", "text": "public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}", "title": "" }, { "docid": "345c70747deda30c3482e759c25c4d12", "score": "0.706081", "text": "public function create()\n {\n return view('passenger.forms.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "20ab9d62fc4da5013c56daa9183bfe28", "score": "0.70571035", "text": "public function create()\n {\n return view('admin.client.form');\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.70510703", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "b7f63db5c5ecb7bba494b8a81ce69874", "score": "0.70475084", "text": "public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "8f53ed51f8136e8e32a2c0525120a50f", "score": "0.7042422", "text": "public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }", "title": "" }, { "docid": "f1f40cbb0cad3cf320b4c0ec09b3b428", "score": "0.7040213", "text": "public function create()\n {\n return view('form');\n\n }", "title": "" }, { "docid": "607b994b80e66fe45602a00379ab7779", "score": "0.70308834", "text": "public function create()\n {\n //return the create view (form)\n return view('books.create');\n }", "title": "" }, { "docid": "643fd44e4ced88a8aac481ced428c5ca", "score": "0.70261294", "text": "public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "8074165780da4d1be303d3e9d8c535ba", "score": "0.7012196", "text": "public function create()\n {\n return view ('owner/form');\n }", "title": "" }, { "docid": "06af90c4292c136aaaf9329cfae0b3fc", "score": "0.70115083", "text": "public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "75fb4bc6a7a5df1f1f5cd380b0cd4aec", "score": "0.7000195", "text": "public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }", "title": "" }, { "docid": "91dd937891cf552bdb6c058f3730d93b", "score": "0.6998989", "text": "public function newAction()\n {\n $entity = new foo();\n $form = $this->createForm(new fooType(), $entity);\n\n return $this->render('ScrunoBoardBundle:foo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c6f4cc7fdd05567403f39d82ae477eb4", "score": "0.6994647", "text": "public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}", "title": "" }, { "docid": "68eb563182e9ed0d6524bc0b6aac22af", "score": "0.69939756", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/professor/create.blade.php)\n\t\t$this->layout->content = View::make('professor.create');\n\t}", "title": "" }, { "docid": "6c77fcad45300d9322c483f2cf6f0bf9", "score": "0.69900626", "text": "public function create()\n\t{\n\t\treturn view('proyek.create');\n\t}", "title": "" }, { "docid": "033dad9a04f818507b4dc909e40e2cca", "score": "0.6988088", "text": "public function create()\n {\n $data[\"action\"] = 'anggota.store';\n return view('anggota.form', $data);\n }", "title": "" }, { "docid": "355b502cb4384aeb8c0d1322a57b7677", "score": "0.69879013", "text": "public function create()\n {\n return view ('show.create', [\n ]); \n }", "title": "" }, { "docid": "afec885a1ddf009d317c5bca27be7983", "score": "0.6985705", "text": "public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }", "title": "" }, { "docid": "93cdfcc841a0d10e976bbc17fe7020ec", "score": "0.6977717", "text": "public function create()\n {\n return view('rombel.create');\n }", "title": "" }, { "docid": "eb3ba5c68f25897de6ed50346b9959f7", "score": "0.6976043", "text": "public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "432a42bd0e4b7b7dd13b0343e81c9f33", "score": "0.6974407", "text": "public function create()\n {\n //\n return view('libros/libroForm');\n }", "title": "" }, { "docid": "27f66e57741013d1d7bd227b0a1ae6cc", "score": "0.6969905", "text": "public function create()\n {\n return view('radars/create');\n }", "title": "" }, { "docid": "db317dc07de792187038b7e4a5f863fd", "score": "0.69643784", "text": "public function newAction()\n {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ManuTfeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "58119c678c7b859b3d2fcb9d4e2544e9", "score": "0.69620776", "text": "public function create()\n {\n return view('forms.girders.create');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "cfb06a7f594e86d7fe22432b5bd18371", "score": "0.6957784", "text": "public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "121c8c321a85cfc3184f64d92ecfca6c", "score": "0.6954882", "text": "public function create()\n\t{\n\t\treturn view ('oficinas.create');\n\t}", "title": "" }, { "docid": "9cc1ebbeb06fe2564e0fa603d2c72f75", "score": "0.69542176", "text": "public function create()\n {\n //\n return view('product.form');\n }", "title": "" }, { "docid": "ad86bd025139be91b2df85c83f79d4bd", "score": "0.69525295", "text": "public function create()\n {\n return view('syllabus.create');\n }", "title": "" }, { "docid": "1276876980c60661df1af9ecd3659454", "score": "0.6946296", "text": "public function create()\n\t{\n\t\treturn View::make('nssf.create');\n\t}", "title": "" }, { "docid": "29d1eb6a37de9bf5891c3b5b4ef4fa2d", "score": "0.69450635", "text": "public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }", "title": "" }, { "docid": "7c12821aa5d613a86cc8ba0cf190e6fd", "score": "0.6930994", "text": "public function create()\n {\n return view('tutores.new');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "60c9cc4899b058bc51c74601c8025ebe", "score": "0.6925751", "text": "public function create()\n {\n return view('adminCreateForm');\n }", "title": "" }, { "docid": "466006539e9b1da8c7c2e06a069c4e2e", "score": "0.6921871", "text": "public function create()\n {\n return view('layout_admin.thenew.create_new');\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "83ebdde393be7960c0a3149b40b830fa", "score": "0.69206", "text": "public function create()\n {\n //\n return view('guest.sample.submit-property2');\n }", "title": "" }, { "docid": "50d6adc18861a552fb9ddb0969a2630f", "score": "0.69202167", "text": "public function create()\n {\n return view('umbooks::admin.models.book.create');\n }", "title": "" }, { "docid": "1b49a8bc053be1715bbf5620cf797e18", "score": "0.69184965", "text": "public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}", "title": "" }, { "docid": "ce1853ac01959995d112bb4d44014367", "score": "0.6918359", "text": "public function create()\n {\n //\n return view('ijinkeluars.create');\n }", "title": "" }, { "docid": "87632e3ed9e4e251e3f5a4dfa4cc4e5e", "score": "0.69181925", "text": "public function create()\n {\n // Place here the initial data and show\n // Ahh screw it, Show Everything!!!\n\n return view('record.create');\n\n }", "title": "" }, { "docid": "27e5069596828984f14a92c012c1e448", "score": "0.6914329", "text": "public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "98e3bff438d778b0a9ccaad60778cf09", "score": "0.69096565", "text": "public function create()\n {\n return view('admin/car/add-car');\n }", "title": "" }, { "docid": "51a5131df9fc2dcd5b65b5ca8aa614d0", "score": "0.69092304", "text": "public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }", "title": "" }, { "docid": "4b3f5241c4a2f638b9ee19747079b7a2", "score": "0.69069797", "text": "public function create()\n {\n return view('stus.add');\n }", "title": "" }, { "docid": "eec374cbf73315b7af3e5f2b21f37d4d", "score": "0.69059855", "text": "public function create()\n {\n return view('linhvuc.create');\n }", "title": "" }, { "docid": "0b940b83fdd9503e0b64330c52106d41", "score": "0.69053364", "text": "public function create()\n {\n return view('inventariss.create');\n }", "title": "" }, { "docid": "ecc913c81504bfd8529f7b7feaef7080", "score": "0.69047576", "text": "public function create(){\n return view('person/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "64d616e79a29573ea35b962756917c05", "score": "0.69007623", "text": "public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "61066352fa31a37b0f1d8bc9fd229ea9", "score": "0.6897235", "text": "public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }", "title": "" }, { "docid": "70820d35b4d8e319baa89b6f91a3d029", "score": "0.6895603", "text": "public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "27fad6d884340578087d232e3218a94d", "score": "0.68955874", "text": "public function create()\n {\n return view('backpages.formInfo');\n }", "title": "" }, { "docid": "619fa64afd3457bdc8d1c1a041acff47", "score": "0.68903565", "text": "public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "09fab99adf688ea100aa90694eab5889", "score": "0.6888845", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "985e9c7c0b741b5b1eb67c091e5ad371", "score": "0.6886975", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('oficinas.create');\n\t}", "title": "" }, { "docid": "9664795bf81cca0f3e65d94f0f595082", "score": "0.6880484", "text": "public function create()\n\t{\n\t\treturn view('questao.create');\n\t}", "title": "" }, { "docid": "623f899bed6c6f380a03ffc99508b73d", "score": "0.6879059", "text": "public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "6648fe4f8fd4df24b091c04829b92bbb", "score": "0.6878773", "text": "public function create()\n\t{\n\t\treturn View::make('powerful.create');\n\t}", "title": "" }, { "docid": "a3b3bbcce8f8a6239dadc2917240252b", "score": "0.6878254", "text": "public function showForm()\n {\n return view('AdminView.create');\n }", "title": "" }, { "docid": "06fe0499ccb2038bd9c25e7ef14289e2", "score": "0.68774086", "text": "public function create()\n {\n //Return item details form\n return view('home.create');\n }", "title": "" }, { "docid": "b3998fa6dce49f97902e942f97d98ede", "score": "0.687325", "text": "public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "60ee9672a795f51a440ede1e68b26045", "score": "0.6870999", "text": "public function create()\n {\n return view('smp.create');\n }", "title": "" }, { "docid": "9f18b1b1a35a9af23eb1d4bbdba665f8", "score": "0.68696606", "text": "public function create()\n {\n return view('admin.car_com.create');\n }", "title": "" }, { "docid": "d14776cad1affd8d37756a185e7fe660", "score": "0.68665606", "text": "public function create()\n {\n return view('relasi.create');\n }", "title": "" }, { "docid": "96c76b820b73f95fa584de07ad04ad0a", "score": "0.6865675", "text": "public function create()\n {\n return view('nasabah/addnasabah');\n }", "title": "" }, { "docid": "e3cfac3178d9c5cb5ab322fa4785604c", "score": "0.6862222", "text": "public function create()\n {\n return view('Prenda.create');\n }", "title": "" } ]
c02a8a681fe86cf1ccc82eec5eb3b92e
Remove file links related to the entity, but leave the entity and file(s) intact.
[ { "docid": "97a0a87601f864ce7fed1e634b787e2f", "score": "0.62985504", "text": "function releaseFiles ($entity_realm, $entity_id)\n{\n\tusePreparedDeleteBlade ('FileLink', array ('entity_type' => $entity_realm, 'entity_id' => $entity_id));\n}", "title": "" } ]
[ { "docid": "df2e90d77b533bb49bb0f76bd81770ad", "score": "0.63496244", "text": "public function cleanFiles()\n {\n foreach($this->uploadAttributes() as $attr)\n {\n /** @var $file File */\n if($file = File::model()->findByPk($this->owner->getAttribute($attr)))\n {\n $this->owner->setAttribute($attr, null);\n $file->deleteUnused();\n }\n }\n }", "title": "" }, { "docid": "e731a86b95a06d1e84575419fcb51990", "score": "0.62453926", "text": "private function removeFile($entity): void\n {\n if (!$entity instanceof Photo) {\n return;\n }\n $file = $entity->getFile();\n if ($file instanceof File) {\n //dump($this->filesystem); // filesystem byl nieprzypisany wczesniej (tylko zadeklarowany jakby)\n $this->filesystem->remove($file->getPathname());\n\n }\n }", "title": "" }, { "docid": "0cfc933e28cf1f3e0d83b1023a8452fc", "score": "0.6243602", "text": "private function cleanupDatabaseLinks()\n {\n $qb = $this->linkRep->createQueryBuilder('l')->update();\n if (!empty($this->linksInFile)) {\n $expr = $qb->expr()->andX();\n foreach ($this->linksInFile as $link) {\n $expr->add($qb->expr()->orX(\n $qb->expr()->neq('l.source', $qb->expr()->literal($link->getSource()->getId())),\n $qb->expr()->neq('l.target', $qb->expr()->literal($link->getTarget()->getId()))\n ));\n }\n $qb->andWhere($expr);\n }\n $qb->andWhere($qb->expr()->isNull('l.closeTime'));\n $qb->set('l.closeTime', $qb->expr()->literal($this->log->getFileTime()->format('Y-m-d H:i:s')));\n $this->log->setLinksRemoved($qb->getQuery()->execute());\n }", "title": "" }, { "docid": "9df14f62d572b26d9f03f69e6db4750f", "score": "0.6036989", "text": "protected function deleteRelatedUpload()\n {\n $uplAttrs = $this->uploadAttributes();\n foreach($this->owner->relations() as $rel => $params)\n {\n if($params[1] !== 'File' || !in_array($params[2], $uplAttrs))\n continue;\n\n if($this->owner->$rel)\n $this->owner->$rel->delete();\n }\n }", "title": "" }, { "docid": "018fa38cf5c07f1be6aa44675f8e642f", "score": "0.60326", "text": "public function removeFileAttributes(): void\n {\n foreach (array_keys($this->getAttachedFiles()) as $key) {\n unset($this->attributes[$key]);\n }\n }", "title": "" }, { "docid": "9290a7b50d099b1aa40fff388056894c", "score": "0.60310936", "text": "public function deleteWithFiles(BaseEntityWithFile $entity);", "title": "" }, { "docid": "148c32f6e417f8456a0dcbbe65ab7675", "score": "0.58904284", "text": "function getAllUnlinkedFiles ($entity_type, $entity_id)\n{\n\t$result = usePreparedSelectBlade\n\t(\n\t\t'SELECT id, name FROM File ' .\n\t\t'WHERE id NOT IN (SELECT file_id FROM FileLink WHERE entity_type = ? AND entity_id = ?) ' .\n\t\t'ORDER BY name, id',\n\t\tarray ($entity_type, $entity_id)\n\t);\n\treturn reduceSubarraysToColumn (reindexById ($result->fetchAll (PDO::FETCH_ASSOC)), 'name');\n}", "title": "" }, { "docid": "beda6edf7201562c794933b18d84f78a", "score": "0.5803789", "text": "public function unStoreFiles()\n\t{\n\t\t$used_metas = array(\n\t\t\t'message_attachments_data',\n\t\t\t'invoice_attachments_data'\n\t\t);\n\t\t$used_ids = array();\n\n\t\tforeach ( $used_metas as $meta ) {\n\t\t\t$metas_list = $this->timber->meta_model->getMetasByKey($meta);\n\n\t\t\tforeach ( $metas_list as $meta_value ) {\n\t\t\t\t$meta_value['me_value'] = unserialize($meta_value['me_value']);\n\t\t\t\t$used_ids = array_merge($used_ids, $meta_value['me_value']);\n\t\t\t}\n\t\t}\n\n\t\t$all_files = $this->timber->file_model->getFiles();\n\t\tforeach ($all_files as $file_data ) {\n\t\t\tif( !in_array($file_data['fi_id'], $used_ids) ){ $this->timber->file_model->deleteFileById($file_data['fi_id']); }\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "252acfbe87e90e078b9c95d83e8ec86c", "score": "0.57761025", "text": "public function removeFiles(BaseEntityWithFile $entity, $properties = array(), $doEraseFiles = true, $doSave = true);", "title": "" }, { "docid": "93645cb8bb4fe686bb34e66a2f3292b0", "score": "0.57521874", "text": "function glossary_delete_old_attachments($entry, $exception=\"\") {\n// EXCEPT for any file named $exception\n\n if ($basedir = glossary_file_area($entry)) {\n if ($files = get_directory_list($basedir)) {\n foreach ($files as $file) {\n if ($file != $exception) {\n unlink(\"$basedir/$file\");\n// notify(\"Existing file '$file' has been deleted!\");\n }\n }\n }\n if (!$exception) { // Delete directory as well, if empty\n rmdir(\"$basedir\");\n }\n }\n}", "title": "" }, { "docid": "930d51be59ed771777cf167c0b12ef08", "score": "0.5737158", "text": "public function doClean() {\n\t\t$oResourceRemover = new Modman_Resource_Remover();\n\t\tforeach ($this->getDeadSymlinks() as $sSymlink) {\n\t\t\techo 'Remove ' . $sSymlink . '.' . PHP_EOL;\n\t\t\t$oResourceRemover->doRemoveResource($sSymlink);\n\t\t}\n\t}", "title": "" }, { "docid": "8bf8f6190e69e9984a15869cbaba853a", "score": "0.5736249", "text": "public function removeEntityLinksFromText() {\n\t\t$this->getText();\n\t\t$baseEntity = $this->getEntity();\n\t\t$counter = 0;\n\n\t\tif ( ! $baseEntity instanceof Entity ) {\n\t\t\t\treturn false;\n\t\t}\n\t\t$baseEntity->load();\n\n\t\tforeach ( $baseEntity->getLanguageData('sitelinks') as $sitelink ) {\n\t\t\t$linkSite = $this->site->family->getSiteFromSiteid( $sitelink['site'] );\n\t\t\tif( $linkSite instanceof Site && $this->site->getType() == $linkSite->getType() ){\n\t\t\t\t$iwPrefix = $linkSite->getIwPrefix();\n\t\t\t\t$page = $linkSite->newPageFromTitle( $sitelink['title'] );\n\t\t\t\t$titleEnd = $page->getTitleWithoutNamespace();\n\t\t\t\t$possibleNamespaces = $linkSite->requestNamespaces();\n\t\t\t\t$possibleNamespaces = $possibleNamespaces[$page->getNsid()];\n\n\t\t\t\t//@todo this could all be improved with something like getRegexForTitle or getRegexForInterwikiLink\n\t\t\t\tforeach ( $possibleNamespaces as $namespace ) {\n\t\t\t\t\tif ( $namespace != \"\" ) {\n\t\t\t\t\t\t$titleVarient = $namespace . ':' . $titleEnd;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$titleVarient = $titleEnd;\n\t\t\t\t\t}\n\n\t\t\t\t\t//@todo this code is wikimedia specific\n\t\t\t\t\tif( $iwPrefix == 'zh-min-nan' || $iwPrefix == 'nan' ){\n\t\t\t\t\t\t$iwPrefix = '(zh-min-nan|nan)';\n\t\t\t\t\t} else if ( $iwPrefix == 'no' || $iwPrefix == 'nb'){\n\t\t\t\t\t\t$iwPrefix = '(nb|no)';\n\t\t\t\t\t}\n\n\t\t\t\t\t$lengthBefore = $this->wikiText->getLength();\n\t\t\t\t\t$removeLink = '/\\n ?\\[\\[' . $iwPrefix . ' ?: ?' . str_replace( ' ', '( |_)', preg_quote( $titleVarient, '/' ) ) . ' ?\\]\\] ?/';\n\t\t\t\t\t$this->wikiText->removeRegexMatched( $removeLink );\n\t\t\t\t\tif ( $lengthBefore > $this->wikiText->getLength() ) {\n\t\t\t\t\t\t$counter = $counter + 1;\n\t\t\t\t\t\techo \"Removed link! $iwPrefix:$titleVarient\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif( count( $this->getInterwikisFromtext() ) == 0 ){\n\n\t\t\tif( $this->getNsid() == 10 ){\n\t\t\t\t//Remove empty no include tags\n\t\t\t\t$this->wikiText->removeRegexMatched('/<noinclude>\\s+?<\\/noinclude>/');\n\t\t\t}\n\n\t\t$this->wikiText->removeRegexMatched('/<!-- ?(interwikis?( links?)?|other (wiki|language)s?) ?-->/i');\n\t\t$this->wikiText->trimWhitespace();\n\n\t\t}\n\n\t\treturn $counter;\n\t}", "title": "" }, { "docid": "a0aaccd14ff43ce9786c7df7df65f0da", "score": "0.56951576", "text": "public function deleteUploadedFile($entity);", "title": "" }, { "docid": "d3f0343da0ee1fd0a38b9f2f9bb6ea85", "score": "0.56682056", "text": "public function removeFiles(BaseEntityWithFile $entity, $properties = array(), $doEraseFiles = true, $doSave = true)\n {\n parent::removeFiles($entity, $properties, $doEraseFiles, $doSave);\n }", "title": "" }, { "docid": "52fa42aafb3fc4987a9eb94aecfb4946", "score": "0.5667116", "text": "private function parseLinks()\n {\n // create full list of links\n foreach ($this->data['links'] as $index => $rawLink) {\n try {\n $link = $this->createLinkInstance($rawLink);\n $this->linksInFile[$link->getMacString()] = $link;\n } catch (ImportException $e) {\n $this->log->addMessage(\n 'error in link ' . $index . ' with property '\n . $e->getWrongKey() . ' (' . $e->getMessage() . ')'\n );\n }\n }\n\n // filter links that already exist\n $this->linksToAdd = $this->linksInFile;\n if (!empty($this->linksInFile)) {\n $qb = $this->linkRep->createQueryBuilder('l');\n $qb->select('l.id, target.mac AS tMAC, source.mac AS sMAC');\n $qb->join('l.target', 'target');\n $qb->join('l.source', 'source');\n $qb->andWhere($qb->expr()->isNull('l.closeTime'));\n\n $linkSearch = $qb->expr()->orX();\n foreach ($this->linksInFile as $link) {\n $linkSearch->add($qb->expr()->andX(\n $qb->expr()->eq('target.mac', $qb->expr()->literal($link->getTarget()->getMac())),\n $qb->expr()->eq('source.mac', $qb->expr()->literal($link->getSource()->getMac()))\n ));\n }\n $qb->andWhere($linkSearch);\n\n // now remove links that are up to date already\n $notToAdd = array();\n foreach ($qb->getQuery()->getArrayResult() as $inDbLink) {\n $linkId = $inDbLink['tMAC'] . '-' . $inDbLink['sMAC'];\n if (array_key_exists($linkId, $this->linksToAdd)) {\n unset($this->linksToAdd[$linkId]);\n $this->log->linkPreserved();\n // replace the link in the file with a relation one that represents the database one\n $this->linksInFile[$linkId] = $this->em->getReference('FreifunkStatisticBundle:Link', $inDbLink['id']);\n $notToAdd[] = $inDbLink['id'];\n }\n }\n\n // now preload the in database links\n if (!empty($notToAdd)) {\n $qb = $this->linkRep->createQueryBuilder('l');\n $qb->andWhere($qb->expr()->in('l.id', $notToAdd));\n /** @var Link $link */\n foreach ($qb->getQuery()->getResult() as $link) {\n $this->linksInFile[$link->getMacString()] = $link;\n }\n }\n }\n }", "title": "" }, { "docid": "9475f28b0b891d0dd7166b87a55f9412", "score": "0.56536156", "text": "public function removeUploadedFiles()\n {\n $files_types = array\n (\n AgreementModel::UPLOADED_FILE_MODEL_TYPE => AgreementModel::MODEL_FILE_PATH,\n AgreementModel::UPLOADED_FILE_RECORD_TYPE => AgreementModel::MODEL_FILE_PATH,\n AgreementModel::UPLOADED_FILE_SCENARIO_TYPE => AgreementModel::MODEL_FILE_PATH,\n AgreementModel::UPLOADED_FILE_ADDITIONAL_FILE_TYPE => AgreementModelReport::ADDITIONAL_FILE_PATH,\n AgreementModel::UPLOADED_FILE_ADDITIONAL_EXT_FILE_TYPE => AgreementModelReport::ADDITIONAL_FILE_PATH,\n AgreementModel::UPLOADED_FILE_FINANCIAL_FILE_TYPE => AgreementModelReport::FINANCIAL_DOCS_FILE_PATH\n );\n\n foreach ($files_types as $key => $path) {\n $filesList = AgreementModelReportFilesTable::getInstance()->createQuery()->where('object_id = ? and file_type = ?', array($this->getId(), $key))->execute();\n\n foreach ($filesList as $file) {\n $filePath = sfConfig::get('app_uploads_path') . '/' . $path . '/' . $file->getFile();\n\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n\n $file->delete();\n }\n }\n }", "title": "" }, { "docid": "c3f9187f44cab7e27863b92ae10df6fc", "score": "0.55603725", "text": "protected function _postDelete()\n {\n // after the files are deleted?\n try {\n\n $search_api = Engine_Api::_()->getDbTable('search', 'page');\n $search_api->deleteData($this);\n\n $file = Engine_Api::_()->getApi('storage', 'storage')->get($this->file_id, null);\n if ($file) $file->remove();\n $file = Engine_Api::_()->getApi('storage', 'storage')->get($this->file_id, 'thumb.normal');\n if ($file) $file->remove();\n $file = Engine_Api::_()->getApi('storage', 'storage')->get($this->file_id, 'thumb.mini');\n if ($file) $file->remove();\n $file = Engine_Api::_()->getApi('storage', 'storage')->get($this->file_id, 'thumb.icon');\n if ($file) $file->remove();\n\n $album = $this->getCollection();\n if ($album){\n $nextPhoto = $this->getNextCollectible();\n\n if( ($album instanceof Core_Model_Item_Collection) && ($nextPhoto instanceof Core_Model_Item_Collectible) &&\n (int) $album->photo_id == (int) $this->getIdentity() ) {\n $album->photo_id = $nextPhoto->getIdentity();\n $album->save();\n }\n }\n } catch( Exception $e ) {\n // @todo should we completely silence the errors?\n //throw $e;\n }\n\n parent::_postDelete();\n }", "title": "" }, { "docid": "761f53550edf8d020e5272624c6c5956", "score": "0.5549504", "text": "function cleanfiles () {\n\n\t\t$database = & JFactory::getDBO();\n\t\t$ezrparams = JComponentHelper::getParams ('com_ezrealty');\n\n\t\t// clean out the old property images\n\t\t// define the absolute directory path\n\t\t$dirPath1 = JPATH_ROOT.'/images/ezrealty/properties';\n\n\t\t// open the directory and make sure it's open\n\t\tif ($handle = opendir($dirPath1)) {\n\n\t\t\t// read through the directory contents\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\n\t\t\t\t// don't worry about the current or parent directory\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\n\t\t\t\t\tif (is_dir(\"$dirPath1/$file\")) {\n\t\t\t\t\t\t// echo \"[$file]<br>\"; // don't do anything with subdirectories\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//don't show the placeholder image or index file\n\t\t\t\t\t\tif ($file != \"index.html\") {\n\n\t\t\t\t\t\t\t# Do the main database query to match images with those in use\n\t\t\t\t\t\t\t$query = \"SELECT id FROM #__ezrealty_images\"\n\t\t\t\t\t\t\t.\"\\n WHERE `fname`='$file'\";\n\t\t\t\t\t\t\t$database->setQuery( $query );\n\t\t\t\t\t\t\t$liveimages = $database->loadResult();\n\n\t\t\t\t\t\t\t//show a delete link if the image is not listed in the database\n\t\t\t\t\t\t\tif (!$liveimages){\n\n\t\t\t\t\t\t\t\tif(file_exists($dirPath1.\"/\".$file )){\n\t\t\t\t\t\t\t\t\t@unlink( $dirPath1.\"/\".$file );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(file_exists($dirPath1.\"/th/\".$file)){\n\t\t\t\t\t\t\t\t\t@unlink( $dirPath1.\"/th/\".$file );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now we close the directory\n\t\t\tclosedir($handle);\n\t\t}\n\n\n\t\t// clean out the old epc files\n\t\t// define the absolute directory path\n\t\t$dirPath2 = JPATH_ROOT.\"/images/ezrealty/epc\";\n\n\t\t// open the directory and make sure it's open\n\t\tif ($handle = opendir($dirPath2)) {\n\n\t\t\t// read through the directory contents\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\n\t\t\t\t// don't worry about the current or parent directory\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (is_dir($dirPath2.\"/\".$file)) {\n\t\t\t\t\t\t// echo \"[$file]<br>\"; // don't do anything with subdirectories\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//don't show the placeholder image or index file\n\t\t\t\t\t\tif ($file != \"index.html\") {\n\n\t\t\t\t\t\t\t# Do the main database query to match images with those in use\n\t\t\t\t\t\t\t$query = \"SELECT id FROM #__ezrealty\"\n\t\t\t\t\t\t\t.\"\\n WHERE epc1='$file' OR epc2='$file'\"\n\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\t$database->setQuery( $query );\n\t\t\t\t\t\t\t$liveimages = $database->loadResult();\n\n\t\t\t\t\t\t\t//show a delete link if the image is not listed in the database\n\t\t\t\t\t\t\tif (!$liveimages){\n\n\t\t\t\t\t\t\t\tunlink( $dirPath2.\"/\".$file );\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now we close the directory\n\t\t\tclosedir($handle);\n\t\t}\n\n\n\t\t// clean out the old pdf files\n\t\t// define the absolute directory path\n\t\t$dirPath3 = JPATH_ROOT.\"/images/ezrealty/pdfs\";\n\n\t\t// open the directory and make sure it's open\n\t\tif ($handle = opendir($dirPath3)) {\n\n\t\t\t// read through the directory contents\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\n\t\t\t\t// don't worry about the current or parent directory\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (is_dir($dirPath3.\"/\".$file)) {\n\t\t\t\t\t\t// echo \"[$file]<br>\"; // don't do anything with subdirectories\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//don't show the index file\n\t\t\t\t\t\tif ($file != \"index.html\") {\n\n\t\t\t\t\t\t\t# Do the main database query to match images with those in use\n\n\t\t\t\t\t\t\t$query = \"SELECT id FROM #__ezrealty\"\n\t\t\t\t\t\t\t.\"\\n WHERE pdfinfo1='$file' OR pdfinfo2='$file'\";\n \n\t\t\t\t\t\t\t$database->setQuery( $query );\n\t\t\t\t\t\t\t$liveimages = $database->loadResult();\n\n\t\t\t\t\t\t\t//show a delete link if the image is not listed in the database\n\t\t\t\t\t\t\tif (!$liveimages){\n\n\t\t\t\t\t\t\t\tunlink( $dirPath3.\"/\".$file );\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now we close the directory\n\t\t\tclosedir($handle);\n\t\t}\n\n\n\t\t// clean out the old panorama images\n\t\t// define the absolute directory path\n\t\t$dirPath4 = JPATH_ROOT.\"/images/ezrealty/panorama\";\n\n\t\t// open the directory and make sure it's open\n\t\tif ($handle = opendir($dirPath4)) {\n\n\t\t\t// read through the directory contents\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\n\t\t\t\t// don't worry about the current or parent directory\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (is_dir($dirPath4.\"/\".$file)) {\n\t\t\t\t\t\t// echo \"[$file]<br>\"; // don't do anything with subdirectories\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//don't show the index file\n\t\t\t\t\t\tif ($file != \"index.html\") {\n\n\t\t\t\t\t\t\t# Do the main database query to match images with those in use\n\n\t\t\t\t\t\t\t$query = \"SELECT id FROM #__ezrealty\"\n\t\t\t\t\t\t\t.\"\\n WHERE panorama='$file'\";\n \n\t\t\t\t\t\t\t$database->setQuery( $query );\n\t\t\t\t\t\t\t$liveimages = $database->loadResult();\n\n\t\t\t\t\t\t\t//show a delete link if the image is not listed in the database\n\t\t\t\t\t\t\tif (!$liveimages){\n\n\t\t\t\t\t\t\t\tunlink( $dirPath4.\"/\".$file );\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now we close the directory\n\t\t\tclosedir($handle);\n\t\t}\n\n\n\t\t// clean out the old floorplans\n\t\t// define the absolute directory path\n\t\t$dirPath6 = JPATH_ROOT.\"/images/ezrealty/floorplans\";\n\n\t\t// open the directory and make sure it's open\n\t\tif ($handle = opendir($dirPath6)) {\n\n\t\t\t// read through the directory contents\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\n\t\t\t\t// don't worry about the current or parent directory\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (is_dir($dirPath6.\"/\".$file)) {\n\t\t\t\t\t\t// echo \"[$file]<br>\"; // don't do anything with subdirectories\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//don't show the placeholder image or index file\n\t\t\t\t\t\tif ($file != \"index.html\") {\n\n\t\t\t\t\t\t\t# Do the main database query to match images with those in use\n\t\t\t\t\t\t\t$query = \"SELECT id FROM #__ezrealty\"\n\t\t\t\t\t\t\t.\"\\n WHERE flpl1='$file' OR flpl2='$file'\"\n\t\t\t\t\t\t\t;\n\t\t\t\t\t\t\t$database->setQuery( $query );\n\t\t\t\t\t\t\t$liveimages = $database->loadResult();\n\n\t\t\t\t\t\t\t//show a delete link if the image is not listed in the database\n\t\t\t\t\t\t\tif (!$liveimages){\n\n\t\t\t\t\t\t\t\tunlink( $dirPath6.\"/\".$file );\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now we close the directory\n\t\t\tclosedir($handle);\n\t\t}\n\n\n $msg = JText::_('EZREALTY_FILES_CLEANED');\n\t\t$this->setRedirect( 'index.php?option=com_ezrealty', $msg );\n\n\t}", "title": "" }, { "docid": "aad70ab3da2efb8a843a77749fa8bf22", "score": "0.55230266", "text": "protected function cleanupOldLinks()\n {\n $removeIds = [];\n $databaseConnection = HelperUtility::getDatabaseConnection();\n $selectInvalidItems = 'SELECT tx_realurl_uniqalias.uid \nFROM tx_realurl_uniqalias LEFT JOIN tx_calendarize_domain_model_index ON tx_realurl_uniqalias.value_id = tx_calendarize_domain_model_index.uid \nWHERE tx_calendarize_domain_model_index.uid IS NULL AND tx_realurl_uniqalias.tablename=\\'tx_calendarize_domain_model_index\\'';\n $res = $databaseConnection->admin_query($selectInvalidItems);\n while ($row = $databaseConnection->sql_fetch_assoc($res)) {\n $removeIds[] = (int) $row['uid'];\n }\n if (empty($removeIds)) {\n return;\n }\n $databaseConnection->exec_DELETEquery('tx_realurl_uniqalias', 'uid IN (' . \\implode(',', $removeIds) . ')');\n }", "title": "" }, { "docid": "77e501f4d8f1f3c7cb887695052285f2", "score": "0.54961896", "text": "protected function undoUnlinkFile( IFileInfo $fileRecord ) {\n\t}", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.546375", "text": "public function removeFile();", "title": "" }, { "docid": "50bc9f047a27d7fd0e31bce968555b21", "score": "0.5462647", "text": "protected function _clearNoRemoveSiblings()\n {\n $collection = $this->getCollection()\n ->addFilter('action', 'add')\n ->addFilter('name', $this->getName())\n ->addFilter('object', ($object = $this->getData('object')) ? $object : '')\n ->addFilter('entity_id', $this->getEntityId());\n\n foreach ($collection as $event) {\n $event->delete();\n }\n\n $collection = $this->getCollection()\n ->addFilter('action', 'modify')\n ->addFilter('name', $this->getName())\n ->addFilter('object', ($object = $this->getData('object')) ? $object : '')\n ->addFilter('entity_id', $this->getEntityId());\n\n foreach ($collection as $event) {\n $event->delete();\n }\n }", "title": "" }, { "docid": "1f8f33f2e4e7c104cae09f02f4793e7c", "score": "0.54523855", "text": "private function cleanup() {\n\t\tforeach($this->files as $file) {\n\t\t\t@unlink($file);\n\t\t}\n\t}", "title": "" }, { "docid": "e8e4c561c0ddb1562cfeba54e20c78f4", "score": "0.54191935", "text": "protected function cleanup()\n {\n File::delete([\n $this->path,\n $this->thumb_path\n ]);\n }", "title": "" }, { "docid": "8e9fde9f7237f4c1b3e10c6994cfb26e", "score": "0.5418561", "text": "public function onRemoveAttachment()\n {\n $fileModel = $this->getRelationModel();\n if (($fileId = post('file_id')) && ($file = $fileModel::find($fileId))) {\n $this->getRelationObject()->remove($file, $this->sessionKey);\n }\n }", "title": "" }, { "docid": "e98006bbda1102755f77788a14ae50ea", "score": "0.54174125", "text": "protected function cleanOldFiles()\n {\n $directoryName = $this->getDirectoryName();\n $sitemapFiles = scandir($directoryName);\n $createdSitemapsFiles = $this->createdSitemaps;\n\n if (!empty($sitemapFiles) && !empty($createdSitemapsFiles)){\n $sitemapFiles = array_flip($sitemapFiles);\n $createdSitemapsFiles = ArrayHelper::index($createdSitemapsFiles, 'loc');\n\n foreach ($sitemapFiles as $sitemapFile => $sitemapIndex){\n $sitemapFile = trim($sitemapFile, '.');\n if (!empty($sitemapFile) && !isset($createdSitemapsFiles[$sitemapFile])){\n unlink($directoryName.'/'.$sitemapFile);\n }\n }\n }\n }", "title": "" }, { "docid": "569ae58630c11f351d2285fb82265bb6", "score": "0.5410161", "text": "protected function removeFiles()\n {\n }", "title": "" }, { "docid": "c8b905b97570c5366173cf5e86018d95", "score": "0.5408051", "text": "function cleanupBatch( $files ) {\n\t\t$conn = $this->connect();\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( is_array( $file ) ) {\n\t\t\t\t// This is a pair, extract it\n\t\t\t\tlist( $cont, $rel ) = $file;\n\t\t\t} else {\n\t\t\t\tif ( self::isVirtualUrl( $file ) ) {\n\t\t\t\t\t// This is a virtual url, resolve it \n\t\t\t\t\t$path = $this->getContainerRel( $file );\n\t\t\t\t\tlist( $cont, $rel) = $path;\n\t\t\t\t} else {\n\t\t\t\t\t// FIXME: This is a full file name\n\t\t\t\t\tthrow new MWException( __METHOD__.\": $file needs an unlink()\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\twfDebug( __METHOD__.\": $cont/$rel\\n\" );\n\t\t\t$container = $this->get_container($conn,$cont);\n\t\t\t$this->swift_delete( $container, $rel );\n\t\t}\n\t}", "title": "" }, { "docid": "69863cfb7c43626dfafee44638815db4", "score": "0.5374242", "text": "protected function unlinkConvertedFiles()\n {\n foreach ($this->templateNames as $templateName) {\n $twigTemplatePath = $this->getTwigTemplatePath($templateName);\n if (file_exists($twigTemplatePath)) {\n unlink($twigTemplatePath);\n }\n }\n }", "title": "" }, { "docid": "d5242162ebe6681053b78ad5a29f4fb7", "score": "0.5373895", "text": "public function unlink()\n\t{\n\n\t}", "title": "" }, { "docid": "f11f3f6877f648147b6795d8f3e2170f", "score": "0.5361032", "text": "private function deleteManifestAndDefinitionFiles()\n {\n unlink($this->getSource() . DIRECTORY_SEPARATOR . self::XML_MANIFEST_FILE_NAME);\n delete_directory_if_exists($this->getSource() . DIRECTORY_SEPARATOR . self::DIRECTORY_FOR_DEFINITION_FILES);\n }", "title": "" }, { "docid": "94a4403ed914ea5b18233587417b4823", "score": "0.5350546", "text": "public function cleanupFiles() {\n\t\t\n\t\t//go through assets/ dir and find downloadable_* files\n\n\t\t$dir = ASSETS_PATH . \"/\";\n\t\t$pattern = 'downloadable_*';\n\t\t$files = $this->findFile($dir, $pattern);\n\n\t\tif ($files && is_array($files)) foreach ($files as $file) {\n\t\t\t$filelastmodified = filemtime($file);\n\n\t\t\tif($filelastmodified < strtotime('-'.Downloadable_Item::$downloadWindow)) {\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "8124dbc6bca22e9ebad9db9c3d7b676e", "score": "0.53397816", "text": "function _auditfiles_referenced_not_used_batch_delete_process_file($reference_id) {\n $reference_id_parts = explode('.', $reference_id);\n $connection = Database::getConnection();\n $num_rows = $connection->delete($reference_id_parts[0])\n ->condition($reference_id_parts[1], $reference_id_parts[4])\n ->execute();\n if (empty($num_rows)) {\n drupal_set_message(\n t(\n 'There was a problem deleting the reference to file ID %fid in the %entity_type with ID %eid. Check the logs for more information.',\n [\n '%fid' => $reference_id_parts[4],\n '%entity_type' => $reference_id_parts[3],\n '%eid' => $reference_id_parts[2],\n ]\n ),\n 'warning'\n );\n }\n else {\n drupal_set_message(\n t(\n 'file ID %fid deleted successfully.',\n [\n '%fid' => $reference_id_parts[4],\n ]\n )\n );\n }\n }", "title": "" }, { "docid": "cb96fe4fcf56ecedcadeffa52fa42bdc", "score": "0.53364027", "text": "protected function cleanup()\n {\n if ($this->madeZip) {\n $this->tempZip->cleanup();\n }\n \n if ($this->clearAttachments) {\n foreach ($this->attachments as $attachment) {\n if (File::exists($attachment['file'])) {\n if (!config('file-mutations.clean_temps')) {\n Log::debug('[ZIP_FLY] Prevented deleting \\'' . $attachment['file'] . '\\'');\n \n continue;\n }\n \n File::delete($attachment['file']);\n }\n }\n }\n }", "title": "" }, { "docid": "509507a551c1414a1150ba0df1e5d976", "score": "0.5333242", "text": "function unlink_all($id = 0) {\n\n\t\t// Get File in Article Image Path\n\t\t$files = glob($this->articleImagePath . $id . '/*.{jpg,jpeg,png}', GLOB_BRACE);\n\n\t\tfor ($i = 0; $i < count($files); $i++) :\n\n\t\t\t$x = str_replace($this->articleImagePath . $id . '/', '' , $files[$i]);\n\n\t\t\tunlink($this->articleImagePath . $id . '/' . $x);\n\n\t\tendfor;\n\n\t}", "title": "" }, { "docid": "44e3ce73150fc39aba54d58b9973c597", "score": "0.5313791", "text": "public function cleanup() {\n\t\t$oResourceRemover = new Modman_Resource_Remover();\n\t\tforeach ($this->aConflicts as $sFilename => $sType) {\n\t\t\tswitch ($sType) {\n\t\t\t\tcase 'dir':\n\t\t\t\t\t$oResourceRemover->doRemoveFolderRecursively($sFilename);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'file':\n\t\t\t\tcase 'link':\n\t\t\t\t\t$oResourceRemover->doRemoveResource($sFilename);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "eec80a6a4da9afffc72fabd116e862cb", "score": "0.53097486", "text": "public function testRemoveFetchFile(): void\n {\n $file_one_dest = 'data/dir1/dir2/first_text.txt';\n $file_two_dest = 'data/dir1/dir2/second_text.txt';\n $expected_with_both = [\n [\n 'uri' => self::$remote_urls[0],\n 'size' => '-',\n 'destination' => $file_one_dest,\n ],\n [\n 'uri' => self::$remote_urls[1],\n 'size' => '-',\n 'destination' => $file_two_dest,\n ],\n ];\n $expected_with_one = [\n [\n 'uri' => self::$remote_urls[1],\n 'size' => '-',\n 'destination' => $file_two_dest,\n ],\n ];\n $bag = Bag::create($this->tmpdir);\n $this->assertFileDoesNotExist($bag->makeAbsolute($file_one_dest));\n $this->assertFileDoesNotExist($bag->makeAbsolute($file_two_dest));\n $bag->addFetchFile(self::$remote_urls[0], $file_one_dest);\n $this->assertFileExists($bag->makeAbsolute($file_one_dest));\n $bag->addFetchFile(self::$remote_urls[1], $file_two_dest);\n $this->assertFileExists($bag->makeAbsolute($file_one_dest));\n $this->assertEquals($expected_with_both, $bag->listFetchFiles());\n // Url doesn't exist, nothing happens\n $bag->removeFetchFile('http://example.org/not/real');\n // Now really remove it.\n $bag->removeFetchFile(self::$remote_urls[0]);\n $this->assertFileDoesNotExist($bag->makeAbsolute($file_one_dest));\n $this->assertEquals($expected_with_one, $bag->listFetchFiles());\n }", "title": "" }, { "docid": "d7035efda1b813aceb15c71e7562cf9f", "score": "0.53044033", "text": "private function do_delete()\n\t{\n\n\t\t$this->checkLoggedIn();\n\t\tlist($file_url, $pathFile, $file) = $this->getFileParamsFromPost();\n\n\t\t$fileMarkdown = $file . CONTENT_EXT;\n\n\t\tif( file_exists(CONTENT_DIR . $pathFile . $fileMarkdown ) ) {\n\t\t\t\tdie( unlink(CONTENT_DIR . $pathFile . $fileMarkdown) );\n\t\t}\n\t\telse {\n\t\t\t// Delete asset file\n\t\t\tif( is_file($file_url)) {\n\t\t\t\tunlink($file_url);\n\t\t\t\t\t// Update meta.php\n\t\t\t\t$path = str_replace($file, '', $file_url);\n\t\t\t\tif( file_exists($path . 'meta.php') ) {\n\t\t\t\t\t$meta = array();\n\t\t\t\t\tinclude($path . 'meta.php');\n\n\t\t\t\t\tif( array_key_exists($file, $meta)) {\n\t\t\t\t\t\t$attributes = $meta[$filenameOld];\n\t\t\t\t\t\tunset($meta[$file]);\n\t\t\t\t\t\tfile_put_contents($path . 'meta.php', '<?php $meta = ' . var_export($meta, true) . ';');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t// Delete thumb file\n\t\t\t\tif ( file_exists($path . '/thumbs' . $file) ) {\n\t\t\t\t\tunlink($path . '/thumbs' . $file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdie();\n\t}", "title": "" }, { "docid": "dabdc8f74c27c1bb1c1969d9780a5a6e", "score": "0.5296358", "text": "public function afterDelete() {\n unlink(Yii::app()->basePath . '/../' . $this->filename);\n if (file_exists(Yii::app()->basePath . '/../' . $this->getThumbnailFile())) unlink(Yii::app()->basePath . '/../' . $this->getThumbnailFile());\n return parent::afterDelete();\n }", "title": "" }, { "docid": "894341b554ce72e7f2e152b48671fa1e", "score": "0.5282887", "text": "public function cleanup() {\n // Remove any paragraphs that were created.\n foreach ($this->entities as $entity) {\n $this->drupalContext->getDriver()\n ->entityDelete(self::ENTITY_TYPE_ID, $entity);\n }\n $this->entities = [];\n $this->paragraphNames = [];\n }", "title": "" }, { "docid": "459a764def9e121da849a2b6193f982d", "score": "0.5269562", "text": "private function removeFromLocalDisk()\n {\n try {\n //Remove main file\n if ($this->absoluteFilePath) {\n unlink($this->absoluteFilePath);\n }\n \n //Remove thumb file\n if ($this->absoluteThumbPath) {\n unlink($this->absoluteThumbPath);\n }\n } catch (\\Exception $e) {\n //@TODO - log error - $e->getMessage()\n }\n }", "title": "" }, { "docid": "f24f7a2d6e6103c05c776d94ca2cdc11", "score": "0.5252425", "text": "protected function tearDown()\n {\n foreach ($this->testFiles as $file)\n {\n if ($file->getId())\n $this->entityDataMapper->delete($file, true);\n }\n }", "title": "" }, { "docid": "4d440e0f3e3fe2330f36144874a1e3e6", "score": "0.5246671", "text": "private function delete_files() {\n\t\t// TODO test\n\t\tif(SUBMISSION_SOURCE == 'database' OR SUBMISSION_SOURCE == 'both') {\n\t\t\t$query = DB::prepare(\"DELETE FROM `file` WHERE submissionid=?\");\n\t\t\t$query->execute(array($this->submissionid));\n\t\t\tDB::check_errors($query);\n\t\t}\n\t\tif(SUBMISSION_SOURCE == 'filesystem' OR SUBMISSION_SOURCE == 'both') {\n\t\t\t$submission_path = substr(SUBMISSION_PATH, -1) == \"/\" ? substr(SUBMISSION_PATH, 0, -1) : SUBMISSION_PATH;\n\t\t\t$submission_path .= $this->entity_path . \"submission_\".$this->submissionid;\n\t\t\tself::rrmdir($submission_path);\n\t\t}\n\t}", "title": "" }, { "docid": "261810741e210cfabcc2ccc310fb0c9e", "score": "0.5241246", "text": "protected function innerShareDeleteLink($filePath){\n\t\t$newFileText='';\n\t\t//add \\n part because in file deleting it doesnt exists\n\t\t$filePath.=\"\\n\";\n\t\t//load all rows from congFiles/links.php and add all exept filePath\n\t\t$destPath= FCPATH . 'confFiles' . $this->PARSE_SIGN . 'links.php';\n\t\t$fh = fopen($destPath,'r');\n\t\t$line = fgets($fh);\n\t\t$newFileText .=$line;\n\t\twhile($line = fgets($fh)){\n\t\t\t$line1=substr($line, 21);\n\t\t\tif($line1!=$filePath){\n\t\t\t\t$newFileText .=$line;\n\t\t\t}\n\t\t}\n\t\tfclose($fh);\n\t\t//save all loaded rows\n\t\t$destPath= FCPATH . 'confFiles' . $this->PARSE_SIGN . 'links.php';\n\t\t$fh = fopen($destPath,'w');\n\t\tfwrite($fh, $newFileText);\n\t\tfclose($fh);\n\t}", "title": "" }, { "docid": "d33e5fdbde7049c05dab403705bb55af", "score": "0.5231034", "text": "function _auditfiles_referenced_not_used_get_file_list() {\n $config = \\Drupal::config('auditfiles_config.settings');\n $connection = Database::getConnection();\n $file_references = $files_referenced = [];\n // Get a list of all files that are referenced in content.\n $files_in_fields = [];\n $fields[] = \\Drupal::service('entity_field.manager')->getFieldMapByFieldType('image');\n $fields[] = \\Drupal::service('entity_field.manager')->getFieldMapByFieldType('file');\n if($fields) {\n $count = 0;\n foreach ($fields as $key => $value) {\n foreach ($value as $table_prefix => $entity_type) {\n foreach ($entity_type as $key1 => $value1) {\n $field_data[$count]['table'] = $table_prefix.'__'.$key1;\n $field_data[$count]['column'] = $key1.'_target_id';\n $field_data[$count]['entity_type'] = $table_prefix;\n $count++;\n }\n }\n }\n foreach ($field_data as $key => $value) {\n $table = $value['table'];\n $column = $value['column'];\n $entity_type = $value['entity_type'];\n $query = 'SELECT entity_id, ' . $column . ' FROM {' . $table . '}';\n $query .= ' WHERE ' . $column . ' NOT IN (SELECT DISTINCT fid FROM {file_usage})';\n $maximum_records = $config->get('auditfiles_report_options_maximum_records') ? $config->get('auditfiles_report_options_maximum_records') : 250;\n if ($maximum_records > 0) {\n $query .= ' LIMIT ' . $maximum_records;\n }\n $file_references = $connection->query($query)->fetchAll();\n foreach ($file_references as $file_reference) {\n $reference_id = $table . '.' . $column . '.' . $file_reference->entity_id . '.' . $entity_type . '.' . $file_reference->{$column};\n $files_referenced[$reference_id] = [\n 'table' => $table,\n 'column' => $column,\n 'entity_id' => $file_reference->entity_id,\n 'file_id' => $file_reference->{$column},\n 'entity_type' => $entity_type,\n ];\n }\n }\n }\n return $files_referenced;\n }", "title": "" }, { "docid": "66f23ce4cb8cd22e26960429017a907c", "score": "0.5227549", "text": "public function testUnlinkWithNotPersistedSource()\n {\n $config = [\n 'sourceTable' => $this->article,\n 'targetTable' => $this->tag,\n 'joinTable' => 'tags_articles'\n ];\n $assoc = new BelongsToMany('Test', $config);\n $entity = new Entity(['id' => 1]);\n $tags = [new Entity(['id' => 2]), new Entity(['id' => 3])];\n $assoc->unlink($entity, $tags);\n }", "title": "" }, { "docid": "03b00e0a205aaf09fbf0fef9331e5e5e", "score": "0.5225208", "text": "private function unexportCandidateEntities() {\n $candidate_entites = $this->candidateEntities[SELF::UNEXPORT];\n foreach ($candidate_entites as $uuid => $candidate_entity) {\n $this->deleteRemoteEntity($candidate_entity);\n unset($this->candidateEntities[SELF::UNEXPORT][$uuid]);\n }\n }", "title": "" }, { "docid": "307eccdbac38cc1581c091b4f2d3bff5", "score": "0.5225093", "text": "function glossary_delete_attachments($glossary) {\n if ( $entries = get_records(\"glossary_entries\",\"glossaryid\",$glossary->id) ) {\n $deleted = 0;\n foreach ($entries as $entry) {\n if ( $entry->attachment ) {\n if ($basedir = glossary_file_area($entry)) {\n if ($files = get_directory_list($basedir)) {\n foreach ($files as $file) {\n unlink(\"$basedir/$file\");\n }\n }\n rmdir(\"$basedir\");\n $deleted++;\n }\n }\n }\n if ( $deleted ) {\n $attachmentdir = glossary_main_file_area($glossary);\n $glossarydir = glossary_mod_file_area($glossary);\n\n rmdir(\"$attachmentdir\");\n if (!$files = get_directory_list($glossarydir) ) {\n rmdir( \"$glossarydir\" );\n }\n }\n }\n}", "title": "" }, { "docid": "2709c37fce16709ebca9c6a3a352db2f", "score": "0.52089065", "text": "public function afterDelete()\n {\n if ($this->shouldDeleteFile()) {\n unlink($this->getRealFilepath());\n }\n parent::afterDelete();\n }", "title": "" }, { "docid": "9e053d64affe1f3ae176061fe3758f2c", "score": "0.5194722", "text": "public function delUpload(){\n\t\tarray_map( 'unlink', glob( _PPSK_UPLOAD_FILES.'*.*' ));\n\t\tarray_map( 'unlink', glob( _PPSK_UPLOAD_FILES._PPSK_THUMB_FOLD.'*.*'));\n\t}", "title": "" }, { "docid": "83f9547c7a196bdc537682e9f6aa4013", "score": "0.5193311", "text": "function unlink() {\n parent::unlink();\n\n // Remove the config from a remote server if necessary.\n $this->data['server']->sync($this->filename());\n }", "title": "" }, { "docid": "980c0fded02f50820d6f2544c792043e", "score": "0.51862735", "text": "private function unexportDisqualifiedExportCandidateEntities() {\n $candidate_entites = $this->candidateEntities[SELF::EXPORT];\n foreach ($candidate_entites as $uuid => $candidate_entity) {\n $root_ancestor_entity = $this->findRootAncestorEntity($candidate_entity);\n // If root ancestor is not published, delete the current entity.\n if ($root_ancestor_entity instanceof NodeInterface && !$root_ancestor_entity->isPublished()) {\n $this->candidateEntities[SELF::UNEXPORT][$uuid] = $candidate_entity;\n unset($this->candidateEntities[SELF::EXPORT][$uuid]);\n }\n }\n }", "title": "" }, { "docid": "3886b70f7db69900ef69945add7856f2", "score": "0.5180896", "text": "public function cleanup_working_files() {\n\t\tif ( file_exists($this->uploadsPath() . '/WP-STATIC-EXPORT-TARGETS') ) {\n\t\t\tunlink($this->uploadsPath() . '/WP-STATIC-EXPORT-TARGETS');\n\t\t}\n\n\t\tif ( file_exists($this->uploadsPath() . '/WP-STATIC-CURRENT-ARCHIVE') ) {\n\t\t\tunlink($this->uploadsPath() . '/WP-STATIC-CURRENT-ARCHIVE');\n\t\t}\n\n\t\tif ( file_exists($this->uploadsPath() . '/WP-STATIC-EXPORT-S3-FILES-TO-EXPORT') ) {\n\t\t\tunlink($this->uploadsPath() . '/WP-STATIC-EXPORT-S3-FILES-TO-EXPORT');\n\t\t}\n\n\t\tif ( file_exists($this->uploadsPath() . '/WP-STATIC-CRAWLED-LINKS') ) {\n\t\t\tunlink($this->uploadsPath() . '/WP-STATIC-CRAWLED-LINKS');\n\t\t}\n\n\t\tif ( file_exists($this->uploadsPath() . '/WP-STATIC-INITIAL-CRAWL-LIST') ) {\n\t\t\tunlink($this->uploadsPath() . '/WP-STATIC-INITIAL-CRAWL-LIST');\n\t\t}\n\n\t\t// TODO: cleanup all but latest archives in case of multiple failed exports filling up disk\n\n\t}", "title": "" }, { "docid": "2b47bf83bcae94177d11905af35dfcb9", "score": "0.515833", "text": "public function afterDelete()\n {\n @unlink($this->getFullPath());\n parent::afterDelete();\n }", "title": "" }, { "docid": "5ffdde326a79a06f4390ad0b92c369ca", "score": "0.51428527", "text": "function fileRemoveControl()\n{\n\t$data\t=\tarray(\n\t\t\t\t'file' => $fdata['file']['path'],\n\t\t\t\t'target_dir' => \"upload\",\t\t\t\t\t\n\t\t\t\t);\n\t$fdata = fileDelete($data);\n}", "title": "" }, { "docid": "de40d50bb8a6473c4b13d0ef7161e02d", "score": "0.51326406", "text": "function deleteFile( $database,$option,$fileName) {\n unlink (JB_ABSPATH.'/uploaded/files/'.$fileName);\n //step 2: remove the database link to the file\n $database->setQuery(\"DELETE FROM #__sb_attachments where filelocation='\".JB_ABSPATH.'/uploaded/files/'.$fileName.\"'\");\n $database->query();\n\n mosRedirect( \"index2.php?option=$option&task=browseFiles\", \"File deleted\" );\n\n}", "title": "" }, { "docid": "d36cbb1ade4754a1dde652e5fd8f0a85", "score": "0.5117209", "text": "public function deleteUploadFile($entity, $fieldName)\n {\n $objectType = $entity->get_objectType();\n if (!in_array($objectType, $this->allowedObjectTypes)) {\n return false;\n }\n \n if (empty($entity[$fieldName])) {\n return $entity;\n }\n \n // remove the file\n if (is_array($entity[$fieldName]) && isset($entity[$fieldName][$fieldName])) {\n $entity[$fieldName] = $entity[$fieldName][$fieldName];\n }\n if (is_object($entity[$fieldName])) {\n $filePath = $entity[$fieldName]->getPathname();\n if (file_exists($filePath) && !unlink($filePath)) {\n return false;\n }\n } elseif (!empty($entity[$fieldName]) && file_exists($entity[$fieldName])) {\n if (!unlink($entity[$fieldName])) {\n return false;\n }\n }\n \n $entity[$fieldName] = null;\n $entity[$fieldName . 'Meta'] = [];\n $entity[$fieldName . 'Url'] = '';\n \n return $entity;\n }", "title": "" }, { "docid": "efece2b3a9eaf603c2a3bf9fd7a461b4", "score": "0.5114097", "text": "public function postRemove(File $file): void\n {\n if ($file->getExternalUrl()) {\n // Externally stored files are not present in filesystem.\n return;\n }\n\n $this->filesShouldBeDeleted[] = $file->getFilename();\n }", "title": "" }, { "docid": "a11bbdcb5ace66b6813393cbf22c99af", "score": "0.510877", "text": "public function afterDelete()\r\n {\r\n $images = $this->owner->getImages();\r\n if (count($images) < 1) {\r\n return true;\r\n } else {\r\n foreach ($images as $image) {\r\n $this->owner->removeImage($image);\r\n }\r\n\r\n $path = Yii::getAlias($this->path) . DIRECTORY_SEPARATOR . $this->owner->primaryKey;\r\n BaseFileHelper::removeDirectory($path);\r\n }\r\n }", "title": "" }, { "docid": "20dbb98d9948cddb37441073679a2d4e", "score": "0.51075596", "text": "function unlink($pageID)\n\t{\n\t\t$this->DeleteAllPageLinks($pageID);\n\t\t$this->DeleteAllPageWidgetLinks($pageID);\n\t\t$this->DeleteAllPageTagLinks($pageID);\n\t}", "title": "" }, { "docid": "ff8f0f51fbe41d1ef05d488446c20c2a", "score": "0.5105729", "text": "protected function cleanup(): void\n {\n if (!\\is_null($this->resource) && $this->resource !== false) {\n $path = $this->getRealPath();\n if ($path === false) {\n throw new BugFoundException('Tried to cleanup a file but it\\'s real path is false, while resource isn\\'t');\n }\n $this->close();\n if (file_exists($path)) {\n @unlink($path);\n }\n }\n }", "title": "" }, { "docid": "d487f4ba0261a3319de1cf754d9d92cf", "score": "0.50998205", "text": "protected function beforeDestroy(){\r\n CourtCase::deleteWhere(array('offender_id'=>$this->id));\r\n // delete the actual file from disk\r\n // if (is_file($this->photo) unlink($this->photo) ;\r\n }", "title": "" }, { "docid": "67b948c63f5f9961cd4caa75f954c09b", "score": "0.5089534", "text": "public function oxResetFileCache()\n {\n $aFiles = glob($this->getCacheFilePath(null, true) . '*');\n if (is_array($aFiles)) {\n // delete all the files, except cached tables field names\n $aFiles = preg_grep($this->_sPermanentCachePattern, $aFiles, PREG_GREP_INVERT);\n foreach ($aFiles as $sFile) {\n @unlink($sFile);\n }\n }\n }", "title": "" }, { "docid": "32854ebf914dacfbfeb5fc7cd71438db", "score": "0.50843185", "text": "public function removeUpload()\n {\n if ($this->filepath && ($file = $this->getAbsolutePath()) && (file_exists($this->getAbsolutePath()))) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "dbdd6b9d8485fc9f250e753703687f52", "score": "0.5081868", "text": "public function clearAttachments();", "title": "" }, { "docid": "bbf22f28d76e007099e15e362a295a5e", "score": "0.5067073", "text": "public function closeFiles ()\n {\n fclose($this->importFile);\n unlink($this->_upload->getFileName());\n }", "title": "" }, { "docid": "301acfd9e1ba57683a24fea82c880235", "score": "0.50641066", "text": "public function afterDeleteCommit(Event $event, EntityInterface $entity, ArrayObject $options) {\n // Delete media from directory\n if(!empty($entity->photo)) {\n \n $profile_image = $this->behaviors()\n ->get('File')\n ->deleteFile($entity->photo, Configure::read('UPLOAD_ORIGNAL_IMAGE_PATH'), Configure::read('UPLOAD_THUMB_IMAGE_PATH'), $entity->photo);\n \n }\n }", "title": "" }, { "docid": "d08dfda9d351b33a3dc82e2a6dbe1ddc", "score": "0.5063949", "text": "public function testRemoveLinkifier()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "c18ae3e40093a2b6df886592dcad66ed", "score": "0.5057186", "text": "public function cleanReferences() {\r\n \tunset($this->substitutions);\r\n \tunset($this->positionsAndPlayers);\r\n \tunset($this->playersOnBench);\r\n \tunset($this->removedPlayers);\r\n }", "title": "" }, { "docid": "a14b6f638a350f277cf9facc525ef223", "score": "0.50436217", "text": "public function cleanOrphanFiles( $oFilesQuery, $oFilesDelete, $sFileDir ) {\n\t\t\n\t\t$oDb = Geko_Wp::get( 'db' );\n\t\t\n\t\t// get all the files in the database\n\t\t$aFilesDb = $oDb->fetchCol( strval( $oFilesQuery ) );\n\t\t$aFilesDb = array_diff( $aFilesDb, array( '' ) );\t\t\t\t\t// remove empty values\n\t\t\n\t\t// get list of actual files\n\t\t$aFiles = array_diff(\n\t\t\tscandir( $sFileDir ),\n\t\t\tarray( '.', '..' )\n\t\t);\n\t\t\n\t\t// remove files in the db that don't actually exist\n\t\t// go through each file\n\t\tforeach ( $aFilesDb as $i => $sFile ) {\n\t\t\t\n\t\t\t$iBefore = count( $aFiles );\t\t\t\t\t\t\t\t\t// count all actual files\n\t\t\t$aFiles = array_diff( $aFiles, array( $sFile ) );\t\t\t\t// remove matching file\n\t\t\t$iAfter = count( $aFiles );\t\t\t\t\t\t\t\t\t\t// count again\n\t\t\t\n\t\t\tif ( $iBefore != $iAfter ) unset( $aFilesDb[ $i ] );\t\t\t// remove from db file list\n\t\t}\n\t\t\n\t\t// cleanup db with whatever was left over from $aFilesDb (since these do not actually exist)\n\t\tforeach ( $aFilesDb as $sFile ) {\n\t\t\t\n\t\t\tif ( $oFilesDelete->hasWhere( 'file' ) ) {\n\t\t\t\t$oFilesDelete->unsetWhere( 'file' );\n\t\t\t}\n\t\t\t\n\t\t\t$oFilesDelete->where( 'f.meta_value = ?', $sFile, 'file' );\n\t\t\t\n\t\t\t$oDb->query( strval( $oFilesDelete ) );\n\t\t}\n\t\t\n\t\t// cleanup files with whatever was left over from $aFiles (since these do not exist in the db)\n\t\tforeach ( $aFiles as $sFile ) {\n\t\t\tunlink( sprintf( '%s%s', $sFileDir, $sFile ) );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "e889bc534b2e97d5fe99151592ea44ab", "score": "0.50434285", "text": "public function rollbackAttachmentRedirect($entity, $field_name, $language = '') {\n // @todo D8 Refactor\n $field = $entity->$field_name;\n if (!empty($field[$language])) {\n foreach ($field[$language] as $delta => $item) {\n $file = File::load($item['fid']);\n $url = \\Drupal::service('file_url_generator')->generateAbsoluteString($file->uri);\n $parsed_url = parse_url($url);\n $destination = ltrim($parsed_url['path'], '/');\n redirect_delete_by_path($destination);\n }\n }\n }", "title": "" }, { "docid": "7ac521cb8248e47dc3fe97cd3f186f94", "score": "0.50374967", "text": "private function cleanup()\n {\n // Remove old temp files\n if (file_exists($this->conf['target_dir']))\n {\n foreach (glob($this->conf['target_dir'] . '/*.part') as $tmpFile)\n {\n if (time() - filemtime($tmpFile) < $this->conf['max_file_age'])\n {\n continue;\n }\n\n if (is_dir($tmpFile))\n {\n self::rrmdir($tmpFile);\n }\n else\n {\n @unlink($tmpFile);\n }\n }\n }\n }", "title": "" }, { "docid": "49779b33fd8f721c50bac02750e83feb", "score": "0.50371397", "text": "private function removePhotos(){\n\t\t\t$received = json_decode(stripslashes($this->getJsonData()));\n\n\t\t\t$photo = new PhotoClass();\n\n\t\t\t$photo->setId($received);\n\t\t\t$all = PhotoADO::findAllByPhotoId($photo);\n\n\t\t\t$path = $all[0]->getPhoto_path();\n\t\t\t$user = $all[0]->getUser_id();\n\t\t\t$path_ex = explode(\"/\", $path);\n\n\t\t\t$filename = \"../../\".$path;\n\n\t\t\tif(file_exists($filename)){\n\t\t\t\tunlink($filename);\n\t\t\t\tPhotoAdo::removePhoto($photo);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4c1e1bf6c5662c1c6708dd4b7eb237e4", "score": "0.50353265", "text": "public function deleteFiles()\n {\n foreach ($this->getFile() as $ifile) {\n foreach ($this->getClassExecutes() as $vld) {\n @unlink($vld->getDirectory().'/'.$ifile['new_name']);\n }\n }\n }", "title": "" }, { "docid": "1ed0e8725a1abca3763a85e85b3691ff", "score": "0.5032842", "text": "function remove_attachment()\n{\n}", "title": "" }, { "docid": "580a0e2d483299f5c66e5b29c883665a", "score": "0.5032758", "text": "private function cleanupFeedFiles()\n {\n $this->logger->info('Cleanup source files.');\n\n /** @var \\Unbxd\\ProductFeed\\Model\\Feed\\FileManager $fileManager */\n $fileManager = $this->getFileManager();\n try {\n $fileManager->deleteSourcePath();\n } catch (\\Exception $e) {\n $this->logger->error($e->getMessage());\n }\n\n return $this;\n }", "title": "" }, { "docid": "66cbd3cf1197cf65fe3a07bcef81dd9a", "score": "0.5031746", "text": "public function clean()\n {\n $mainFile = $this->filePath;\n $exclude = array();\n\n if (isset($this->metadata['sizes']))\n {\n foreach($this->metadata['sizes'] as $size => $data)\n {\n $exclude[] = $data['file'];\n }\n }\n $result['excluding'] = $exclude;\n\n $ext = pathinfo($mainFile, PATHINFO_EXTENSION); // file extension\n $base = substr($mainFile, 0, strlen($mainFile) - strlen($ext) - 1);\n $pattern = '/' . preg_quote($base, '/') . '-\\d+x\\d+\\.'. $ext .'/';\n $thumbsCandidates = @glob($base . \"-*.\" . $ext);\n\n $thumbs = array();\n if(is_array($thumbsCandidates)) {\n foreach($thumbsCandidates as $th) {\n if(preg_match($pattern, $th)) {\n $thumbs[]= $th;\n }\n }\n if( count($this->customThumbSuffixes)\n && !( is_plugin_active('envira-gallery/envira-gallery.php')\n || is_plugin_active('soliloquy/soliloquy.php')\n || is_plugin_active('soliloquy-lite/soliloquy-lite.php'))){\n foreach ($this->customThumbSuffixes as $suffix){\n $pattern = '/' . preg_quote($base, '/') . '-\\d+x\\d+'. $suffix . '\\.'. $ext .'/';\n foreach($thumbsCandidates as $th) {\n if(preg_match($pattern, $th)) {\n $thumbs[]= $th;\n }\n }\n }\n }\n }\n\n $result['removed'] = array();\n\n foreach($thumbs as $thumb) {\n if($thumb === $mainFile)\n {\n continue;\n }\n if (in_array(basename($thumb), $exclude))\n {\n continue;\n }\n\n if($thumb !== $mainFile) {\n $status = @unlink($thumb);\n $result['removed'][] = $thumb . \"($status)\";\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "d9d45b6c28282f7451282364d23640bf", "score": "0.5027743", "text": "public function clearFiles();", "title": "" }, { "docid": "19dd8c6af5d60461d2c83bc36d17d0d7", "score": "0.5022963", "text": "public function removeTransformsForAsset(AssetFileModel $asset)\n {\n $paths = new Imager_ImagePathsModel($asset);\n\n if (strpos($paths->targetPath, craft()->imager->getSetting('imagerSystemPath')) !== false) {\n IOHelper::clearFolder($paths->targetPath);\n craft()->templateCache->deleteCachesByElementId($asset->id);\n\n if ($paths->isRemote) {\n IOHelper::deleteFile($paths->sourcePath . $paths->sourceFilename);\n }\n }\n }", "title": "" }, { "docid": "9d27408141b41d99be559cec728e75cd", "score": "0.50183797", "text": "function cot_extrafield_unlinkfiles($fielddata, $extrafield)\n{\n\tglobal $cfg, $pl;\n\n\tif ($extrafield['field_type'] == 'file')\n\t{\n\t\t$extrafield['field_params'] = (!empty($extrafield['field_params'])) ? $extrafield['field_params'] : $cfg['extrafield_files_dir'];\n\t\t$extrafield['field_params'] .= (mb_substr($extrafield['field_params'], -1) == '/') ? '' : '/';\n\t\tif ($extrafield['field_params'].$fielddata) {\n\t\t\t/* === Hook === */\n\t\t\tforeach (cot_getextplugins('extrafields.unlinkfiles') as $pl) {\n\t\t\t\tinclude $pl;\n\t\t\t}\n\t\t\t/* ===== */\n\t\t\t@unlink($extrafield['field_params'].$fielddata);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.50095296", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "baffbecf7511ba702d62560d70744a42", "score": "0.5006174", "text": "public function testFuneralAttachmentCanBeRemoved()\n {\n $this->withoutExceptionHandling();\n Storage::fake('fake');\n $raw = factory(Funeral::class)->raw();\n $raw['attachments'][] = UploadedFile::fake()->image('test.jpg');\n\n $this->actingAs($this->user)\n ->post(route('funerals.store'), $raw)\n ->assertStatus(302);\n\n $this->assertCount(1, Funeral::all());\n $this->assertCount(1, Funeral::first()->attachments);\n\n unset($raw['attachments']);\n $raw['remove_attachment'][] = Attachment::first()->id;\n $this->actingAs($this->user)\n ->patch(route('funerals.update', Funeral::first()->id), $raw)\n ->assertStatus(302);\n\n $this->assertCount(0, Funeral::first()->attachments);\n }", "title": "" }, { "docid": "02ba91545ee102dffb1111d848d56e9a", "score": "0.5006144", "text": "function unlinkfiles($filename)\n\t{\n\t\t// xelatex related\n\t\tunlink($filename.\".aux\");\n\t\tunlink($filename.\".out\");\n\t\tunlink($filename.\".toc\");\n\t\tunlink($filename.\".log\");\n\t\t\n\t\t// glossaries related\n\t\tunlink($filename.\".ist\");\n\t\tunlink($filename.\".glg\");\n\t\tunlink($filename.\".glo\");\n\t\tunlink($filename.\".gls\");\n\n\t\t// makeidx related\n\t\tunlink($filename.\".idx\");\n\t\tunlink($filename.\".ilg\");\n\t\tunlink($filename.\".ind\");\n\t}", "title": "" }, { "docid": "9d07a9d2dfd38d1c3468ddc1c270550e", "score": "0.5005827", "text": "public function testUnlinkWithNotPersistedTarget()\n {\n $config = [\n 'sourceTable' => $this->article,\n 'targetTable' => $this->tag,\n 'joinTable' => 'tags_articles'\n ];\n $assoc = new BelongsToMany('Test', $config);\n $entity = new Entity(['id' => 1], ['markNew' => false]);\n $tags = [new Entity(['id' => 2]), new Entity(['id' => 3])];\n $assoc->unlink($entity, $tags);\n }", "title": "" }, { "docid": "3a17b06024808a40de89c370cfba68b3", "score": "0.50057787", "text": "public function deleteUrls($entity)\n {\n if ($entity->getUrls()) {\n $this->deleteAllEntitiesOfCollection($entity->getUrls());\n }\n }", "title": "" }, { "docid": "2b9e22f475b118d954eec297cbe10334", "score": "0.500403", "text": "public function testRemovedFiles() {\n $workdir = $this->webroot() . '/sites/all/modules';\n $this->drush('dl', array('exif_custom-1.14'), array(), NULL, $workdir);\n\n // Remove a file.\n unlink($workdir . '/exif_custom/exif_custom.features.inc');\n\n // Check that diff reports changes.\n $this->drush('bandaid-diff', array('exif_custom'), array(), NULL, $workdir, self::EXIT_CODE_DIFF_DETECTED);\n }", "title": "" }, { "docid": "0216b8ac8a97725bc262d132171969f4", "score": "0.49978974", "text": "public function testRemoveOrphans()\n {\n $usersFile = $this->loadData('User', 'default');\n $user1 = $this->User->load($usersFile[0]->getKey());\n $adminUser = $this->User->load($usersFile[2]->getKey());\n $this->dispatchUrl('/admin/removeorphans', $user1, true);\n\n $this->resetAll();\n $this->dispatchUrl('/admin/removeorphans', $adminUser, true);\n\n $this->resetAll();\n $this->dispatchUrl('/admin/removeorphans?model=Blah', $adminUser, true);\n\n $this->resetAll();\n $this->dispatchUrl('/admin/removeorphans?model=Bitstream', $adminUser);\n $resp = json_decode($this->getBody());\n $this->assertEquals($resp->status, 'ok');\n $this->assertEquals($resp->message, 'Bitstream resources cleaned');\n }", "title": "" }, { "docid": "d6622da51f91451cd191f2c35688a3ef", "score": "0.49826124", "text": "function fett_settings_validate_remove($element, &$form_state, $form) {\n // File field support included.\n unset($form_state['values'][str_replace(array('files[', ']'), '', $element['#name'])]);\n}", "title": "" }, { "docid": "7431bf597704628bb6985e7fc7d3b70e", "score": "0.49768573", "text": "public function assertFileUnchanged(FileInterface $before, FileInterface $after) {\n $this->assertEquals($before->id(), $after->id(), 'File id is the same');\n $this->assertEquals($before->getOwner()->id(), $after->getOwner()->id(), 'File owner is the same');\n $this->assertEquals($before->getFilename(), $after->getFilename(), 'File name is the same');\n $this->assertEquals($before->getFileUri(), $after->getFileUri(), 'File path is the same');\n $this->assertEquals($before->getMimeType(), $after->getMimeType(), 'File MIME type is the same');\n $this->assertEquals($before->getSize(), $after->getSize(), 'File size is the same');\n $this->assertEquals($before->isPermanent(), $after->isPermanent(), 'File status is the same');\n }", "title": "" }, { "docid": "4c7aa08d7dd1266b72355256341cb352", "score": "0.49685755", "text": "public function removeUpload()\n\t{\n\t if ($file = $this->getAbsolutePath()) {\n\t unlink($file); \n\t }\n\t}", "title": "" }, { "docid": "5b9fa2c7addeed64b8cfb088ebb059ff", "score": "0.49579373", "text": "public function removeUpload()\n {\n if ($file = $this->getAbsolutePath()) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "8353991b483ffccbd75034c760457bb5", "score": "0.49561572", "text": "public function clearConvertedFiles()\n {\n $this->convertedFiles = null;\n }", "title": "" }, { "docid": "5a758d89f90d20fdc2fb90d261cf52dd", "score": "0.49524784", "text": "private function tidy() {\n\t$expired = clone $this->dateTime;\n\t$expired->sub(new DateInterval(\"PT2M\"));\n\n\tforeach (new DirectoryIterator($this->uploadPath) as $fileInfo) {\n\t\tif($fileInfo->isDot()) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$filename = $fileInfo->getFilename();\n\t\t$dateFromFile = strtok($filename, \"_\");\n\t\t$dateTimeFile = new DateTime($dateFromFile);\n\n\t\tif($dateTimeFile < $expired) {\n\t\t\tunlink($fileInfo->getPathname());\n\t\t}\n\t}\n}", "title": "" }, { "docid": "5ecf1f504189fb071d1f65805e93cc88", "score": "0.49505857", "text": "public function remove_added_uploads() {}", "title": "" }, { "docid": "057ce22a84a504e221dc969e4214a273", "score": "0.49318007", "text": "public function cleanupTestUploadFiles()\n {\n foreach ($this->uploadFilePaths as $uploadFilePath) {\n if (file_exists($uploadFilePath) and !is_dir($uploadFilePath)) {\n @unlink($uploadFilePath);\n }\n }\n $this->uploadFilePaths = [];\n }", "title": "" }, { "docid": "b8bd1e0941f8c9ca5d5bd681a0b2a69d", "score": "0.49303302", "text": "public function removeUpload()\n\t{\n\t\t//if ($file = $this->getAbsolutePath()) {\n\t\t//\tunlink($file);\n\t\t//}\n\t}", "title": "" }, { "docid": "6a85dae2767d6be71af1ef1634e249b8", "score": "0.49290723", "text": "function hapus_gambar_real($old_file){\n // $old_file_thumb=$this->merge($old_file,'_thumb'); //Simpan File Thumbnail di folder Server\n $file_thumb = './Assets/img/prospektus/real/'.$old_file;\n unlink($file_thumb);\n\n /* $old_file_thumb=$this->merge($old_file,'_thumb'); //Simpan File Thumbnail di folder Server\n $file_thumb = './Assets/img/artikel/prospektus/'.$old_file_thumb;\n unlink($file_thumb);\n */\n }", "title": "" }, { "docid": "7cdc79965a8ccf07494f3f4f3faedf0d", "score": "0.4926954", "text": "private function _clean() {\n\t\ttqb_empty_folder( $this->_get_imports_path() );\n\t}", "title": "" }, { "docid": "a6a55a90456fa9771626b36400fcfa16", "score": "0.4926147", "text": "function commissioner_preprocess_file_entity(&$variables) {\n if ($variables['view_mode'] == 'default') {\n if (($key = array_search('file', $variables['classes_array'])) !== FALSE) {\n unset($variables['classes_array'][$key]);\n }\n }\n}", "title": "" }, { "docid": "dfe8fa9223636b411fbb66ba4cefdb79", "score": "0.49151185", "text": "public function actionDelete($id)\n{\n $model = $this->findModel($id);\n //remove upload file & data\n $this->removeUploadDir($model->ref);\n Uploads::deleteAll(['ref'=>$model->ref]);\n\n $model->delete();\n\n return $this->redirect(['index']);\n}", "title": "" } ]
15509910e5f6b3eeb728e50cb9d50cdd
Recupere et format les donnees pour la generation du graph
[ { "docid": "e632ff83d2f11826c52c57f665254f67", "score": "0.0", "text": "public function ajaxGraphiByCategorieAction(){\n\n $Date = array();\n $Date['month'] = $this->app->HTTPRequest->getData('month');\n $Date['year'] = $this->app->HTTPRequest->getData('year');\n $CumulTicket = 0;\n\n if( !isset($_GET['month']) ){\n return $this->getDataByCategoriesYear($Date['year']);\n }\n \n if( $Date['month'] < 10 ){\n $Date['month'] = '0'. $Date['month'];\n }\n \n // Recuperation des categories\n $ResSql = $this->app->db->select('id, completename')->from('glpi_itilcategories')->order('completename')->get();\n \n $i=1;\n $categories = array();\n foreach( $ResSql as $Row):\n if( substr($Row['completename'],0,1) != '-'):\n $categories[$i] = $Row;\n endif;\n $i++;\n endforeach;\n\n // On boucle sur les lieux\n $Semaine1 = array();\n $i=1;\n $y=0;\n foreach( $categories as $categorie ): \n \n // 01 au 07\n $Tmp = $this->app->db->select('COUNT(id) as nb')\n ->from('glpi_tickets ggt')\n ->where_free('ggt.date >= \"'. $Date['year'] .'-'. $Date['month'] .'-01 00:00:00\" AND ggt.date <= \"'. $Date['year'] .'-'. $Date['month'] .'-07 23:59:59\" AND ggt.itilcategories_id = ' . $categorie['id'] . ' ')\n ->get_one();\n \n $Semaine1[$y] = array($Tmp['nb'],$i);\n\n $i++;\n $y++;\n endforeach;\n\n ///////////////\n // Semaine 2 //\n // ////////////\n $i=1;\n $y=0;\n $Semaine2 = array();\n foreach( $categories as $categorie ): \n // 08 au 14\n $Tmp = $this->app->db->select('COUNT(id) as nb')\n ->from('glpi_tickets ggt')\n ->where_free('ggt.date >= \"'. $Date['year'] .'-'. $Date['month'] .'-08 00:00:00\" AND ggt.date <= \"'. $Date['year'] .'-'. $Date['month'] .'-14 23:59:59\" AND ggt.itilcategories_id = ' . $categorie['id'] . ' ')\n ->get_one();\n $Semaine2[$y] = array($Tmp['nb'],$i);\n $i++;\n $y++;\n endforeach;\n\n ///////////////\n // Semaine 3 //\n // ////////////\n $i=1;\n $y=0;\n $Semaine3 = array();\n foreach( $categories as $categorie ): \n\n $Tmp = $this->app->db->select('COUNT(id) as nb')\n ->from('glpi_tickets ggt')\n ->where_free('ggt.date >= \"'. $Date['year'] .'-'. $Date['month'] .'-15 00:00:00\" AND ggt.date <= \"'. $Date['year'] .'-'. $Date['month'] .'-21 23:59:59\" AND ggt.itilcategories_id = ' . $categorie['id'] . ' ')\n ->get_one();\n $Semaine3[$y] = array($Tmp['nb'],$i);\n\n $i++;\n $y++;\n endforeach;\n\n ///////////////\n // Semaine 4 //\n // ////////////\n $i=1;\n $y=0;\n $Semaine4 = array();\n foreach( $categories as $categorie ): \n\n $Tmp = $this->app->db->select('COUNT(id) as nb')\n ->from('glpi_tickets ggt')\n ->where_free('ggt.date >= \"'. $Date['year'] .'-'. $Date['month'] .'-22 00:00:00\" AND ggt.date <= \"'. $Date['year'] .'-'. $Date['month'] .'-28 23:59:59\" AND ggt.itilcategories_id = ' . $categorie['id'] . ' ')\n ->get_one();\n $Semaine4[$y] = array($Tmp['nb'],$i);\n\n $i++;\n $y++;\n endforeach;\n \n return json_encode(array($Semaine1, $Semaine2, $Semaine3, $Semaine4), JSON_NUMERIC_CHECK );\n }", "title": "" } ]
[ { "docid": "9798d9388902dd6f7bba4eaccff49897", "score": "0.64755577", "text": "function __toString(){\n\t\t// TODO all are string values, maybee som should be decimal\n\t\t//$x=$this->attributes['fp'][0]+$this->attributes['offset'];\n\t\t//$y=$this->attributes['fp'][0]-$this->attributes['offset'];\n\n\t\t$x=$this->attributes['fp'][0]+$this->attributes['offset'];\n\t\t$y=$this->attributes['fp'][1]-$this->attributes['offset'];\n\t\t$defaults['lineweight']=1;\n\t\t\t\t\n\t\treturn sprintf(\"0\\nDIMENSION\\n70\\n1\\n10\\n%d\\n20\\n%d\\n13\\n%d\\n23\\n%d\\n14\\n%d\\n24\\n%d\\n370\\n%d\\n\",\n\t\t\t\t\t\t\t\t\t$x,$y,\n\t\t\t\t\t\t\t\t\t$this->attributes['fp'][0],\n\t\t\t\t\t\t\t\t\t$this->attributes['fp'][1],\n\t\t\t\t\t\t\t\t\t$this->attributes['sp'][0],\n\t\t\t\t\t\t\t\t\t$this->attributes['sp'][1],\n\t\t\t\t\t\t\t\t\t$this->attributes['lineweight']\n\t\t\t\t\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "995f095566d4cad6b712f7e638044c6a", "score": "0.6019374", "text": "public function graph1()\n {\n $myConfig = $this->getConfig();\n $oDb = oxDb::getDb();\n\n $aDataX = array();\n $aDataY = array();\n\n $sTimeFromParameter = oxRegistry::getConfig()->getRequestParameter(\"time_from\");\n $sTimeToParameter = oxRegistry::getConfig()->getRequestParameter(\"time_to\");\n $sTimeFrom = $oDb->quote(date(\"Y-m-d H:i:s\", strtotime($sTimeFromParameter)));\n $sTimeTo = $oDb->quote(date(\"Y-m-d H:i:s\", strtotime($sTimeToParameter)));\n\n $sSQL = \"select count(*) as nrof, oxparameter from oxlogs where oxclass = 'search' \" .\n \"and oxtime >= $sTimeFrom and oxtime <= $sTimeTo group by oxparameter order by nrof desc\";\n $rs = $oDb->execute($sSQL);\n if ($rs != false && $rs->recordCount() > 0) {\n while (!$rs->EOF) {\n if ($rs->fields[1]) {\n $aDataX[] = $rs->fields[0];\n $aDataY[] = $rs->fields[1];\n }\n $rs->moveNext();\n }\n }\n\n header(\"Content-type: image/png\");\n\n // New graph with a drop shadow\n $graph = new Graph(800, max(640, 20 * count($aDataX)));\n $graph->setBackgroundImage($myConfig->getImageDir(true) . \"/reportbgrnd.jpg\", BGIMG_FILLFRAME);\n\n // Use a \"text\" X-scale\n $graph->setScale(\"textlin\");\n\n $top = 60;\n $bottom = 30;\n $left = 80;\n $right = 30;\n $graph->set90AndMargin($left, $right, $top, $bottom);\n\n // Label align for X-axis\n $graph->xaxis->setLabelAlign('right', 'center', 'right');\n\n // Label align for Y-axis\n $graph->yaxis->setLabelAlign('center', 'bottom');\n\n $graph->setShadow();\n // Description\n $graph->xaxis->setTickLabels($aDataY);\n\n // Set title and subtitle\n $graph->title->set(\"Suchw�rter\");\n\n // Use built in font\n $graph->title->setFont(FF_FONT1, FS_BOLD);\n\n // Create the bar plot\n $bplot = new BarPlot($aDataX);\n $bplot->setFillGradient(\"navy\", \"lightsteelblue\", GRAD_VER);\n $bplot->setLegend(\"Hits\");\n\n $graph->add($bplot);\n\n // Finally output the image\n $graph->stroke();\n }", "title": "" }, { "docid": "5d59a1a7d57f990a95e6844bb50ee483", "score": "0.5996267", "text": "function generarGrafoPert($grafo,$nodos,$resolver = false,$conexion = null,$preguntas = null) {\r\n\t\t$gv = new Image_GraphViz(true, array(\"rankdir\"=>\"LR\", \"size\"=>\"8.333,11.111!\"), \"PERT\", false, false);\r\n\t\t//Añadimos los nodos al grafo\r\n\t\tfor($i = 1; $i <= count($nodos); $i++)\r\n\t\t{\r\n\t\t\t$gv->addNode($i, array(\"label\"=>\"({$nodos[$i][\"tei\"]}){$i}({$nodos[$i][\"tli\"]})\"));\r\n\t\t\t\r\n\t\t\t//Si es necesario obtenemos la respuesta a la pregunta 4\r\n\t\t\tif($resolver){\r\n\t\t\t\tif($i == count($nodos))\r\n\t\t\t\t{\r\n\t\t\t\t\t$respuesta4 = $nodos[$i][\"tei\"];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$respuesta5 = \"\";\r\n\t\t//Añadimos los arcos\r\n\t\tforeach($grafo as $value)\r\n\t\t{\r\n\t\t\tif($value->getFicticia())\r\n\t\t\t{\r\n\t\t\t\t$gv->addEdge(array($value->getNodoOrigen() => $value->getNodoDestino()), array(\"label\" => $value->getID().\"(\".$value->getDuracion().\")\", \"style\" => \"dashed\"));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$color = \"black\";\r\n\t\t\t\t$holgura = $nodos[$value->getNodoDestino()][\"tli\"] - $nodos[$value->getNodoOrigen()][\"tei\"] - $value->getDuracion();\r\n\t\t\t\t\r\n\t\t\t\tif($holgura == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$color = \"red\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Si es necesario obtenemos la respuesta a la pregunta 5\r\n\t\t\t\t\tif(($respuesta5 != \"\") && $resolver)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$respuesta5 = $respuesta5.\",\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($resolver)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$respuesta5 = $respuesta5.$value->getID();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Si es necesario obtenemos la respuesta a las pregunta 1 2 3\r\n\t\t\t\tif($resolver)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($value->getID() == $preguntas[\"NOMBRE_1\"])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$respuesta1 = $holgura;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($value->getID() == $preguntas[\"NOMBRE_2\"])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$respuesta2 = $nodos[$value->getNodoOrigen()][\"tei\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($value->getID() == $preguntas[\"NOMBRE_3\"])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$respuesta3 = $nodos[$value->getNodoDestino()][\"tli\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$gv->addEdge(array($value->getNodoOrigen() => $value->getNodoDestino()), array(\"color\" => $color, \"label\" => $value->getID().\"(\".$value->getDuracion().\")[>{$holgura}<]\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t//Si es necesario guardamos las respuestas correctas en la BD\r\n\t\tif($resolver)\r\n\t\t{\r\n\t\t\t$consulta = \"INSERT INTO respuestas_correctas(ID_GRAFO, RESPUESTA_1, RESPUESTA_2, RESPUESTA_3, RESPUESTA_4, RESPUESTA_5) VALUES({$preguntas[\"ID_GRAFO\"]}, {$respuesta1}, {$respuesta2}, {$respuesta3}, {$respuesta4}, '{$respuesta5}');\";\r\n\t\t\t$conexion->query($consulta);\r\n\t\t}\r\n\t\treturn $gv;\r\n\t}", "title": "" }, { "docid": "39437952346586894791c1de62a59bb0", "score": "0.59820426", "text": "public function rrd_graph(){\n if(empty($this->_colors) || count($this->_colors) == 1)\n $this->_rainbow_colors();\n\n $data = $this->_rrd_gen_graph($this->_png);\n\n #echo implode(' ', $data); exit;\n\n $return = NULL;\n if(!$this->_png){\n $return .= '<canvas id=\"'.sha1(serialize($data)).'\" class=\"rrd\">';\n foreach($data as $value)\n $return .= \"$value \";\n $return .= '</canvas>';\n } else {\n header(\"content-type: image/png\");\n $return = implode(' ', $data);\n\n echo `$return`;\n\n return true;\n }\n\n return $return;\n }", "title": "" }, { "docid": "9bd7b7a9b29a909b1badfb1bb70d9b66", "score": "0.5982012", "text": "function __toString(){\n\t\t// TODO all are string values, maybee som should be decimal\n\t\t$result = sprintf(\"0\\nLWPOLYLINE\\n%s\\n70\\n%s\\n\",\n\t\t\t\t\t\t\t\t\t$this->common(),\n\t\t\t\t\t\t\t\t\t$this->attributes['flag']\n\t\t);\n\t\tif (isset($this->attributes['width'])){\n\t\t\t$result .= sprintf(\"43\\n%s\\n\",\n\t\t\t\t\t\t\t\t$this->attributes['width']);\n\t\t}\n\t\t$result .= sprintf(\"90\\n%s\\n%s\",\n\t\t\t\t\t\t\t\tcount($this->attributes['points']),\n\t\t\t\t\t\t\t\tpoints($this->attributes['points'], false)\n\t\t);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "74953b9a2d85fd6c016ae37636a889fa", "score": "0.5979669", "text": "function createGraph($matrix) {\n\t\techo \"<script> \";\n\t\techo \" var xhr = new XMLHttpRequest(); xhr.open('GET','db/neighbours.db.bz2', true); xhr.responseType = 'arraybuffer'; xhr.onload = function(e) {\";\n\t\techo \" var datacolor={\\\"97BBCD\\\":\\\"On-line\\\", \\\"781678\\\":\\\"SERF\\\", \\\"78DC78\\\":\\\"DNS\\\", \\\"167878\\\":\\\"Proxy\\\", \\\"787816\\\":\\\"Graph Server\\\", \\\"E53D00\\\":\\\"Syncthing\\\", \\\"7878DC\\\":\\\"PeerStreamer\\\", \\\"DC7878\\\":\\\"OpenVZ Web Panel\\\"};\";\n\t\t\n\t\t// THE MATRIX NEEDS TO BE CONVERTED HERE as ECHO of the arrays\n\t\t//echo \" var peerst = [];\";\n\t\t$i=0;\n\t\t$py0=array();\n\t\t$py1=array();\n\t\t//echo \" \n // var py0 = [];\n // var py1 = [];\";\n\t\t//Each node as a PY\n\t\tforeach ($matrix as $times) {\n\t\t\t$pytxt = \"\n\t\t\t\t var py\".$i.\" = [];\";\n\t\t\t\n\t\t\tfor ($j=0;$j<count($times);$j++) {\n\t\t\t\t //var py1 = [];\";\n\t\t\tif (!empty($times[$j][0])) {\n\t\t\t$pytxt .= \" py\".$i.\".push(\".$times[$j][0].\");\";\n\t\t\t} else $pytxt .= \" py\".$i.\".push(0);\"; //NOT 0 but start time\n\t\t\tif( !empty($times[$j][1])) {\n\t\t\t$pytxt .= \" py\".$i.\".push(\".$times[$j][1].\");\";\n\t\t\t} else $pytxt .= \" py\".$i.\".push(1456400000);\"; //End Time\n\t\t\t}\n\t\t\t$py[$i++]=$pytxt;\n\t\t}\n\t\tforeach ($py as $ys) echo $ys;\n\t\t//Needs Labels Here!\n\t\techo \"\n\t\t\tvar label = [];\";\n\t\t\n\t\t//We also need to include each PY as a dataset\n\t\techo \" var ChartData = { labels : label,\n \tdatasets : [\";\n\t\t$i=0;\n\t\t//for ($i=0; $i<2; $i++) {\n\t\tforeach ($py as $ys) {\t\n\t\t echo \"\n {\n fillColor : \\\"rgba(0,0,0,0)\\\",\n strokeColor : \\\"rgba(151,187,205,1)\\\",\n pointColor : \\\"rgba(151,187,205,1)\\\",\n pointStrokeColor : \\\"#fff\\\",\n label: 'PeerStreamer\".$i.\"',\n data : py\".$i++.\"\n },\";\n\t\t\t\n\t\t}\n\t\techo \"\t] }\";\n\t\techo \" \n\t\t var legend = \\\"<ul style=\\\\\\\"list-style-type: none;margin: 0;padding: 0;\\\\\\\">\\\";\";\n\t\techo \" for (var k in datacolor){ legend += \\\"<li style=\\\\\\\"display: inline;float: left;\\\\\\\"><div style=\\\\\\\"background-color: #\\\" + k + \\\"; height: 20px; width: 20px; margin 5px;float:left\\\\\\\"></div><div style=\\\\\\\"margin-left: 5px; margin-right: 20px;display:inline\\\\\\\">\\\"+datacolor[k]+\\\"</div></li>\\\";\";\n\t\techo \" } legend += \\\"</ul>\\\";\";\n\n\t\techo \" document.getElementById(\\\"line-chart-legend\\\").innerHTML = legend;\";\n\t\techo \" var ctx = document.getElementById(\\\"canvas\\\").getContext(\\\"2d\\\");\";\n\t\techo \" var grafic = new Chart(ctx).Line(ChartData, {\n bezierCurve: false,\n multiTooltipTemplate: \\\"<%= value %><%if (datasetLabel){%> <%=datasetLabel%><%}%>\\\",\n responsive : true,\n pointDotRadius : 3,\n pointDot : true,\n animation: false, }); \n\t\t}\";\n\n\t\techo \" \n\t\t\txhr.send();\";\n\t\techo \" \n\t\t\t</script>\";\n\t}", "title": "" }, { "docid": "5ed23d0a6b2ea923b7f31c03b653e055", "score": "0.58588177", "text": "function conf__esquema($esquema)\r\n\t{\r\n\t\t$dot = \"digraph G {\r\n\t\t\tedge [\tlabelfontcolor=red,\t\r\n\t\t\t\t\tlabelfloat=false,\r\n\t\t\t\t\tlabelfontsize=9,\r\n\t\t\t\t\tarrowhead=none,\r\n\t\t\t\t\tarrowtail=none];\r\n\t\t\tnode [\tshape=polygon,\t\r\n\t\t\t\t\tsides=4\r\n\t\t\t\t\tcolor=blue];\\n\";\r\n\t\t$datos = toba_info_editores::get_relaciones_tablas($this->fuente);\r\n\t\tforeach ($datos as $dato) {\r\n\t\t\t$dot .=\t'\"' . $dato['tabla_1'] . '\" -> \"' . $dato['tabla_2'] . '\" ' .\r\n\t\t\t\t\t'[headlabel=\"'. $dato['tabla_2_cols'] . \r\n\t\t\t\t\t'\", taillabel=\"'.$dato['tabla_1_cols'].\"\\\"];\\n\";\r\n\t\t}\r\n\t\t$dot .= '\r\n\t\t}\r\n\t\t';\t\r\n\t\t//echo $dot;\r\n\t\treturn $dot;\r\n\t}", "title": "" }, { "docid": "dd472e7190c8ddc44db63662703759e2", "score": "0.58523464", "text": "function __toString()\n {\n $prenotazioni = \"\";\n $date = \"\";\n foreach ($this -> getPrenotazioni() as $value) {\n $prenotazioni .= $prenotazioni . \" \" . $value -> __toString() . \"\\n\";\n }\n foreach ($this -> getFasce() as $value) {\n\n $date .= \" \" . date_format($value->getData(),\"d/m/Y H:i:s\"). \"\\n\";\n }\n return $print = \"NOME: \" . $this -> getNome() . \" | CATEGORIA: \" . $this -> getCategoria() . \" | DATA DI INIZIO: \" . date_format($this -> getStartDate(),\"d/m/Y H:i:s\") .\n \" | DATA DI FINE: \" .date_format($this -> getEndDate(),\"d/m/Y H:i:s\") .\n \" | FASCE ORARIE: \" . $date . \" | PRENOTATI: \" . $prenotazioni;\n }", "title": "" }, { "docid": "5a6beab76b4e524f56c811aa6e12f9bb", "score": "0.5822468", "text": "public function __toString(){\r\n return parent::__toString().\"<pre>{$this->pulgadas}, {$this->resolucion}</pre>\";\r\n }", "title": "" }, { "docid": "242a4d20c4f71a550a00230573b390b3", "score": "0.5709538", "text": "private function _line_graph_calculate_lines(){\n //print_r( $this->graph_data );\n \n if( $this->type == 'column' || $this->type == 'bar'){\n self::_column_graph_calculate_lines();\n return;\n }\n //print_r( $this->graph_data );\n \n if( $this->more == 'spline'){\n $this->from_x = floor( min( $this->graph_data['x'] )) - 1;\n $this->to_x = ceil( max( $this->graph_data['x'] )) + 1;\n $this->from_y = floor( min( $this->graph_data['y'] ) ) - 1;\n $this->to_y = ceil( max( $this->graph_data['y'] ) ) + 1;\n if( ( $this->from_x ) >= 0 )\n $this->from_x = -1;\n else if( ! is_int( $this->from_x ) ){\n $this->from_x = floor( $this->from_x ); \n }\n if( $this->to_x <= 0 )\n $this->to_x = 1;\n else if( !is_int( $this->to_x ) ){\n $this->to_x = ceil( $this->to_x ); \n }\n if( ( $this->from_y ) >= 0 )\n $this->from_y = -1;\n else if( ! is_int( $this->from_y ) ){\n $this->from_y = floor( $this->from_y ); \n }\n if( $this->to_y <= 0 )\n $this->to_y = 1;\n else if( !is_int( $this->to_y ) ){\n $this->to_x = ceil( $this->to_y ); \n }\n \n }\n \n $return = array();\n //minimalni sirka mezi linkami\n $min = 20;\n //rozmer, ve kterem se budou linky vykreslovat\n $width = $this->width - $this->padding_left - $this->padding_right;\n //pocet souradnic na ose x\n $num = ( ( $this->to_x - $this->from_x ));\n //sirka mezi dvema souradnicema\n $section = $width / $num;\n //$section = $this->place / ( ( $this->to_x - $this->from_x ));\n //pokud je sirka mensi nez minimalni, prepocita se\n if( $section >= $min ){\n $start = $this->padding_left;\n for( $i = 0; $i < $num - 1; $i++ ){\n $start += $section;\n $return[] = array( $start, 1 );\n }\n }\n else{\n $keys = array(); \n $num = abs( $this->from_x );\n $section = $this->move_left / $num;\n $start = $this->padding_left + $this->move_left;\n $last = 0; \n \n for( $i = 0; $i < $num; $i++ ){\n if( $last == 0 || ( abs( $start - $last ) >= $min ) ){\n if( !in_array( $start, $keys ) ){\n $return[] = array( $start, 1 );\n }\n $last = $start;\n }\n else\n $return[] = array( $start, 0 );\n \n $keys[] = $start;\n $start -= $section;\n }\n \n $num = abs( $this->to_x );\n $section = ($this->width - $this->padding_left - $this->padding_right - $this->move_left) / $num;\n $start = $this->padding_left + $this->move_left;\n $last = 0; \n \n for( $i = 0; $i < $num; $i++ ){\n if( $last == 0 || ( abs( $start - $last ) >= $min ) ){\n if( !in_array( $start, $keys ) ) {\n $return[] = array( $start, 1 );\n }\n $last = $start;\n } \n else\n $return[] = array( $start, 0 );\n \n $keys[] = $start;\n $start += $section;\n }\n }\n sort( $return );\n $this->x_positions = $return;\n \n unset( $return );\n $return = array(); \n \n $height = $this->height - $this->padding_top - $this->padding_bottom;\n $num = abs( $this->from_y - $this->to_y );\n $section = $height / $num;\n \n if( $section >= $min ){\n $start = $this->padding_top;\n for( $i = 0; $i < $num - 1; $i++ ){\n $start += $section;\n $return[] = array( $start, 1); \n }\n }\n else{\n $keys = array();\n $num = abs( $this->from_y );\n $section = $this->move_up / $num;\n $start = $this->height - $this->padding_bottom - $this->move_up;\n $last = 0;\n \n for( $i = 0; $i < $num; $i++ ){\n if( $last == 0 || ( abs( $start - $last ) >= $min ) ){ \n if( !in_array( $start, $keys ) ){\n $return[] = array( $start, 1 );\n }\n $last = $start;\n }\n else{\n $return[] = array( $start, 0 ); \n }\n \n $keys[] = $start; \n $start += $section; \n }\n \n $num = abs( $this->to_y );\n $section = ($this->height - $this->padding_top - $this->padding_bottom - $this->move_up) / $num ;\n $start = $this->height - $this->padding_bottom - $this->move_up;\n $last = 0;\n \n for( $i = 0; $i < $num; $i++ ){ \n if( $last == 0 || ( abs( $start - $last ) >= $min ) ){\n if( !in_array( $start, $keys ) ) {\n $return[] = array( $start, 1 );\n }\n $last = $start;\n } \n else\n $return[] = array( $start, 0 );\n \n $keys[] = $start;\n $start -= $section; \n }\n } \n sort( $return );\n $this->y_positions = $return;\n \n $this->calculate_positions = 1;\n }", "title": "" }, { "docid": "febd8ea5cfaa35e771b9c97026110647", "score": "0.5707221", "text": "public function __toString()\n {\n $dot = \"digraph Tree {\\n\";\n\n foreach ( $this->nodes as $key => $value )\n {\n $dot .= sprintf(\n \"node%s [label=\\\"%s\\\"]\\n\",\n $key,\n $value\n );\n }\n\n $dot .= \"\\n\";\n\n foreach ( $this->edges as $fromNode => $toNodes )\n {\n foreach ( $toNodes as $toNode )\n {\n $dot .= sprintf(\n \"node%s -> node%s\\n\",\n\n $fromNode,\n $toNode\n );\n }\n }\n\n return $dot . \"}\\n\";\n }", "title": "" }, { "docid": "7d51f7d2615187fde47b06e9b7686d65", "score": "0.5706013", "text": "function action_gen_graphs()\n\t{\n\tglobal $timespan_view;\n\t$start = \"-1h\";\n\tif($timespan_view == \"hour\"){ $start = \"-1h\"; }\n\tif($timespan_view == \"day\"){ $start = \"-1d\"; }\n\tif($timespan_view == \"week\"){ $start = \"-1w\"; }\n\tif($timespan_view == \"month\"){ $start = \"-1m\"; }\n\tif($timespan_view == \"year\"){ $start = \"-1y\"; }\n\tif($timespan_view == \"5year\"){ $start = \"-5y\"; }\n\tif($timespan_view == \"10year\"){ $start = \"-10y\"; }\n\tfor ( $i=1; $i<=6; $i++)\t{ vm_graph($i, $start, \"\", \"\"); }\n\tclean_temp_images();\n\t}", "title": "" }, { "docid": "c65ea4a512b9ae83d9f42ba1ff818dbd", "score": "0.5697642", "text": "public function __toString(): string {\n $desc = '';\n foreach ($this->_vertices as $vertex) {\n $desc .= $vertex.\" -> \".implode(\n ', ',\n $this->neighborsForVertex($vertex)\n ).PHP_EOL;\n }\n return $desc;\n }", "title": "" }, { "docid": "6036be4a16fc4b0f9871347612580c4e", "score": "0.55923265", "text": "private function buildGraphs($incinerateur){\n foreach($incinerateur->getLignes() as $currLine) {\n $this->graphs[$currLine->getNumero()] = [];\n $measuresByLine[$currLine->getNumero()] = [];\n }\n\n // Preparation of the data\n $declarations = $this->declarationRepository\n ->findValidatedDeclarations($incinerateur);\n\n foreach($declarations as $currDeclaration) {\n foreach ($currDeclaration->getDeclarationsFonctionnementLigne() as $currDeclarationFonctionnement) {\n $offset = (string)$currDeclarationFonctionnement->getLigne()->getNumero();\n $measuresByLine[$offset] = array_merge(\n $measuresByLine[$offset],\n $currDeclarationFonctionnement->getMesures()->toArray()\n );\n }\n }\n\n // Formatting of the data for display in graphs\n foreach($incinerateur->getLignes() as $currLine) {\n $measures = [];\n foreach(self::graphMapping as $currentGraph) {\n $this->graphs[$currLine->getNumero()][$currentGraph] = new GraphData($currentGraph, $measuresByLine[$currLine->getNumero()]);\n }\n }\n }", "title": "" }, { "docid": "045fe5c34b2f87ca0f804aadfbd12631", "score": "0.5590815", "text": "public function draw()\n {\n $this->drawLegends();\n $this->drawStates();\n $this->drawTransitions();\n\n if(\"dot\" == $this->format)\n {\n $exporter = new Dot();\n }else{\n $exporter = new Image();\n $exporter->setFormat($this->format);\n }\n\n $output = $exporter->getOutput($this->graph);\n return $output;\n }", "title": "" }, { "docid": "ef96200ea77bdaf0d15fabc43d38f0a6", "score": "0.55807614", "text": "public function sumCrimesToGraph() {\n\t\t$timeDAO = new TempoDAO ();\n\t\t$timeData = new Tempo ();\n\t\t$timeDataArray = $timeDAO->listAll ();\n\t\tfor( $i = 0; $i < count ( $timeDataArray ); $i ++ ) {\n\t\t\t$timeData = $timeDataArray [$i];\n\t\t\t$dados [$i] = $timeData->__getInterval ();\n\t\t}\n\t\tfor( $i = 0; $i < count ( $dados ); $i ++ ) {\n\t\t\t$crimeData [$i] = $this->_sumCrimesPerYear ( $dados [$i] );\n\t\t\t$crimeDataTitle [$i] = number_format ( $crimeData [$i], 0, ',', '.' );\n\t\t}\n\t\t\n\t\tfor( $i = 0; $i < count ( $crimeData ); $i ++ ) {\n\t\t\t/**\n\t\t\t * Loop that defines what will be represented in the graph\n\t\t\t * the string (\"\\\"bar\\\"\" ) defines the graphs full bar and\n\t\t\t * the string (\"\\\"bar simple\\\"\" ) defines the graphs dotted bar\n\t\t\t * The conditional 'if( $i%2==0 )' grants that the dotted and full bars will be intercalated.\n\t\t\t * Returns the concatenated strings array\n\t\t\t */\n\t\t\tif ( $i % 2 == 0 ) {\n\t\t\t\t$varbar = \"\\\"bar\\\"\";\n\t\t\t} else {\n\t\t\t\t$varbar = \"\\\"bar simple\\\"\";\n\t\t\t}\n\t\t\t$FormatedCrimeData [] = \"<div class=\" . $varbar . \"title=\\\"\" . $crimeDataTitle [$i] . \" Ocorrencias\\\">\n\t\t\t\t\t\t\t\t\t \t\t<div class=\\\"title\\\">\" . $dados [$i] . \"</div>\n\t\t\t\t\t\t\t\t\t \t\t<div class=\\\"value\\\">\" . $crimeData [$i] . \"</div>\n\t\t\t\t\t\t\t\t\t </div>\";\n\t\t\tif ($i != 0) {\n\t\t\t\t$FormatedCrimeData [0] = $FormatedCrimeData [0] . $FormatedCrimeData [$i];\n\t\t\t} else {\n\t\t\t\t//nothing to do here\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $FormatedCrimeData [0];\n\t}", "title": "" }, { "docid": "0eb3644e84581385a96d95c07757a8cf", "score": "0.55793315", "text": "public function visualize()\n {\n \n return $this->toString();\n \n }", "title": "" }, { "docid": "1bb2c46a22ccca365baa5ab13d486a94", "score": "0.55658466", "text": "function projet($num_pro,$intitule){\r\n\r\n return array(\r\n \"adjacencies\" => array(),\r\n \"data\" => array(\r\n \"\\$color\" => \"purple\",\r\n \"\\$type\" => \"circle\",\r\n \"\\$dim\" => 5,\r\n \"noeud\" => 'Racine',\r\n ),\r\n \"id\" => \"Pro-\".$num_pro,\r\n \"name\" => $intitule,\r\n );\r\n}", "title": "" }, { "docid": "751ebbf4baaca5f9dbed58e39a77734d", "score": "0.55487573", "text": "public function printGraph(){\n set_error_header(453, \"RDF not supported\");\n $generator = new Generator($this->rootname . \" - formatter cannot process RDF\");\n $body =\"\";\n $body .= \"<h1>Formatter doesn't support RDF</h1>\";\n\n $body .= \"<p>We don't have a triple output for this formatter yet. This is a best effort in HTML.</p>\";\n $body .= \"<p>There are plenty of RDF formatters which do work however. Check .ttl or .json for instance.</p>\";\n $rn = $this->rootname;\n $body .= \"<table border=3>\";\n $body .= \"<tr><td>subject</td><td>predicate</td><td>object</td></tr>\";\n foreach($this->objectToPrint->$rn->triples as $triple){\n $body .= \"<tr><td>\". $triple[\"s\"] .\"</td>\";\n $body .= \"<td>\". $triple[\"p\"] .\"</td>\";\n $body .= \"<td>\". $triple[\"o\"] .\"</td>\";\n\n $body .= \"</tr>\";\n }\n $body .= \"</table>\";\n $h = headers_list();\n $i = 0;\n $matches = array();\n while($i < sizeof($h) && !preg_match( \"/Link: (.+);rel=next.*/\" , $h[$i], $matches)){\n $i++;\n }\n if($i < sizeof($h)){\n $body .= \"<p class='nextpage'><a href='\". $matches[1] .\"'>Next page</a></p>\";\n }\n $generator->generate($body);\n }", "title": "" }, { "docid": "e41f76130243913e6fe61a0bdc808f4b", "score": "0.54324573", "text": "function Graph_n_table_format($period_type,$date_value)\n{\n\tglobal $log;\n\t$log->debug(\"Entering Graph_n_table_format(\".$period_type.\",\".$date_value.\") method ...\");\n $date_val=explode(\"-\",$date_value);\n if($period_type==\"month\") //to get the vtiger_table format dates\n {\n $table_format=date(\"j\",mktime(0,0,0,date($date_val[1]),(date($date_val[2])),date($date_val[0])));\n $graph_format=date(\"D\",mktime(0,0,0,date($date_val[1]),(date($date_val[2])),date($date_val[0])));\n }\n else if($period_type==\"week\")\n {\n $table_format=date(\"d/m\",mktime(0,0,0,date($date_val[1]),(date($date_val[2])),date($date_val[0])));\n $graph_format=date(\"D\",mktime(0,0,0,date($date_val[1]),(date($date_val[2])),date($date_val[0])));\n }\n else if($period_type==\"yday\")\n {\n $table_format=date(\"j\",mktime(0,0,0,date($date_val[1]),(date($date_val[2])),date($date_val[0])));\n $graph_format=$table_format;\n }\n $values=array($graph_format,$table_format);\n\t$log->debug(\"Exiting Graph_n_table_format method ...\");\n return $values;\n}", "title": "" }, { "docid": "4a8e425d0baef40fa2ae3e601a8de2a9", "score": "0.5415884", "text": "protected function populateGraphWithNodes()\n {\n $this->generateFirstRow();\n $this->generateSecondRow();\n $this->generateThirdRow();\n $this->generateFourthRow();\n }", "title": "" }, { "docid": "0315b285c06289c70b205bc26578ed9d", "score": "0.54123634", "text": "public function dump(): string\n {\n $counter = [];\n $output = [$this->getHeader()];\n\n foreach ($this->list->getRelations() as $_ => $d) {\n if (empty($counter[$d->getName()])) {\n $counter[$d->getName()] = count($counter);\n $output[] = $this->formatClass($d, $counter);\n }\n\n $depSize = count($d->getDependency());\n\n foreach ($d->getDependency() as $child) {\n if (empty($counter[$child->getName()])) {\n $counter[$child->getName()] = count($counter);\n $output[] = $this->formatClass($child, $counter);\n }\n\n $output[] = $this->formatGraph($d, $child, $counter, $depSize);\n }\n }\n\n $output[] = $this->getFooter();\n\n return implode(\"\\n\", array_filter($output, function ($o) {\n return !empty($o);\n })) . \"\\n\";\n }", "title": "" }, { "docid": "b23169a4b085044697adf1fe7dd37d70", "score": "0.5382788", "text": "function __toString() {\n return \"un camion : \" . parent::__toString() . \" $this->_axles essieux\";\n }", "title": "" }, { "docid": "02d28874653b03f1e6abb03270efcee2", "score": "0.5372805", "text": "public static function drawChart($nodes, $edges, $times) {\n\n $maxNodes = max($nodes);\n $maxEdges = max($edges);\n\n //vynulovanie minut a sekund\n foreach ($times as $index => $unixCas) {\n $times[$index] = self::vynuluj($unixCas, 1, 0, 0);\n }\n\n //rozsah dni\n $prvyDen = self::vynuluj($times[0], 0, 0, 0);\n $poslednyDen = self::vynuluj($times[sizeof($times) - 1], 0, 0, 0) + 86400; // ziskame zacatek dne + pripocitame jeden den (86400 sekund)\n $pocetHodin = ($poslednyDen - $prvyDen) / 3600; // zjistime pocet hodin od zacatku, do konce.\n $pocetHodinGraf = $pocetHodin - 1; //v grafu chybi posledni hodina vzdy, proto na graf dame o jednu mene.\n $pocetDni = round(($pocetHodin / 24)) + 1; //pocet dni ve vypisu, tj. na konec dame pripiseme jeden den navic. S vela cislami to nejako zblbne a da divne cislo, treba zaokruhlit\n // pole dnu, ktere se zobrazi v grafu\n $dnyArray = array();\n for ($i = 0; $i < $pocetDni; $i++) {\n $dnyArray[] = date(\"d.n.\", $prvyDen + $i * 86400);\n }\n\n //ulozeni do vypisu\n // vypis dnu\n // priklad: ?chxl=2:|15.3.|16.3.|17.3.|18.3|19.3\n $chxl = \"chxl=2:\";\n foreach ($dnyArray as $datum) {\n $chxl .= \"|\" . $datum;\n }\n\n // delka x vyska grafu\n $vyskaGrafu = 220;\n $rozsahDne = 100;\n $chs = \"&chs=\";\n $chs .= ( $pocetDni - 1) * $rozsahDne . \"x\" . $vyskaGrafu;\n\n // rozmezi hodin mezi dny\n $chxp = \"&chxp=2\";\n for ($i = 0; $i < $pocetDni; $i++) {\n $chxp .= \",\" . $i * 24;\n }\n\n\n // rozsah jednotlivých os\n $chxr = \"&chxr=0,0,\" . $maxNodes . \"|1,0,\" . $maxEdges . \"|2,0,\" . $pocetHodin;\n\n\n // pocet bodov v jednotlivych osach (napriklad na Y-osi je moznost umistit bod na kazdou hodinu)\n $chds = \"&chds=0,\" . $pocetHodinGraf . \",0,\" . $maxNodes . \",0,\" . $pocetHodinGraf . \",0,\" . $maxEdges;\n\n // body v grafu\n $chd = \"&chd=t:\";\n\n $hodinyUdalosti = \"\";\n $hodnotyNodes = \"\";\n $hodnotyEdges = \"\";\n\n for ($i = 0; $i < sizeof($times); $i++) {\n //hodiny udalosti\n $hodina = ($times[$i] - $prvyDen) / 3600; // rozdil mezi zacatkem a vydeleno na hodiny\n $hodinyUdalosti .= $hodina;\n if ($i != sizeof($times) - 1)\n $hodinyUdalosti .= \",\";\n\n //hodnoty nodes\n $hodnotyNodes .= $nodes[$i];\n if ($i != sizeof($times) - 1)\n $hodnotyNodes .= \",\";\n\n //hodnoty edges\n $hodnotyEdges .= $edges[$i];\n if ($i != sizeof($times) - 1)\n $hodnotyEdges .= \",\";\n }\n $chd .= $hodinyUdalosti . \"|\" . $hodnotyNodes . \"|\" . $hodinyUdalosti . \"|\" . $hodnotyEdges;\n\n // vysrafovane cary (chceme srafovat Y-ovou os, kazdy den jedna cara)\n $chg = \"&chg=\" . 100 / ($pocetDni - 1) . \",0\";\n\n $url = \"http://chart.apis.google.com/chart?\"\n . $chxl\n . $chxp\n . $chxr .\n \"&chxs=0,3072F3,11.5,0,lt,C2BDDD|1,FF9900,11.5,0,l,676767&chxtc=0,5&chxt=y,r,x&chs=1000x300&cht=lxy&chco=3072F3,FF9900\"\n . $chds\n . $chd .\n \"&chdl=Nodes|Edges&chdlp=b\"\n . $chg .\n \"&chls=1|1&chma=5,5,5,25&chm=r,FF0000,0,0,0&chtt=Po%C4%8Det%20u%C5%BEivatel%C5%AF%20a%20vztahy%20mezi%20nimi\";\n\n return $url;\n }", "title": "" }, { "docid": "e714db22992f8f72200af49f10b483d8", "score": "0.5366408", "text": "protected function to_ntriples($graph)\n {\n $nt = '';\n foreach ($graph->resources() as $resource) {\n foreach ($resource->properties() as $property) {\n $objects = $resource->all($property);\n foreach ($objects as $object) {\n $nt .= $this->ntriplesResource($resource).\" \";\n $nt .= $this->ntriplesResource($property).\" \";\n $nt .= $this->ntriplesObject($object).\" .\\n\";\n }\n }\n }\n return $nt;\n }", "title": "" }, { "docid": "e67603f867b8e4c7d5dbc48e0fd88bd8", "score": "0.53603697", "text": "public function __toString(): string\n {\n return \"DefaultGraphType [directed=\" . $this->directed . \", undirected=\" . $this->undirected\n . \", self-loops=\" . $this->selfLoops . \", multiple-edges=\" . $this->multipleEdges . \", weighted=\"\n . $this->weighted . \", allows-cycles=\" . $this->allowsCycles . \", modifiable=\" . $this->modifiable . \"]\";\n }", "title": "" }, { "docid": "60dcf795e827e62b23e41779f0661f43", "score": "0.5348656", "text": "public function gen_chart_data() {\n\t\tglobal $wpdb;\n\t\t$rows = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $wpdb->gviz_dummydata\" ), ARRAY_N );\n\t\t$new_result = array();\n\t\tforeach ($rows as $row) {\n\t\t\t$new_row = array();\n\t\t\tforeach ($row as $i => $value) {\n\t\t\t\tif ( $wpdb->col_info[$i]->numeric ) {\n\t\t\t\t\tif ( $wpdb->col_info[$i]->type == 'float' || $wpdb->col_info[$i]->type == 'double' || $wpdb->col_info[$i]->type == 'real' )\n\t\t\t\t\t\t$new_row[$wpdb->col_info[$i]->name] = (float)$value;\n\t\t\t\t\telseif ( $wpdb->col_info[$i]->type == 'bool' || $wpdb->col_info[$i]->type == 'boolean' )\n\t\t\t\t\t\t$new_row[$wpdb->col_info[$i]->name] = (bool)$value;\n\t\t\t\t\telse\n\t\t\t\t\t\t$new_row[$wpdb->col_info[$i]->name] = (int)$value;\n\t\t\t\t}\n\t\t\t\telseif ( $wpdb->col_info[$i]->type == 'datetime' )\n\t\t\t\t\t$new_row[$wpdb->col_info[$i]->name] = strtotime($value);\n\t\t\t\telse\n\t\t\t\t\t$new_row[$wpdb->col_info[$i]->name] = $value;\n\t\t\t}\n\t\t\t$new_result[] = $new_row;\n\t\t}\n\t\t$data_table = $new_result;\n\t\treturn $data_table;\n\t}", "title": "" }, { "docid": "b549aa1e79b3f59a3ed48620e9c415c3", "score": "0.5347913", "text": "public function format();", "title": "" }, { "docid": "b549aa1e79b3f59a3ed48620e9c415c3", "score": "0.5347913", "text": "public function format();", "title": "" }, { "docid": "b549aa1e79b3f59a3ed48620e9c415c3", "score": "0.5347913", "text": "public function format();", "title": "" }, { "docid": "b549aa1e79b3f59a3ed48620e9c415c3", "score": "0.5347913", "text": "public function format();", "title": "" }, { "docid": "b549aa1e79b3f59a3ed48620e9c415c3", "score": "0.5347913", "text": "public function format();", "title": "" }, { "docid": "b549aa1e79b3f59a3ed48620e9c415c3", "score": "0.5347913", "text": "public function format();", "title": "" }, { "docid": "b08bb28e55bf930f3dd64f2e6c017fbf", "score": "0.5327021", "text": "function parse()\n {\n if (isset($this->graph['name']) && is_string($this->graph['name'])) {\n $parsedGraph = \"digraph \" . $this->graph['name'] . \" {\\n\";\n } else {\n $parsedGraph = \"digraph G {\\n\";\n }\n\n if (isset($this->graph['attributes'])) {\n foreach ($this->graph['attributes'] as $key => $value) {\n $attributeList[] = $key . '=\"' . $value . '\"';\n }\n\n if (!empty($attributeList)) {\n $parsedGraph .= 'graph [ '.implode(',', $attributeList) . \" ];\\n\";\n }\n }\n\n if (isset($this->graph['nodes'])) {\n foreach($this->graph['nodes'] as $group => $nodes) {\n if ($group != 'default') {\n $parsedGraph .= sprintf(\n \"subgraph \\\"cluster_%s\\\" {\\nlabel=\\\"%s\\\";\\n\",\n\n $group,\n isset($this->graph['clusters'][$group]) ? $this->graph['clusters'][$group]['title'] : ''\n );\n\n if (isset($this->graph['clusters'][$group]['attributes'])) {\n unset($attributeList);\n\n foreach ($this->graph['clusters'][$group]['attributes'] as $key => $value) {\n $attributeList[] = $key . '=\"' . $value . '\"';\n }\n\n if (!empty($attributeList)) {\n $parsedGraph .= implode(',', $attributeList) . \";\\n\";\n }\n }\n }\n\n foreach($nodes as $node => $attributes) {\n unset($attributeList);\n\n foreach($attributes as $key => $value) {\n $attributeList[] = $key . '=\"' . $value . '\"';\n }\n\n if (!empty($attributeList)) {\n $parsedGraph .= sprintf(\n \"\\\"%s\\\" [ %s ];\\n\",\n addslashes(stripslashes($node)),\n implode(',', $attributeList)\n );\n }\n }\n\n if ($group != 'default') {\n $parsedGraph .= \"}\\n\";\n }\n }\n }\n\n if (isset($this->graph['edges'])) {\n foreach($this->graph['edges'] as $label => $node) {\n unset($attributeList);\n\n $from = key($node);\n $to = $node[$from];\n\n foreach($this->graph['edgeAttributes'][$label] as $key => $value) {\n $attributeList[] = $key . '=\"' . $value . '\"';\n }\n\n $parsedGraph .= sprintf(\n '\"%s\" -> \"%s\"',\n addslashes(stripslashes($from)),\n addslashes(stripslashes($to))\n );\n \n if (!empty($attributeList)) {\n $parsedGraph .= sprintf(\n ' [ %s ]',\n implode(',', $attributeList)\n );\n }\n\n $parsedGraph .= \";\\n\";\n }\n }\n\n return $parsedGraph . \"}\\n\";\n }", "title": "" }, { "docid": "d3604ff8f7e73ce9b2bb8fcfe4d87bff", "score": "0.5324543", "text": "public function __toString(): string {\n $val = 'Segment from '.$this->begin.' to '.$this->end;\n if ($this->horizontal) {\n $val = 'HORIZONTAL '.$val.': '.$this->y;\n }\n if ($this->vertical) {\n $val = 'VERTICAL '.$val.': '.$this->x;\n }\n\n $val .= ' ('.$this->raw.')';\n\n return $val;\n }", "title": "" }, { "docid": "0a5ea4cfa85c1e1a7f152e8960142fab", "score": "0.5317022", "text": "private function createGraphData()\n {\n $divider = $this->dayOrMonth ? self::AVARAGE_WORK_DAY : self::AVARGE_WORK_MONTH;\n $workPercentage = $this->workedTime / (3600 * $divider) * 100;\n $remainder = $workPercentage;\n while($remainder > 100) {\n array_push($this->graphData, 100);\n $remainder -= 100;\n }\n array_push($this->graphData, $remainder);\n }", "title": "" }, { "docid": "06506ca05f7b6da96b09c465248915c0", "score": "0.53052485", "text": "public function __toString(){\n\t\t$str=\"ID:{$this->id['db_name']}(ID:{$this->id['name']})\\n\";\n\t\t$str.=\"Relation ID:{$this->relation_id['db_name']}({$this->relation_id['name']})\\n\";\n\t\t$str.=\"Data:\";\n\t\tfor ($i=0; $i<sizeof($this->text); $i++)\n\t\t\t$str.=\"{$this->text[$i]['db_name']}({$this->text[$i]['name']}),\";\n\t\t\t\n\t\t$str.=\"\\nExtra:\";\n\t\tfor ($i=0; $i<sizeof($this->data); $i++)\n\t\t\t$str.=\"{$this->data[$i]['db_name']}({$this->data[$i]['name']}),\";\n\t\t\t\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "e5197b28e05cd11ed8c47a45598788bd", "score": "0.5304801", "text": "public function __toString(): string\n {\n return \"Circles { Radius :\".$this->radius.\" ,Color :\".$this->color.\" ,Area: \".$this->area.\"}\";\n }", "title": "" }, { "docid": "5d4d7b9e8169312a54d0d81bb4bc35a2", "score": "0.5302292", "text": "function createGraph($output, $start, $title, $width)\n {\n $options = array(\n \"--width=$width\",\n \"--slope-mode\",\n \"--start\", $start,\n \"--title=$title\",\n \"--lower=0\",\n \"DEF:temp=$this->public_path/temperatures.rrd:temp:AVERAGE\",\n \"AREA:temp#FFCC00:Temperature\",\n \"COMMENT:\\\\n\",\n \"GPRINT:temp:MIN:Min\\: %6.2lf %S\",\n \"GPRINT:temp:AVERAGE:Avg\\: %6.2lf %S\",\n \"GPRINT:temp:MAX:Max\\: %6.2lf %S\\\\n\",\n );\n\n $ret = rrd_graph($output, $options);\n if (! $ret) {\n echo \"<b>Graph error: </b>\".rrd_error().\"\\n\";\n }\n }", "title": "" }, { "docid": "78818a7c0f23afea207e97769703b628", "score": "0.52993405", "text": "function draw_graph($text, $real_units, $val, $total = 100, $classes = null, $show_percent = true, $total_width = 200) {\n\tif ($classes == null) {\n\t\t$classes = array(\n\t\t\t0=>'graphok',\n\t\t\t70=>'graphwarn',\n\t\t\t90=>'grapherror',\n\t\t);\n\t}\n\n\t$chars_per_pixel = 7;\n\tif (strlen($text) * $chars_per_pixel > $total_width - 35) {\n\t\t$text_trimmed = substr($text,0, floor(($total_width - 35) / $chars_per_pixel)).'..';\n\t} else {\n\t\t$text_trimmed = $text;\n\t}\n\n\t$clean_val = preg_replace(\"/[^0-9\\.]*/\",\"\",$val);\n\n\tif ($total == 0) {\n\t\t$percent = ($clean_val == 0) ? 0 : 100;\n\t} else {\n\t\t$percent = round($clean_val/$total*100);\n\t}\n\t\n\t$graph_class = false;\n\tforeach ($classes as $limit=>$class) {\n\t\tif (!$graph_class) {\n\t\t\t$graph_class = $class;\n\t\t}\n\t\tif ($limit <= $percent) {\n\t\t\t$graph_class = $class;\n\t\t} else {\n\t\t\tbreak;\n\t\t}\n\t}\n\t$width = $total_width * ($percent/100);\n\tif ($width > $total_width) { \n\t\t$width = $total_width;\n\t}\n\t\n\t$tooltip = $text.\": \".$val.$real_units.\" / \".$total.$real_units.\" (\".$percent.\"%)\";\n\t$display_value = ($show_percent ? $percent.\"%\" : $val.$real_units); \n\t\n\t$out = \"<div class=\\\"databox graphbox\\\" style=\\\"width:\".$total_width.\"px;\\\" title=\\\"\".$tooltip.\"\\\">\\n\";\n\t$out .= \" <div class=\\\"bargraph \".$graph_class.\"\\\" style=\\\"width:\".$width.\"px;\\\"></div>\\n\";\n\t$out .= \" <div class=\\\"dataname\\\">\".$text_trimmed.\"</div>\\n\";\n\t$out .= \" <div class=\\\"datavalue\\\">\".$display_value.\"</div>\\n\";\n\t$out .= \"</div>\\n\";\n\t\n\treturn $out;\n}", "title": "" }, { "docid": "a37f13530cb11036e5f509726c10746b", "score": "0.5298919", "text": "public function __toString()\n {\n return Maths::segmentToString(\n ($this->is3D() ?\n array($this->getPointA()->x, $this->getPointA()->y, $this->getPointA()->z) : array($this->getPointA()->x, $this->getPointA()->y)\n ),\n ($this->is3D() ?\n array($this->getPointB()->x, $this->getPointB()->y, $this->getPointB()->z) : array($this->getPointB()->x, $this->getPointB()->y)\n )\n );\n }", "title": "" }, { "docid": "42cda639258fc2a78bfc422791694060", "score": "0.52666146", "text": "public static function visualize();", "title": "" }, { "docid": "aa0018fef9dbe9fc2dbd9fba73297a4d", "score": "0.52660275", "text": "function __toString(): string { return '['.$this->sw[0].','.$this->sw[1].','.$this->ne[0].','.$this->ne[1].']'; }", "title": "" }, { "docid": "e47a86c4d3d96bef87a084e74abdcb8f", "score": "0.5261949", "text": "public function dump(GraphNodeCollection $collection): string\n {\n $this->reset();\n $this->collection = $collection;\n\n $rows = [];\n $this->addGraphDefinition($rows);\n $this->addNodeDefinition($rows);\n $this->addNodesAndEdges($rows);\n\n return $this->buildGraph($rows);\n \n\n // $arrows = $this->collection->flattenedArrows();\n }", "title": "" }, { "docid": "4eeb6b9071ccac3908074901f1c0c009", "score": "0.52504396", "text": "public function __toString(){\r\n\t\t$str=\"ID:{$this->id['db_name']}(ID:{$this->id['name']})\\n\";\r\n\t\t$str.=\"Relation ID:{$this->relation_id['db_name']}({$this->relation_id['name']})\\n\";\r\n\t\t$str.=\"Data:\";\r\n\t\tfor ($i=0; $i<sizeof($this->text); $i++)\r\n\t\t\t$str.=\"{$this->text[$i]['db_name']}({$this->text[$i]['name']}),\";\r\n\r\n\t\t$str.=\"\\nExtra:\";\r\n\t\tfor ($i=0; $i<sizeof($this->data); $i++)\r\n\t\t\t$str.=\"{$this->data[$i]['db_name']}({$this->data[$i]['name']}),\";\r\n\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "458bc32949e36c9fb22f12dfa823d4bb", "score": "0.5241248", "text": "private function BuildGraph()\n {\n $this->CheckValues($this->values);\n\n if($this->show_tooltips)\n $this->LoadJavascript();\n\n // body content comes from the subclass\n return $this->DrawGraph();\n }", "title": "" }, { "docid": "0dde46e43101c7e0e45b8fad2686b572", "score": "0.52388227", "text": "function get_graph($xmlReport)\r\n\t{\r\n\t\tif($xmlReport->graphValue=='')\r\n\t\t\treturn '';\r\n\t\tif($xmlReport->graphValue=='' && $xmlReport->graphHeader=='')\r\n\t\t\treturn '';\r\n\t\t//setup variables\r\n\t\tif($xmlReport->graphLabels==''||strpos($xmlReport->graphLabels,',,,')===false){\r\n\t\t\t$arrGraphHeader = explode(',,,',$xmlReport->graphHeader);\r\n\t\t\t//-- check length of values to see width for text on graph, default to 300 if exceeding that to prevent small graphs\r\n\t\t\tforeach($arrGraphHeader as $header)\r\n\t\t\t{\r\n\t\t\t\tif((strlen($header)*7) > $xmlReport->intGraphValueStringMaxLength)\r\n\t\t\t\t\t$xmlReport->intGraphValueStringMaxLength = (strlen($header)*7);\r\n\t\t\t}\r\n\t\t\tif($xmlReport->intGraphValueStringMaxLength > 300)\r\n\t\t\t\t$xmlReport->intGraphValueStringMaxLength=300;\r\n\t\t\t\r\n\t\t\t//No Labels, so this is a bar graph\r\n\t\t\t$labels = html_entity_decode($xmlReport->graphHeader);\r\n\t\t\tif($xmlReport->graphLabels=='')\r\n\t\t\t\t$data = $xmlReport->graphValue;\r\n\t\t\telse{\r\n\t\t\t\t$data = explode('___',$xmlReport->graphValue);\r\n\t\t\t\t$data = implode(',,,',$data);\r\n\t\t\t}\r\n\t\t\t$copts='';\r\n\t\t\t$old_query='';\r\n\t\t\t$top_config = '<Config><Graphs><Graph name=\"TOP\"><SizeX value=\"650\"/><SizeY value=\"300\"/><PlotX value=\"'.(600-$xmlReport->intGraphValueStringMaxLength).'\"/><PlotY value=\"245\"/><MarginLeft value=\"'.$xmlReport->intGraphValueStringMaxLength.'\"/><MarginTop value=\"25\"/><ChartOffsetX value=\"\"/><ChartOffsetY value=\"\"/><PieScalingFactor value=\"\"/><Title value=\"'.$xmlReport->graphTitle.'\"/><XTitle value=\"\"/><YTitle value=\"\"/><LabelAngle value=\"0\"/><LineColor value=\"#DFDFDF\"/><TextColor value=\"\"/><VLineVisible value=\"1\"/><HLineVisible value=\"1\"/><EdgeVisible value=\"1\"/><SwapXY value=\"1\"/><Depth value=\"5\"/><Perspective value=\"\"/><Transparency value=\"\"/><Border value=\"0\"/><Legend value=\"\"/><LegendX value=\"0\"/><LegendY value=\"0\"/><DiscAbove value=\"\"/><DiscBelow value=\"\"/><Transpose value=\"\"/><ChartType value=\"3D Bar\"/><BackgroundType value=\"Plain Colour\"/><BackgroundColor value=\"#FFFFFF\"/><BackgroundGradient value=\"\"/><FillType value=\"Default Palette\"/><ElementColor value=\"\"/><MultiDepth value=\"\"/><SortMethod Value=\"ValueDesc\"/><ExplodePie value=\"\"/><ExplodeSector value=\"\"/><ExplodeDistance value=\"\"/><StartAngle value=\"\"/></Graph></Graphs></Config>';\r\n\t\t}else{\r\n\t\t\t//Labels are set, so this is a multi line graph\r\n\t\t\t$labels = html_entity_decode($xmlReport->graphHeader);\r\n\t\t\t$data = $xmlReport->graphValue;\r\n\t\t\t$copts='';\r\n\t\t\t$options = $xmlReport->graphLabels;\r\n\t\t\t$old_query='';\r\n\t\t\t$top_config = '<Config>\t\t<Graphs>\r\n\t\t\t<Graph name=\"TOP\">\r\n\t\t\t\t<SizeX value=\"600\"/>\r\n\t\t\t\t<SizeY value=\"480\"/>\r\n\t\t\t\t<PlotX value=\"480\"/>\r\n\t\t\t\t<PlotY value=\"245\"/>\r\n\t\t\t\t<MarginLeft value=\"90\"/>\r\n\t\t\t\t<MarginTop value=\"25\"/>\r\n\t\t\t\t<ChartOffsetX value=\"\"/>\r\n\t\t\t\t<ChartOffsetY value=\"\"/>\r\n\t\t\t\t<PieScalingFactor value=\"\"/>\r\n\t\t\t\t<Title value=\"'.$xmlReport->graphTitle.'\"/>\r\n\t\t\t\t<XTitle value=\"\"/>\r\n\t\t\t\t<YTitle value=\"\"/>\r\n\t\t\t\t<LabelAngle value=\"60\"/>\r\n\t\t\t\t<LineColor value=\"#DFDFDF\"/>\r\n\t\t\t\t<TextColor value=\"\"/>\r\n\t\t\t\t<VLineVisible value=\"1\"/>\r\n\t\t\t\t<HLineVisible value=\"1\"/>\r\n\t\t\t\t<EdgeVisible value=\"1\"/>\r\n\t\t\t\t<SwapXY value=\"0\"/>\r\n\t\t\t\t<Depth value=\"5\"/>\r\n\t\t\t\t<Perspective value=\"\"/>\r\n\t\t\t\t<Transparency value=\"1\"/>\r\n\t\t\t\t<Border value=\"0\"/>\r\n\t\t\t\t<Legend value=\"\"/>\r\n\t\t\t\t<LegendX value=\"1\"/>\r\n\t\t\t\t<LegendY value=\"1\"/>\r\n\t\t\t\t<DiscAbove value=\"\"/>\r\n\t\t\t\t<DiscBelow value=\"\"/>\r\n\t\t\t\t<Transpose value=\"\"/>\r\n\t\t\t\t<ChartType value=\"Multi Bar\"/>\r\n\t\t\t\t<BackgroundType value=\"Plain Colour\"/>\r\n\t\t\t\t<BackgroundColor value=\"#FFFFFF\"/>\r\n\t\t\t\t<BackgroundGradient value=\"\"/>\r\n\t\t\t\t<FillType value=\"Default Palette\"/>\r\n\t\t\t\t<ElementColor value=\"\"/>\r\n\t\t\t\t<MultiDepth value=\"\"/>\r\n\t\t\t\t<ExplodePie value=\"\"/>\r\n\t\t\t\t<ExplodeSector value=\"\"/>\r\n\t\t\t\t<ExplodeDistance value=\"\"/>\r\n\t\t\t\t<StartAngle value=\"\"/>\r\n\t\t\t</Graph>\r\n\t\t</Graphs>\r\n\t\t</Config>';\r\n\t\t}\r\n\t\t$start_time = time();\r\n\r\n\t\t//create query\r\n\t\t$conf_type = $GLOBALS['conf_type'];\r\n\t\t$conf_user = swcuid();\r\n\t\t$conf_pass = swcpwd();\r\n\t\t$conf_srvr = $GLOBALS['conf_srvr'];\r\n\t\t$conf_dbselect = $GLOBALS['conf_dbselect']\t;\t\t\t// Only for MySQL\r\n\t\t$conf_port = $GLOBALS['conf_port'];\t\t\t\t\t\t\t// Only for PostgreSQL\r\n\t\t$conf_underlying = $GLOBALS['conf_underlying'];\t\t\t\t\t\t\t// Only for ODBC ('mssql' changes how the class finds the last insert ID)\r\n\r\n\t\t$conf_table = $GLOBALS['conf_table'];\t\t\t// Table where report configs will be\r\n\t\t$conf_tmpdb = $GLOBALS['conf_tmpdb'];\t\t\t\t// Database for temporary args, can be same db (REQUIRED)\r\n\t\t$conf_tmptable = $GLOBALS['conf_tmptable'];//\"tmp_graph_args\";\t\t\t// Table for temporary args\r\n\r\n\t\t\r\n\t\t$_SESSION['graph_ckeys'] = str_replace(\"'\",\"''\",$labels);\r\n\t\t$_SESSION['graph_cvals'] = $data;\r\n\t\t$_SESSION['graph_copts'] = $options;\r\n\t\t$_SESSION['graph_xmlconf'] = $top_config;\r\n\r\n\t\t# Make the chart according to the border and chart editable settings and output it\r\n\t\t$html_chart = '<img src=\"../common/php/report.graph.php\" border=\"0\">';\r\n\t\tif (strpos($top_config,'<Border value=\"1\"/>')) $html_chart = '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td bgcolor=\"#000000\" colspan=\"3\"></td></tr><tr><td bgcolor=\"#000000\"></td><td>'.$html_chart.'</td><td bgcolor=\"#000000\"></td></tr><tr><td bgcolor=\"#000000\" colspan=\"3\"></td></tr></table>';\r\n\t\t$conf_conn = null;\r\n\t\t$html_chart .= \"<br><br>\";\r\n\t\treturn $html_chart;\r\n\r\n\t}", "title": "" }, { "docid": "09997491d4e4581f0faa04442ac5d1fb", "score": "0.52349055", "text": "function barregraphe($notes,$sup,$filesave,$noms){\r\n\t\tfor($i=0;$i<count($notes);$i++){\r\n\t\t\t//$val = ($notes[$i]/2);\r\n\t\t\t//$part = explode(\".\", \"$val\");\r\n\t\t\t//$Y[$part[0]]++;\r\n\t\t\tif($i<count($notes)-1) {\r\n\t\t\t\t$listedesnotes .= rtrim(\"$notes[$i]\").\":\";//pour nettoyer\r\n\t\t\t\t$listedesnoms .= rtrim(\"$noms[$i]\").\":\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$listedesnotes .= rtrim(\"$notes[$i]\");\r\n\t\t\t\t$listedesnoms .= rtrim(\"$noms[$i]\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//$Y[9]+=$Y[10];\r\n\t\t//$nuage = \"\";\r\n\t\t//for($i=0;$i<10;$i++) $nuage .= \"Y$i=$Y[$i]&\";\r\n\r\n\t\t//$val = ($sup/2);\r\n\t\t//$part = explode(\".\", \"$val\");\r\n\t\t//if($sup!=\"\") $nuage .= \"PP=$part[0]\"; else $nuage .= \"PP=\";\r\n\r\n\t\t//Version avril 2016\r\n\t\tgraphe07($notes,$filesave);\r\n\t\t$file_image = str_replace(\"txt\", \"png\", $filesave);\r\n\r\n\t\tif($filesave!=\"\"){//Sauvegardes des valeurs\r\n\t\t\t$image = \"<a href=\\\"./geo.php?nomfichier=$filesave\\\">\";\r\n\t\t\t//$image .= \"<img src=\\\"../GestionConfig/Applications/graphe_notes3.php?$nuage\\\"/></a>\";\r\n\t\t\t$image .= \"<img src=\\\"$file_image\\\"/></a>\";\r\n\t\t\t$fp = fopen($filesave, \"w\");\r\n\t\t\tfprintf($fp, \"$listedesnotes\\n$listedesnoms\");\r\n\t\t\tfclose($fp);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$image .= \"<img src=\\\"$file_image\\\"/>\";\r\n\t\t}\r\n\r\n\t\tif($listedesnoms==\"\") $image = \"\";\r\n\r\n\t\treturn($image);\r\n\t}", "title": "" }, { "docid": "32f05410c668bddfccef5e16be4adf16", "score": "0.52306604", "text": "function diagramFonds($pid) {\n $pid = (int) $pid;\n $db = $GLOBALS['db'];\n $sql = 'SELECT date, kurs FROM stocks_kurse WHERE pid = '.$pid.' ORDER BY id DESC';\n $db->query($sql);\n $dayvalue = array();\n while($v = $db->results()) {\n $dayvalue[mktime(\n 0, 0, 0,\n (int)substr($v['date'],5,2),\n (int)substr($v['date'],8,2),\n (int)substr($v['date'],0,4))*1000] = $v['kurs'];\n }\n $data = array();\n foreach ($dayvalue as $day=>$kurs) {\n $data[] = \"[new Date(\".$day.\"), \".$kurs.\"]\";\n }\n return array(implode($data,','), min($dayvalue), max($dayvalue));\n}", "title": "" }, { "docid": "ef4d646ea575a91f11209a7d86948055", "score": "0.52268493", "text": "public function toString(){\n return $this -> printDati();\n }", "title": "" }, { "docid": "2eb4ff4fe1cbe5e7fad6589c950cb347", "score": "0.5221157", "text": "public function __toString() : string\n {\n return \"Linear Discriminant Analysis (dimensions: {$this->dimensions})\";\n }", "title": "" }, { "docid": "4ea5828702fe18e6eba47949823a24c3", "score": "0.5211307", "text": "function graph($wilayah_id = NULL, $lingkungan_id = NULL){\n\t\t\t\t\t$status_umat = $this->DATA->grap_status_umat_model($wilayah_id,$lingkungan_id);\n\t\t\t\t\t$umat = $this->DATA->grap_umat_model($wilayah_id,$lingkungan_id);\n\t\t\t\t\t$data_kk = $this->DATA->grap_kk($wilayah_id,$lingkungan_id);\n\t if($wilayah_id == NULL && $lingkungan_id == NULL){\n\n \t\t\t\t\t$nama_header = \"Graph Seluruh Umat\";\n\t $lingkungan = $this->db->get('lingkungan');\n\t $link = base_url('admin/data/'.$wilayah_id.'/'.$lingkungan_id);\n\n\t }else if($wilayah_id != NULL && $lingkungan_id == NULL){\n\n \t\t\t\t\t\t$nama_wilayah = $this->db->query('select wilayah_nama from wilayah where wilayah_id = '.$wilayah_id.'')->result();\n\t $nama_header = \"Semua Graph Di Wilayah \".$nama_wilayah[0]->wilayah_nama.\" \";\n\t $lingkungan = $this->db->get_where('lingkungan',array('wilayah_id' => $wilayah_id));\n\t $link = base_url('admin/graph/'.$wilayah_id.'/'.$lingkungan_id);\n\t }else{\n\n \t\t\t\t\t\t\t$nama_wilayah = $this->db->query('select wilayah_nama from wilayah where wilayah_id = '.$wilayah_id.'')->result();\n\t $nama_lingkungan = $this->db->query('select lingkungan_nama from lingkungan where lingkungan_id = '.$lingkungan_id.'')->result();\n\t $nama_header = \"Graph di \".$nama_wilayah[0]->wilayah_nama.\" - \".$nama_lingkungan[0]->lingkungan_nama.\"\";\n\t $link = base_url('admin/graph/'.$wilayah_id.'/'.$lingkungan_id);\n\t $lingkungan = $this->db->get_where('lingkungan',array('lingkungan_id' => $lingkungan_id));\n\t }\n\t\t\t\t\t\t\t$data = array(\n\t 'page'\t\t\t\t=> \"graph\",\n\t\t\t\t\t\t\t'umat'\t\t\t\t\t\t\t=> $umat,\n\t\t\t\t\t\t\t'status_umat'\t\t\t\t\t\t\t=> $status_umat,\n\t\t\t\t\t\t\t'data_kk'\t\t\t\t\t=> $data_kk,\n\t 'lingkungan_id' => $lingkungan_id,\n\t 'wilayah_id' => $wilayah_id,\n\t 'lingkungan' => $lingkungan,\n\t 'header'\t\t\t=> $nama_header,\n\t 'link'\t\t\t\t=> $link\n\t\t\t);\n\t\t\t$this->load->view(\"admin/admin/layout.php\",$data);\n\n\t }", "title": "" }, { "docid": "3c949bc87a8a52b6ad96cbb271c406dd", "score": "0.52001935", "text": "function get_html() {\n\t\techo \"\n\t\t<script type='text/javascript' names='\".json_encode($this->names).\"' vars='\".json_encode($this->vars).\"' plant='\".$this->plant.\"' src='../template/graph/graph.js'></script>\n\t\t<div class = 'chartContiner'> \n\t\t\t<div id='\".$this->names[0].\"Chart' style='height: 400px; width: 500px;' class='noselect'></div>\n\t\t\t<div class='chartText'>\n\t\t\t\t<div class='text'>\n\t\t\t\t\t<h2>\".str_replace(\"_\",\" \",$this->vars[0]).\"</h2>\n\t\t\t\t\t<p id='\".$this->vars[0].\"Max'></p>\n\t\t\t\t\t<p id='\".$this->vars[0].\"Min'></p>\n\t\t\t\t\t<p id='\".$this->vars[0].\"Avg'></p>\n\t\t\t\t</div>\n\t\t\t\t<div class='text'>\n\t\t\t\t\t<h2>\".str_replace(\"_\",\" \",$this->vars[1]).\"</h2>\n\t\t\t\t\t<p id='\".$this->vars[1].\"Max'></p>\n\t\t\t\t\t<p id='\".$this->vars[1].\"Min'></p>\n\t\t\t\t\t<p id='\".$this->vars[1].\"Avg'></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class = 'chartContiner'> \n\t\t\t<div id='\".$this->names[1].\"Chart' style='height: 400px; width: 500px;' class='noselect'></div>\n\t\t\t<div class='chartText'>\n\t\t\t\t<div class='text'>\n\t\t\t\t\t<h2>\".$this->vars[2].\"</h2>\n\t\t\t\t\t<p id='\".$this->vars[2].\"Max'></p>\n\t\t\t\t\t<p id='\".$this->vars[2].\"Min'></p>\n\t\t\t\t\t<p id='\".$this->vars[2].\"Avg'></p>\n\t\t\t\t</div>\n\t\t\t\t<div class='text'>\n\t\t\t\t\t<h2>\".$this->vars[3].\"</h2>\n\t\t\t\t\t<p id='\".$this->vars[3].\"Max'></p>\n\t\t\t\t\t<p id='\".$this->vars[3].\"Min'></p>\n\t\t\t\t\t<p id='\".$this->vars[3].\"Avg'></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\";\n\t}", "title": "" }, { "docid": "2cfc6eed8f91d79f1ea53f8721598b2f", "score": "0.5194478", "text": "private function _calculate_lines(){\n \n $this->calculate_lines = 1;\n \n $this->place = $this->width - $this->padding_left - $this->padding_right; \n //start / osa x\n $this->from_x = floor( min( $this->graph_data['x'] )) - 1;\n $this->to_x = ceil( max( $this->graph_data['x'] )) + 1;\n \n //osy se musi krizit\n if( ( $this->from_x ) >= 0 )\n $this->from_x = -1;\n else if( ! is_int( $this->from_x ) ){\n $this->from_x = floor( $this->from_x ); \n }\n if( $this->to_x <= 0 )\n $this->to_x = 1;\n else if( !is_int( $this->to_x ) ){\n $this->to_x = ceil( $this->to_x ); \n }\n \n $this->section_x = $this->place / ( ( $this->to_x - $this->from_x ));\n //zde se osy krizi\n $this->cross_x = abs( $this->from_x );\n //konec / osa x\n \n $this->place = $this->height - $this->padding_bottom - $this->padding_top;\n //start / osa y\n $this->from_y = floor( min( $this->graph_data['y'] ) ) - 1;\n $this->to_y = ceil( max( $this->graph_data['y'] ) ) + 1;\n //osy se musi krizit\n if( ( $this->from_y ) >= 0 )\n $this->from_y = -1;\n else if( ! is_int( $this->from_y ) ){\n $this->from_y = floor( $this->from_y ); \n }\n if( $this->to_y <= 0 )\n $this->to_y = 1;\n else if( !is_int( $this->to_y ) ){\n $this->to_y = ceil( $this->to_y ); \n }\n \n $this->section_y = $this->place / ( $this->to_y - $this->from_y);\n //zde se osy krizi na ose y\n $this->cross_y = abs( $this->from_y );\n //konec / osa y\n \n //posun jednotlivych os smerem nahoru a doprava po prepocitani souradnic\n $this->move_up = $this->cross_y * $this->section_y;\n $this->move_left = $this->cross_x * $this->section_x; \n }", "title": "" }, { "docid": "00ef0f16fc7529c33bb5258913da2a0a", "score": "0.5189665", "text": "public function __toString()\n {\n return \"[{$this->small},{$this->tall},{$this->wide}]\";\n }", "title": "" }, { "docid": "533d91484d178cd133b9eff0b9faf253", "score": "0.5189228", "text": "public function __toString() {\n return '(' . $this->x . ', ' . $this->y . ')';\n }", "title": "" }, { "docid": "4eac5a95495fa02d056cce81c9a0840a", "score": "0.51869065", "text": "function generateGraph($value, $multiplier, $legend) {\n\t\n\twriteLog(\"generateGraph()\");\n\t\n\t$width = $value * $multiplier;\n\tif ($legend == 'left') {\n\t\t$text = \"<table cellpadding=0 cellspacing=2 border=0 width=100%><tr><td align=right>\" . $value . \"<td width=\" . $width . \"px bgcolor=red></tr></table>\";\t\t\n\t} elseif ($legend == 'right') {\n\t\t$text = \"<table cellpadding=0 cellspacing=2 border=0 width=100%><tr><td width=\" . $width . \"px bgcolor=red><td align=left>\" . $value . \"</tr></table>\";\n\t}\n\t\n\treturn $text;\n\t\n}", "title": "" }, { "docid": "b46b243623781ffb86971dbb4c30ba3d", "score": "0.51827836", "text": "private function createText()\n {\n $numberArray = array();\n\n $numberArray[0][0] = ' ###### ';\n $numberArray[0][1] = ' ## ## ';\n $numberArray[0][2] = '## # ##';\n $numberArray[0][3] = '## # ##';\n $numberArray[0][4] = '## # ##';\n $numberArray[0][5] = ' ## ## ';\n $numberArray[0][6] = ' ###### ';\n\n $numberArray[1][0] = ' ## ';\n $numberArray[1][1] = '### ';\n $numberArray[1][2] = ' ## ';\n $numberArray[1][3] = ' ## ';\n $numberArray[1][4] = ' ## ';\n $numberArray[1][5] = ' ## ';\n $numberArray[1][6] = '####';\n\n $numberArray[2][0] = ' #######';\n $numberArray[2][1] = '## ##';\n $numberArray[2][2] = ' ##';\n $numberArray[2][3] = ' #######';\n $numberArray[2][4] = '## ';\n $numberArray[2][5] = '## ';\n $numberArray[2][6] = '########';\n\n $numberArray[3][0] = ' ####### ';\n $numberArray[3][1] = '## ##';\n $numberArray[3][2] = ' ##';\n $numberArray[3][3] = ' ###### ';\n $numberArray[3][4] = ' ##';\n $numberArray[3][5] = '## ##';\n $numberArray[3][6] = ' ####### ';\n\n $numberArray[4][0] = ' #### ';\n $numberArray[4][1] = ' ## ## ';\n $numberArray[4][2] = ' ## ## ';\n $numberArray[4][3] = '## ## ';\n $numberArray[4][4] = '########';\n $numberArray[4][5] = ' ## ';\n $numberArray[4][6] = ' ## ';\n\n $numberArray[5][0] = '########';\n $numberArray[5][1] = '## ';\n $numberArray[5][2] = '## ';\n $numberArray[5][3] = '####### ';\n $numberArray[5][4] = ' ##';\n $numberArray[5][5] = ' ##';\n $numberArray[5][6] = '####### ';\n\n $numberArray[6][0] = ' ###### ';\n $numberArray[6][1] = '## ##';\n $numberArray[6][2] = '## ';\n $numberArray[6][3] = '####### ';\n $numberArray[6][4] = '## ##';\n $numberArray[6][5] = '## ##';\n $numberArray[6][6] = ' ###### ';\n\n $numberArray[7][0] = '########';\n $numberArray[7][1] = ' ##';\n $numberArray[7][2] = ' ## ';\n $numberArray[7][3] = ' ## ';\n $numberArray[7][4] = ' ## ';\n $numberArray[7][5] = ' ## ';\n $numberArray[7][6] = ' ## ';\n\n $numberArray[8][0] = ' ###### ';\n $numberArray[8][1] = '## ##';\n $numberArray[8][2] = '## ##';\n $numberArray[8][3] = ' ###### ';\n $numberArray[8][4] = '## ##';\n $numberArray[8][5] = '## ##';\n $numberArray[8][6] = ' ###### ';\n\n $numberArray[9][0] = ' ###### ';\n $numberArray[9][1] = '## ##';\n $numberArray[9][2] = '## ##';\n $numberArray[9][3] = ' #######';\n $numberArray[9][4] = ' ##';\n $numberArray[9][5] = ' ##';\n $numberArray[9][6] = ' ##';\n\n $generateString = strval($this->randomInteger);\n $captchaOutput = '<div id=\"captchaContainer\">';\n for ( $currentLine = 0; $currentLine < sizeof($numberArray[0]); $currentLine++ )\n {\n $captchaOutput .= \"\\n\" . '<div class=\"line\">';\n for( $i=0; $i < strlen($generateString); $i++ )\n {\n $currentChar = $generateString{$i};\n $numberLine = $numberArray[intval($currentChar)][$currentLine];\n for( $y=0; $y < strlen($numberLine); $y++ )\n {\n // Depending on whats in the current position, choose either a light or dark color.\n $color = ( $numberLine{$y} === ' ' ) ? ($color = $this->genColor(0)) : ($color = $this->genColor(1));\n // And output the span with whatever color was generated\n $captchaOutput .= '<span style=\"background:'.$color.';\"></span>';;\n }\n // Create an empty space at end of the line\n $color = $this->genColor(0);\n $captchaOutput .= '<span style=\"background:'.$color.';\"></span>';\n }\n $captchaOutput .= \"</div>\";\n }\n $captchaOutput .= \"\\n</div>\";\n return $captchaOutput;\n }\n\n /**\n * Return a light(0) or dark(1) color witin set min/max range hex values\n *\n * @return string\n */\n private function genColor( $px = 0 )\n {\n $color = '#';\n // [0] == \"light\" color\n // [1] == \"dark\"\n // this is an array of (min, max) values for the hex color\n $onoff[0] = array(0x99, 0xff);\n $onoff[1] = array(0x00, 0x59);\n\n $array = $onoff[$px];\n\n // Generate 3 random values within the light/dark ranges\n // And add them to the color. pad any values < 10 (ie, 0 -> f) with a 0 on the left side\n for( $i = 0; $i < 3; $i++ )\n $color .= str_pad( dechex( rand($array[0], $array[1]) ), 2, '0', STR_PAD_LEFT );\n\n return $color;\n }\n\n /**\n * Function for the parser to return the markup for captcha (img/actual value)\n *\n * @return string\n */\n function returnMarkup()\n {\n if ( $this->useGD() )\n {\n $output = '<img src=\"/captcha\" alt=\"Session Captcha\" class=\"captcha\" />';\n return $output;\n } else {\n if ( $userBanned )\n {\n $captchaOutput = '<span id=\"Captcha_bannedMessage\">{!i18n:Captcha|Banned}</span>';\n } else {\n $sessionData = $this->fSession->getPersistVariables($this);\n $this->randomInteger = rand(1000, 99999);\n $captchaOutput = $this->createText();\n $sessionString = $this->randomInteger;\n $this->fSession->setPersistVariables($this, array('string' => $sessionString, 'count' => $sessionData['count']) );\n }\n return $captchaOutput;\n }\n }\n\n /**\n * Should we use GD?\n *\n * @return bool\n */\n private function useGD()\n {\n \n if ( ( strtolower($this->registry->image->type) == 'gd' ) ||\n ( function_exists('imagecreate') ) ||\n ( function_exists('ImageFTBbox') ) )\n {\n return true;\n }\n\n return false;\n }\n\n}", "title": "" }, { "docid": "9ba9db8858f91429318871d17be20d1e", "score": "0.5182487", "text": "function buildGraph() {\n require_once('common/chart/Chart.class.php');\n if ($this->width == 0) {\n if (!is_null($this->xaxis)) {\n $this->width = (count($this->data)*count($this->data[0])*25)+(2*150);\n } else {\n $this->width = (count($this->data)*100)+(2*150);\n }\n }\n\n $right_margin = 50;\n \n $this->graph = new Chart($this->width,$this->height);\n $this->graph->SetScale(\"textlint\");\n $this->graph->title->Set($this->title);\n if (is_null($this->description)) {\n $this->description = \"\";\n }\n $this->graph->subtitle->Set($this->description);\n \n // x axis formating\n $this->graph->xaxis->SetTickSide(SIDE_DOWN);\n \n $this->graph->xaxis->title->setMargin(60,20,20,20);\n \n if (!is_null($this->xaxis)) {\n $this->graph->xaxis->SetTickLabels($this->xaxis);\n } else {\n $this->graph->xaxis->SetTickLabels(array_values($this->legend));\n }\n \n $colors = $this->graph->getThemedColors();\n \n if (is_null($this->xaxis)) {\n if ((is_array($this->data)) && (array_sum($this->data)>0)) {\n $this->graph->add($this->getBarPlot($this->data, $colors[0]));\n }\n \n } else {\n $this->keys = array();\n foreach($this->data as $group => $data) {\n foreach($data as $key => $nb) {\n $this->keys[$key] = 1;\n }\n }\n $this->keys = array_keys($this->keys);\n foreach($this->data as $group => $data) {\n foreach($this->keys as $key) {\n if (!isset($data[$key])) {\n $this->data[$group][$key] = 0;\n }\n }\n uksort($this->data[$group], array($this, 'sort'));\n }\n $l = 0; \n foreach($this->data as $base => $group) {\n $b[$l] = $this->getBarPlot(array_values($group), $colors[$l % count($colors)]);\n $b[$l]->SetLegend($this->legend[$base]);\n $l++;\n }\n $gbplot = new GroupBarPlot($b);\n $this->graph->add($gbplot);\n $right_margin = 150;\n }\n $this->graph->SetMargin(50,$right_margin,$this->graph->getTopMargin() + 40,100);\n return $this->graph;\n }", "title": "" }, { "docid": "b07045e4ac6e10dd9dd97b3646991672", "score": "0.51776516", "text": "public function definition(){\n\t\t // $graphs = App\\Graph::pluck('id')->toArray();\n\n return [\n\t\t\t 'graph_id' => \\App\\Models\\Graph::factory(),\n\t\t\t\t\t // 'parent_id' => $faker->randomElement($users),\n\n\n ];\n \n\t}", "title": "" }, { "docid": "5a6fcb2395450ce28167d51599fe0543", "score": "0.5176934", "text": "protected function graphSchaduleWinLoss(){\r\n\t\t$AryDataProvider= new ArrayDataProvider([\r\n\t\t\t//'key' => 'PARENT_ID',\r\n\t\t\t//'allModels'=>Yii::$app->db_esm->createCommand(\"CALL DASHBOARD_ESM_SALES_customer_visit_winloss('GRAPH_COUNTER_DAILY','\". date('Y-m-d').\"','','')\")->queryAll(),\r\n\t\t\t'allModels'=>Yii::$app->db_esm->cache(function ($db_esm) {\r\n\t\t\t\t\treturn $db_esm->createCommand(\"CALL DASHBOARD_ESM_SALES_customer_visit_winloss('GRAPH_COUNTER_DAILY','\". date('Y-m-d').\"','','')\")->queryAll();\r\n\t\t\t}, 60),\r\n\t\t\t//'allModels'=>Yii::$app->db_esm->createCommand(\"CALL DASHBOARD_ESM_SALES_customer_visit_winloss('GRAPH_COUNTER_DAILY','2016-04-03','','')\")->queryAll(),\r\n\t\t\t 'pagination' => [\r\n\t\t\t\t'pageSize' => 100,\r\n\t\t\t]\r\n\t\t]);\r\n\t\t$dataProvider=$AryDataProvider->getModels();\t\t\r\n\t\t$resultWinLost=Json::encode($dataProvider);\t\r\n\t\t$prn='{\r\n\t\t\t\t\"chart\": {\t\t\t\t\r\n\t\t\t\t\tcaption: \"VISIT PROCESS\", \r\n\t\t\t\t\t// theme: \"fint\",\t\t\t\t\t \r\n\t\t\t\t\tshowValues: \"1\",\r\n\t\t\t\t\tshowZeroPlane: \"1\", \r\n\t\t\t\t\tpaletteColors: \"#FF0033,#0B2536,#0075c2,#9E466B,#C5E323\",\r\n\t\t\t\t\tusePlotGradientColor: \"0\",\t\t\t\t\t\r\n\t\t\t\t\tzeroPlaneColor:\"#003366\",\r\n\t\t\t\t\tzeroPlaneAlpha: \"100\",\r\n\t\t\t\t\tzeroPlaneThickness: \"3\",\r\n\t\t\t\t\tdivLineIsDashed: \"1\",\r\n\t\t\t\t\tdivLineAlpha: \"40\",\r\n\t\t\t\t\txAxisName: \"time\",\r\n\t\t\t\t\tyAxisName: \"Visit\",\r\n\t\t\t\t\tshowValues: \"1\" , \t\t\t//MENAMPILKAN VALUE \r\n\t\t\t\t\tshowBorder: \"1\", \t\t\t\t//Border side Out \r\n\t\t\t\t\tshowCanvasBorder: \"0\",\t\t//Border side inside\r\n\t\t\t\t\t//paletteColors: \"#0075c2\",\t// WARNA GARIS\t\r\n\t\t\t\t\tshowAlternateHGridColor: \"0\",\t//\r\n\t\t\t\t\tbgcolor: \"#ffffff\"\r\n\t\t\t }, \r\n\t\t\t\t\"dataset\": [{\r\n\t\t\t\t\t \"data\":'.$resultWinLost.'\r\n\t\t\t\t}] \r\n\t\t\t}';\t\t\r\n\t\treturn $prn;\r\n\t}", "title": "" }, { "docid": "b68fa8b7323aff9d6fff674e87d4f7e2", "score": "0.5165028", "text": "function gerar($modelo,$ano,$cor){\r\n\t\t\techo \"<hr>Modelo: $modelo \".\"<br>Ano: $ano <br>Cor: $cor\";\r\n\t\t}", "title": "" }, { "docid": "03f4e0ebbec1149eb2671d75ee51bc09", "score": "0.5155875", "text": "public function __toString() {\n return \"\\nIdentificacion: \".$this->getIdentificacion().\"\\n\".\n \"Fecha Otorgamiento: \".$this->getFechaOtorgamiento().\"\\n\".\n \"Monto: \".$this->getMonto().\"\\n\".\n \"Cantidad de cuotas: \".$this->getCantCuotas().\"\\n\".\n \"Taza de interes: \".$this->getTazaInteres().\"\\n\".\n \"------CUOTAS------\".$this->mostrarCuotas().\"\\n\".\n \"------PERSONA------\".$this->getObjPersona();\n }", "title": "" }, { "docid": "24d4c1e5f64aff29a07bcb12d7ac67f5", "score": "0.5128847", "text": "public function out_betriebe_eintrag()\n\t{\n\t\t$bezirk_parents = $this->get_parent_bezirke();\n\t\t// 2 dimensional array [bezirk_id][yearweek] = sum\n\t\t$bezirk_yw_cnt = array();\n\t\t$all_yw = array();\n\t\t$q = $this->model->q('\n\t\t\tSELECT b.id, b.name, YEARWEEK( btr.added ) as yw, COUNT(btr.id) as cnt\n\t\t\tFROM fs_bezirk b\n\t\t\tINNER JOIN fs_betrieb btr ON ( btr.bezirk_id = b.id ) \n\t\t\tWHERE btr.betrieb_status_id = 3\n\t\t\tGROUP BY b.id, YEARWEEK( btr.added )');\n\t\tforeach($q as $line) {\n\t\t\t$all_yw[$line['yw']] = True;\n\t\t\tforeach($bezirk_parents[$line['id']] as $bzid) {\n\t\t\t\tif(!array_key_exists($bzid, $bezirk_yw_cnt)\n\t\t\t\t || !array_key_exists($line['yw'], $bezirk_yw_cnt[$bzid])) {\n\t\t\t\t\t$bezirk_yw_cnt[$bzid][$line['yw']] = 0;\n\t\t\t\t}\n\t\t\t\t$bezirk_yw_cnt[$bzid][$line['yw']] += $line['cnt'];\n\t\t\t}\n\t\t}\n\t\t$fp = fopen(\"betriebe_added.txt\", \"w\");\n\t\tfwrite($fp, \"bezirk\");\n\t\t$yws = array_keys($all_yw);\n\t\tsort($yws);\n\t\tforeach($yws as $yw) {\n\t\t\tfwrite($fp, \",$yw\");\n\t\t}\n\t\tfwrite($fp, \"\\n\");\n\n\t\t$bezirk_names = array();\n\t\t$q = $this->model->q(\"\n\t\t\tselect b.id, b.type, group_concat(b.name order by a.depth DESC separator ' -> ') as path\n\t\t\tfrom fs_bezirk_closure d\n\t\t\tjoin fs_bezirk_closure a on (a.bezirk_id = d.bezirk_id)\n\t\t\tjoin fs_bezirk b on (b.id = a.ancestor_id)\n\t\t\twhere d.ancestor_id = 741 and d.bezirk_id != d.ancestor_id\n\t\t\tgroup by d.bezirk_id\n\t\t\tHAVING b.`type` != 7\n\t\t\tORDER BY path\");\n\t\tforeach($q as $line) {\n\t\t\t$bezirk_names[$line['id']] = $line['path'];\n\t\t\techo $line['path'];\n\t\t\tfwrite($fp, '\"'.$line['path'].'\"');\n\t\t\tforeach($yws as $yw) {\n\t\t\t\t$cnt = 0;\n\t\t\t\tif(array_key_exists($line['id'], $bezirk_yw_cnt)\n\t\t\t\t && array_key_exists($yw, $bezirk_yw_cnt[$line['id']])) {\n\t\t\t\t\t$cnt = $bezirk_yw_cnt[$line['id']][$yw];\n\t\t\t\t}\n\t\t\t\tfwrite($fp, \",$cnt\");\n\t\t\t}\n\t\t\tfwrite($fp, \"\\n\");\n\t\t}\n\t\tfclose($fp);\n\t}", "title": "" }, { "docid": "a7b13ca905933513437224dcd6edecfa", "score": "0.5126359", "text": "public function get_graph() {\n $customer_id = $this->input->post(\"customer_id\");\n $insert_id = $this->input->post(\"insert_id\");\n\n $query = $this->db->query(\"SELECT month,gstr2A_3B,gstr2A_difference,gstr2A_cummulative,gstr2A FROM comparison_summary_all WHERE customer_id='$customer_id' AND insert_id='$insert_id' order by id desc\");\n $query_get_observation = $this->db->query(\"SELECT * from observation_transaction_all where customer_id='$customer_id' AND insert_id='$insert_id' ORDER BY ID DESC LIMIT 1\");\n $data = \"\"; //view observations\n $data1 = \"\"; //view observations\n $data2 = \"\"; //view observations\n $data_threeb_vs2A_name = \"\";\n $data_threeb_vs2A_observation = \"\";\n $data_threeb_vs2A_remarks = \"\";\n $a = \"\";\n// if ($query->num_rows() > 0) {\n if ($this->db->affected_rows() > 0) {\n $result = $query->result();\n $result1 = $query_get_observation->row();\n $threeb_vs2A_observation = $result1->gstr3bvs2a_observation;\n $threeb_vs2A_remarks = $result1->gstr3bvs2a_remarks;\n\n $data_threeb_vs2A_name = \"GSTR-3B vs GSTR-2A\";\n $data_threeb_vs2A_observation = $threeb_vs2A_observation;\n// $data_threeb_vs2A_remarks = $threeb_vs2A_remarks;\n $a = $threeb_vs2A_remarks;\n if ($a == '') {\n $data_threeb_vs2A_remarks = 'not given';\n } else {\n $data_threeb_vs2A_remarks = $threeb_vs2A_remarks;\n }\n if($data_threeb_vs2A_observation=='') {\n $data_threeb_vs2A_name = \"\";\n $data_threeb_vs2A_remarks = \"\";\n } else {\n// $data_threeb_vs2A_name = \"GSTR-3B vs GSTR-2A\";\n }\n $gstr_tb1 = array();\n $difference2 = array();\n $cumu_difference3 = array();\n $gstr2a4 = array();\n $months = array();\n $data2 .= '<h4><b>1.GSTR3B VS. GSTR2A -Input Tax Credit Reconcillation</b></h4>';\n $data .= '<table class=\"table-bordered table-striped\" width=\"700\">\n <thead style=\"background-color: #0e385e;color:white\">\n <tr>\n \n <th>Month</th>\n <th>GSTR-3B</th>\n <th>GSTR-2A</th>\n <th>Difference</th>\n <th>Cumulative Difference</th>\n </tr>\n </thead>\n <tbody>';\n $k = 1;\n foreach ($result as $row) { //to get values\n $gstr_tb = $row->gstr2A_3B;\n $difference = $row->gstr2A_difference;\n $cumu_difference = $row->gstr2A_cummulative;\n $gstr2a = $row->gstr2A;\n $month = $row->month;\n\n //arrays\n $gstr_tb1[] = $gstr_tb;\n $difference2[] = $difference;\n $cumu_difference3[] = $cumu_difference;\n $gstr2a4[] = $gstr2a;\n $months[] = $row->month;\n\n $data .= '<tr>' .\n '<td>' . $month . '</td>' .\n '<td>' . number_format(round($gstr_tb)) . '</td>' .\n '<td>' . number_format(round($gstr2a)) . '</td>' .\n '<td>' . number_format(round($difference)) . '</td>' .\n '<td>' . number_format(round($cumu_difference)) . '</td>' .\n '</tr>';\n }\n //to get total values\n $data .= '<tr>' .\n '<td>' . '<b>Total</b>' . '</td>' .\n '<td>' . '<b>' . number_format(round($thb = array_sum($gstr_tb1))) . '</b> ' . '</td>' .\n '<td>' . '<b>' . number_format(round($twa = array_sum($gstr2a4))) . '</b>' . '</td>' .\n '<td>' . '<b>' . number_format(round(array_sum($difference2))) . '</b>' . '</td>' .\n '<td>' . '<b>' . number_format(round(array_sum($cumu_difference3))) . '</b>' . '</td>' .\n '</tr>';\n $data .= '</tbody></table>';\n\n $data1 .= \"<br><br><h4><b>Observation:</b></h4>\";\n\n if ($thb > $twa) {\n $data1 .= \"<span>GSTR-3B > 2A, ITC declared and ITC claimed is showing a huge difference as either the company has taken excess credit or vendor has not recorded our purchases in his GSTR 1. \"\n . \"This may lead to interest liability & penalties notices or permanent loss of credit if vendor is not informed and corrective action is not taken by such vendor.</span>\";\n $data1 .= \"<h5><b>Note: </b> For detailed and consolidated summary refer section-10.</h5>\";\n } elseif ($twa > $thb) {\n $data1 .= \"<span>GSTR-3B < 2A, company need to check the eligibility and ineligibility of credit reflecting in GSTR-2A & prepare a reconciliation statement accordingly. There may be the case where input tax credit has not been taken by the company on its genuine eligible input credit. \"\n . \"This may lead to a huge loss of working Capital & also permanent loss of credit if corrective actions not taken immediately.</span>\";\n $data1 .= \"<h5><b>Note: </b> For detailed and consolidated summary refer section-10.</h5>\";\n } else {\n $data1 .= \"<span>No difference.</span>\";\n $data1 .= \"<h5><b>Note: </b>For detailed and consolidated summary refer section-10.</h5>\";\n }\n $abc = array();\n $abc3 = array();\n $abc4 = array();\n $abc5 = array();\n\n for ($o = 0; $o < sizeof($gstr_tb1); $o++) { //loop to convert string data into integer\n $abc[] = $gstr_tb1[$o];\n $aa1 = settype($abc[$o], \"float\");\n\n $abc3[] = $difference2[$o];\n $aa2 = settype($abc3[$o], \"float\");\n\n $abc4[] = $cumu_difference3[$o];\n $aa3 = settype($abc4[$o], \"float\");\n\n $abc5[] = $gstr2a4[$o];\n $aa4 = settype($abc5[$o], \"float\");\n }\n\n\n $quer_range = $this->db->query(\"SELECT MAX(gstr2A_3B) as gstrtb_max FROM comparison_summary_all WHERE customer_id='$customer_id' and insert_id='$insert_id' order by id desc\");\n $gstr3b_max = $quer_range->row();\n $gstrtbmax = $gstr3b_max->gstrtb_max;\n $quer_range1 = $this->db->query(\"SELECT MAX(gstr2A) as gstr2a_max FROM comparison_summary_all WHERE customer_id='$customer_id' and insert_id='$insert_id' order by id desc\");\n $gstr1_max = $quer_range1->row();\n $gstr1max = $gstr1_max->gstr2a_max;\n $max_value = (max($gstrtbmax, $gstr1max));\n\n $respose['data'] = $data; //data of observation\n $respose['data1'] = $data1; //data of observation\n $respose['data2'] = $data2; //data of observation\n $respose['message'] = \"success\";\n $respose['gstr_tb'] = $abc; //data of gstr 3b\n $respose['max'] = $max_value; //max values\n $respose['difference'] = $abc3; //difference of 3b and 2a\n $respose['cumu_difference'] = $abc4; //cummulative difference of 3b and 2a\n $respose['gstr2a'] = $abc5; //data of gstr2a\n $respose['month_data'] = $months; //months\n $respose['data_threeb_vs2A_name'] = $data_threeb_vs2A_name; //months\n $respose['data_threeb_vs2A_observation'] = $data_threeb_vs2A_observation; //months\n $respose['data_threeb_vs2A_remarks'] = $data_threeb_vs2A_remarks; //months\n } else {\n $respose['data'] = \"\";\n $respose['data1'] = \"\";\n $respose['message'] = \"fail\";\n $respose['gstr_tb'] = \"\";\n $respose['difference'] = \"\";\n $respose['cumu_difference'] = \"\";\n $respose['gstr2a'] = \"\";\n }\n echo json_encode($respose);\n }", "title": "" }, { "docid": "31b1739f066da492b33edccaf5eb1ea7", "score": "0.5124764", "text": "private function make($directions = 'LR')\n {\n $graph = \"graph {$directions}\\n\";\n $notes = $this->process->getNodes();\n\n foreach ($notes as $v){\n $def = '';\n if($v instanceof BeginEvent || $v instanceof EndEvent){\n $def = \"(({$v->getName()}))\";\n }else if($v instanceof EventBasedGateway){\n $def = \"{fa:fa-empire}\";\n }else if($v instanceof ExclusiveForkGateway ||\n $v instanceof ExclusiveJoinGateway){\n $def = \"{X}\";\n }else if($v instanceof InclusiveForkGateway ||\n $v instanceof InclusiveJoinGateway){\n $def = \"{O}\";\n }else if($v instanceof ParallelForkGateway ||\n $v instanceof ParallelJoinGateway){\n $def = \"{+}\";\n }else if($v instanceof Timer){\n $def = \"((fa:fa-clock-o))\";\n }else if($v instanceof Listener){\n $def = \"((fa:fa-envelope-o))\";\n }else{\n $def = \"[{$v->getName()}]\";\n }\n $graph .= \" {$v->getName()}_0$def\\n\";\n $this->getConnections($v);\n }\n\n $isCreated = [];\n foreach ($this->connections as $con){\n list($from, $to) = $con;\n $graph .= \" {$from}_0-->{$to}_0\\n\";\n }\n $this->graphText = $graph;\n }", "title": "" }, { "docid": "f5c5c7b26193182ac150b450a806bd43", "score": "0.5124052", "text": "static function format($txt) {\r\n \r\n $de_inloc = $cu_inloc = [];\r\n $de_inloc[] = [\"prost\", \"cacat\", \"pisat\", \"pula\", \"sula\", \"pizda\", \"muie\", \"sugi\", \"coi\", \"coios\", \"taran\", \"curva\", \"jepat\", \"fuck\", \"futut\", \"fut\", \"fute\", \"muist\", \"bulesc\", \"babardesc\", \"homo\", \"homosexual\", \"bulit\", \"futi\", \"floci\", \"bagami-as\", \"bagamias\", \"mata\", \"tact-o\", 'bitch', \"bitchass\", \"blowjob\", \"blow job\", \"shit\"];\r\n $cu_inloc[] = \"<span style=\\\"color:red; font-style: italic;\\\">×××</span>\";\r\n\r\n $de_inloc[] = \":))\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_1.gif\\\" align=\\\"middle\\\" alt=\\\"&#058;&#041;&#041;\\\" title=\\\"&#058;&#041;&#041;\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \">:)\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_2.gif\\\" align=\\\"middle\\\" alt=\\\"&#062;&#058;&#041;\\\" title=\\\"&#062;&#058;&#041;\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \":)\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_3.gif\\\" align=\\\"middle\\\" alt=\\\"&#058;&#041;\\\" title=\\\"&#058;&#041;\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \";)\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_4.gif\\\" align=\\\"middle\\\" alt=\\\"&#059;&#041;\\\" title=\\\"&#059;&#041;\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \":\\(\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_5.gif\\\" align=\\\"middle\\\" alt=\\\"&#058;&#040;\\\" title=\\\"&#058;&#040;\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \":~\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_6.gif\\\" align=\\\"middle\\\" alt=\\\"&#058;&#126;\\\" title=\\\"&#058;&#126;\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \":&quot;>\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_7.gif\\\" align=\\\"middle\\\" alt=\\\"&#058;&#034;&#062;\\\" title=\\\"&#058;&#034;&#062;\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \":o\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_8.gif\\\" align=\\\"middle\\\" alt=\\\"&#058;o\\\" title=\\\"&#058;o\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \":ups\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_9.gif\\\" align=\\\"middle\\\" alt=\\\"&#058;ups\\\" title=\\\"&#058;ups\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \"B-)\";\r\n $cu_inloc[] = \"<img src=\\\"\" . SITE_ROOT . \"/admin/images/zambareti/zambaret_10.gif\\\" align=\\\"middle\\\" alt=\\\"B&#045;&#041;\\\" title=\\\"B&#045;&#041;\\\" border=\\\"0\\\">\";\r\n $de_inloc[] = \"\\[b\\]\";\r\n $cu_inloc[] = \"<strong>\";\r\n $de_inloc[] = \"\\[/b\\]\";\r\n $cu_inloc[] = \"</strong>\";\r\n $de_inloc[] = \"\\[i\\]\";\r\n $cu_inloc[] = \"<i>\";\r\n $de_inloc[] = \"\\[/i\\]\";\r\n $cu_inloc[] = \"</i>\";\r\n $de_inloc[] = \"\\[u\\]\";\r\n $cu_inloc[] = \"<u>\";\r\n $de_inloc[] = \"\\[/u\\]\";\r\n $cu_inloc[] = \"</u>\";\r\n $de_inloc[] = \"\\\\[url\\\\]([^\\\\[]*)\\\\[/url\\\\]\";\r\n $cu_inloc[] = \"<a href=\\\"\\\\1\\\" target=\\\"_blank\\\" title=\\\"\\\\1\\\">\\\\1</a>\";\r\n $de_inloc[] = \"\\\\[url=([^\\\\[]*)\\\\]([^\\\\[]*)\\\\[/url\\\\]\";\r\n $cu_inloc[] = \"<a href=\\\"\\\\1\\\" target=\\\"_blank\\\" title=\\\"\\\\1\\\">\\\\2</a>\";\r\n $de_inloc[] = \"\\\\[img\\\\]([^\\\\[]*)\\\\[/img\\\\]\";\r\n $cu_inloc[] = \"<img src=\\\"\\\\1\\\" alt=\\\"\\\\1\\\" title=\\\"\\\\1\\\">\";\r\n $de_inloc[] = \"\\\\[img=([^\\\\[]*)\\\\]([^\\\\[]*)\\\\[/img\\\\]\";\r\n $cu_inloc[] = \"<img src=\\\"\\\\1\\\" alt=\\\"\\\\2\\\" title=\\\"\\\\2\\\">\";\r\n\r\n foreach ($de_inloc as $nume => $valoare) {\r\n $txt = str_replace($valoare, $cu_inloc[$nume], $txt);\r\n }\r\n $txt = nl2br($txt);\r\n return $txt;\r\n }", "title": "" }, { "docid": "858c1a049532f4a5d7cb961a94fe73f9", "score": "0.51238924", "text": "public abstract function mostrar_plantillas();", "title": "" }, { "docid": "e7240eb62c149a8e4fde789b4cd975c9", "score": "0.5121578", "text": "function Identificacion()\r\n{\r\n //PRIMERA LINEA (ARRIBA)\r\n\t$this->text(80, 82, 'DESCRIPCION DEL VEHICULO: ');\r\n\t$this->Line(200,84,19,84);\r\n\t//SEGUNDA LINEA\r\n\t$this->Line(200,100,19,100);\r\n\t// PRIMERA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(19,84,19,100);\r\n\t// SEGUNDA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(50,84,50,100);\r\n\t// TERCERA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(85,84,85,100);\r\n\t// CUARTA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(127,84,127,100);\r\n\t// QUINTA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(175,84,175,100);\r\n\t// SEXTA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(200,84,200,100);\r\n\t//SEGUNDA LINEA HORIZONTAL(ABAJO)\r\n\t$this->Line(200,90,19,90);\r\n\t\r\n\t\r\n\t//TERCER TITULO\r\n\t$this->text(80, 115, 'MANTENIMIENTO PREVENTIVO: ');\r\n\t//PRIMERA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,117,19,117);\r\n\t//2DA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,125,19,125);\r\n\t//3RA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,133,19,133);\r\n\t//4TA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,141,19,141);\r\n\t//5TA LINEA HORIZONTAL DESPUES DEL TERCER TITULO\r\n\t$this->Line(200,171,19,171);\r\n\t\r\n\t// PRIMERA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(19,171,19,117);\r\n\t// 2DA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(110,171,110,117);\r\n\t// 3RA LINEA IZQUIERDA VERTICAL\r\n\t$this->Line(200,171,200,117);\r\n\t// 4TA LINEA IZQUIERDA VERTICAL PEQUEÑA\r\n\t$this->Line(150,171,150,141);\r\n\r\n\t\r\n\r\n\r\n\t\r\n}", "title": "" }, { "docid": "781babb88262428be7cf5821e02ac272", "score": "0.5117615", "text": "function grafico($si,$no)\n {\n $datos = array($si,$no);\n //se asginan etiquetas a los valores agregados \n $leyenda = array('SI','NO');\n \n //Se define el grafico\n $grafico = new PieGraph(450,300);\n \n //Añadimos el titulo y la leyenda\n $p1 = new PiePlot($datos);\n $p1->SetLegends($leyenda);\n $p1->SetCenter(0.4);\n //Se muestra el grafico\n $grafico->Add($p1);\n //se asigna nombre con ubicacion a la imagen en una carpeta temporal\n $nombreImagen = '../img/temp/' .mt_rand(). '.png';\n // Display the graph\n $grafico->Stroke($nombreImagen);\n\n return $nombreImagen;\n }", "title": "" }, { "docid": "b2a0edadc0a41f52031b17000292df7f", "score": "0.51172423", "text": "private function writeFormatFill()\n {\n $str = '';\n\n $str .= '<a:fillStyleLst>';\n $str .= '<a:solidFill>';\n $str .= '<a:schemeClr val=\"phClr\" />';\n $str .= '</a:solidFill>';\n $str .= '<a:gradFill rotWithShape=\"1\">';\n $str .= '<a:gsLst>';\n $str .= '<a:gs pos=\"0\">';\n $str .= '<a:schemeClr val=\"phClr\">';\n $str .= '<a:tint val=\"50000\" />';\n $str .= '<a:satMod val=\"300000\" />';\n $str .= '</a:schemeClr>';\n $str .= '</a:gs>';\n $str .= '<a:gs pos=\"35000\">';\n $str .= '<a:schemeClr val=\"phClr\">';\n $str .= '<a:tint val=\"37000\" />';\n $str .= '<a:satMod val=\"300000\" />';\n $str .= '</a:schemeClr>';\n $str .= '</a:gs>';\n $str .= '<a:gs pos=\"100000\">';\n $str .= '<a:schemeClr val=\"phClr\">';\n $str .= '<a:tint val=\"15000\" />';\n $str .= '<a:satMod val=\"350000\" />';\n $str .= '</a:schemeClr>';\n $str .= '</a:gs>';\n $str .= '</a:gsLst>';\n $str .= '<a:lin ang=\"16200000\" scaled=\"1\" />';\n $str .= '</a:gradFill>';\n $str .= '<a:gradFill rotWithShape=\"1\">';\n $str .= '<a:gsLst>';\n $str .= '<a:gs pos=\"0\">';\n $str .= '<a:schemeClr val=\"phClr\">';\n $str .= '<a:shade val=\"51000\" />';\n $str .= '<a:satMod val=\"130000\" />';\n $str .= '</a:schemeClr>';\n $str .= '</a:gs>';\n $str .= '<a:gs pos=\"80000\">';\n $str .= '<a:schemeClr val=\"phClr\">';\n $str .= '<a:shade val=\"93000\" />';\n $str .= '<a:satMod val=\"130000\" />';\n $str .= '</a:schemeClr>';\n $str .= '</a:gs>';\n $str .= '<a:gs pos=\"100000\">';\n $str .= '<a:schemeClr val=\"phClr\">';\n $str .= '<a:shade val=\"94000\" />';\n $str .= '<a:satMod val=\"135000\" />';\n $str .= '</a:schemeClr>';\n $str .= '</a:gs>';\n $str .= '</a:gsLst>';\n $str .= '<a:lin ang=\"16200000\" scaled=\"0\" />';\n $str .= '</a:gradFill>';\n $str .= '</a:fillStyleLst>';\n\n return $str;\n }", "title": "" }, { "docid": "dd040b58127fdd10132056f189247d02", "score": "0.5117179", "text": "function customized_graph_view($from,$to,$facility,$device,$all,$county_name_value,$report_type)\n\t{\n\t\t$custom=1;\n\t\t$total=0;\n\t\t$tests=0;\n\t\t$errors=0;\n\t\t$year=0;\n\t\t$year_end=0;\n\n\t\tif(!$facility==\"\")//By Facility\n\t\t{\n\t\t\t$device=\"\";\n\t\t\t$all=\"\";\n\t\t\t$county_id=\"\";\n\t\t}\n\t\tif(!$device==\"\")//By Device\n\t\t{\n\t\t\t$facility=\"\";\n\t\t\t$all=\"\";\n\t\t\t$county_id=\"\";\n\t\t}\n\t\tif($all==4)//By County\n\t\t{\t\n\t\t\t$facility=\"\";\n\t\t\t$device=\"\";\n\t\t\t$county_id=$this->reports_model->get_county_id($county_name_value);\n\t\t}\n\t\telse if($all==5)//All data\n\t\t{\n\t\t\t$facility=\"\";\n\t\t\t$device=\"\";\n\t\t\t$county_id=\"\";\n\t\t}\n\n\t\tif($report_type==1)//Tests only\n\t\t{\n\t\t\t$report_type= \" \";\n\t\t\t\n\t\t\t$the_total=$this->reports_charts_sql_model->get_test_details($facility,$device,$all,$county_id,$from,$to,$year,$year_end,$report_type,$custom);\n\n\t\t\tif(!empty($the_total))\n\t\t\t{\n\t\t\t\tforeach ($the_total as $key => $value) \n\t\t\t\t{\n\t\t\t\t\t$total+=(int)$value['data'];\n\t\t\t\t\t$tests+=(int)$value['valid'];\n\t\t\t\t}\n\t\t\t\t$tests_results['both_results'][]=$total;\n\t\t\t\t$tests_results['tests'][]=$tests;\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$tests_results['tests'][]=0;\n\t\t\t\t$tests_results['both_results'][]=0;\n\n\t\t\t\treturn $tests_results;\n\t\t\t}\n\n\t\t}\n\t\telse if($report_type==2)//Errors only\n\t\t{\n\t\t\t$report_type= \" \";\n\t\t\t$the_total=$this->reports_charts_sql_model->get_test_details($facility,$device,$all,$county_id,$from,$to,$year,$year_end,$report_type,$custom);\n\n\t\t\tif(!empty($the_total))\n\t\t\t{\n\t\t\t\tforeach ($the_total as $key => $value) \n\t\t\t\t{\n\t\t\t\t\t$total+=(int)$value['data'];\n\t\t\t\t\t$errors+=(int)$value['errors'];\n\t\t\t\t}\n\t\t\t\t$tests_results['both_results'][]=$total;\n\t\t\t\t$tests_results['errors'][]=$errors;\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$tests_results['errors'][]=0;\n\t\t\t\t$tests_results['both_results'][]=0;\n\n\t\t\t\treturn $tests_results;\n\t\t\t}\n\t\t}\n\t\telse if($report_type==0)//Both Tests and Errors\n\t\t{\n\t\t\t$report_type= \" \";\n\t\t\t$the_total=$this->reports_charts_sql_model->get_test_details($facility,$device,$all,$county_id,$from,$to,$year,$year_end,$report_type,$custom);\n\n\t\t\tif(!empty($the_total))\n\t\t\t{\n\t\t\t\tforeach ($the_total as $key => $value) \n\t\t\t\t{\n\t\t\t\t\t$total+=(int)$value['data'];\n\t\t\t\t\t$tests+=(int)$value['valid'];\n\t\t\t\t\t$errors+=(int)$value['errors'];\n\t\t\t\t}\n\n\t\t\t\t$tests_results['both_results'][]=$total;\n\t\t\t\t$tests_results['tests'][]=$tests;\n\t\t\t\t$tests_results['errors'][]=$errors;\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$tests_results['errors'][]=0;\n\t\t\t\t$tests_results['tests'][]=0;\n\t\t\t\t$tests_results['both_results'][]=0;\n\n\t\t\t\treturn $tests_results;\n\t\t\t}\n\t\t}\n\t\telse if($report_type==3)// Tests <350\n\t\t{\n\t\t\t$report_type= \" \";\n\t\t\t$the_total=$this->reports_charts_sql_model->get_test_details($facility,$device,$all,$county_id,$from,$to,$year,$year_end,$report_type,$custom);\n\n\t\t\tif(!empty($the_total))\n\t\t\t{\n\t\t\t\tforeach ($the_total as $key => $value) \n\t\t\t\t{\n\t\t\t\t\t$total+=(int)$value['data'];\n\t\t\t\t\t$tests+=(int)$value['failed'];\n\t\t\t\t}\n\t\t\t\t$tests_results['both_results'][]=$total;\n\t\t\t\t$tests_results['tests'][]=$tests;\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$tests_results['tests'][]=0;\n\t\t\t\t$tests_results['both_results'][]=0;\n\n\t\t\t\treturn $tests_results;\n\t\t\t}\n\t\t}\n\t\telse if($report_type==4)//Errors by percentage\n\t\t{\n\t\t\t$percentage_successful=0;\n\t\t\t$percentage_error=0;\n\t\t\t$total_successful=0;\n\t\t\t$total_errors=0;\n\t\t\t$grand_total=0;\n\n\t\t\t$report_type= \" \";\n\t\t\t$the_total=$this->reports_charts_sql_model->get_test_details($facility,$device,$all,$county_id,$from,$to,$year,$year_end,$report_type,$custom);\n\t\t\tif(!empty($the_total))\n\t\t\t{\n\t\t\t\tforeach($the_total as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$total_successful+=$value['valid'];\n\t\t\t\t\t$total_errors+=$value['errors'];\n\t\t\t\t\t$grand_total+=$value['data'];\t\t\n\t\t\t\t}\n\n\t\t\t\t$percentage_successful=round(($total_successful/$grand_total)*100,1);\n\t\t\t\t$percentage_error=round(($total_errors/$grand_total)*100,1);\n\n\t\t\t\t$tests_results['tests'][]=$percentage_successful;\n\t\t\t\t$tests_results['errors'][]=$percentage_error;\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$tests_results['tests'][]=0;\n\t\t\t\t$tests_results['errors'][]=0;\n\n\t\t\t\treturn $tests_results;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t\t\n\treturn $tests_results;\t\n\t}", "title": "" }, { "docid": "351874bc6d7f8aede36348003db0a3a2", "score": "0.51147485", "text": "function build_process_graph($pId)\n {\n if (!(isset($this->process_manager))) $this->process_manager =& new ProcessManager($this->db);\n $attributes = Array(\n \n );\n $graph = new Process_GraphViz(true,$attributes);\n $name = $this->process_manager->_get_normalized_name($pId);\n $graph->set_pid($name);\n \n //Get the config of the workflow where we'll have some tips for the graph\n $myconfneeds = array(\n 'draw_roles' => true, \n 'font_size' => 12,\n );\n $configs = $this->process_manager->getConfigValues($pId,true,true,$myconfneeds);\n\n // Nodes are process activities so get\n // the activities and add nodes as needed\n $nodes = $this->get_process_activities($pId);\n \n foreach($nodes as $node)\n {\n if($node['wf_is_interactive']=='y') \n {\n $color='black';\n $fillcolor='0.6,0.6,0.9'; //blue TLS values\n } \n else \n {\n $color='black';\n $fillcolor='0.25,1,0.8';//green in TLS values\n }\n // get the fontsize, defined in the process\n $fontsize = $configs['font_size'];\n // if asked add roles on the graph\n if ($configs['draw_roles']) \n {\n $activity_roles = $this->get_activity_roles($node['wf_activity_id']);\n }\n // fill activity roles\n $act_role= '';\n if (isset($activity_roles))\n {\n foreach ($activity_roles as $role)\n {\n // the / is escaped and space seems to be necessary,\n //issues with some special characters if no spaces between this char and the /\n $act_role = $act_role.\" \\\\n[\".$role['wf_name'].\"]\";\n }\n }\n $auto[$node['wf_name']] = $node['wf_is_autorouted'];\n $graph->addNode($node['wf_name'],array('URL'=>\"foourl?wf_activity_id=\".$node['wf_activity_id'],\n 'label'=>$node['wf_name'].$act_role,\n 'shape' => $this->_get_activity_shape($node['wf_type']),\n 'color' => $color,\n 'fillcolor'=> $fillcolor,\n 'style' => 'filled',\n 'fontsize' => $fontsize\n )\n );\n }\n \n // Now add edges, edges are transitions,\n // get the transitions and add the edges\n $edges = $this->get_process_transitions($pId);\n foreach($edges as $edge)\n {\n if($auto[$edge['wf_act_from_name']] == 'y') {\n $color = '0.25,1,0.28'; #dark green in TLS values\n $arrowsize = 1;\n } else {\n $color = '0.6,0.6,0.9'; #blue in TLS values\n $arrowsize= 2;\n }\n $graph->addEdge(array($edge['wf_act_from_name'] => $edge['wf_act_to_name']), array('color'=>$color,arrowsize=>$arrowsize)); \n }\n \n \n // Save the map image and the image graph\n $graph->image_and_map();\n unset($graph);\n return true; \n }", "title": "" }, { "docid": "0d90a1d15d1d905186d8af3f201fa86e", "score": "0.5110311", "text": "function PrintHalfPersonData($num, $patient_data)\n{\n $left_col_x = 0;\n $right_col_x = 120;\n $i=0;\n $labels = [\"Nombre: \", \"Edad: \", \"CI: \", \"Fecha: \"];\n \n $current_y = $this->GetY();\n \n //verificar si es array y no esta vacio\n if (is_array($patient_data)) {\n\n $txt = \"\";\n // Fuente\n $this->SetFont('Times','',12);\n // Imprimir texto en una columna de 6 cm de ancho (si el valor es 60)\n foreach($patient_data as $data){\n $this->Cell(0,6, $labels[$i].$data, 0, 1);\n $i++;\n }\n\n\n $this->SetY($current_y);\n $this->SetX($right_col_x);\n $i=0;\n // Imprimir texto en una columna de 6 cm de ancho (si el valor es 60)\n foreach($patient_data as $data){\n $this->Cell(0,6, $labels[$i].$data, 0, 1);\n $this->SetX($right_col_x);\n $i++;\n }\n\n // $this->MultiCell(190,7,$txt);\n // $this->Ln();\n // Guardar ordenada\n $this->y0 = $this->GetY();\n }\n}", "title": "" }, { "docid": "628997a003b0e9b0913f9a88f07f63b9", "score": "0.51094884", "text": "abstract public function pretty();", "title": "" }, { "docid": "d1c959826c82a0db78ec34981b9f2f15", "score": "0.51064086", "text": "public function format() {\n foreach( $this->elements as &$element ) {\n $element->format();\n }\n\t}", "title": "" }, { "docid": "ad0411573838a896c6e527a2da5f2f78", "score": "0.5105061", "text": "function __toString(){\n\t\treturn sprintf(\"0\\nBLOCK\\n8\\n%s\\n2\\n%s\\n70\\n%s\\n%s3\\n%s\\n%s\\n0\\nENDBLK\\n\",\n\t\t\t\t\t\t$this->attributes['layer'],\n\t\t\t\t\t\tstrtoupper($this->attributes['name']),\n\t\t\t\t\t\t$this->attributes['flag'],\n\t\t\t\t\t\tpoint($this->attributes['base']),\n\t\t\t\t\t\tstrtoupper($this->attributes['name']),\n\t\t\t\t\t\tparent::__toString()\n\t\t\t\t);\n\t}", "title": "" }, { "docid": "3da79f754c88581979134072ae0fb2e6", "score": "0.51031244", "text": "public function __toString() {\r\n\t$string = '';\r\n\t$string .= '[objectId] => ' . $this->getObjectId() . '<br />';\r\n\t$string .= '[active] => ' . $this->getActive() . '<br />';\r\n\t$string .= '[commentCounter] => ' . $this->getCommentCounter() . '<br />';\r\n\t$string .= '[counter] => ' . $this->getCounter() . '<br />';\r\n\t$string .= '[duration] => ' . $this->getDuration() . '<br />';\r\n\tif ($this->getFeaturing() != null && count($this->getFeaturing() > 0)) {\r\n\t foreach ($this->getFeaturing() as $user) {\r\n\t\t$string .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t\t$string .= '[featuring] => ' . $user . '<br />';\r\n\t }\r\n\t}\r\n\t$string.= '[filePath] => ' . $this->getFilePath() . '<br />';\r\n\t$fromUser = $this->getFromUser();\r\n\tif ($fromUser != null) {\r\n\t $string.= '[fromUser] => ' . $fromUser . '<br />';\r\n\t}\r\n\t$string.= '[genre] => ' . $this->getGenre() . '<br />';\r\n\t$parseGeoPoint = $this->getLocation();\r\n\tif ($parseGeoPoint->lat != null && $parseGeoPoint->long) {\r\n\t $string .= '[location] => ' . $parseGeoPoint->lat . ', ' . $parseGeoPoint->long . '<br />';\r\n\t}\r\n\t$string .= '[loveCounter] => ' . $this->getLoveCounter() . '<br />';\r\n\tif ($this->getLovers() != null && count($this->getLovers() > 0)) {\r\n\t foreach ($this->getLovers() as $lover) {\r\n\t\t$string .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t\t$string .= '[lover] => ' . $lover . '<br />';\r\n\t }\r\n\t}\r\n\t$string .= '[position] => ' . $this->getPosition() . '<br />';\r\n\t$record = $this->getRecord();\r\n\tif ($record != null) {\r\n\t $string .= '[record] => ' . $record . '<br />';\r\n\t}\r\n\t$string .= '[shareCounter] => ' . $this->getShareCounter() . '<br />';\r\n\t$string .= '[title] => ' . $this->getTitle() . '<br />';\r\n\tif ($this->getCreatedAt() != null) {\r\n\t $string .= '[createdAt] => ' . $this->getCreatedAt()->format('d-m-Y H:i:s') . '<br />';\r\n\t} else {\r\n\t $string .= '[createdAt] => NULL<br />';\r\n\t}\r\n\tif ($this->getUpdatedAt() != null) {\r\n\t $string .= '[updatedAt] => ' . $this->getUpdatedAt()->format('d-m-Y H:i:s') . '<br />';\r\n\t} else {\r\n\t $string .= '[updatedAt] => NULL<br />';\r\n\t}\r\n\tif ($this->getACL() != null) {\r\n\t foreach ($this->getACL()->acl as $key => $acl) {\r\n\t\t$string .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t\t$string .= '[ACL] => ' . $key . '<br />';\r\n\t\tforeach ($acl as $access => $value) {\r\n\t\t $string .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t\t $string .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t\t $string .= '[access] => ' . $access . ' -> ' . $value . '<br />';\r\n\t\t}\r\n\t }\r\n\t} else {\r\n\t $string .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\r\n\t $string .= '[ACL] => NULL<br />';\r\n\t}\r\n\treturn $string;\r\n }", "title": "" }, { "docid": "b7899333bac9b33fb449b9e7296a8af8", "score": "0.5090195", "text": "public function forex()\n {\n $eurgbp = ChocolateFactory_Core_Csv::init('/home/bas/vhosts/darwin/doc/EURGBP.csv');\n $eurusd = ChocolateFactory_Core_Csv::init('/home/bas/vhosts/darwin/doc/EURUSD.csv');\n $gbpusd = ChocolateFactory_Core_Csv::init('/home/bas/vhosts/darwin/doc/GBPUSD.csv');\n\n $graph = new Graph();\n $lines['name'] = 'rate';\n $lines['color'] = '000000';\n foreach($eurgbp->getColumn('HIGH') as $i => $high) {\n $line = new stdClass();\n $line->step = $i;\n $line->rate = $high;\n $lines['name'] = 'rate';\n $lines['color'] = '00CED1';\n $lines['data'][] = $line;\n }\n $graph->setXaxis(0, $i, 1);\n $graph->setYaxis(5000, 8000, 500);\n $graph->addLine($lines);\n $graph->render();\n }", "title": "" }, { "docid": "4d696e7792ad3c8c11f2bef5fa668f33", "score": "0.50822014", "text": "public function generateCSV($graph) {\n if ($graph == 'current') {\n echo \"Label,Count\\n\";\n\n $labels = array(\n 'Private',\n 'Public'\n );\n\n $values = $this->db->query_amo(\"SELECT listed, COUNT(*) FROM collections GROUP BY listed ORDER BY listed\");\n while ($value = mysql_fetch_array($values, MYSQL_NUM)) {\n echo \"{$labels[$value[0]]},{$value[1]}\\n\";\n }\n }\n elseif ($graph == 'history') {\n echo \"Date,Private,Public\\n\";\n\n $dates = $this->db->query_stats(\"SELECT date, private, public FROM {$this->table} ORDER BY date\");\n while ($date = mysql_fetch_array($dates, MYSQL_NUM)) {\n echo implode(',', $date).\"\\n\";\n }\n }\n }", "title": "" }, { "docid": "f804714b969c705174653431cb4c9352", "score": "0.5077949", "text": "function __toString(): string\n {\n return $this->dashArray->toString() . \" \" . $this->dashPhase->toString() . \" d\\n\";\n }", "title": "" }, { "docid": "98402f05a94fc7703df6aaa96ff56e70", "score": "0.5077948", "text": "private function createGraphFor2Nucleo(&$im, $black, $iFontWeight)\n {\n try {\n // lines\n $startx = $this->nucleotidsGraphs[\"startx_2\"];\n $starty = $this->nucleotidsGraphs[\"starty_2\"];\n $interval = $this->nucleotidsGraphs[\"intervals_2\"];\n\n imageline($im, $startx, ($starty + $interval), ($startx + $interval * 4), ($starty + $interval), $black);\n imageline($im, $startx, ($starty + $interval * 2), ($startx + $interval * 4), ($starty + $interval * 2), $black);\n imageline($im, $startx, ($starty + $interval * 3), ($startx + $interval * 4), ($starty + $interval * 3), $black);\n\n imageline($im, ($startx + $interval), $starty, ($startx + $interval), ($starty + $interval * 4), $black);\n imageline($im, ($startx + $interval * 2), $starty, ($startx + $interval * 2), ($starty + $interval * 4), $black);\n imageline($im, ($startx + $interval * 3), $starty, ($startx + $interval * 3), ($starty + $interval * 4), $black);\n\n // dimers in their place\n $h_pos = $this->nucleotidsGraphs[\"positions_2\"][\"h_pos\"];\n $v_pos = $this->nucleotidsGraphs[\"positions_2\"][\"v_pos\"];\n\n $imageNucleotids = array(\n \"CC\" => array(\n \"x\" => $startx + $h_pos,\n \"y\" => $starty + $v_pos\n ),\n \"GC\" => array(\n \"x\" => $startx + $interval + $h_pos,\n \"y\" => $starty + $v_pos\n ),\n \"CG\" => array(\n \"x\" => $startx + ($interval * 2) + $h_pos,\n \"y\" => $starty + $v_pos\n ),\n \"GG\" => array(\n \"x\" => $startx + ($interval * 3) + $h_pos,\n \"y\" => $starty + $v_pos\n ),\n\n \"AC\" => array(\n \"x\" => $startx + $h_pos,\n \"y\" => $starty + $interval + $v_pos\n ),\n \"TC\" => array(\n \"x\" => $startx + $interval + $h_pos,\n \"y\" => $starty + $interval + $v_pos\n ),\n \"AG\" => array(\n \"x\" => $startx + ($interval * 2) + $h_pos,\n \"y\" => $starty + $interval + $v_pos\n ),\n \"TG\" => array(\n \"x\" => $startx + ($interval * 3) + $h_pos,\n \"y\" => $starty + $interval + $v_pos\n ),\n\n \"CA\" => array(\n \"x\" => $startx + $h_pos,\n \"y\" => $starty + ($interval * 2) + $v_pos\n ),\n \"GA\" => array(\n \"x\" => $startx + $interval + $h_pos,\n \"y\" => $starty + ($interval * 2) + $v_pos\n ),\n \"CT\" => array(\n \"x\" => $startx + ($interval * 2) + $h_pos,\n \"y\" => $starty + ($interval * 2) + $v_pos\n ),\n \"GT\" => array(\n \"x\" => $startx + ($interval * 3) + $h_pos,\n \"y\" => $starty + ($interval * 2) + $v_pos\n ),\n\n \"AA\" => array(\n \"x\" => $startx + $h_pos,\n \"y\" => $starty + ($interval * 3) + $v_pos\n ),\n \"TA\" => array(\n \"x\" => $startx + $interval + $h_pos,\n \"y\" => $starty + ($interval * 3) + $v_pos\n ),\n \"AT\" => array(\n \"x\" => $startx + ($interval * 2) + $h_pos,\n \"y\" => $starty + ($interval * 3) + $v_pos\n ),\n \"TT\" => array(\n \"x\" => $startx + ($interval * 3) + $h_pos,\n \"y\" => $starty + ($interval * 3) + $v_pos\n ),\n );\n\n foreach($imageNucleotids as $key => $l) {\n imagestring($im, $iFontWeight, $l[\"x\"], $l[\"y\"], $key, $black);\n }\n } catch (\\Exception $e) {\n throw new \\Exception($e);\n }\n }", "title": "" }, { "docid": "c8dcb45aabad05f35fdf66ae9049c3c3", "score": "0.5076206", "text": "function GraphXYKey ($title, $value, $syntax ) {\r\r\n $sbits = explode(\":\",$syntax.\":::\");\r\r\n $axis = $sbits[0];\r\r\n $keygroup = $sbits[1];\r\r\n $action = $sbits[2];\r\r\n $graphxykey = \"\";\r\r\n \r\r\n if (strlen(strstr($keygroup,\"FOREACH\"))>0) { $ruletype = \"FOREACH\"; } \r\r\n if ($keygroup == \"FORALL\") { $ruletype = \"FORALL\"; }\r\r\n \r\r\n if ( $ruletype == \"FOREACH\" ) {\r\r\n if (strlen(strstr($keygroup,'_'))>0) { \r\r\n // special situation - another field is involved\r\r\n $otherfieldname = str_replace(\"FOREACH\",\"\",$sbits[1]);\r\r\n $graphxykey = $GLOBALS{$otherfieldname};\r\r\n } else {\r\r\n // normal situation this field value returned\r\r\n $rulefound = \"0\";\r\r\n if (( $keygroup == \"FOREACH\" )&&( $rulefound == \"0\" )) {\r\r\n $graphxykey = $graphykey = $value;\r\r\n }\r\r\n if (( $keygroup == \"FOREACHyyyy\" )&&( $rulefound == \"0\" )) {\r\r\n $graphxykey = substr($value,0,4);\r\r\n }\r\r\n if (( $keygroup == \"FOREACHmm\" )&&( $rulefound == \"0\" )) {\r\r\n $graphxykey = substr($value,2,2).substr($value,6,2);\r\r\n }\r\r\n if (( $keygroup == \"FOREACHqtr\" )&&( $rulefound == \"0\" )) {\r\r\n $mmi = (int)substr($value,6,2);\r\r\n $qtr = \"\";\r\r\n if ($mmi > 0) { $qtr = \"Q1\"; }\r\r\n if ($mmi > 3) { $qtr = \"Q2\"; }\r\r\n if ($mmi > 6) { $qtr = \"Q3\"; }\r\r\n if ($mmi > 9) { $qtr = \"Q4\"; }\r\r\n $graphxykey = substr($value,2,2).$qtr;\r\r\n }\r\r\n }\r\r\n }\r\r\n \r\r\n if ( $ruletype == \"FORALL\" ) {\r\r\n $graphxykey = $title;\r\r\n }\r\r\n \r\r\n // $colour = \"green\";\r\r\n // if ( $axis == \"Y\" ) { $colour = \"red\"; }\r\r\n // XPTXTCOLOR($axis.\" \".$value.\" \".$syntax.\" ==> \".$graphxykey,$colour);\r\r\n return $graphxykey;\r\r\n}", "title": "" }, { "docid": "4cee5e0244f23b19e27737b367e4e3be", "score": "0.5074675", "text": "function evolucionTotales ($gestion,$totales,$fechas){\n\n global $cache;\n\n\t\t /* Create and populate the pData object */ \n\t\t $MyData = new pData(); \n\t\t \n\t\t $MyData->addPoints($gestion,\"gestion\"); \n\t\t $MyData->addPoints($totales,\"totales\"); \n\t\t \n\n\t\t $MyData->setPalette(\"gestion\",array(\"R\"=>200,\"G\"=>200,\"B\"=>200)); \n\t\t $MyData->setPalette(\"totales\",array(\"R\"=>0,\"G\"=>255,\"B\"=>255)); \n\n\n\t\t $MyData->setSerieWeight(\"gestion\",2);\n\t\t $MyData->setSerieWeight(\"totales\",2); \n\n\t\t \n\t\t $MyData->addPoints($fechas,\"Labels\"); \n\t\t $MyData->setSerieDescription(\"Labels\",\"Months\"); \n\t\t $MyData->setAbscissa(\"Labels\"); \n\n\t\t /* Create the pChart object, TRUE is for transparent background*/ \n\t\t $myPicture = new pImage(1000,500,$MyData, TRUE); \n\n\n\t\t /* Turn on Antialiasing */ \n\t\t $myPicture->Antialias = TRUE; \n\n\t\t \n\t\t \n\t\t /* Write the chart title */ \n\t\t$myPicture->setFontProperties(array(\"FontName\"=>\"fonts/OpenSans-Regular.ttf\",\"FontSize\"=>12, \"R\"=>255,\"G\"=>255,\"B\"=>255)); \n\t\t$myPicture->drawText(500,35,\"Evolución Totales Vs. Gestión\",array(\"FontSize\"=>24,\"Align\"=>TEXT_ALIGN_BOTTOMMIDDLE)); \n\n\t\t /* Set the default font */ \n\t\t $myPicture->setFontProperties(array(\"FontName\"=>\"fonts/OpenSans-Light.ttf\",\"FontSize\"=>18,\"R\"=>255,\"G\"=>255,\"B\"=>255)); \n\n\t\t /* Define the chart area */ \n\t\t $myPicture->setGraphArea(20,70,980,450); \n\n\n\n\t\t $Settings = array(\"Pos\"=>SCALE_POS_LEFTRIGHT, \"Mode\"=>SCALE_MODE_FLOATING, \"LabelingMethod\"=>LABELING_DIFFERENT\n\t\t, \"GridR\"=>217, \"GridG\"=>255, \"GridB\"=>66, \"GridAlpha\"=>50, \"TickR\"=>255, \"TickG\"=>255, \"TickB\"=>255, \"TickAlpha\"=>255, \"LabelRotation\"=>0, \"CycleBackground\"=>1, \"DrawXLines\"=>0, \"DrawSubTicks\"=>FALSE, \"SubTickR\"=>255, \"SubTickG\"=>255, \"SubTickB\"=>255, \"SubTickAlpha\"=>255, \"XMargin\"=>20, \"YMargin\"=>0, \"DrawYLines\"=>NONE,\"AxisR\"=>255,\"AxisG\"=>255,\"AxisB\"=>255, \"AxisAlpha\"=>0, \"RemoveYAxis\"=>TRUE);\n\t\t$myPicture->drawScale($Settings);\n\n\n\t\t /* Draw the line chart */ \n\t\t $myPicture->drawSplineChart();\n\t\t $myPicture->drawPlotChart(array(\"PlotBorder\"=>TRUE,\"BorderSize\"=>1,\"Surrounding\"=>-60,\"BorderAlpha\"=>80, \"DisplayValues\"=>TRUE, \"DisplayR\"=>255,\"DisplayG\"=>255,\"DisplayB\"=>255)); \n\n \n\n\n\n\t\t /* Write the chart legend */ \n\t\t //$myPicture->drawLegend(540,20,array(\"Style\"=>LEGEND_NOBORDER,\"Mode\"=>LEGEND_HORIZONTAL)); \n\n\t\t /* Render the picture (choose the best way) */ \n\t\t $myPicture->render($cache.\"/evoluciontotales.png\");\n\n\n\t\t\n\n}", "title": "" }, { "docid": "4859cc9fdd70ad64d82ed6c3ced1acd4", "score": "0.507242", "text": "public function __toString()\r\n {\r\n $cadena = \"\";\r\n $cadena .= \"\\n\\t ~ iD Función: \" . $this->getIdFuncion();\r\n $cadena .= \"\\n\\t ~ Categoría: \".get_class($this);\r\n $cadena .= \"\\n\\t Nombre de la función: \" . $this->getNombreFuncion();\r\n $cadena .= \"\\n\\t Hora de inicio: \" . $this->getHoraInicio();\r\n $cadena .= \"\\n\\t Duración: \" . $this->getDuracion();\r\n $cadena .= \"\\n\\t Precio: \" . $this->getPrecioFuncion();\r\n $cadena .= \"\\n\\t Mes: \" . $this->getMes();\r\n return $cadena;\r\n }", "title": "" }, { "docid": "be8a29dfd62748324a99d4517ae0e6dc", "score": "0.5070984", "text": "public function newgestormatriculaAction()\n {\n $em= $this->getDoctrine()->getManager();\n $sedes=$em->getRepository(\"NetpublicCoreBundle:Colegio\")->findAll();\n $grados=$em->getRepository(\"NetpublicCoreBundle:Grado\")->findAll();\n $anos_escolares=$em->getRepository(\"NetpublicCoreBundle:Dimension\")->findAnoEscolares();\n \n return array(\n 'sedes'=>$sedes,\n \"grados\"=>$grados,\n 'anos_escolares'=>$anos_escolares, \n );\n }", "title": "" }, { "docid": "2bf9701999ebed6f8c688c33cce2e1c8", "score": "0.5067944", "text": "function affiche_KO($valeurs, $names,$result=1){\r\n\t\t// $result = 1 => resultats\r\n\t\t// $result = 0 => schedule\r\n\r\n\t\t/*\t print_r($valeurs);\r\n\t\t echo \"<hr>\";\r\n\t\t print_r($names);\r\n\t\t echo \"<hr>\";*/\r\n\r\n\t\t$lesnoms = array();\r\n\t\tforeach($names as $name)\r\n\t\t{\r\n\t\t\tarray_push($lesnoms,\"\");\r\n\t\t\tif(is_string($name))\r\n\t\t\t$lesnoms[] = $name;\r\n\t\t\telse\r\n\t\t\t$lesnoms[] = $name['value'];\r\n\t\t}\r\n\r\n\t\t$n_lignes = count($lesnoms);\r\n\t\t$n_col = 0;\r\n\r\n\t\tforeach($valeurs as $colonne)\r\n\t\t{\r\n\t\t\t$n_col++;\r\n\t\t\t$lesvaleurs[$n_col] = array();\r\n\t\t\tforeach($colonne as $valeur)\r\n\t\t\t{\r\n\t\t\t\tarray_push($lesvaleurs[$n_col],\"\");\r\n\r\n\t\t\t\t$lesvaleurs[$n_col][] = $valeur['value'];\r\n\r\n\t\t\t\tif(($result)&&($valeur['score']!=\"0-0\"))\r\n\t\t\t\t$lesvaleurs[$n_col][] = $valeur['score'];\r\n\t\t\t\telse\r\n\t\t\t\tarray_push($lesvaleurs[$n_col],\"\");\r\n\r\n\t\t\t\t//$lesvaleurs[$n_col][] = $valeur['noc'];\r\n\r\n\t\t\t\tarray_push($lesvaleurs[$n_col],\"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$yinit = 70;\r\n\t\t$xinit = 10;\r\n\t\t$taille_bloc = 12; // fonction de $n_col\r\n\t\t$taille_texte = 6; // fonction de $n_col\r\n\t\t$largeur_bloc = 277/4; // fonction de $n_col\r\n\r\n\t\t$xinit = (297-(($n_col+1) * $largeur_bloc))/2;\r\n\t\t$xpos = $xinit;\r\n\t\t$ypos = $yinit-20;\r\n\t\t$this->SetFillColor(192);\r\n\r\n\t\t$this->SetXY($xpos,$ypos);\r\n\t\t$this->SetFont('Arial','B',14);\r\n\t\t$n_val = count($lesvaleurs[$n_col]);\r\n\t\t$titre = $this->getEntete(0,$n_col);\r\n\t\t$this->Cell($largeur_bloc,$taille_bloc,\"\".$titre,1,0,'C','1');\r\n\t\t$xpos += $largeur_bloc;\r\n\t\tfor($i=0;$i< $n_col; $i++)\r\n\t\t{\r\n\t\t\t$this->SetXY($xpos,$ypos);\r\n\t\t\t$n_val = count($lesvaleurs[$n_col]);\r\n\t\t\t$titre = $this->getEntete($i+1,$n_col);\r\n\t\t\t$this->Cell($largeur_bloc,$taille_bloc,\"\".$titre,1,0,'C','1');\r\n\t\t\t$xpos += $largeur_bloc;\r\n\t\t}\r\n\r\n\t\t//print_r($lesnoms);\r\n\t\t//echo \"<hr>\";\r\n\t\t//print_r($lesvaleurs);\r\n\r\n\t\t$xpos = $xinit;\r\n\t\t$ypos = $yinit;\r\n\t\t$this->SetFillColor(255);\r\n\t\t$this->SetFont('Arial','',10);\r\n\t\t//Cell( w, h, txt, border, ln, align, fill, link)\r\n\t\tfor($i=0;$i< $n_lignes; $i++)\r\n\t\t{\r\n\t\t\t$this->SetXY($xpos,$ypos);\r\n\t\t\t// on veut $i de 1 � 4 et non de 0 � 3 !\r\n\t\t\t$bord = $this->getBordureNom($i+1);\r\n\t\t\t$this->Cell($largeur_bloc, $taille_bloc-$taille_texte,\r\n\t\t \"\".$lesnoms[$i++],$bord,0,'C');\r\n\t\t\t$ypos += $taille_bloc-$taille_texte;\r\n\t\t\t$this->SetXY($xpos,$ypos);\r\n\t\t\t// on veut $i de 1 � 4 et non de 0 � 3 !\r\n\t\t\t$bord = $this->getBordureNom($i+1);\r\n\t\t\t$this->Cell($largeur_bloc,$taille_texte,\"\".$lesnoms[$i],$bord,0,'C');\r\n\t\t\t$ypos += $taille_texte;\r\n\t\t}\r\n\r\n\t\t$taille_bloc_init = $taille_bloc;\r\n\t\t// $taille_bloc = 16;\r\n\t\t$xpos = $xinit+$largeur_bloc;\r\n\t\t$ypos = $yinit;\r\n\t\t$finale = 0;\r\n\t\tfor($j=1;$j<=$n_col;$j++)\r\n\t\t{\r\n\t\t\t$n_lignes = count($lesvaleurs[$j]);\r\n\t\t\tif($n_lignes==4) $finale = 1 ;\r\n\r\n\t\t\t$this->SetXY($xpos,$ypos);\r\n\t\t\t$this->Cell($largeur_bloc,$taille_bloc_init / 2,\"\",0,0,'C');\r\n\t\t\t$ypos += $taille_bloc_init / 2 ;\r\n\r\n\t\t\tfor($i=0;$i< $n_lignes; $i++)\r\n\t\t\t{\r\n\t\t\t\t$this->SetXY($xpos,$ypos);\r\n\t\t\t\t// on veut $i de 1 � 4 et non de 0 � 3 !\r\n\t\t\t\t$bord = $this->getBordureKO($i+1,$finale);\r\n\t\t\t\t$this->Cell($largeur_bloc,$taille_bloc-$taille_texte,\r\n\t\t\t\"\".$lesvaleurs[$j][$i++],$bord,0,'C');\r\n\t\t\t\t$ypos += $taille_bloc-$taille_texte;\r\n\t\t\t\t$this->SetXY($xpos,$ypos);\r\n\t\t\t\t// on veut $i de 1 � 4 et non de 0 � 3 !\r\n\t\t\t\t$bord = $this->getBordureKO($i+1,$finale);\r\n\t\t\t\t$this->Cell($largeur_bloc,$taille_texte,\r\n\t\t\t\"\".$lesvaleurs[$j][$i++],$bord,0,'C');\r\n\t\t\t\t$ypos += $taille_texte;\r\n\t\t\t\t$this->SetXY($xpos,$ypos);\r\n\t\t\t\t// on veut $i de 1 � 4 et non de 0 � 3 !\r\n\t\t\t\t$bord = $this->getBordureKO($i+1,$finale);\r\n\t\t\t\t$this->Cell($largeur_bloc,$taille_texte,\r\n\t\t\t\"\".$lesvaleurs[$j][$i++],$bord,0,'C');\r\n\t\t\t\t$ypos += $taille_texte;\r\n\t\t\t\t$this->SetXY($xpos,$ypos);\r\n\t\t\t\t// on veut $i de 1 � 4 et non de 0 � 3 !\r\n\t\t\t\t$bord = $this->getBordureKO($i+1,$finale);\r\n\t\t\t\t$this->Cell($largeur_bloc,$taille_bloc-$taille_texte,\r\n\t\t\t\"\".$lesvaleurs[$j][$i],$bord,0,'C');\r\n\t\t\t\t$ypos += $taille_bloc-$taille_texte;\r\n\t\t\t}\r\n\t\t\t$taille_bloc = $taille_bloc * 2 ;\r\n\t\t\t$ypos = $yinit;\r\n\t\t\t$xpos += $largeur_bloc;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "f9f286703e19bca71d1c0f96999bcbe8", "score": "0.5064958", "text": "public function __toString()\n {\n return sprintf('%01.4f, %01.4f, %01.4f', $this->x, $this->y, $this->z);\n }", "title": "" }, { "docid": "129d3a0973756024279ce35465ec4816", "score": "0.50644773", "text": "private function createGanttChart()\n {\n $this->createDayDateHeaders();\n $this->createTaskRows();\n $this->createGanttTable();\n }", "title": "" }, { "docid": "f79f3f310aae0a2ffdb5318fd26ab12d", "score": "0.50529534", "text": "public function __toString()\n {\n return \"({$this->x}, {$this->y}, {$this->z})\";\n }", "title": "" }, { "docid": "43fb9e624bf37008d1fa4967c833deaa", "score": "0.5051959", "text": "public function output($format = 'jsonld',jld\\GraphInterface $graph = null)\n\t{\n\t\tif(!is_null($graph))\n\t\t{\n\t\t\t$outputGraph = $graph;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$outputGraph = $this->newGraph;\n\t\t}\n\t\tif(!$outputGraph)\n\t\t{\n\t\t\tthrow new \\Exception('marc2rdf must be initialized first.');\n\t\t}\n\t\t\n\t\tif( !in_array($format,$this->formats) )\n\t\t{\n\t\t\tthrow new \\Exception('Unknown format '.$format);\n\t\t}\n\t\t\n\t\t$nquads = new jld\\NQuads();\n\t\t$serialized = $outputGraph->toJsonLd(true);\n\t\t$quads = jld\\JsonLD::toRdf($serialized);\n\n\t\tif($format == 'jsonld')\n\t\t{\n\t\t\t$output = jld\\JsonLD::toString($serialized);\n\t\t}\n\t\telseif($format == 'ntriples')\n\t\t{\n\t\t\t$output = $nquads->serialize($quads);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach( get_object_vars($this->context) as $prefix => $namespace )\n\t\t\t{\n\t\t\t\tif(gettype($namespace) == 'string' && $prefix[0] != '@')\n\t\t\t\t{\n\t\t\t\t\t$oldprefix = \\EasyRdf_Namespace::prefixOfUri($namespace);\n\t\t\t\t\tif(isset($oldprefix)) \\EasyRdf_Namespace::delete($oldprefix);\n\t\t\t\t\tif('marc2rdf' != $prefix) \\EasyRdf_Namespace::set($prefix,$namespace);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$graph = new \\EasyRdf_Graph();\n\t\t\t$ntripleParser = new \\EasyRdf_Parser_Ntriples();\n\t\t\t$ntripleParser->parse($graph,$nquads->serialize($quads),'ntriples',$this->base);\n\t\t\t#$graph->parse($nquads->serialize($quads), 'ntriples');\n\n\t\t\t$output = $graph->serialise($format);\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "d84bb5e0dc80de6a17e8c29429e47bed", "score": "0.50469327", "text": "function generate_entity_popup_graphs($entity, $entity_type)\n{\n\n global $config;\n\n if (is_array($config['entities'][$entity_type]['graph']))\n {\n\n if(isset($config['entities'][$entity_type]['graph']['type']))\n {\n $graphs[] = $config['entities'][$entity_type]['graph'];\n } else {\n $graphs = $config['entities'][$entity_type]['graph'];\n }\n\n foreach ($graphs as $graph_array)\n {\n $graph_array = $config['entities'][$entity_type]['graph'];\n // We can draw a graph for this type/metric pair!\n\n foreach ($graph_array as $key => $val)\n {\n // Check to see if we need to do any substitution\n if (substr($val, 0, 1) == \"@\")\n {\n $nval = substr($val, 1);\n $graph_array[$key] = $entity[$nval];\n }\n }\n $graph_array['height'] = \"100\";\n $graph_array['width'] = \"323\";\n\n $content .= \"<h4>\" . ucwords(str_replace(\"_\", \" \", $graph_array['type'])) . \"</h4>\";\n\n foreach (array('day', 'month') as $period)\n {\n $graph_array['from'] = $config['time'][$period];\n $content .= generate_graph_tag($graph_array);\n }\n }\n\n return $content;\n }\n}", "title": "" }, { "docid": "c683bf64264bc35fcdee904421cc4736", "score": "0.50405705", "text": "public function __toString()\n {\n return nl2br( \"Nome: $this->nome\n idade: $this->idade \n idade em meses: {$this->calcularEmMeses()}\");\n }", "title": "" }, { "docid": "264ce8d8f522fbfb0d471a06940005b8", "score": "0.5038844", "text": "private function dtaEgresosGenerales()\n {\n\t $datosGastosInversiones = array();\n\t $datosGastosGenerales = array();\n\t \n\t //obtengo todos los concepto gastos asociados a la solicitud sol_id\n\t $c = new Criteria();\n\t $c->add(ConceptoGastosPeer::COG_SOL_ID, $this->getUser()->getAttribute('solicitud'));\n\t $conceptosGastos = ConceptoGastosPeer::doSelect($c);\n\t \n\t foreach($conceptosGastos as $conceptoGasto)\n\t {\n\t //obtengo los gastos por periodos asociados al concepto\n\t $c = new Criteria();\n\t $c->add(GastosGeneralesPeer::IGG_COG_ID, $conceptoGasto->getCogId());\n\t $gastosPeriodos = GastosGeneralesPeer::doSelect($c);\n\t \n\t //obtengo el tipo del concepto para determinar cual de los dos arreglos poner el nuevo rejistro\n\t $tipoConcepto = $conceptoGasto->getCogTipo();\n\t \n\t $newRejistro[0] = $conceptoGasto->getCogConcepto();//almaceno el nombre del concepto \n\t foreach($gastosPeriodos as $gastoPeriodo)\n\t {\n\t //almaceno el valor en la posicion del arreglo correspondiente al periodo del gasto\n\t $p = $gastoPeriodo->getIggPeriodo();\n\t $v = $gastoPeriodo->getIggCosto();\n\t $newRejistro[$p] = $v;\n\t } \n\t \t \n\t if($tipoConcepto == 'General')\n\t {\n\t array_push($datosGastosGenerales, $newRejistro);\n\t }\n\t else if($tipoConcepto == 'Inversion')\n\t {\n\t array_push($datosGastosInversiones, $newRejistro);\n\t }\n\n\t }\n\n\t //codifico en json los arreglos para enviarlos a la interfaz cliente\n\t $this->gastosInversiones = json_encode($datosGastosInversiones);\n\t $this->gastosGenerales = json_encode($datosGastosGenerales);\n }", "title": "" }, { "docid": "749e3ceeaca0a96d53ccd41f01a6a45e", "score": "0.503217", "text": "function stampajNiz($niz){\n foreach($niz as $elem){\n echo $elem. \" \";\n }\n echo \"<hr>\";\n }", "title": "" }, { "docid": "d302de1ad075b3ee4946cf927d72799b", "score": "0.50232446", "text": "private function _calculate_lines_column(){\n $this->calculate_lines = 1;\n \n if( $this->more == '3d' || $this->more == '3dsum' ){\n $this->padding_right -= 10; \n }\n \n $this->place = $this->width - $this->padding_left - $this->padding_right - 40;\n //start / osa x\n $this->from_x = min( $this->graph_data['x'] );\n $this->to_x = max( $this->graph_data['x'] ) + 1;\n \n //osy se musi krizit\n if( ( $this->from_x ) > 0 )\n $this->from_x = 0;\n else if( ! is_int( $this->from_x ) ){\n $this->from_x = floor( $this->from_x ); \n }\n if( $this->to_x < 0 )\n $this->to_x = 0;\n else if( !is_int( $this->to_x ) ){\n $this->to_x = ceil( $this->to_x ); \n }\n \n $this->section_x = $this->place / ( ( $this->to_x - $this->from_x ));\n //zde se osy krizi\n $this->cross_x = abs( $this->from_x );\n //konec / osa x\n \n $this->place = $this->height - $this->padding_bottom - $this->padding_top;\n //start / osa y\n $this->from_y = min( $this->graph_data['y'] ) - 1;\n $this->to_y = max( $this->graph_data['y'] ) + 1;\n \n //osy se musi krizit\n if( ( $this->from_y ) >= 0 )\n $this->from_y = -1;\n else if( ! is_int( $this->from_y ) ){\n $this->from_y = floor( $this->from_y ); \n }\n if( $this->to_y <= 0 )\n $this->to_y = 1;\n else if( !is_int( $this->to_y ) ){\n $this->to_x = ceil( $this->to_y ); \n }\n \n $this->section_y = $this->place / ( $this->to_y - $this->from_y);\n //zde se osy krizi na ose y\n $this->cross_y = abs( $this->from_y );\n //konec / osa y\n \n //posun jednotlivych os smerem nahoru a doprava po prepocitani souradnic\n $this->move_up = $this->cross_y * $this->section_y;\n $this->move_left = $this->cross_x * $this->section_x + 40;\n }", "title": "" }, { "docid": "351b03a1c16896f0f5d34e51daabe91b", "score": "0.5011626", "text": "function write_style_information($values)\n {\n\n foreach ($values as $country_province => $value)\n {\n echo \" <Style id=\\\"$country_province\\\">\\r\\n\";\n \n echo \" <PolyStyle>\\r\\n\";\n echo \" <color>\";\n echo $this->color_mapper->value_to_color($value);\n echo \"</color>\\r\\n\";\n log3(\"<foo>top: $numerators[$country_province] bot: $denominators[$country_province]\");\n log3(\"val: $values[$country_province]</foo>\\n\");\n echo \" </PolyStyle>\\r\\n\";\n echo \" </Style>\\r\\n\";\n }\n }", "title": "" }, { "docid": "c26adf99a2302400a4c3c0739b56f3c7", "score": "0.50113285", "text": "function chart1(){\n\t\t$yearnow = $this->yearnow;\t\t\n\t\t$m='';\n\t\t$slitting = '';\n\t\t$produksi='';\n\t\t$rata='';\n\t\t/*\n\t\t * melakukan perulangan tahun dan bulan dalam 1 tahun\n\t\t */\n\t\tfor($i=1; $i <= 12; $i++){\n\t\t\t$yearmonth = $yearnow.'-'.date(\"m\",strtotime($yearnow.\"-\".$i));\t\t\n\t\t\t$yearmonth_[] = $yearmonth;\n\t\t\t//mendapatkan bulan text dengan index value adalah tahun dan bulan\n\t\t\t$month[$yearmonth] = date(\"F Y\",strtotime($yearnow.\"-\".$i.\"-01\"));\n\t\t}\t\t\n\t\t\n\t\t$periode = 'ym';//tahun bulan\n\t\t//mendapatkan data multiple array perbandingan presentase produksi dan slitting\n\t\t$sum = $this->m_master->get_sum_prod_slit($yearmonth_,$periode);\t\n\t\t\t\n\t\tforeach ($sum['slitting'] as $slit)\n\t\t\t$slitting .= $slit.',';\t//menampilkan jumlah presentase slitting dan dibuat string\n\t\t\t\t\n\t\tforeach ($sum['produksi'] as $prod)\n\t\t\t$produksi .= $prod.','; //menampilkan jumlah presentase produksi dan dibuat string\n\t\t\n\t\tforeach ($sum['rata'] as $rat)\n\t\t\t$rata .= $rat.','; //menampilkan jumlah presentase rata2 dan dibuat string\n\t\t\n\t\tforeach ($sum['yearmonth'] as $y){\n\t\t\t$m .= \"'\".$month[$y].\"',\"; //menampilkan bulan yang sudah diindex dari database produksi dan dibuat string\n\t\t}\n\t\t\n\t\t$periode = 'y';//tahun\n\t\t$total = $this->m_master->get_sum_prod_slit($yearmonth_,$periode);\n\t\t$total_produksi = number_format($total['produksi'][0],2,'.',',');\n\t\t$total_slitting = number_format($total['slitting'][0],2,'.',',');\n\t\t\n\t\t$data['month'] = substr($m,0,-1);//menghilangkan karater paling akhir\t\t\n\t\t$data['produksi'] = substr($produksi,0,-1);\n\t\t$data['slitting'] = substr($slitting,0,-1);\n\t\t$data['total_produksi'] = $total_produksi;\n\t\t$data['total_slitting'] = $total_slitting;\n\t\t$data['rata'] = substr($rata,0,-1);\n\t\t$data['title'] = 'Grafik Produksi Vs Slitting '.$yearnow;\n\t\treturn $this->load->view('dashboard/v_chart1',$data,true);\t\t\n\t}", "title": "" }, { "docid": "bdd03a832931edbf95e41ef2ecc7acaf", "score": "0.5005394", "text": "function metromaptext( $json, $size = '11,8') {\n\t$L = ttl( $json, '.'); lpop( $L); lpush( $L, 'dot'); $out = ltt( $L, '.'); \n\tmetromapwrite( jsonload( $json), $out); $in = $out;\n\t$L = ttl( $in, '/', '', false); $in = lpop( $L); $root = ltt( $L, '/'); \n\t$L = ttl( $in, '.'); lpop( $L); $out = ltt( $L, '.') . '.info';\n\t$path = '/APPS/graphviz/bin';\n\t//$CWD = getcwd(); chdir( $root);\n\t$c = \"$path/bin/neato -Gsize=$size -Tdot $in -o temp.info\"; procpipe( $c);\n\tif ( ! is_file( $out)) die( \"ERROR! graphviztext() failed to run c[$c]\\n\");\n\t//chdir( $CWD);\n\treturn \"$root/$out\";\n}", "title": "" }, { "docid": "0891ac0e720f2f183637163b92071a88", "score": "0.500265", "text": "function write_about_denominator_data()\n {\n\n \n if(\"A\" == $request->denominator)\n {\n if($this->is_provinces)\n {\n write_about_province_area_data();\n } else\n {\n write_about_country_area_data();\n }\n }\n if(\"P\" == $request->denominator)\n {\n\n if($this->is_provinces)\n {\n write_about_province_population_data();\n } else\n {\n write_about_country_population_data();\n }\n }\n\n echo \" ]]></description>\\n\";\n echo \"<styleUrl>#pinStyle</styleUrl>\\n\";\n echo \"<Point>\\n\";\n echo \" <coordinates>-133.000,25.000</coordinates>\\n\";\n echo \"</Point>\\n\";\n echo \"</Placemark>\\n\\n\";\n }", "title": "" }, { "docid": "2f04fc605c81b6b5694992d06c059fbc", "score": "0.4997985", "text": "public function generateSpielerString(){\n\n $str = \"\";\n\n $x = 0;\n foreach ($this->ownSpieler as $spieler) {\n\n $str.= $spieler->vorname .\" \".$spieler->nachname;\n\n if(count($this->ownSpieler) != ++$x){\n $str.=\" / \";\n }\n }\n\n $this->spieler = $str;\n R::store($this);\n }", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "06e434a25256d2880f15c79bc7a67416", "score": "0.0", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->middleware('auth');\n }", "title": "" } ]
[ { "docid": "ea40e59e4f2b1da24be65a9e57cbc305", "score": "0.7549227", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $controller = str_replace(\"Service\", \"\", $controller);\n\n $this->call('gemboot:make-controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $this->argument('model'),\n '--service' => \"{$controller}Service\",\n '--resource' => $this->option('resource'),\n ]));\n }", "title": "" }, { "docid": "05d7dac0338894a66366c880843dabac", "score": "0.74036777", "text": "protected function createController()\n {\n $name = $this->argument('name');\n $this->callSilent('make:bundle:controller', [\n 'name' => $this->getBundleName($name),\n '--namespace' => $this->relativeNamespace,\n ]);\n }", "title": "" }, { "docid": "989264a7f4ea60c3f03d20f996144e2b", "score": "0.7353646", "text": "public function controller()\n {\n return new $this->controllerClass(\n ...$this->controllerClassDependencies\n );\n }", "title": "" }, { "docid": "c4806bb55e4bb7f5b3f8e6bbf3ade77a", "score": "0.7257598", "text": "public function createController() {\n\n //If controller class does exist (11)\n if (class_exists($this->controller)) {\n\n //Array ( [Controller] => Controller ) 1\n $parents = class_parents($this->controller);\n\n //Check if the $this->controller has descendances\n //So, basically if it has base Controller\n if (in_array(\"Controller\", $parents)) {\n\n $_SESSION['profile_path'] = $this->action;\n //If in Existing Controller $this->action method exists.\n if (method_exists($this->controller, $this->action)) {\n\n\n if ($_SESSION['profile_path'] != 'Index') {\n $_SESSION['profile_path'] = \"../\";\n } else {\n $_SESSION['profile_path'] = '';\n }\n\n //return new Controller($this->action, $this->request);\n return new $this->controller($this->action, $this->request);\n } else {\n // Method Does Not Exist\n echo '<h1>Method does not exist</h1>';\n return;\n }\n } else {\n // Base Controller Does Not Exist\n echo '<h1>Base controller not found</h1>';\n return;\n }\n } else {\n // Controller Class Does Not Exist\n echo '<h1>Controller class does not exist</h1>';\n return;\n }\n }", "title": "" }, { "docid": "b47907b8390724cae6a3885294cb5ea6", "score": "0.71835274", "text": "protected function &createAppController() {\n return new AppController();\n }", "title": "" }, { "docid": "6f7fc6399f0792a24216ee2389197f2f", "score": "0.7172925", "text": "protected function makeController()\n {\n if ($this->option('controller')) {\n $this->controllerName = $this->entity.'Controller.php';\n\n $controllerPath = app_path('Http/Controllers');\n $backendPath = $controllerPath.'/'.config('entity.namespace.backend');\n $frontendPath = $controllerPath.'/'.config('entity.namespace.frontend');\n\n $fileExistsMessage = 'Controller already exists:';\n\n switch (strtolower($this->namespace)) {\n case 'both':\n /** Backend's Controller */\n if ($this->files->exists(\n $path = $backendPath.'/'.$this->controllerName\n )) {\n $this->input->setOption('controller', false);\n\n $this->line($fileExistsMessage.' '.config('entity.namespace.backend').'/'.$this->controllerName);\n } else {\n $this->compileControllerStub($path, config('entity.namespace.backend'));\n\n $this->addToTable('Controller', config('entity.namespace.backend').'/'.$this->controllerName);\n }\n\n /** Frontend's Controller */\n if ($this->files->exists(\n $path = $frontendPath.'/'.$this->controllerName\n )) {\n $this->input->setOption('controller', false);\n\n $this->line($fileExistsMessage.' '.config('entity.namespace.frontend').'/'.$this->controllerName);\n } else {\n $this->compileControllerStub($path, config('entity.namespace.frontend'));\n\n $this->addToTable('Controller', config('entity.namespace.frontend').'/'.$this->controllerName);\n }\n\n break;\n\n case 'none':\n if ($this->files->exists(\n $path = $controllerPath.'/'.$this->controllerName\n )) {\n $this->input->setOption('controller', false);\n\n $this->line($fileExistsMessage.' '.$this->controllerName);\n } else {\n $this->compileControllerStub($path);\n\n $this->addToTable('Controller', $this->controllerName);\n }\n\n break;\n\n default:\n if ($this->files->exists(\n $path = $controllerPath.'/'.$this->namespace.'/'.$this->controllerName\n )) {\n $this->input->setOption('controller', false);\n\n $this->line($fileExistsMessage.' '.$this->namespace.'/'.$this->controllerName);\n } else {\n $this->compileControllerStub($path, $this->namespace);\n\n $this->addToTable('Controller', $this->namespace.'/'.$this->controllerName);\n }\n\n break;\n }\n\n if ($this->option('controller')) {\n $this->info($this->data['artefact'].' created.');\n }\n }\n }", "title": "" }, { "docid": "5cb03a328abf86ce5d06b937c42c2a96", "score": "0.7004667", "text": "public static function newController($controller_name)\n {\n $session = new UserSession();\n $twig = new Twig($session);\n $entityManager = new Doctrine();\n $flash = new FlashMessage();\n $mail = new Mail();\n $token = new CrsfToken();\n\n switch (strtolower($controller_name)) {\n case 'article':\n $controller = new ArticleController($twig, $entityManager, $flash, $token);\n break;\n case 'utilisateur':\n $controller = new UtilisateurController($twig, $entityManager, $flash, $token);\n break;\n case 'commentaire':\n $controller = new CommentaireController($twig, $entityManager, $flash, $token);\n break;\n case 'contact':\n $controller = new ContactController($mail);\n break;\n case 'home':\n $controller = new HomeController($twig, $entityManager, $flash, $token);\n break;\n default:\n throw new \\Exception('Unkown controller');\n }\n\n return $controller;\n }", "title": "" }, { "docid": "7c8d3eb8a7a58b6b149e0579201904c9", "score": "0.6989004", "text": "private function createController($controllerName)\n {\n $controller = $this->controllerBasePath . $controllerName;\n return new $controller();\n }", "title": "" }, { "docid": "aac9e9101d0408f03b6181bb795bb16b", "score": "0.6967265", "text": "protected function &createController($controllerName)\n {\n // require_once $this->config->getControllerModule($controllerName);\n $controllerClassName = $this->config->getControllerClassName($controllerName);\n $prefix = $this->app->isCms() ? '\\\\Cms\\\\' : '\\\\App\\\\';\n // $controllerClassName = '\\\\App\\\\Controllers\\\\'.$controllerClassName;\n $controllerClassName = $prefix . 'Controllers\\\\' . $controllerClassName;\n // return new $controllerClassName($this->app);\n // echo $controllerClassName; exit;\n return Registry::getObject($controllerClassName);\n }", "title": "" }, { "docid": "f2f9da29474f03211e77f0027c2ca47a", "score": "0.6556245", "text": "public function createController(RequestInterface $request)\n {\n $this->validateRequest($request);\n\n return new $this->controllerClass;\n }", "title": "" }, { "docid": "fbf5b52448f6e513cf421b705068d011", "score": "0.65289193", "text": "public function createController($moduleDir, $moduleName);", "title": "" }, { "docid": "4aae2030bf81d14520235590049fdf3f", "score": "0.64967984", "text": "public static function factory($context, $args=array())\r\n\t{\r\n\t\tif (!self::exists($context['site'], $context['controller'])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$controller_name = 'controllers\\\\'.$context['site'].'\\\\'.$context['controller'];\r\n\r\n\t\treturn new $controller_name($args, $context);\r\n\t}", "title": "" }, { "docid": "d49617cdf7cd2842f14c05e79955edb1", "score": "0.64913213", "text": "public static function create($controllerName = NULL, $variables = NULL) {\r\n\t\treturn new self($controllerName, $variables);\r\n\t}", "title": "" }, { "docid": "232e8d68ec64c182196a45cd5bc4a8cc", "score": "0.6443307", "text": "private function createController($className)\n {\n $file = 'src/Controller/' . $className . 'Controller.php';\n\n if (file_exists($file)) {\n return false;\n }\n\n sh::touch($file);\n\n sh::echo('\"<?php\n\nnamespace App\\Controller;\n\nuse Psr\\Container\\ContainerInterface;\n\nclass ' . $className . 'Controller\n{\n protected \\$container;\n\n public function __construct(ContainerInterface \\$container)\n {\n \\$this->container = \\$container;\n }\n\n public function __invoke(\\$request, \\$response, \\$args)\n {\n // 取得 di-container 裡的 view\n \\$view = \\$this->container->get(\\'view\\');\n\n // render template\n return \\$view->render(\\$response, \\'frontend/HelloWorld.html.twig\\', [\n \\'a_variable\\' => \\'test\\'\n ]);\n }\n}\n \" >> ' . $file);\n\n return true;\n }", "title": "" }, { "docid": "4b1ec2f2e77066261a27cba01df92a5f", "score": "0.64411014", "text": "public function loadController()\n {\n\n return \\core\\controllers\\controllerFactory::getInstance($this->request->controller);\n //return $controller;\n }", "title": "" }, { "docid": "d992eb834a82ea04b83f8d3a06f5d9b8", "score": "0.6440343", "text": "public function controller($name) {\n\t\treturn new BuilderController($this, \"/controllers/\" . $name);\n\n\t}", "title": "" }, { "docid": "981f2deeb1a25bac737a4a808e0a0281", "score": "0.64348906", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n // Call the worker method\n $results = CheckRequestStatusService::checkRequestStatus($this->clientService);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Check request status\",\n \"Admin API data response output:\",\n \"Results from UserExport:getUserListExport method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "78124cc937e397d1d30608171a867c4b", "score": "0.63920224", "text": "function loadController() {\n $name = ucfirst($this->request->controller) . 'Controller';\n $file = ROOT . DS . 'controller' . DS . $name . '.php';\n //var_dump($file);\n require $file;\n return new $name($this->request);\n }", "title": "" }, { "docid": "9710c546ff8eef7376511dcaa8e0fe98", "score": "0.63876194", "text": "function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = $this->worker($this->args);\n\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Get a list of clickwraps\",\n \"Get a list of clickwraps\",\n \"Results from the ClickWraps::getClickwraps method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n\n }", "title": "" }, { "docid": "2bbb0b84516f3d00d84c5b2f6001fbd3", "score": "0.63504004", "text": "protected function getControllerInstance()\n {\n $controller = $this->getController();\n if (!class_exists($controller)) {\n throw new \\RuntimeException('Missing controller class: ' . $controller);\n }\n $controllerInstance = new $controller();\n if (!($controllerInstance instanceof ControllerInterface)) {\n throw new \\RuntimeException(sprintf(\n 'The \"%s\" controller must implement the ControllerInterface interface.',\n $controller\n ));\n }\n\n return $controllerInstance;\n }", "title": "" }, { "docid": "47ff92b3c75a0288bfe3bf6d1bb5f188", "score": "0.634787", "text": "public static function getController(array $params): Controller\n {\n if (!include_once APP_PATH.\"controllers/{$params['controller_path']}_controller.php\") {\n // Extrae las variables para manipularlas facilmente\n extract($params, EXTR_OVERWRITE);\n throw new KumbiaException('', 'no_controller');\n }\n //Asigna el controlador activo\n $controller = Util::camelcase($params['controller']).'Controller';\n return new $controller($params);\n }", "title": "" }, { "docid": "3d96ece528e6ceb68886a42d9d5d12b1", "score": "0.63404584", "text": "public function testControllerExist()\n {\n $this->controller = new UserController;\n }", "title": "" }, { "docid": "55042cee0f6ab29234b2996de517a6c6", "score": "0.6313802", "text": "private function getController(): RecastController\n {\n return new RecastController(\n $this->http_prophecy->reveal(),\n $this->logger_prophecy->reveal(),\n $this->drupal_base_url,\n $this->fedora_base_url,\n $this->namespaces\n );\n }", "title": "" }, { "docid": "e9a84bdf7e7d540e773773febd12ed83", "score": "0.63062215", "text": "public function loadController() {\n\t\tif (isset($this->Controller)) {\n\t\t\treturn $this->Controller;\n\t\t}\n\n\t\tif (!class_exists('Controller')) {\n\t\t\tApp::import('Controller', 'Controller', false);\n\t\t}\n\n\t\t$request = new CakeRequest;\n\t\t$this->Controller = new Controller($request);\n\t\t$this->Controller->uses = null;\n\n\t\t$this->Controller->constructClasses();\n\t\t$this->Controller->startupProcess();\n\n\t\treturn $this->Controller;\n\t}", "title": "" }, { "docid": "7549c3aa5de8c608d233608a05e0d2ff", "score": "0.6303757", "text": "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "title": "" }, { "docid": "0d1df5abf616046979a15a0038b7f63c", "score": "0.62977755", "text": "function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = CreateRoomsWithDataService::worker($this->args, $this->clientService);\n\n if ($results) {\n $room_name = $results['name'];\n $room_id = $results['room_id'];\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Creating a room with data\",\n \"Creating a room with data\",\n \"Room $room_name has been created!<BR>Room ID: $room_id\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n\n }", "title": "" }, { "docid": "4d95572e6e7479ffd2b92ee2f50fdbaa", "score": "0.62705475", "text": "public function MyController()\n {\n if ($controller_name = Config::inst()->get(static::class, 'controller_name')) {\n $controller = $controller_name;\n } else {\n $class = ClassInfo::ShortName($this->getClassName());\n $controller = sprintf('%sController', $class);\n }\n if (class_exists($controller)) {\n return new $controller();\n }\n return false;\n }", "title": "" }, { "docid": "0f3a972eb0c0fb0edf6d406482cd9bb6", "score": "0.6249157", "text": "private function createController($controllerName, Request $request)\n {\n if (!class_exists($controllerName)) {\n throw new RouteException(\"Controller class $controllerName does not exist\");\n }\n\n // Just in case the request hasn't already been bound, bind it\n // This allows us to use it when resolving the controller class\n if (!is_object($this->container->getBinding(Request::class))) {\n $this->container->bind(Request::class, $request);\n }\n\n $controller = $this->container->makeShared($controllerName);\n\n if ($controller instanceof Controller) {\n $controller->setRequest($request);\n\n if ($this->container->isBound(IViewFactory::class)) {\n $controller->setViewFactory($this->container->makeShared(IViewFactory::class));\n }\n\n if ($this->container->isBound(ICompiler::class)) {\n $controller->setViewCompiler($this->container->makeShared(ICompiler::class));\n }\n }\n\n return $controller;\n }", "title": "" }, { "docid": "dcb752bba6209e6bc11f65134500cf6d", "score": "0.6243108", "text": "public static function createControllerObject($url) {\r\n if(file_exists(ROOT . DS . 'app' . DS . 'controllers' . DS . $url['controller'] . '.php')){\r\n require_once ROOT . DS . 'app' . DS . 'controllers' . DS . $url['controller'] . '.php';\r\n }\r\n $conrollerObject = new $url['controller']();\r\n baseController::callAction($conrollerObject,$url); \r\n }", "title": "" }, { "docid": "9674bf58e11602d6fcb98e5b65705c47", "score": "0.6241156", "text": "public static function controller()\n {\n\n // Get current database tables\n $db_tables = self::currentTables();\n // Remove migrations table\n if (($key = array_search('migrations', $db_tables)) !== false) {\n unset($db_tables[$key]);\n }\n\n // Get current controlled table names\n $models = scandir(dirname(dirname(__DIR__)) . '/app/models');\n $controlled_tables = [];\n foreach ($models as $key => $value) {\n $value = substr($value, 0, strpos($value, 'Model.php'));\n array_push($controlled_tables, lcfirst($value));\n }\n\n $available_tables = array_diff($db_tables, $controlled_tables);\n\n // Implode the tables array into one string with separated commas\n $available_tables_implode = implode(', ', array_filter($available_tables));\n\n // Pick table to create controller/model for\n do {\n Scripts::echo(\"Specify the targeted table: (available tables: \" . $available_tables_implode . \"):\");\n $table = fgets(STDIN);\n } while (!in_array(trim($table), $db_tables));\n\n $table = trim($table);\n $tableUpper = ucfirst($table);\n\n // Ask for id incrementation\n do {\n Scripts::echo(\"Is your id auto incremented? [ yes, no ] \");\n $increment = fgets(STDIN);\n } while (trim($increment) !== 'yes' && trim($increment) !== 'no');\n\n // If no auto increment on id\n if (trim($increment) === 'no') {\n $id = 'Middleware::generateId()';\n } else if (trim($increment) === 'yes') {\n $id = \"''\";\n }\n\n // Connect to the database\n $db = new Dbh();\n $db_conn = $db->connect();\n\n // Get columns from table\n $sql = \"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='$_ENV[DB_NAME]' AND TABLE_NAME='$table'\";\n\n $stmt = $db_conn->prepare($sql);\n $stmt->execute();\n $table_cols = $stmt->fetchAll(PDO::FETCH_COLUMN);\n\n $columns = implode(', ', $table_cols);\n\n $create_cols = [];\n $update_cols = [];\n\n // Remove id and date columns\n foreach ($table_cols as $key => $value) {\n if (strpos($value, '_updated_at') !== false || strpos($value, '_created_at') !== false || strpos($value, $table . '_id') !== false) {\n unset($table_cols[$key]);\n }\n }\n\n $c_validate_create_params = '';\n $c_validate_update_params = '';\n $c_setters = '';\n\n // Generate parameters validation and setters for controller\n foreach ($table_cols as $key => $value) {\n $c_setters .= PHP_EOL . \"\\t\\t\" . '$model->set' . ucwords($value) . '($' . $value . ')' . \";\";\n $value = '$' . $value . ' = $this->validateParams(\"' . $value . '\", $this->param[\"' . $value . '\"], STRING)';\n array_push($create_cols, $value);\n array_push($update_cols, $value);\n }\n foreach ($create_cols as $param) {\n if ($param !== $table . '_id') $c_validate_create_params .= PHP_EOL . \"\\t\\t\" . $param . \";\";\n }\n foreach ($update_cols as $param) {\n $c_validate_update_params .= PHP_EOL . \"\\t\\t\" . $param . \";\";\n }\n\n $m_params = '';\n $m_setget = '';\n $table_cols_values = [];\n $bind_insert = '';\n\n // Generate properties, setters & getters for model, parameter binding for prepare statements\n foreach ($table_cols as $key => $value) {\n $m_params .= PHP_EOL . \"\\tprivate $\" . $value . \";\";\n $m_setget .= PHP_EOL . \"\\tfunction set\" . ucwords($value) . '($' . $value . ') { $this->' . $value . ' = $' . $value . '; }' . PHP_EOL . \"\\tfunction get\" . ucwords($value) . '() { return $this->' . $value . '; }';\n array_push($table_cols_values, ':' . $value);\n $bind_insert .= PHP_EOL . \"\\t\\t$\" . \"stmt->bindParam(':\" . $value . \"', $\" . \"this->\" . $value . \");\";\n }\n\n if (count($table_cols) > 0) {\n $columns_insert = ', ' . implode(', ', $table_cols);\n $values_insert = ', ' . implode(', ', $table_cols_values);\n } else {\n $columns_insert = '';\n $values_insert = '';\n }\n\n // Declaring our arrays for placeholders to be replaced depending on user inputs\n $controller_placeholders = [];\n $controller_inputs = [];\n\n $model_placeholders = [];\n $model_inputs = [];\n\n // Generate class name based on the table name\n $controller_class = $tableUpper . 'ApiController';\n $model_class = $tableUpper . 'Model';\n\n // Generate filename from classname by adding '.php' extension\n $controller_name = $controller_class . \".php\";\n $model_name = $model_class . \".php\";\n\n // Create the migration file based on a template and Get the created file\n $controller_file = self::createFile(\"controller__template--create.txt\", $controller_name, 'controllers');\n $model_file = self::createFile(\"model__template--create.txt\", $model_name, 'models');\n\n // Populate the arrays of placeholders and data depending on user inputs\n array_push($controller_placeholders, '{{ controller }}', '{{ model }}', '{{ tableUpper }}', '{{ table }}', '{{ id }}', '{{ c_validate_create_params }}', '{{ c_validate_update_params }}', '{{ c_setters }}');\n array_push($controller_inputs, $controller_class, $model_class, $tableUpper, $table, $id, $c_validate_create_params, $c_validate_update_params, $c_setters);\n array_push($model_placeholders, '{{ model }}', '{{ tableUpper }}', '{{ table }}', '{{ m_params }}', '{{ m_setget }}', '{{ columns }}', '{{ columns_insert }}', '{{ values_insert }}', '{{ bind_insert }}');\n array_push($model_inputs, $model_class, $tableUpper, $table, $m_params, $m_setget, $columns, $columns_insert, $values_insert, $bind_insert);\n\n // Replace the placeholders by their data counterparts\n $controller_replaced = str_replace($controller_placeholders, $controller_inputs, $controller_file);\n $model_replaced = str_replace($model_placeholders, $model_inputs, $model_file);\n\n // Place the new content in the file\n file_put_contents(dirname(__DIR__) . '/controllers/' . $controller_name, $controller_replaced);\n file_put_contents(dirname(__DIR__) . '/models/' . $model_name, $model_replaced);\n }", "title": "" }, { "docid": "6513c298f131e4de9fa958b04eb173a0", "score": "0.6237097", "text": "private function createControllers(): void\n {\n $sourceFolder = dirname(__DIR__, 2).DIRECTORY_SEPARATOR.\n \"files\".DIRECTORY_SEPARATOR.\n \"controllers\".DIRECTORY_SEPARATOR.\n ($this->features->isREST ? \"rest\" : \"no_rest\");\n $destinationFolder = $this->rootFolder.DIRECTORY_SEPARATOR.\n \"src\".DIRECTORY_SEPARATOR.\n \"Controllers\";\n\n copy(\n $sourceFolder.DIRECTORY_SEPARATOR.\"Index.php\",\n $destinationFolder.DIRECTORY_SEPARATOR.\"Index.php\"\n );\n if ($this->features->security) {\n copy(\n $sourceFolder.DIRECTORY_SEPARATOR.\"Login.php\",\n $destinationFolder.DIRECTORY_SEPARATOR.\"Login.php\"\n );\n if ($this->features->security->isCMS) {\n copy(\n $sourceFolder.DIRECTORY_SEPARATOR.\"Restricted.php\",\n $destinationFolder.DIRECTORY_SEPARATOR.\"Restricted.php\"\n );\n } else {\n copy(\n $sourceFolder.DIRECTORY_SEPARATOR.\"Members.php\",\n $destinationFolder.DIRECTORY_SEPARATOR.\"Members.php\"\n );\n }\n }\n }", "title": "" }, { "docid": "ca8272cf9b9cb17eb4ddf343dbf8a083", "score": "0.6224789", "text": "public static function create($actionController = null)\n {\n return new self($actionController);\n }", "title": "" }, { "docid": "4c1ef8f11155c0b4b7b9e5516c170489", "score": "0.6217092", "text": "public function getController() {\n $page = $this->getPage();\n switch ($page) {\n case \"about\":\n return new AboutController();\n \n case \"home\":\n default:\n return new HomeController();\n \n }\n \n \n }", "title": "" }, { "docid": "b20b623e1d42f9df15e666e4d6174913", "score": "0.6210313", "text": "public function createControllerByID($id)\n {\n $className = \"\\\\app\\\\controllers\\\\\" . ucfirst($id).'Controller';\n if (is_subclass_of($className, 'base\\Controller')) {\n $controller = new $className;\n return $controller;\n } elseif (APPMODE_DEBUG) {\n throw new \\ErrorException(\"Controller class must extend from \\\\base\\\\Controller.\");\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1abd88b56c1b70fab6e66069caa963e1", "score": "0.62062794", "text": "function controller($path, $name, $action = null)\n{\n $class_array = explode('/', strtolower($name));\n $class_name = 'SlimMVC\\\\Controller\\\\' . join('\\\\', array_map('ucfirst', $class_array));\n if (!class_exists($class_name))\n {\n throw new Exception(sprintf('Controller class \"%s\" not exists', $class_name));\n }\n new $class_name($path, $name, \\Slim\\Slim::getInstance());\n}", "title": "" }, { "docid": "a60447180f793aa7437254bec8a14bbd", "score": "0.6186573", "text": "public function getController(){}", "title": "" }, { "docid": "456a070544c643b26bde3be278b27242", "score": "0.6155394", "text": "private function getController()\n {\n return $this->buildMockedController(FileActionsController::class, [$this->repository]);\n }", "title": "" }, { "docid": "f76d668ffa618bf4bb5edd515b63c14a", "score": "0.6151855", "text": "protected function _initializeController($name)\n\t{\n\t\t$controller = 'Msqueeg\\\\Controllers\\\\' . ucfirst($name) . 'Controller';\n\t\treturn new $controller();\n\t}", "title": "" }, { "docid": "e0676bad370eda967a477bf9b882f14c", "score": "0.61496484", "text": "public function __construct()\n {\n $url = $this->parseUrl();\n // check if the controller exists\n\n if(file_exists('../App/Controller/' . $url[0] . '.php' ))\n {\n // sets new controller\n $this->controller = $url[0];\n unset($url[0]);\n }\n // Require in the controller\n require_once('../App/Controller/' . $this->controller . '.php');\n\n $this->controller = new $this->controller;\n\n //check if method in the controller exists or index if default\n if(isset($url[1]))\n {\n if(method_exists($this->controller, $url[1]))\n {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n // adds parameters to value if it is not empty\n $this->parameters = $url ? array_values($url) : [];\n\n // call method in a the controller\n call_user_func_array([$this->controller, $this->method], $this->parameters);\n }", "title": "" }, { "docid": "c3fa66be3abcc4e72600fc909494c54b", "score": "0.6144525", "text": "public function testCreateTheControllerClass()\n {\n $dice = new DiceController();\n $this->assertInstanceOf(\"\\Edvin\\Controller\\DiceController\", $dice);\n }", "title": "" }, { "docid": "4ad7cf5d20baaed3680361cee31c36d2", "score": "0.6114611", "text": "private function addController(){\n $controller = $this->getCurrentRoute();\n $class = \"App\\\\Controller\\\\{$controller}\";\n $this->obj = new $class;\n\n if(isset(Helpers::parseURL()[1])){\n $this->addMethod();\n } else {\n $this->obj->render();\n }\n }", "title": "" }, { "docid": "6c0d6495eeffa6162e4b8f85af30246b", "score": "0.610868", "text": "public function __construct()\n\t{\n\t\t$this->reflection = new ReflectionController($this);\n\t}", "title": "" }, { "docid": "9319ce2a6fb0583e693276ea4dacd143", "score": "0.60891604", "text": "protected function _getController()\n {\n if (!$request = Router::getRequest(true)) {\n $request = Request::createFromGlobals();\n }\n $response = new Response();\n\n $errorController = Configure::read('Cors.ErrorController');\n\n try {\n $controller = new $errorController($request, $response);\n $controller->startupProcess();\n $startup = true;\n } catch (Exception $e) {\n $startup = false;\n }\n\n // Retry RequestHandler, as another aspect of startupProcess()\n // could have failed. Ignore any exceptions out of startup, as\n // there could be userland input data parsers.\n if ($startup === false && !empty($controller) && isset($controller->RequestHandler)) {\n try {\n $event = new Event('Controller.startup', $controller);\n $controller->RequestHandler->startup($event);\n } catch (Exception $e) {\n }\n }\n if (empty($controller)) {\n $controller = new Controller($request, $response);\n }\n\n return $controller;\n }", "title": "" }, { "docid": "0568df8f05e745774597b888b65f34a9", "score": "0.6074414", "text": "public function getController()\n {\n $router = new Router();\n\n $xml = new \\DOMDocument();\n $xml->load(__DIR__ . '/../Config/routes.xml');\n\n $routes = $xml->getElementsByTagName('route');\n\n foreach ($routes as $route) {\n $vars = [];\n if ($route->hasAttribute('vars')) {\n $vars = explode(',', $route->getAttribute('vars'));\n }\n\n $router->addRoute(new Route($route->getAttribute('url'), $route->getAttribute('module'), $route->getAttribute('action'), $route->getAttribute('layout'), $vars));\n }\n\n try {\n $matchedRoute = $router->getRoute($this->httpRequest->getRequestURI());\n } catch (\\RuntimeException $e) {\n if ($e->getCode() == Router::NO_ROUTE) {\n $this->httpResponse->redirect404();\n }\n }\n\n $_GET = array_merge($_GET, $matchedRoute->getVars());\n\n $controllerClass = 'Controller\\\\'.$matchedRoute->getModule().'Controller';\n return new $controllerClass($this, $matchedRoute->getModule(), $matchedRoute->getAction(), $matchedRoute->getLayout());\n }", "title": "" }, { "docid": "0ebd94072f3eb00293107b1a8e20af05", "score": "0.60710955", "text": "function __construct($controller, $name) {\n\t\t\n\n\t}", "title": "" }, { "docid": "d37d9900044b83d97eef59743264840a", "score": "0.6069854", "text": "public static function Controller($path, $fname)\n {\n try{\n $ins = file_get_contents(INSTANCES.\"controller.instance\");\n $ins = str_replace(\"@rn\", $fname.\"Controller\", $ins);\n if(!(empty($fname)))\n {\n if (strpos($fname, ':') !== false) {\n $fname = explode(':', $fname);\n \n file_put_contents($path.$fname[0].'Area'.DIRECTORY_SEPARATOR. $fname[1].\"Controller.php\", $ins);\n echo \"\\n [+] Your new controller called {$fname[1]}Controller.php created in controllers and {$fname[0]}Area path\\n\\n\";\n }else{\n file_put_contents($path. $fname.\"Controller.php\", $ins);\n echo \"\\n [+] Your new controller called {$fname}Controller.php created in controller path\\n\\n\";\n }\n }\n \n }catch (Exception $e)\n {\n echo \"\\n [!] Error while creating new item in project. Error message: \\n{$e->getMessage()}\";\n }\n }", "title": "" }, { "docid": "b85698ecb3c38f875fb6fd9b1956180a", "score": "0.60683733", "text": "static function createPhpne()\r\n {\r\n return new HuaweiController();\r\n }", "title": "" }, { "docid": "f7e93eadebd24194d81e5f725703e4dc", "score": "0.60622543", "text": "private static function initiateController(string $controller,string $action){\n global $controllerObj;\n //Checking if resource for the requested URI exist or not\n if(!self::isResourceAvailable($controller, $action)){\n $exception = new MyEasyException(\"Sorry, the page you are looking for is not found on this server.\");\n $exception->setDetails(\"Please check whether the requested url is registered in route configuration file Config/route.php.\");\n $exception->httpCode = HttpStatus::HTTP_NOT_FOUND;\n $exception->setErrorFile('');\n throw $exception;\n } \n //*** creating Controller Object ***/\n $controller_class = CONTROLLER_NAMESPACE.$controller; \n $controllerObj = new $controller_class();//instantiate a new controller object\n $controllerObj->setRequest(self::$request);\n $controllerObj->setParams(self::$routeParams);//setting parameters\n \n //If the controller is not an api controller then check if the user is authorized\n if($controllerObj instanceof Controller){\n startSecureSession();\n //check if method (action) to be invoked is authorised for the user\n if(!Authorization::isAuthorized($controllerObj,$action)){\n $msg = \"Unauthorize access. You are not allowed to access the page. <a href='\".Config::get('host').\"/Accounts/login'>Login</a> with \"\n . \"an authorized account. \";\n $exc = new MyEasyException($msg); \n $exc->httpCode = HttpStatus::HTTP_FORBIDDEN;\n $exc->setErrorFile('');\n $exc->setErrorLine(-1);\n throw $exc;\n }\n } \n }", "title": "" }, { "docid": "e6d3b35d055eb340023c9229040464f7", "score": "0.602309", "text": "function createController($name)\r\n{\r\n\t$filename=__URLCONTROLLER__.$name.\"Controller.php\";\r\n\r\n\tif (file_exists($filename)==FALSE){\r\n\t\t\r\n\t\t/*This is the content of controller*/\r\n\t\t\r\n\t$fileController=\"<?php\r\n\tclass \".$name.\"Controller extends controller\r\n\t{\r\n\t\tpublic function __construct()\r\n\t\t{\r\n\t\t\tparent::__construct();\r\n\t\t}\r\n\t\t\r\n\t\tpublic function index(\".'$arg=false)\r\n\t\t{\r\n\t\t\t$this->view->render('.\"'/\".$name.\"/index');\r\n\t\t}\r\n\t}\r\n\r\n?>\";\r\n\t/*End content of controller*/\r\n\t\r\n\t//add text into the controller\r\n\tcreateFile($filename, $fileController);\r\n\t\r\n\twriteln(\"Controller has been successfully created\");\r\n\t\r\n\t/*create the view*/\r\n\tcreateView($name);\r\n\t}\r\n\telse \r\n\t\t{\r\n\t\t\twriteln(\"Possible Duplication of $name Controller!\\n Action aborted!\");\r\n\t\t}\r\n}", "title": "" }, { "docid": "fbf9da20af4b9c4391997c543bac5399", "score": "0.5988264", "text": "public function __construct() {\r\n $request = Request::getInstance();\r\n\r\n $request->findRoute();\r\n\r\n $this->controllerName = self::CONTROLLER_PREFIX . ucfirst($request->getController());\r\n $this->actionName = self::ACTION_PREFIX . $request->getAction();\r\n $this->arguments = $request->getRouteExtras();\r\n\r\n try {\r\n $this->controller = new $this->controllerName;\r\n } catch (Exception_ClassNotFound $e) {\r\n self::display404();\r\n }\r\n\r\n if (method_exists($this->controller, $this->actionName)) {\r\n // If the controller and action exist, we run that.\r\n $this->controller->preAction();\r\n self::loadController($this->controller, $this->actionName, $this->arguments);\r\n $this->controller->postAction();\r\n } else if (method_exists($this->controller, self::NO_ACTION)) {\r\n // If the controller exists, but the action doesn't, and we have a noAction, run that\r\n $this->controller->preAction();\r\n self::loadController($this->controller, self::NO_ACTION, $this->arguments);\r\n $this->controller->postAction();\r\n } else {\r\n // Oh no, I can't find anything! Just run the 404 stuff!\r\n self::display404();\r\n }\r\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "4be37d578a4daaf7ced4cc52c4309908", "score": "0.5974697", "text": "private function getInstance($controller, $constructerData)\n {\n $reflection = new ReflectionClass($controller);\n return $reflection->newInstanceArgs($constructerData);\n }", "title": "" }, { "docid": "d88903d7f2c3c3f215f6dcad1d05943d", "score": "0.5954134", "text": "public function laravelMakeModelController(array $params)\n {\n $laravel = new PwLaravel($params);\n if ($params['is_overwrite']) $laravel->removeController($this->value['name']);\n\n $options[] = '--resource';\n $name = Controller::className($this->value['name']);\n $cmd = $laravel->artisanMakeCmd('controller', $name, $options);\n }", "title": "" }, { "docid": "880320187f29fc33b746b56ce607ecf0", "score": "0.5952558", "text": "function &get_instance()\n{\n\treturn Controller::get_instance();\n}", "title": "" }, { "docid": "d00d782010f5d92014d3001132979594", "score": "0.5952397", "text": "public function factoryController(array $request = null, array $server = null,\n $aSeparator = '.',\n $controllerNs = '\\App\\{Module}\\Controller\\\\',\n $baseControllerFallback = '\\App\\Controller')\n {\n $request = $request ?: array_merge($_GET, $_POST, $_REQUEST);\n $request = self::decomposeRequest($request, $aSeparator);\n\n $replaceMap = [\n '{Module}' => ucfirst(strtolower($request['_module'])),\n '{Controller}' => ucfirst(strtolower($request['_controller'])),\n '{Action}' => ucfirst(strtolower($request['_action'])),\n ];\n $controllerNs = str_replace(\n array_keys($replaceMap), array_values($replaceMap), $controllerNs\n );\n $controllerNs = preg_replace('/\\\\\\\\+/', '\\\\', $controllerNs);\n\n // vyskladame nazov classu buduceho controllera\n $controllerClass = $controllerNs . str_replace(' ', '', ucwords(str_replace(\n array(\".\", \"-\", '/'), \" \", ucfirst(strtolower($request['_controller']))\n ))) . \"Controller\";\n\n // novinka: \"_\" v nazve kontrollera mapujeme ako namespace (aby sa dali\n // kontrolere filesystemovo upratat)\n $controllerClass = str_replace(' ', '\\\\', ucwords(\n str_replace(\"_\", \" \", $controllerClass)\n ));\n // prx($controllerClass);\n\n if (!ClassUtil::classExists($controllerClass)) {\n $exception = new PageNotFound(\"Controller '$controllerClass' not found\");\n }\n\n // ak chyba, tak (optimisticky) konvencne defaultny\n if (!empty($exception)) {\n $controllerClass = $baseControllerFallback;\n }\n\n // konvencia\n $dic = $this->init(\"dic\");\n\n // params reference chicken-egg fix\n /** @var Params $params */\n $params = $dic['params'];\n $params->set($request);\n\n // unit testable\n if ($server) {\n $params->_SERVER()->exchangeArray($server);\n }\n\n //\n return new $controllerClass($params, array(\n 'exception' => isset($exception) ? $exception : null,\n 'response' => isset($dic['response']) ? $dic['response'] : null,\n 'dic' => $dic,\n ));\n }", "title": "" }, { "docid": "c25bb047d20889b0ea06793d8f355259", "score": "0.59474415", "text": "abstract public function getController();", "title": "" }, { "docid": "6a7b678a0f93099aacbaa0fb3553feb3", "score": "0.59412265", "text": "function c($name = '') {\n if(empty($name)) {\n $name = DEFCONTROLLER;\n }\n if(strpos($name, '/') === false) {\n $path = $name . '/' . $name;\n } else {\n $path = $name;\n $name = explode('/', $path)[1];\n }\n $return = mf($path . CONTROLLER_EXT);\n if($return) {\n require_once($return);\n $name .= 'Controller';\n $return = new $name();\n }\n return $return;\n}", "title": "" }, { "docid": "4d4e0ac05d19ab91cdb3ea3e658a4759", "score": "0.59317094", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Form();\n $this->assertInstanceOf(\"\\Mos\\Controller\\Form\", $controller);\n }", "title": "" }, { "docid": "941eb1dfa86b8421eb946a3bc3a58d8d", "score": "0.59184027", "text": "public function __construct()\n {\n $this->componentController = new MainController();\n }", "title": "" }, { "docid": "7a4897cc9b0369858f61e05c4a659b1d", "score": "0.5913605", "text": "function uploadController() {\n\tglobal $container, $routeParser;\n\treturn new UploadController( $container, $routeParser );\n}", "title": "" }, { "docid": "9c60fbff64810741d378ec324a56be82", "score": "0.59013796", "text": "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "title": "" }, { "docid": "9c60fbff64810741d378ec324a56be82", "score": "0.59013796", "text": "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "title": "" }, { "docid": "ce8d57d1622a21ca67cffa2184160673", "score": "0.5886395", "text": "private function initController()\n {\n $fullClassName = $this->route->getControllerClass();\n $methodName = $this->route->getControllerMethod();\n\n if (!class_exists($fullClassName)) {\n throw new InvalidRouteException('Controller class does not exist: ' . $fullClassName);\n }\n\n $this->controller = new $fullClassName();\n\n if (!method_exists($this->controller, $methodName)) {\n throw new InvalidRouteException('Controller method does not exist: ' . $methodName);\n }\n }", "title": "" }, { "docid": "f7d9be1849f222e8591d2b9ed57af5f6", "score": "0.58799565", "text": "public function formControllerCreate(Request $request, Response $response, $args)\n {\n $ms = $this->ci->alerts;\n\n /** @var \\UserFrosting\\Support\\Repository\\Repository $config */\n $config = $this->ci->config;\n\n // Get the current user\n $currentUser = $this->ci->currentUser;\n\n // Get the authorizer\n $authorizer = $this->ci->authorizer;\n\n // Check if user has permissions\n if (!$authorizer->checkAccess($currentUser, 'uri_site_admin')) {\n throw new NotFoundException($request, $response);\n }\n\n // Get HTPP GET parameters\n $params = $request->getQueryParams();\n\n /**\n * create an empty dummy controller with some default values if required\n */\n $target_controller = (object) [\n 'shared' => 1,\n 'url' => 'https://your_hostname:8443'\n ];\n\n // Load validation rules\n $schema = new RequestSchema('schema://requests/controller-shared-create.yaml');\n $validator = new JqueryValidationAdapter($schema, $this->ci->translator);\n\n return $this->ci->view->render($response, 'pages/admin/forms/controller-info-modal.html.twig', [\n 'box_id' => $params['box_id'],\n 'box_title' => 'Add New Controller',\n 'modal_mode' => 'new',\n 'submit_button' => 'Add',\n 'form_action' => $config['site.uri.public'] . '/admin/controllers/create',\n 'target_controller' => $target_controller,\n 'validators' => $validator->rules('json', true)\n ]);\n }", "title": "" }, { "docid": "097cce46fe9f20e63336e1deff4dcb90", "score": "0.58657455", "text": "public function create() { }", "title": "" }, { "docid": "a43baa5227072df3ca6bdaab87ed1688", "score": "0.586125", "text": "function runControllerAction($controller_name, $action_name) //this is a function that gets the controller name and action when the function is called\n{ //it takes the controllers from the controller file as per below and returns it when the function is called\n\n\n //include the controller file\n require '../app/controllers/'.$controller_name.'.php';\n\n //create new object of the class Controller and put in a new variable $controller\n $controller = new $controller_name();\n\n //print the return value of calling the method of the created $controller\n echo $controller->$action_name();\n}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "8ea5920bb47f9296e3df78c9f520566c", "score": "0.5848037", "text": "public function create(): void\n {\n if (!is_dir(DIR_MODULES . '/' . $this->module)) {\n throw new \\RuntimeException('Error while creating ' . $this->getFilename() . ' : Module doesn\\'t exists.');\n }\n\n if (!is_dir(DIR_MODULES . '/' . $this->module . '/src/Controller')) {\n mkdir(DIR_MODULES . '/' . $this->module . '/src/Controller');\n }\n\n parent::create();\n\n $this->writeRoutes();\n }", "title": "" }, { "docid": "c45cea136b8d6457c6a4ac9ec9d5aad0", "score": "0.58357555", "text": "protected function generateControllerClass()\n {\n $path = sprintf(\n '%s/Controller/%s/%sController.php',\n $this->params['controller']['bundle']['path'],\n $this->params['entity']['namespace_path'],\n $this->params['entity']['name']\n );\n\n $this->generateFile('crud/controllers/controller.php.twig', $path);\n }", "title": "" }, { "docid": "1d3ed6ad3f5671cfcf9de7e3ffaf0711", "score": "0.583421", "text": "public static function controller(string $dir = null)\n {\n if (!isset($dir)) {\n return new Controller;\n }\n\n $class = self::NAMESPACE_CONTROLLER . str_replace('/', '\\\\', $dir);\n\n return class_exists($class) ? new $class : null;\n }", "title": "" }, { "docid": "0cf1a701f7b04845c50115d2d90aa008", "score": "0.58340716", "text": "public function createNodeController($name);", "title": "" }, { "docid": "b159fd0a73b2addee839522c98540fec", "score": "0.5831278", "text": "public function controller( $name = false, $model = false ) {\n\n // se não existir um nome\n if (!$name) return cmdLine( 'Voce deve informar o nome do controller!' );\n\n // paths permitidos\n $paths = [ 'api', 'web' ];\n\n // separa os nomes\n $path = explode( ':', $name )[0];\n\n // verifica se é permitidos\n if ( !in_array( $path, $paths ) ) {\n cmdLine( 'Caminho não permitido!' );\n return;\n }\n\n // seta o nome\n $name = explode( ':', $name )[1];\n\n // seta o nome\n $name = ucfirst( $name );\n\n // verifica se a página já existe\n if ( file_exists( \"application/controllers/$path/$name.php\" ) ) {\n return cmdLine( \"O controller $name já existe!\" );\n }\n\n // seta as variaveis do template\n $t_vars = [ '%_CONTROLLER_NAME_%' ];\n\n // seta as variaveis com valor\n $t_val = [ $name ];\n\n // caminho do template;\n $t_path = \"application/core/templates/default_controller.txt\";\n\n // verifica se é de crud\n if ( $model ) {\n \n // carrega a library de migração\n $this->load->library( 'migration' );\n $schema = $this->migration->_getNewSchema( [ $model ] );\n $schema = isset( $schema[$model] ) ? $schema[$model] : [];\n $schema = $this->__getForm( $schema );\n\n // Seta as regras\n $rules = [];\n foreach( $schema as $item ) {\n $rules[] = [\n 'field' => $item['name'],\n 'label' => $item['label'],\n 'rules' => $item['rules']\n ];\n }\n \n // seta as variaveis\n $t_vars[] = '%_MODEL_FILE_%';\n $t_vars[] = '%_MODEL_CLASS_%';\n $t_vars[] = '%_FORM_RULES_%';\n\n // seta os valores\n $t_val[] = $model;\n $t_val[] = ucfirst( $model );\n $t_val[] = var_export( $rules, true );\n\n // define o novo template\n $t_path = \"application/core/templates/default_crud_controller.txt\";\n }\n\n // pega o conteudo\n $record = file_get_contents( $t_path );\n \n // subistiui os valores\n $record = str_replace( $t_vars, $t_val, $record );\n\n // salva no novo arquivo\n file_force_contents( \"application/controllers/$path/$name.php\", $record );\n\n // imprime a mensagem\n print \"Controller criado com sucesso\".PHP_EOL;\n }", "title": "" }, { "docid": "8004e913d459d0cdc8d0a1b9c6889c62", "score": "0.5823654", "text": "protected function getController () {\n // Load the controllers for this route\n list($name, $type, $action, $args) = $this->mapRequestToControllerParts();\n $controllerFile = CONTROLLER_DIR . \"/{$name}.controller.php\";\n if (!file_exists($controllerFile)) {\n // Check whether there's a simple page template\n $pageController = new Controller\\Page($this->request, $name, $action, $args);\n if ($pageController->exists()) {\n return $pageController;\n }\n \n throw new HttpStatus\\NotFound();\n }\n require_once($controllerFile);\n \n // Choose a controller class to deal with this request\n $controllerRoot = \"App\\\\Controller\\\\{$name}\";\n $controllerClass = $controllerRoot . $type;\n $sharedClass = \"{$controllerRoot}Shared\";\n \n if (!$this->doesControllerActionExist($controllerClass, $action)) {\n \n // There's no valid action for this request. Check if the URL is available for other request types\n $requestMethod = $this->request->getMethod();\n $support = $this->getControllerSupport($controllerRoot, $action, $requestMethod);\n \n // a) URL valid in another mime/type\n if (!empty($support['mimeTypes'])) {\n $exception = new HttpStatus\\NotAcceptable(\"Not all mime/types are accepted for $requestMethod requests at this URL. Accepted mime/types are: \" . implode(\", \", $support['mimeTypes']));\n $exception->setAcceptedMimeTypes($support['mimeTypes']);\n throw $exception;\n }\n \n // b) URL valid with another method\n if (!empty($support['methods'])) {\n $exception = new HttpStatus\\MethodNotAllowed(\"$requestMethod requests aren’t allowed at this URL. Allowed methods are: \" . implode(\", \", $support['methods']));\n $exception->setAllowedMethods($support['methods']);\n throw $exception;\n }\n \n // c) Shared class exists\n if (class_exists($sharedClass)) {\n $shared = new $sharedClass($this->request, $name, $action, $args);\n if ($shared->hasAction()) {\n $shared->setUp();\n return $shared;\n }\n }\n \n // d) 404d\n throw new HttpStatus\\NotFound();\n }\n \n $controller = new $controllerClass($this->request, $name, $action, $args);\n // Run the shared controller action\n if (class_exists($sharedClass)) {\n $shared = new $sharedClass($this->request, $name, $action, $args, $controller);\n $shared->setUp();\n $shared->action();\n }\n \n return $controller;\n }", "title": "" }, { "docid": "8f84174fe5aa684980a5058f4b230de3", "score": "0.5819361", "text": "public function __construct(){\n $url = $this->parseUrl();\n\n /* con el primer parametro (por ej /home/) crea el nombre del controlador.\n por convencion HomeController. */\n $controllerName = ucfirst( strtolower($url[0]) ) . \"Controller\";\n\n /* si existe el controlador que se pidio, se pisa el default */\n if( file_exists( APP_PATH . \"controllers/\" . $controllerName . \".php\") ){\n $this->controller = $controllerName;\n /* unset elimina el elemento pero matiene los indices de todos los demas.\n (no va a existir elemento 0 pero si 1 y 2). */\n unset($url[0]);\n }\n\n /* se incluye el archivo del controlador que este en $this->controller */\n require APP_PATH . \"controllers/\" . $this->controller . \".php\";\n /* se instancia un controlador de ese tipo. Todo de forma dinamica. */\n $this->controller = new $this->controller;\n\n if( isset($url[1]) ){\n /* si esta seteado el action recuperarlo al formato de la convencion.\n ej: actionIndex */\n $methodName = \"action\" . ucfirst( strtolower($url[1]) );\n /* si el controlador tiene ese metodo, pisa el de default */\n if( method_exists($this->controller, $methodName) ){\n $this->method = $methodName;\n unset($url[1]);\n }\n }\n\n /* guarda los parametros que quedan pero empezando por el indice cero. */\n $this->params = $url ? array_values($url) : $this->params;\n\n /* llama al metodo de la clases (ambos pasados en el primer parametro)\n con los parametros del array del segundo parametro */\n call_user_func_array( [$this->controller, $this->method], $this->params );\n\n\n }", "title": "" }, { "docid": "78c946e1dba5edb0116124d24ff50bf8", "score": "0.5817895", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceProcessor();\n $this->assertInstanceOf(\"\\Mos\\Controller\\DiceProcessor\", $controller);\n }", "title": "" }, { "docid": "0c1c9311ab97fcd64f3df05cfc924aed", "score": "0.5803177", "text": "public function testCreateTheControllerClass()\n {\n $controller = new YatzyController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\YatzyController\", $controller);\n }", "title": "" }, { "docid": "58df3a7ec752a910276875ffb7558406", "score": "0.5801582", "text": "function system_instanciate_controller($controller_id)\n{\n\tif( in_object_storage($controller_id) )\n\t\t$res = restore_object($controller_id);\n\telseif( class_exists($controller_id) )\n\t\t$res = new $controller_id();\n\telse\n\t\tWdfException::Raise(\"ACCESS DENIED: Unknown controller '$controller_id'\",\"REQ=\",$_REQUEST);\n\t\n\tif( system_is_ajax_call() )\n\t{\n\t\tif( !($res instanceof Renderable) && !($res instanceof WdfResource) )\n\t\t{\n\t\t\tlog_fatal(\"ACCESS DENIED: $controller_id is no Renderable\");\n\t\t\tdie(\"__SESSION_TIMEOUT__\");\n\t\t}\n\t}\n\telse if( !($res instanceof ICallable) )\n\t\tWdfException::Raise(\"ACCESS DENIED: $controller_id is no ICallable\");\n\t\n\treturn $res;\n}", "title": "" }, { "docid": "127722624c8ccec65ad1546a4c40bcb1", "score": "0.5799336", "text": "public function __construct()\n {\n $this->middleware('auth');\n $this->tiendaController = new TiendaController();\n $this->treeController = new TreeController;\n $this->reportController = new ReporteController();\n $this->walletController = new WalletController;\n $this->activacionController = new ActivacionController();\n }", "title": "" }, { "docid": "89488b1bdd210ecab614e764957877c9", "score": "0.5795149", "text": "public function __construct()\n {\n return \"Lerning Controller in Lumen\";\n }", "title": "" }, { "docid": "fb0ac150672e4c029256a04ed7896e74", "score": "0.5787829", "text": "public function getDefaultController(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.5774415", "text": "public function create(){}", "title": "" }, { "docid": "0cb5464449195112933351cb42f1a305", "score": "0.57714355", "text": "public function deploy()\n {\n $class = '\\\\app\\\\controllers\\\\' . $this->controller_class;\n \n $controller = new $class();\n \n $callable = [$controller, $this->controller_method];\n \n call_user_func_array($callable, $this->request_parameters);\n \n }", "title": "" }, { "docid": "ace64e8c2bd4de9bed7ebc74cecd3e45", "score": "0.5768426", "text": "function controller($class)\n {\n return app()->controller($class);\n }", "title": "" }, { "docid": "82d55917923081223dc4bed9c28ad2ef", "score": "0.5737861", "text": "protected function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n \n $role = \"ROLE_\". strtoupper($this->completeRoute);\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n 'complete_route' => $this->completeRoute,\n 'role' => $role,\n ));\n }", "title": "" }, { "docid": "2d69484e81e6a3b08e11633b6965bbc7", "score": "0.57294965", "text": "private function getController($dir) {\n include_once(Library::getControllerPath($dir));\n $name = @array_pop(explode('/', $dir));\n $class = 'Controller_' . $name;\n\n $controller = new $class;\n return $controller;\n }", "title": "" }, { "docid": "38f70a89dcf56836203737a054f6163f", "score": "0.57232785", "text": "function __construct() {\n\t\t$url = isset($_GET['url']) ? $_GET['url'] : \"index\";\n\t\t\n\t\t$url = explode('/', rtrim($url, '/'));\n\t\t\n\t\t// debug\n\t\t//print_r($url);\n\t\t\n\t\t$controllerName = $url[0];\n\t\t\n\t\t$file = 'controllers/' . $controllerName . '.php';\n\t\t\n\t\tif (! file_exists($file)) {\n\t\t\t$this->error();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\trequire $file;\n\t\t\n\t\t$controller = new $controllerName;\n\t\t$controller->loadModel($controllerName);\n\t\t\n\t\tif (isset($url[1])) {\n\t\t\t\n\t\t\t$methodName = $url[1];\n\t\t\t\n\t\t\tif (! method_exists($controller, $methodName)) { \n\t\t\t\t$this->error();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (isset($url[2])) {\n\t\t\t\t$controller->{$methodName}($url[2]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$controller->{$methodName}();\n\t\t\t}\n\t\t}\n\t\telse { \n\t\t\t// no method was set, so go to index() method for the controller by default\n\t\t\t$controller->index();\n\t\t}\n\t}", "title": "" }, { "docid": "b366bfcfd3c396a55f5901b33ecb3c28", "score": "0.5721523", "text": "public function __construct(){\n\n\t\t$url = isset($_GET['url']) ? $_GET['url']: null;\n\t\t$url = rtrim($url, '/');\n\t\t$url = explode('/', $url );\n\n\t\t$existentcontrollers= array(\n\t\t\t\t\t\t\t\t\t'enviar'=>['obtenerToken', 'configurarTiempoEnvio', 'configurarSensoresEnvio']\n\t\t\t\t\t\t\t\t\t\t);//añadir\n\n\t\t$controllerName = $url[0];\n\n\n\t\tif(empty($url[0])){//When entering without defining a controller\n\t\t\t$archivoController = 'controllers/inicio.php';//Initial controller\n\t\t\trequire_once($archivoController);\n\t\t\t$controller = new Inicio();\n\t\t\t//$controller->loadModel('inicio');\n\t\t\t$controller->render();\n\t\t\treturn false;\n\t\t}\n\t\t$archivoController = 'controllers/'.$url[0].'.php';//Assign the controller\n\n\t\tif(file_exists($archivoController)){//Check if the file exists\n\t\t\trequire_once($archivoController);\n\t\t\t//Initialize the controller and load the model\n\t\t\t$controller = new $url[0];\n\t\t\t$controller->loadModel($url[0]);\n\t\t\t$nparam = sizeof($url);\n\t\t\n\t\t\tif($nparam > 1){\n\t\t\t\tif($nparam >2){\n\t\t\t\t\t$param = [];\n\t\t\t\t\tfor($i = 2; $i < $nparam; $i++){\n\t\t\t\t\t\tarray_push($param, $url[$i]);\n\t\t\t\t\t}\n\t\t\t\t\t$controller->{$url[1]}($param);\n\t\t\t\t}else{\n\t\t\t\t\tif(in_array($url[1], $existentcontrollers[$controllerName])){//yooo\n\t\t\t\t\t\t$controller->{$url[1]}();\n\t\t\t\t\t}else{//yoo\n\t\t\t\t\t\trequire_once('controllers/errores.php');//yoo\n\t\t\t\t\t\t$controller = new Errores();//yoo\n\t\t\t\t\t}//yooo\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$controller->render();\n\t\t\t}\n\t\t}else{\n\t\t\trequire_once('controllers/errores.php');\n\t\t\t$controller = new Errores();\n\t\t}\n\t}", "title": "" }, { "docid": "c2625d501556724dfc320218ea197ba7", "score": "0.5721424", "text": "public function testConstruct()\n {\n $mockRenderer = $this->createMock(PhpRenderer::class);\n $todoModel = $this->createMock(TodoModel::class);\n $case = new AddTodoController($mockRenderer, $todoModel);\n $expected = AddTodoController::class;\n $this->assertInstanceOf($expected, $case);\n }", "title": "" }, { "docid": "3e27aa0797f5f71de64052b94d0b853f", "score": "0.57118225", "text": "public function controller()\n\t{\n\t\treturn new Routing\\FilteredController($this->router());\n\t}", "title": "" }, { "docid": "6187c10c98d754dd320b443ffa6584df", "score": "0.5711818", "text": "public function create()\n {\n return view('createclass');\n }", "title": "" }, { "docid": "6fe15bcfe14dc266deef5134792e7f7a", "score": "0.57094896", "text": "public function __construct()\n\t{\n\t\t$url = $this->parseUrl();\n\n\t\t/**\n\t\t * First (CONTROLLER) part of URL\n\t\t * Checks if the \"controller\" exists.\n\t\t */\n\t\tif(file_exists('../app/controllers/' . $url[0] . '.php')){\n\t\t\t$this->controller = $url[0];\n\t\t\tunset($url[0]);\n\t\t}\n\t\trequire_once '../app/controllers/'. $this->controller . '.php';\n\n\t\t// Creates an object of the controller\n\t\t$this->controller = new $this->controller;\n\n\t\t/**\n\t\t * Second (METHOD) part of URL\n\t\t * Checks if the method exists in the Controller-object.\n\t\t */\t\t\n\t\tif (isset($url[1])) {\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t\tunset($url[1]);\n\n\t\t\t}\n\t\t}\n\t\t// Checks if $url has content\n\t\t$this->params = $url ? array_values($url) : [];\n\n\t\t// Call the the method in controller-object and passes in params as arguments\n\t\tcall_user_func_array([$this->controller, $this->method], $this->params);\n\n\t}", "title": "" }, { "docid": "c717172a930909c2b2a8654eb804c553", "score": "0.57066214", "text": "public function create($control)\n {\n\n }", "title": "" }, { "docid": "05a37166b27e3b24fc82ddb0224eff94", "score": "0.5706124", "text": "function __construct($controller) {\n\t\t$request_url = explode('/', strtolower(ltrim(htmlspecialchars(str_ireplace('?'.$_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_URI']), PHP_URL_PATH), '/')));\n\t\t$this->request = $request_url;\n\n\t\tif(empty($request_url) or empty($request_url[0])) \n\t\t{\n\t\t\t$this->controller_file = \"ash-free-controllers/{$controller}.php\";\n\t\t\t$this->controller_class = $controller;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->controller_file = 'ash-free-controllers/'.$request_url[0].'.php';\n\t\t\t$this->controller_class = ucfirst($request_url[0]);\n\t\t}\n\n\t\tif(empty($request_url) or empty($request_url[1]))\n\t\t{\n\t\t\t$this->method = 'index';\n\t\t\t$this->para = [];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->method = $request_url[1];\n\t\t\t$this->para = array_map(function($s){ return htmlentities( $s , ENT_QUOTES | ENT_XML ); }, array_map('urldecode', array_slice($request_url, 2)));\n\t\t}\n\t}", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5704155", "text": "public function create();", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "5afe42cee9487e1dfde171b65fe2c5cf", "score": "0.0", "text": "public function __construct()\n {\n $this->disk = app()->environment(['prod']) ? 'cdn' : 'public';\n }", "title": "" } ]
[ { "docid": "bd1ee0eb805b9537f7b5fffd7bc75869", "score": "0.7934717", "text": "protected function createController()\n\t{\n\t\t$this->createParentControllerIfNotExists();\n\n\t\t$this->create('Controller', $this->data->get('controller.path'), [\n\t\t\t'name' => $this->data->get('controller.name'),\n\t\t\t'namespace' => $this->data->get('controller.namespace'),\n\t\t\t'parent' => $this->data->get('base_controller.name'),\n\t\t\t'parent_namespaced' => $this->data->get('base_controller.namespaced'),\n\t\t]);\n\t}", "title": "" }, { "docid": "8fc472ca59d683f1b71ce35c8d9cd840", "score": "0.79196423", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "586d07833162bcc0f3d9ef3beb9597eb", "score": "0.75784665", "text": "private function makeController()\r\n {\r\n\r\n new MakeController($this, $this->files);\r\n\r\n }", "title": "" }, { "docid": "c93c248aa366a21a75f395554a1b6d92", "score": "0.7545241", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('tenant:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n ]);\n }", "title": "" }, { "docid": "6d22add10fa68cef458f5bce88d0fc82", "score": "0.7471624", "text": "public static function create()\n\t{\n\t\t//check, if an ObjectController instance already exists\n\t\tif(ObjectController::$objectController == null)\n\t\t{\n\t\t\tObjectController::$objectController = new ObjectController();\n\t\t}\n\n\t\treturn ObjectController::$objectController;\n\t}", "title": "" }, { "docid": "0b66faaecec66cfdcab2e8144eedde9c", "score": "0.7285359", "text": "public function create()\n {\n // See register controller\n }", "title": "" }, { "docid": "5905a13dea41ead7716acf26c8e1b561", "score": "0.72167856", "text": "public function createController() \n\t{\n if (!class_exists($this->controller))\n {\n new InvalidPageException(Method::GET, null);\n header('Location: /document/pagenotfound'); \n }\n \n return new $this->controller($this->action,$this->urlvalues, $this->postvalues, $this->filevalues, $this->id, $this->userid, $this->state, $this->admin);\n\t}", "title": "" }, { "docid": "44397456b6f80012d882544513cb3343", "score": "0.71994245", "text": "private function makeContoller()\n {\n $this->warn(\"Creating Controller\");\n\n $contents = file_get_contents( __DIR__.'../../../resources/base_files/controller.php');\n $updated_contents = $this->updateFileContents($contents);\n $path = base_path() .'/packages/'.$this->packageName.'/Http/Controllers/'.$this->packageName.'Controller.php';\n\n file_put_contents($path, $updated_contents);\n }", "title": "" }, { "docid": "e221633d04fc2f4f5f4d8a2362428823", "score": "0.69536394", "text": "abstract protected function controllerConstruct();", "title": "" }, { "docid": "fb60484fbf762e91b17b69f41086c2c6", "score": "0.6904606", "text": "private function makeController($controllerClassName)\n {\n if ($this->controllerFactory !== null) {\n return call_user_func($this->controllerFactory, $controllerClassName);\n }\n\n return new $controllerClassName;\n }", "title": "" }, { "docid": "88a72e1c8a3b541250666d8d876df9b1", "score": "0.6892876", "text": "public function createController($pi, array $params)\n {\n $container = include __DIR__ . '/dic.php';\n $class = __NAMESPACE__ . '\\\\Controller';\n\n return $container->get($class);\n }", "title": "" }, { "docid": "f5c573357e8982b856f3cf95f34207d4", "score": "0.6804621", "text": "public function controller()\n {\n $this->setClassname($this->getArgument(0));\n\n $this->generateClass('Http/Controllers', 'controller.stub', [\n 'classname' => $this->getClassname(),\n ]);\n }", "title": "" }, { "docid": "7768e52ada3641234c165223358c3965", "score": "0.66875744", "text": "private function getController(): IndexController\n {\n return new IndexController($this->getContainer());\n }", "title": "" }, { "docid": "d57ef5a3ee0ea199899f50a3bc03b48b", "score": "0.65677804", "text": "public function createController($pi, array $params)\n {\n $page = isset($params['page']) ? $params['page'] : 'main';\n $page = preg_replace('/_page$/', '', $page);\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\' . ucfirst($page) . 'Controller';\n\n return new $class();\n }", "title": "" }, { "docid": "72d5a441f81890687fc2dd00df3baf73", "score": "0.65138745", "text": "public static function getInstance() \n {\n $class = __CLASS__;\n if (!isset(self::$_Controller)) {\n return new $class();\n }\n return self::$_Controller;\n }", "title": "" }, { "docid": "75acb5ec39d0d68eed980ebdb37bc967", "score": "0.6485421", "text": "public static function ctrl_maker($ctrl_name)\n \t{\n \t\tif (file_exists(\"app/controllers/{$ctrl_name}.php\")) {\n \t\t\techo \"Existing [{$ctrl_name}] Controller found, try again \\n\";\n \t\t\texit;\n \t\t}\n\n \t\t//Create and write File to controller Dir\n \t\t$controller = fopen(\"app/controllers/{$ctrl_name}.php\",\"w\");\n \t\tfwrite($controller, self::wfile($ctrl_name));\n\n \t\t//Throw response\n \t\techo \"Controller [{$ctrl_name}] created successfully \\n\";\n \t}", "title": "" }, { "docid": "cb636a4bd71a574d37ddab166dd7fcc1", "score": "0.6446192", "text": "private function createController($name, $option = \"false\")\n {\n $container = controllers_path();\n $name = preg_replace('/controller/i', 'Controller', ucfirst($name));\n $append = <<<EOF\n\n /**\n * Controller Index\n *\n * @return mixed\n **/\n public function index()\n {\n\n }\n\n\n /**\n * Fetch resource\n *\n * @return mixed\n **/\n public function fetch()\n {\n\n }\n\n\n /**\n * Show all/a resource(s)\n *\n * @param \\$id\n * @return mixed\n **/\n public function show(\\$id)\n\t{\n\n\t}\n\n\n /**\n * Create a resource\n *\n * @return mixed\n * */\n public function create()\n {\n\n }\n\n\n /**\n * Store the resource\n *\n * @return mixed\n * */\n public function store()\n {\n\n }\n\n\n /**\n * Edit a resource\n *\n * @param \\$id\n * @return mixed\n */\n public function edit(\\$id)\n {\n\n }\n\n\n /**\n * update the resource\n *\n * @return mixed\n */\n public function update()\n {\n\n }\n\n\n /**\n * Destroy a resource\n *\n * @param \\$id\n */\n public function destroy(\\$id)\n {\n\n }\n\n\nEOF;\n\n /**\n * if $option is 'empty', return an empty class\n */\n $methods = ($option == \"true\") ? '' : $append;\n\n $sub = preg_replace('/(.*)\\/(.*)/', '$2', $name);\n $data = <<<EOF\n<?php\n\nclass {$sub}\n{\n {$methods}\n}\n\nEOF;\n\n if (file_exists(\"{$container}/{$name}.php\")):\n return die(\"controller '{$name}' already exists.\\n\");\n endif;\n\n $file = fopen(\"{$container}/{$name}.php\", 'x');\n fwrite($file, $data);\n\n return die(\"'{$sub}' class created.\\n\");\n }", "title": "" }, { "docid": "e7d30d8ef2c251016e0dac7a6ede050c", "score": "0.6426407", "text": "public static function factory($controllerName, $layoutName, $action, $agent)\n {\n // Determine full classname\n $className = self::getClassName($controllerName);\n\n // Construct and return Controller\n return new $className($layoutName, $action, $agent);\n }", "title": "" }, { "docid": "2340da4739a3d4f3af4a806c3b40163c", "score": "0.6424097", "text": "public function incluirController() {\n $controller = $this->name . 'Controller';\n $this->controller = new $controller;\n }", "title": "" }, { "docid": "62acacd9eda2a0af65323ac3d09ec0fd", "score": "0.63956344", "text": "protected function createController( ezcMvcRoutingInformation $routingInformation, ezcMvcRequest $request )\n {\n $controllerClass = $routingInformation->controllerClass;\n $controller = new $controllerClass( $routingInformation->action, $request );\n return $controller;\n }", "title": "" }, { "docid": "9964315b7852ff5fa78452a1123ffbf4", "score": "0.63953257", "text": "public function postController(Request $request){\n $data = $request->json()->all();\n $controller = Controller::create([\n 'controller'=> $data['controller'],\n ]);\n return response()->json($controller, 201);\n }", "title": "" }, { "docid": "6dfca3c8cec5e1689beed63c582777e1", "score": "0.63864696", "text": "public function createController($class) {\n\t\t$replace = [];\n\t\t$file = [];\n\n\t\t$stub='/stubs/EditoraController.20220812.stub';\n\t\tif ($this->old_school_controllers)\n\t\t{\n\t\t\t$stub='/stubs/EditoraController.stub';\n\t\t}\n\n\t\tif (!file_exists(app_path() . '/Http/Controllers/Editora/'))\n\t\t\tmkdir(app_path() . '/Http/Controllers/Editora/', 0755, true);\n\n\t\tif (!file_exists(app_path() . '/Http/Controllers/Editora/' . $class->name . '.php') || $this->force_overwrite_controllers) {\n\n\t\t\tif (file_exists(__DIR__ . $stub)) {\n\t\t\t\t$file = file_get_contents(__DIR__ . $stub);\n\n\t\t\t\t$repositoryNamespace = 'App\\Http\\Controllers\\Editora';\n\t\t\t\t$replace[\"DummyNamespace\"] = 'App\\Http\\Controllers\\Editora';\n\t\t\t\t$replace[\"DummyModelClass\"] = $class->name . 'Extraction';\n\t\t\t\t$replace[\"DummyClass\"] = $class->name;\n\t\t\t\t$replace[\"DummyLowerCaseClass\"] = strtolower($class->name);\n\n\t\t\t\t$file = str_replace(array_keys($replace), array_values($replace), $file);\n\n\t\t\t\t$file_php = fopen(app_path() . '/Http/Controllers/Editora/' . $class->name . '.php', \"w\");\n\t\t\t\tfwrite($file_php, $file);\n\t\t\t\tfclose($file_php);\n\n\t\t\t\techo(\"Create \" . $class->name . \" Controller \\n\");\n\t\t\t} else {\n\t\t\t\techo \"Not exist stub controller \\n\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Exist \" . $class->name . \" Controller \\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "cbd895cf654881e4d256ac3844370a33", "score": "0.6360979", "text": "private function initController($controller) {\n\n $file = __DIR__ . '/../controllers/' . $controller . 'Controller.php';\n include_once $file;\n $controller = $controller . 'Controller';\n return new $controller;\n }", "title": "" }, { "docid": "c0c517ef5bcb5856fd2a2deeb4b02326", "score": "0.6323563", "text": "public function createController(): void\n {\n $this->checkDsToken();\n // Call the worker method\n $args = $this->getTemplateArgs();\n $results = $this->addActiveUser($args[\"envelope_args\"]);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Create a new active eSignature user\",\n \"Create a new active eSignature user\",\n \"Results from eSignUserManagement:createUser method:\",\n json_encode(($results->__toString()))\n );\n }\n }", "title": "" }, { "docid": "53355a54bdfca52319b0b386c404dc0c", "score": "0.63204664", "text": "private function instantiateControllers()\n {\n $this->app['payments.controller'] = function () {\n return new PaymentsController($this->app['payments.service'], $this->app['payments.validator']);\n };\n }", "title": "" }, { "docid": "9a984469cd357201ffb0fbfd42e53081", "score": "0.62975997", "text": "public static function inst($controller) {\n $controllerName = $controller.'Controller';\n $fname = str_replace('_', '/', $controller).'.php';\n if (!class_exists($controllerName)) {\n if (!include(wheel::$conf['local_inc_dir'].'/controllers/'.$fname))\n throw new wheelException('Could not load file for controller '. $controller.' - please verify file is in the right location');\n }\n return new $controllerName();\n }", "title": "" }, { "docid": "adb31cc89366698aa5547192a77b1f97", "score": "0.6294923", "text": "public function criarControllerAction()\n {\n $form = $this->getServiceLocator()->get('Gerador\\Form\\CriarControllerForm');\n $service = $this->getServiceLocator()->get('Gerador\\Service\\GeradorService');\n\n $objRequest = $this->getRequest();\n\n if ($objRequest->isPost()) {\n $form->setData($objRequest->getPost());\n if ($form->isValid()) {\n $arrDataFromForm = $form->getData();\n\n try {\n $service->createController($arrDataFromForm);\n //return $this->redirect()\n // ->toRoute($this->route, array('controller' => 'gerador', 'action' => 'criarController'));\n } catch (\\Exception $objException) {\n $this->flashMessenger()->addErrorMessage($objException->getMessage());\n }\n } else {\n echo (\"Form Inválido\");\n }\n }\n\n return new ViewModel(compact('form'));\n }", "title": "" }, { "docid": "75c68b107831d5c640d18447761d5a7d", "score": "0.6283691", "text": "public static function factory(App $app, $controller_name)\n {\n if (!isset($app) || (isset($app) && !$app instanceof App))\n Throw new Error('Controller factory needs an app object.');\n\n // App or framework controller?\n $class = ($app->isSecure() ? '\\\\Web\\\\Framework\\\\AppsSec' : '\\\\Web\\\\Apps') . \"\\\\\" . $app->getName() . '\\\\Controller\\\\' . $controller_name . 'Controller';\n\n // Create controller object\n return new $class($controller_name, $app);\n }", "title": "" }, { "docid": "d9df194088048f2e2b032f201a82e8b3", "score": "0.6262158", "text": "protected function instantiateController($class) {\n\t\treturn new $class();\n\t}", "title": "" }, { "docid": "97d8642dd6ae6270fb8b77bde9f1de31", "score": "0.626122", "text": "public function new_route_controller( $namespace ) {\n\t\t// Do we want to auto start our controllers?\n\t\tif ( $this->config['routing']['auto_start_controllers'] ) {\n\t\t\t// Let's get our class name from the namespace\n\t\t\t$name_parts = explode( '/', $namespace ); \n\n\t\t\t// Let's convert our url endpoint name to a legit classname\n\t\t\t$name_parts = array_map(\n\t\t\t\tfunction( $string ) {\n\t\t\t\t\t$string = str_replace( '-', '_', $string ); // Turn all hyphens to underscores\n\t\t\t\t\t$string = str_replace( '_', ' ', $string ); // Turn all underscores to spaces (for easy casing)\n\t\t\t\t\t$string = ucwords( $string ); // Uppercase each first letter of each \"word\"\n\t\t\t\t\t$string = str_replace( ' ', '', $string ); // Remove spaces. BOOM! Zend-compatible camel casing\n\n\t\t\t\t\treturn $string;\n\t\t\t\t},\n\t\t\t\t$name_parts\n\t\t\t);\n\n\t\t\t// Create a callable classname\n\t\t\t$classname = implode( '\\\\', $name_parts );\n\t\t\t$class = $this->config['routing']['controller_base_namespace'] . $classname;\n\n\t\t\t// Does the class exist? (Autoload it if its not loaded/included yet)\n\t\t\tif ( class_exists( $class, true ) ) {\n\t\t\t\t// Instanciate the controller and keep an easy reference to it\n\t\t\t\t$this->controller = new $class( $this->request, $this->response, $this->service, $this );\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "1eb2ffcd396865a14ff746907387f0c6", "score": "0.62481457", "text": "protected function getController($className, array $controllerArgs = null)\n {\n $class = new ReflectionClass($className);\n if ($controllerArgs === null) {\n $controller = $class->newInstance();\n } else {\n $controller = $class->newInstanceArgs($controllerArgs);\n }\n $controller->setContainer($this->getContainer());\n $controller->setLogger($this->getLogger());\n $controller->init();\n return $controller;\n }", "title": "" }, { "docid": "1f3acdf88cb0b7dccd1cab7a0e225b29", "score": "0.6216539", "text": "public static function createController($config, $comm = null) {\n\n $templateDirectory = __DIR__.'/stubs';\n\n CoreHelper::log(\"info\", \"Creating controller...\", $comm);\n $md = file_get_contents($templateDirectory.\"/controller.stub\");\n\n $md = str_replace(\"__controller_class_name__\", $config->controllerName, $md);\n $md = str_replace(\"__model_name__\", $config->modelName, $md);\n $md = str_replace(\"__crud_name__\", $config->crudName, $md);\n $md = str_replace(\"__view_column__\", $config->crud->view_col, $md);\n\n // Listing columns\n $listing_cols = \"\";\n foreach ($config->crud->fields as $field) {\n $listing_cols .= \"'\".$field['colname'].\"', \";\n }\n $listing_cols = trim($listing_cols, \", \");\n\n // Module\n $module = Module::where('slug', $config->crud->module);\n\n $md = str_replace(\"__listing_cols__\", $listing_cols, $md);\n $md = str_replace(\"__view_folder__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__route_resource__\", snake_case($config->crudName), $md);\n $md = str_replace(\"__db_table_name__\", $config->dbTableName, $md);\n $md = str_replace(\"__singular_var__\", $config->singularVar, $md);\n $md = str_replace(\"__module__\", $module['name'], $md);\n\n file_put_contents(base_path('app/Modules/'.$module['name'].'/Http/Controllers/'.$config->controllerName.\".php\"), $md);\n }", "title": "" }, { "docid": "9a1cc018242715a0160a8ba04e04d0bd", "score": "0.61998004", "text": "private static function createController ($name)\r\n {\r\n if (strpbrk($name, \"\\\\/?%*:|\\\"<>\")) {\r\n echo $name . ' isn\\'t a valid controller name' . \"\\n\";\r\n return;\r\n }\r\n\r\n $name = ucwords(strtolower($name));\r\n $filer = new WalrusFileManager(ROOT_PATH);\r\n\r\n if (!file_exists(ROOT_PATH . 'engine/controllers/' . $name . 'Controller.php')) {\r\n\r\n // @TODO: catch isn't working ?\r\n try {\r\n $filer->setCurrentElem('Walrus/core/sample/controller.sample');\r\n $controller = $filer->getFileContent();\r\n $controller = str_replace('%name%', $name, $controller);\r\n\r\n $filer->setCurrentElem('engine/controllers');\r\n $filer->fileCreate($name . 'Controller.php');\r\n $filer->setCurrentElem('engine/controllers/' . $name . 'Controller.php');\r\n $filer->changeFileContent($controller);\r\n echo 'New controller created in engine/controllers with the name ' . $name . 'Controller.php' . \"\\n\";\r\n } catch (Exception $e) {\r\n echo 'Exception: ' . $e->getMessage() . \"\\n\";\r\n return;\r\n }\r\n } else {\r\n echo $name . 'Controller.php already exist' . \"\\n\";\r\n }\r\n\r\n if (!file_exists(ROOT_PATH . 'www/templates/' . $name)) {\r\n\r\n try {\r\n\r\n $filer->setCurrentElem('www/templates');\r\n $filer->folderCreate(strtolower($name));\r\n\r\n echo 'New templates directory created in www/templates with the name ' . $name . \"\\n\";\r\n } catch (Exception $e) {\r\n echo 'Exception: ' . $e->getMessage() . \"\\n\";\r\n return;\r\n }\r\n } else {\r\n echo $name . ' template directory already exist' . \"\\n\";\r\n }\r\n\r\n }", "title": "" }, { "docid": "7991aa5da4a05993d0bcdb2cd110d8c1", "score": "0.6191357", "text": "function getController($controller)\n{\n $ctrl_name = ucfirst($controller) . 'Controller';\n include_once(APP_CONTROLLERS . $ctrl_name . '.php');\n return new $ctrl_name();\n}", "title": "" }, { "docid": "ece691d92559c8f2397b402a34c03523", "score": "0.61910933", "text": "protected function createRegisterController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/Auth/RegisterController.php'),\r\n $this->compileRegisterControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "5443c2363b3d31c386455f04837cdb5c", "score": "0.6187821", "text": "protected static function createInstance()\n {\n\n if (defined('BUIZ_CONTROLLER'))\n $flowController = 'LibFlow'.ucfirst(BUIZ_CONTROLLER);\n else\n $flowController = 'LibFlowApachemod';\n\n self::$instance = new $flowController();\n\n }", "title": "" }, { "docid": "20d843346cbe0a3b4e3d2a396049130d", "score": "0.6175614", "text": "public function create()\n {\n dd('ehExamplesController@create()');\n }", "title": "" }, { "docid": "09aab347ece7f5d31ce863e81c0aeb5c", "score": "0.6171574", "text": "protected function createController($controller)\n {\n $this->checkClass($controller);\n $handler = Application::container()->make($controller);\n if (! $handler instanceof ControllerInterface) {\n throw new InvalidControllerException(\n \"The class '{$controller}' does not implement ControllerInterface.\"\n );\n }\n return $handler;\n }", "title": "" }, { "docid": "320e267b303f4685e52514f9cdbd0cf6", "score": "0.61517256", "text": "public function createControllerByID($id)\r\n {\r\n $ret = parent::createControllerByID($id);\r\n if (!empty($ret)) {\r\n return $ret;\r\n } else {\r\n $this->controllerNamespace = $this->fallbackControllerNamespace;\r\n return parent::createControllerByID($id);\r\n }\r\n }", "title": "" }, { "docid": "1c6937b6ddb8471e5090c844698c096a", "score": "0.6137554", "text": "protected function createHomeController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/HomeController.php'),\r\n $this->compileHomeControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "feaa9cda25e1119c8673a0964cb215d5", "score": "0.61270726", "text": "protected function getMaker_AutoCommand_MakeControllerService()\n {\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\console\\\\Command\\\\Command.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Command\\\\MakerCommand.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\MakerInterface.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\AbstractMaker.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\maker-bundle\\\\src\\\\Maker\\\\MakeController.php';\n\n $a = ($this->privates['maker.file_manager'] ?? $this->getMaker_FileManagerService());\n\n $this->privates['maker.auto_command.make_controller'] = $instance = new \\Symfony\\Bundle\\MakerBundle\\Command\\MakerCommand(new \\Symfony\\Bundle\\MakerBundle\\Maker\\MakeController($a), $a, ($this->privates['maker.generator'] ?? $this->getMaker_GeneratorService()));\n\n $instance->setName('make:controller');\n\n return $instance;\n }", "title": "" }, { "docid": "dfb02f31f17c5fb00847b5714a26516e", "score": "0.6124433", "text": "protected function generateController(array $options) \n\t{\n\t\t$this->progress[] = 'Create controller';\n\n\t\t$controllersPath = $options['paths']['controllers_path'];\n\t\t$servicesPath = $options['paths']['services_path'];\n\t\t$requestsPath = $options['paths']['requests_path'];\n\t\t$viewsPath = $options['paths']['views_path'];\n\t\t$entityName = $options['entity_name'];\n\t\t$files = $options['files'];\n\n\t\tif ($this->fileSystem->exists(base_path($controllersPath) . $entityName . 'Controller.php')) {\n\t\t\t$this->progress[] = 'Controller already exists';\n\t\t\treturn;\n\t\t}\n\n\t\t$config['namespace'] = $this->getNamespaceFromPath($controllersPath);\n\t\t$config['servicesNamespace'] = $this->getNamespaceFromPath($servicesPath);\n\t\t$config['requestsNamespace'] = $this->getNamespaceFromPath($requestsPath);\n\t\t$config['viewsPath'] = $this->getFullViewsPathFromPath($viewsPath);\n\t\t$config['createRequest'] = (in_array('createrequest', $files) ? \"{$entityName}CreateRequest\" : 'Request' );\n\t\t$config['updateRequest'] = (in_array('updaterequest', $files) ? \"{$entityName}UpdateRequest\" : 'Request' );\n\t\t$config = $this->addEntityNameVariations($config, $entityName);\n\n\t\t$useClasses = [];\n\t\t$useClasses[] = $config['servicesNamespace'] . '\\\\' . $entityName . 'Service';\n\t\tif (in_array('createrequest', $files)) {\n\t\t\t$useClasses[] = $config['requestsNamespace'] . '\\\\' . $config['createRequest'];\n\t\t}\n\t\tif (in_array('updaterequest', $files)) {\n\t\t\t$useClasses[] = $config['requestsNamespace'] . '\\\\' . $config['updateRequest'];\n\t\t}\n\t\tif (count($useClasses) === 1) {\n\t\t\t$config['requestsNamespace'] = 'Illuminate\\Http';\n\t\t\t$useClasses[] = 'Illuminate\\Http\\Request';\n\t\t}\n\n\t\t$config['useStatements'] = '';\n\t\tforeach ($useClasses as $useClass) {\n\t\t\t$config['useStatements'] .= \"use {$useClass}; \\n\";\n\t\t}\n\t\t$config['useStatements'] = rtrim($config['useStatements']);\n\t\t\n\t\t$controllerTemplate = $this->controllerBuilder->create($config);\n\t\t$this->makeDirectoryIfNecessary($controllersPath);\n\t\t$this->fileSystem->put(base_path($controllersPath) . $entityName . 'Controller.php', $controllerTemplate);\n\n\t\t$this->progress[] = 'Success';\n\t}", "title": "" }, { "docid": "40f73be6ff50aaa31634ebfff605297a", "score": "0.6120663", "text": "private function _createControllerModel()\n {\n\n //echo \"creando archivo de controller\";\n\n $model_controller = new \\application\\modules\\system\\model\\ControllerModel();\n $model_module = new \\application\\modules\\system\\model\\ModuleModel();\n\n // lets set the controller params\n $model_controller->controller_description = 'Controller created automatically '\n . ' from model';\n $model_controller->controller_model_id = $this->_id_value;\n $model_controller->controller_name = strtolower($this->_model_name);\n $model_controller->controller_module = $model_module->find('module', ['id_module' => $this->_module_id], 'one')->module;\n $model_controller->controller_module_id = $this->_module_id;\n $model_controller->view_dependency = $this->_controller_dependencys;\n $model_controller->controller_path = __MODULEFOLDER__ . '/' . $model_controller->controller_module . '/controller/';\n\n //create a new controller for this model\n $model_controller->createController();\n\n // create asociatcion , module,controller->model\n $model_controller_model = new ModuleControllerModel();\n $model_controller_model->id_controller = $model_controller->_id_value;\n $model_controller_model->id_module = $this->_module_id;\n $model_controller_model->id_model = $this->_id_value;\n $model_controller_model->createModelControllerModule();\n }", "title": "" }, { "docid": "0dabd0b6625b8176c59d525592b88eb1", "score": "0.60779977", "text": "public function makeController($controllerPath, $controller, $action)\n\t{\n\t\tif (!$this->frontController)\n\t\t\tthrow new \\RuntimeException('You must set frontController before calling this func.');\n\n\t\t$className = $this->createClassName($controllerPath, $controller);\n\t\t$actionName = $this->getActionMethod($action);\n\n\t\ttry {\n\t\t\tif (!class_exists($className) || !method_exists($className, $actionName))\n\t\t\t\treturn false;\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$class = new $className($this->frontController);\n\t\tif (!$class instanceof \\KZ\\Controller)\n\t\t\tthrow new \\RuntimeException('Controller must be instance of \\KZ\\Controller.');\n\n\t\treturn $class;\n\t}", "title": "" }, { "docid": "46a9eceb74f42943d037f0f8fb2b933a", "score": "0.6077509", "text": "public function createRequestController(Request $aRequest)\n {\n \t$sControllerName = $aRequest->string($this->sControllerParam) ;\n \t\n \t$sControllerClass = $this->transControllerClass($sControllerName) ;\n \t\n \treturn $sControllerClass? new $sControllerClass($aRequest): null ;\n }", "title": "" }, { "docid": "c6ec4073881c5196194e82ee78c6155e", "score": "0.6073948", "text": "public function CreateController(\\Doctrine\\ORM\\EntityManager $entityManager) {\r\n\r\n //does the class exist? \r\n if (class_exists($this->controller)) {\r\n $parents = class_parents($this->controller);\r\n //does the class extend the controller class?\r\n if (in_array(\"Alt68\\\\Sys\\\\BaseController\", $parents)) {\r\n //does the class contain the requested method?\r\n if (method_exists($this->controller, $this->action)) {\r\n return new $this->controller($entityManager, $this->action, $this->urlvalues);\r\n }\r\n }\r\n }\r\n\r\n // if any error create error page\r\n\r\n $this->controller = $this->controllerNamespaceName .\r\n CommonService::getConfigValue('mainController');\r\n $this->action = 'error';\r\n\r\n return new $this->controller($entityManager, $this->action, $this->urlvalues);\r\n }", "title": "" }, { "docid": "414cc4037aacb1536e895af52a5753cd", "score": "0.60387444", "text": "private function getController(): SecurityController\n {\n return new SecurityController(\n $this->alert,\n $this->config,\n $this->repository,\n $this->toggleTwoFactorService,\n $this->twoFactorSetupService\n );\n }", "title": "" }, { "docid": "7024dca89692e6831b1a364e33d90086", "score": "0.60160553", "text": "public static function createController($inputName)\n {\n $pluginName = StringHelper::camelCase($inputName);\n\n mkdir('craft/plugins/' . $pluginName . '/controllers');\n\n $controller = fopen('craft/plugins/' . $pluginName . '/controllers/' . StringHelper::upperNoSpaces($inputName) . 'Controller.php', 'w');\n fwrite($controller, ContentHelper::generateControllerContent($inputName));\n fclose($controller);\n return;\n }", "title": "" }, { "docid": "6d3db3d7f88034ec7c0db252b9d435c0", "score": "0.6002788", "text": "public function __construct(){\n\t\t$this->crimeController = new crimeController();\n\t}", "title": "" }, { "docid": "9b5c2275d9ffcaf65871350494345c0c", "score": "0.6000697", "text": "function &get_instance(){\n\t return Controller::get_instance();\n\t }", "title": "" }, { "docid": "95c55b5934df2b2fef9a9c0ba3e78c91", "score": "0.5998441", "text": "protected function setupController()\n {\n }", "title": "" }, { "docid": "0d085febcc69eecde78c718eff8bb5b2", "score": "0.5995643", "text": "private function create_migration_controller()\n {\n $controller = $this->location . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $this->controller_name . '.php';\n if (is_file($controller))\n {\n throw new RuntimeException('The ' . $this->controller_name . ' controller aleardy exists!');\n }\n else\n {\n $template_name = \"migration_controller\";\n $args = array(\n 'class_name' => ApplicationHelpers::camelize($this->controller_name),\n );\n\n if ($this->run_from_web === FALSE)\n {\n $args['extra'] = ' $this->input->is_cli_request() or exit(\"Execute via command line: php index.php migrate\");';\n }\n else\n {\n $args['extra'] = PHP_EOL;\n }\n\n $template = new TemplateScanner($template_name, $args);\n $controller_contents = $template->parse();\n\n if (!file_put_contents($controller, $controller_contents))\n {\n throw new RuntimeException('Could not create migration controller...' . PHP_EOL);\n }\n\n return TRUE;\n }\n }", "title": "" }, { "docid": "d100a28ce6d77b6f197f6d776534f5a9", "score": "0.59911996", "text": "function __construct(Controller $controller)\n {\n $this->_controller = $controller;\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "3d68780a3dae015b84166f917045917b", "score": "0.5978511", "text": "function __construct($class){\n\t\t$this->controller = new $class();\n\t\t}", "title": "" }, { "docid": "7e39a9533343a65165e1fb5bb10d9c81", "score": "0.5962812", "text": "private function addController($controller)\r\n {\r\n try {\r\n $object = new $controller($this->app);\r\n\r\n // App\\Controllers\\HomeController\r\n $this->controllers[$controller] = $object;\r\n } catch (Exception $e) {\r\n echo $e->getMessage();\r\n pred($e->getTrace());\r\n }\r\n }", "title": "" }, { "docid": "e764e6e99310cc69470cb81487b06f38", "score": "0.5956204", "text": "protected function createLoginController()\r\n {\r\n file_put_contents(\r\n path('app/Controllers/Auth/LoginController.php'),\r\n $this->compileLoginControllerTemp()\r\n );\r\n }", "title": "" }, { "docid": "85ce2faaab2f738d464b8e593b227bbc", "score": "0.5949653", "text": "private function use_controller() {\n\n\t\t// Find out which controller to use.\n\t\tif ( $this->request->is_front ) {\n\n\t\t\t$Controller = new Front;\n\n\t\t} elseif ( $this->request->is_dashboard ) {\n\n\t\t\t$Controller = new Dashboard;\n\n\t\t} elseif ( $this->request->is_system ) {\n\n\t\t\t$Controller = new System;\n\n\t\t} elseif ( $this->request->is_auth ) {\n\n\t\t\t$Controller = new Auth;\n\n\t\t} elseif ( $this->request->is_api ) {\n\n\t\t\t$Controller = new API;\n\n\t\t}\n\n\t\t// Load the route.\n\t\t$Controller->load_route( $this->request );\n\n\t}", "title": "" }, { "docid": "3931ba5a979acbd9aa891f561cae7af4", "score": "0.5931807", "text": "public static function GetController($action)\n\t{\n\t\t$controller = null;\n\n\t\tswitch ($action) {\n\t\t\tcase 'search':\n\t\t\t\t$controller = new Controller_Search();\n\t\t\t\tbreak;\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'history':\n\t\t\t\t$controller = new Controller_History();\n\t\t\t\tbreak;\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new Controller_Snapshot();\n\t\t\t\tbreak;\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new Controller_Tag();\n\t\t\t\tbreak;\n\t\t\tcase 'tags':\n\t\t\t\t$controller = new Controller_Tags();\n\t\t\t\tbreak;\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new Controller_Heads();\n\t\t\t\tbreak;\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new Controller_Blame();\n\t\t\t\tbreak;\n\t\t\tcase 'blob':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('plain', true);\n\t\t\t\tbreak;\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_RSS);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GITPHP_FEED_FORMAT_ATOM);\n\t\t\t\tbreak;\n\t\t\tcase 'commit':\n\t\t\t\t$controller = new Controller_Commit();\n\t\t\t\tbreak;\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new Controller_Project();\n\t\t\t\tbreak;\n case 'tree':\n\t\t\tdefault:\n $controller = new Controller_Tree();\n\t\t}\n\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "d57a13e96b207607fc9ba7327e52d77e", "score": "0.5927687", "text": "private function _buildController($controller_name) {\r\n\t\t\r\n\t\t$model_name = Inflector::singularize($controller_name);\r\n\t\t$controller_name = Inflector::pluralize($controller_name);\r\n\r\n\t\t$this->controller = new Controller();\r\n\t\t$collection = new ComponentCollection();\r\n\t\t$this->controller->request = new CakeRequest();\r\n\t\t$this->Image =& new ImageComponent($collection);\r\n\t\t$this->PDFMenu =& new PDFMenuComponent($collection);\r\n\r\n\t\t$this->controller->name = $controller_name;\r\n\t\t$this->controller->{$model_name} = $this->{$model_name};\r\n\r\n\t\t$this->Image->initialize($this->controller, $this->files_dry_run);\r\n\t\t$this->PDFMenu->initialize($this->controller, $this->files_dry_run);\r\n\r\n\t}", "title": "" }, { "docid": "181c88b44dd8c624423841bce0a25ad4", "score": "0.59190243", "text": "protected function controller($name)\n {\n $space = explode('/', $name);\n $className = last($space);\n $namespace = 'App\\Http\\Controllers';\n $modelPath = str_replace('/', '\\\\', $name);\n $requestPath = $modelPath . 'Request';\n $servicePath = $modelPath . 'Service';\n $resourcePath = $modelPath . 'Resource';\n\n if (count($space) > 1) {\n $namespace .= \"\\\\\" . str_replace('/', '\\\\', str_replace(\"/\". $className, '', $name));\n }\n\n $direcotory = app_path(str_replace('App/', '', str_replace('\\\\', '/', $namespace)));\n\n $controllerTemplate = str_replace(\n [\n '{{DummyNamespace}}',\n '{{requestPath}}',\n '{{servicePath}}',\n '{{resourcePath}}',\n '{{modelName}}',\n '{{modelNamePluralLowerCase}}',\n '{{modelNameSingularLowerCase}}'\n ],\n [\n $namespace,\n $requestPath,\n $servicePath,\n $resourcePath,\n $className,\n strtolower(str_plural($className)),\n strtolower($className)\n ],\n $this->getStub('ControllerAjax')\n );\n\n if(!file_exists($direcotory))\n mkdir($direcotory, 0777, true);\n\n file_put_contents(app_path(\"/Http/Controllers/{$name}Controller.php\"), $controllerTemplate);\n }", "title": "" }, { "docid": "a8d8aed9f45c7f10fa763f95b96cb019", "score": "0.59000975", "text": "public static function factory($name)\n {\n $class = self::toClass($name);\n include APPLICATION_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $class . '.php';\n return new $class();\n }", "title": "" }, { "docid": "29b809a46b9dbf7606b6a90ce383619a", "score": "0.589585", "text": "private function getController(string $dir) {\n $dir = str_replace('/', '\\\\', $dir);\n $class = 'Controller\\\\' . $dir;\n \n $controller = new $class($this, $this->library, $this->session, $this->cache);\n return $controller;\n }", "title": "" }, { "docid": "7651f62b6c93723a9c372dc1a5f871df", "score": "0.589468", "text": "public function initController($controller, $path)\n {\n if($path)\n {\n $controller = $this->name . '\\\\Controller\\\\' . $path . '\\\\' . $controller;\n }\n else\n {\n $controller = $this->name . '\\\\Controller\\\\' . $controller;\n }\n\n return new $controller();\n }", "title": "" }, { "docid": "903cd6f46161ed593e91fd8d1e441e4e", "score": "0.588756", "text": "private function load_controller()\n\t{\n\t\t// If no controller is set through the uri array then set it to default\n\t\tif (Router::uri(1) === null)\n\t\t\tRouter::uri(1, Config::$config[$this->data['app']['name']]['default_controller']);\n\n\t\trequire DOC_ROOT . 'apps/' . $this->app_name . '/controllers/controller.' . Router::uri(1) . '.php';\n\t\t\n\t\t$controller_name = String::uc_slug(Router::uri(1), '_') . '_Controller';\n\t\t$controller_obj = new $controller_name($this->data);\n\t}", "title": "" }, { "docid": "18f6b019957cbd45ff8dd1ea670e90a4", "score": "0.58828807", "text": "public function action_controller( $params ) \n\t{\t\n\t\t$options = \\CCDataObject::assign( $params );\n\t\t\n\t\t$name = $options->get( 0, null );\n\t\t$parent = $options->get( 1, null );\n\t\t\n\t\t// get name if we dont have one\n\t\twhile( !$name ) \n\t\t{\n\t\t\t$name = $this->read( 'Please enter the controller name: ' );\n\t\t}\n\t\t\n\t\t// fix controller suffix\n\t\tif ( substr( $name, ( strlen( 'Controller' ) * -1 ) ) != 'Controller' )\n\t\t{\n\t\t\t$name .= 'Controller';\n\t\t}\n\t\t\n\t\t// try to resolve the path\n\t\tif ( !$path = \\CCPath::controllers( str_replace( '_', '/', $name ), EXT ) )\n\t\t{\n\t\t\t$this->error( 'Could not resolve the path. Check if the namespace is registered.' ); return;\n\t\t}\n\t\t\n\t\t// parent\n\t\tif ( is_null( $parent ) )\n\t\t{\n\t\t\t$parent = '\\\\CCController';\n\t\t} \n\t\t\n\t\t// view controller\n\t\tif ( $options->get( 'view', false ) )\n\t\t{\n\t\t\t$parent = '\\\\CCViewController';\n\t\t}\n\t\t\n\t\t// create the class\n\t\t$class = \\CCShipyard::create( 'class', $name, $parent );\n\t\t\n\t\t// get the actions\n\t\t$actions = array( 'index' );\n\t\t\n\t\tif ( $options->get( 'actions', false ) )\n\t\t{\n\t\t\t$actions = array_merge( $actions, explode( ',', $options->get( 'actions' ) ) );\n\t\t}\n\t\t\n\t\tforeach( $actions as $action )\n\t\t{\n\t\t\t$action = trim( $action );\n\t\t\t\n\t\t\t$class->add( 'function', 'action_'.$action, 'protected', 'echo \"'.$name.' '.$action.' action\";', ucfirst($action).\" action\\n@return void|CCResponse\" );\n\t\t\t$class->add( 'line', 2 );\n\t\t}\n\t\t\n\t\t// add static init\n\t\tif ( !$options->get( 'no-events', false ) )\n\t\t{\n\t\t\t$class->add( 'function', 'wake', 'protected', '//', \"Controller wake\\n@return void|CCResponse\" );\n\t\t\t$class->add( 'line', 2 );\n\t\t\t$class->add( 'function', 'sleep', 'protected', '//', \"Controller wake\\n@return void\" );\n\t\t}\n\t\t\t\t\t\t\n\t\t// check for overwrite\n\t\tif ( file_exists( $path ) )\n\t\t{\n\t\t\tif ( !$this->confirm( \"The class already exists. Do you wish to overwrite it?\", true ) ) \n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write file\n\t\t\\CCFile::write( $path, $class->output() );\n\t}", "title": "" }, { "docid": "986593fadac4a233b16d6411512510b2", "score": "0.5880932", "text": "public function getController($controller_name)\n {\n return Controller::factory($this, $controller_name);\n }", "title": "" }, { "docid": "48be68f2d9bd5c305c8873ab5aff62d3", "score": "0.58794177", "text": "public function create()\n\t{\n\t\t//\n\n return view ('control.create');\n\t}", "title": "" }, { "docid": "cd98ae6932161ed0431f62e5eec26b70", "score": "0.587036", "text": "function __contruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contruct();//Chamando o construtor da classe pai\n\t}", "title": "" }, { "docid": "df206b51af190c78d40f349a9ca3622c", "score": "0.58663046", "text": "private function buildController(Request $request) {\n // With redirection, all incoming URLs are like :\n // index.php?controller=XXX&action=YYY&id=ZZZ\n $controllerSuffix = \"Home\"; // Default controller suffix is \"Home\" to call ControllerHome\n if ($request->existsParameter('controller')) {\n $controllerSuffix = $request->getParameter('controller');\n // First letter to uppercase\n $controllerSuffix = ucfirst(strtolower($controllerSuffix));\n }\n // Once we have the Suffix we can create the controller filename\n $controllerClass = \"Controller\" . $controllerSuffix;\n $controllerFilePath = \"Controller/\" . $controllerClass . \".php\";\n if (file_exists($controllerFilePath)) {\n // Now the right controller matching with the url request is required\n require($controllerFilePath);\n // We instantiate a new controller object \n $controller = new $controllerClass();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"File '$controllerFilePath' not found\");\n }", "title": "" }, { "docid": "4dfca9238fe442ba82b785971608ec5d", "score": "0.5859159", "text": "public function testCreateController()\n {\n $module = new Module('app');\n $module->setModule('base', new Module('base'));\n $defaultController = ['class' => 'yii\\web\\Controller'];\n $otherController = ['class' => 'yii\\web\\Controller'];\n $module->getModule('base')->controllerMap = [\n 'default' => $defaultController,\n 'other' => $otherController,\n ];\n\n list($controller, $action) = $module->createController('base');\n $this->assertSame('', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/default');\n $this->assertSame('', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other');\n $this->assertSame('', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/default/index');\n $this->assertSame('index', $action);\n $this->assertSame('app/base/default', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other/index');\n $this->assertSame('index', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n list($controller, $action) = $module->createController('base/other/someaction');\n $this->assertSame('someaction', $action);\n $this->assertSame('app/base/other', $controller->uniqueId);\n\n $controller = $module->createController('bases/default/index');\n $this->assertFalse($controller);\n\n $controller = $module->createController('nocontroller');\n $this->assertFalse($controller);\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "c012a06c01a8723b409f5711fd9f32fc", "score": "0.58479625", "text": "public function __construct()\n {\n $this->ctrlHome = new HomeController();\n $this->ctrlAdministration = new AdministrationController();\n }", "title": "" }, { "docid": "e391ad7de7d9c70f4f5ada285f6f9e34", "score": "0.58444035", "text": "public function __construct()\n {\n $model = 'Model'.str_replace('Controller','',static::class);\n $this->request = $GLOBALS['request'];\n $this->response = $GLOBALS['response'];\n $this->model = new $model;\n }", "title": "" }, { "docid": "9e818a4d637c746887563487d241a1a2", "score": "0.5828917", "text": "public static function getInstance() {\n\n if( isset( $_REQUEST['api'] ) && filter_input( INPUT_GET, 'api', FILTER_VALIDATE_BOOLEAN ) ){\n\n if( !isset( $_REQUEST['action'] ) || empty( $_REQUEST['action'] ) ){\n header( \"Location: \" . INIT::$HTTPHOST . INIT::$BASEURL . \"api/docs\", true, 303 ); //Redirect 303 See Other\n die();\n }\n\n $_REQUEST[ 'action' ][0] = strtoupper( $_REQUEST[ 'action' ][ 0 ] );\n\n //PHP 5.2 compatibility, don't use a lambda function\n $func = create_function( '$c', 'return strtoupper($c[1]);' );\n\n $_REQUEST[ 'action' ] = preg_replace_callback( '/_([a-z])/', $func, $_REQUEST[ 'action' ] );\n $_POST[ 'action' ] = $_REQUEST[ 'action' ];\n\n //set the log to the API Log\n Log::$fileName = 'API.log';\n\n }\n\n //Default : catController\n $action = ( isset( $_POST[ 'action' ] ) ) ? $_POST[ 'action' ] : ( isset( $_GET[ 'action' ] ) ? $_GET[ 'action' ] : 'cat' );\n $className = $action . \"Controller\";\n\n //Put here all actions we want to be performed by ALL controllers\n require_once INIT::$MODEL_ROOT . '/queries.php';\n\n return new $className();\n\n }", "title": "" }, { "docid": "c167b1ad8a774d33f321682f8bf85138", "score": "0.58256966", "text": "public function createEndpoint()\n {\n $stack = $this->getMiddleware(Controller\\CreateActionController::class);\n $this->app->post(\"/{$this->name}\", $stack, \"{$this->name}.create\");\n return $this;\n }", "title": "" }, { "docid": "441ddd8ff482b1f4a290fc202d094f4f", "score": "0.5820733", "text": "public function __construct(\\Jazzee\\Interfaces\\AdminController $controller);", "title": "" }, { "docid": "ab1cb66e4ea5f6709ca6b9444df42925", "score": "0.5819755", "text": "public function __construct () \r\n\t\t{\r\n\t\t\t// Get the controller values, action and parameter from URL and set class properties.\r\n\t\t\t$this->get_url_data();\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if controller exists.\r\n\t\t\t * If not add the standard controller (controllers/home-controller.php) and call index() method.\r\n\t\t\t*/\r\n\t\t\tif ( ! $this->controlador )\r\n\t\t\t{\r\n\t\t\t\t// Add the standard controller\r\n\t\t\t\trequire_once ABSPATH . '/controllers/home-controller.php';\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Generate controller object \"home-controller.php\"\r\n\t\t\t\t * This controller should have a class called HomeController\r\n\t\t\t\t*/\r\n\t\t\t\t$this->controlador = new HomeController();\r\n\r\n\t\t\t\t// Call index() method\r\n\t\t\t\t$this->controlador->index();\r\n\t\t\t\treturn;\t\t\t\r\n\t\t\t} // ! $this->controlador\r\n\r\n\t\t\t// If controller doesn't exist, nothing happens\r\n\t\t\tif ( ! file_exists( ABSPATH . '/controllers/' . $this->controlador . '.php' ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // file_exists\r\n\r\n\t\t\t// Include controller file\r\n\t\t\trequire_once ABSPATH . '/controllers/' . $this->controlador . '.php';\r\n\r\n\t\t\t/**\r\n\t\t\t * Remove invalid characters from controller name to generate class name.\r\n\t\t\t * e.g: If file name is \"news-controller.php\", the class should be named NewsController.\r\n\t\t\t*/\r\n\t\t\t$this->controlador = preg_replace( '/[^a-zA-Z]/i', '', $this->controlador );\r\n\r\n\t\t\t// If controller's class doesn't exist, nothing happens\r\n\t\t\tif ( ! class_exists( $this->controlador ) ) \r\n\t\t\t{\r\n\t\t\t\t// Page not found\r\n\t\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\t\treturn;\r\n\t\t\t} // class_exists\r\n\r\n\t\t\t// Generate controller class's object and send the parameters\r\n\t\t\t$this->controlador = new $this->controlador( $this->parametros );\r\n\r\n\t\t\t// Remove invalid characters fromethod name.\r\n\t\t\t$this->acao = preg_replace( '/[^a-zA-Z]/i', '', $this->acao );\r\n\r\n\t\t\t// If the method exists, run it and send the parameters\r\n\t\t\tif ( method_exists( $this->controlador, $this->acao ) )\r\n\t\t\t{\r\n\t\t\t\t$this->controlador->{$this->acao}( $this->parametros );\r\n\t\t\t\treturn;\r\n\t\t\t} // method_exists\r\n\r\n\t\t\t// Without action, calls index method\r\n\t\t\tif ( ! $this->acao && method_exists( $this->controlador, 'index' ) ) \r\n\t\t\t{\r\n\t\t\t\t$this->controlador->index( $this->parametros );\t\t\r\n\t\t\t\treturn;\r\n\t\t\t} // ! $this->acao \r\n\r\n\t\t\t// Page not found\r\n\t\t\trequire_once ABSPATH . $this->not_found;\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "34844035a0c313ec42e7eaf1afa3065d", "score": "0.58110505", "text": "public function setupController()\n {\n \t$serviceLocator = $this->getApplicationServiceLocator();\n \t\n $this->setController(new ComponentsController( $serviceLocator ));\n $this->getController()->setServiceLocator( $serviceLocator );\n $this->setRequest(new Request());\n $this->setRouteMatch(new RouteMatch(array('controller' => '\\UIComponents\\Controller\\Components', 'action' => 'index')));\n $this->setEvent(new MvcEvent());\n $config = $serviceLocator->get('Config');\n $routerConfig = isset($config['router']) ? $config['router'] : array();\n $router = HttpRouter::factory($routerConfig);\n $this->getEvent()->setRouter($router);\n $this->getEvent()->setRouteMatch($this->getRouteMatch());\n $this->getController()->setEvent($this->getEvent());\n $this->setResponse(new Response());\n \n $this->setZfcUserValidAuthMock();\n }", "title": "" }, { "docid": "a5957a33fd679962035a8954188adc3d", "score": "0.5803588", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Ampheris\\ampController\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "3c8672a4ab44565b758888a22784fc6a", "score": "0.58019835", "text": "private function _loadExistingController() {\n $file = $this->_controllerPath . $this->_url[1] . '.php';\n \n if (file_exists($file)) {\n require $file;\n $this->_controller = new $this->_url[1];\n $this->_controller->loadModel($this->_url[1], $this->_modelPath);\n } else {\n $this->_error();\n }\n }", "title": "" }, { "docid": "8ed601196501353ac907825ec55208f4", "score": "0.5797926", "text": "protected function getAuthController(): AuthController\n {\n return new AuthCtrl();\n }", "title": "" }, { "docid": "35c04f36e6686376a85a41edc2a73614", "score": "0.57961756", "text": "public function run()\n {\n $url = self::parseUrl(); // Get sanitized url array\n\n if (file_exists(Path::CONTROLLER_PATH . ucfirst($url[0]) . self::CONTROLLER . \".php\")) {\n $this->controller = ucfirst($url[0]) . self::CONTROLLER; // Capitalize firts letter of controller file\n unset($url[0]); // Remove controller name from url\n }\n \n // Create a new instance of founded controller.\n $className = $this->namespace . $this->controller;\n $this->controller = new $className;\n\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]); // Remove method name from url\n }\n }\n\n $this->params = $url ? array_values($url) : [];\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "5404dfc85e5adc922cf24c054703a005", "score": "0.57896876", "text": "public static function getController()\n {\n return self::$instance;\n }", "title": "" }, { "docid": "fc9c9115cba804e7db3b3d49bf5e7a27", "score": "0.5785685", "text": "public function create(){\n\t\t//non-cli request\n\t}", "title": "" }, { "docid": "9078992e89b7bb474dff25ce94989df2", "score": "0.5785085", "text": "public static function create () {}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "f5f543afe38b9e29fb7131e5b7ce724f", "score": "0.5768897", "text": "public static function getController ()\n {\n self::getInstance();\n return self::$_controller;\n }", "title": "" }, { "docid": "06e437b3d8f0ef39c9c2664758c0c1ed", "score": "0.5759767", "text": "public function setController($val)\n {\n $this->_propDict[\"controller\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "b327f30a2114560543450f05e31a181b", "score": "0.57568383", "text": "public function __construct()\n\t\t{\n\t\t\t$this->Controller = $this->getController().'Controller';\n\n\t\t\t// On inclut le model de la class controller\n\t\t\t$model = $this->getController().'Model';\n\t\t\t// on test que le fichier model existe\n\t\t\tif(file_exists(ROOT_PAGES.$this->getController().__DS__.$model.'.php'))\n\t\t\t{\n\t\t\t\tinclude ROOT_PAGES.$this->getController().__DS__.$model.'.php';\t\n\t\t\t\t$this->$model = new $model($this->getController());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4b21a26d8fd938d2bfbcd330533a6d54", "score": "0.57491434", "text": "public function create(Request $request){\n $ProductController = BuyMakeProduct::create($request->all());\n return view('welcome');\n }", "title": "" }, { "docid": "4646ca16c9933666e66043139537df93", "score": "0.574532", "text": "function UserController() // constructor\n {\n }", "title": "" }, { "docid": "4970bdf134efda6be8fc94534eec2ec8", "score": "0.5742138", "text": "protected function handleController() {\n $c = Config::getInstance();\n \n $controllerName = $c->getControllerName();\n $action_name = $c->getActionName();\n if (!empty($_GET[$controllerName])) {\n $controller = $_GET[$controllerName];\n } else {\n $controller = \"home\"; // If any controller, this is the default.\n }\n\n $class = ucfirst($controller) . 'Controller';\n $c = new $class();\n $c->setup();\n }", "title": "" }, { "docid": "0a7d4148e0bb3ee841aa635d286b1157", "score": "0.57387894", "text": "public function __construct() {\n $url = $this->getUrl();\n\n // Check for 1st part if the url: localhost/mm/pages\n if (isset($url[0])) {\n\n // Prepare the class name\n $controller = ucwords(strtolower($url[0]));\n\n // Check if controller exists\n if (file_exists(\"../app/controllers/\" . $controller . \".php\")) {\n\n // If exists, set as controller\n $this->currentController = $controller;\n\n // Unset the first word\n unset($url[0]);\n }\n }\n\n // Require the controller\n require_once \"../app/controllers/\" . $this->currentController . \".php\";\n\n // Instantiate controller class\n $this->currentController = new $this->currentController;\n\n // Check for 2nd part if the url: localhost/mm/pages/about\n if (isset($url[1])) {\n\n // Prepare the method name\n $method = strtolower($url[1]);\n\n // check if methed exits in the currentController\n if (method_exists($this->currentController, $method)) {\n\n $this->currentMethod = $method;\n\n // Unset the second word\n unset($url[1]);\n }\n }\n\n // Move other params from URL to params array\n $this->params = $url ? array_values($url) : [];\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "4b83dec6b24f4f923c1ce547a3d9c6db", "score": "0.57330596", "text": "public function GenerateController()\n {\n $fileName2='../application/controller/'.$this->className.\"sController.php\";\n\n $fn=fopen($fileName2,'w') or die(\"can't open file\");\n $stringData=\"<?php \\n \\n require_once('controller.php');\\n\";\n\n fwrite($fn,$stringData);\n $string=\"\\n if(isset($\".\"_REQUEST['\".\"action\".\"'])){\\n $\".\"controller_templet=new Controller($\".\"_REQUEST['action']);\\n\\t if($\".\"controller_templet->getAction()=='view'){\\n\";\n $string.=\"\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->view());\\n }\";\n fwrite($fn,$string);\n //fwrite($fn,$stringData);\n $string2=\"\\t else if($\".\"controller_templet->getAction()=='add'){\\n\";\n $string2.=\"\\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string2);\n //set varible\n for($i=1;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->save());\\n }\\n else if($\".\"controller_templet->getAction()=='edit'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n for($i=0;$i<sizeof($this->table_names);$i++){\n\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[$i].\"($\".\"_REQUEST['\".$this->table_names[$i].\"']);\\n\";\n fwrite($fn,$string3);\n }\n $string4=\"\\t \\t echo json_encode( $\".$this->className.\"->update()); }\\n else if($\".\"controller_templet->getAction()=='delete'){\\n \\t \\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \";\n fwrite($fn,$string4);\n $string3=\"\\t \\t $\".$this->className.\"->set\".$this->table_names[0].\"($\".\"_REQUEST['\".$this->table_names[0].\"']);\\n\";\n fwrite($fn,$string3);\n $string5=\"echo json_encode( $\".$this->className.\"->delete()); \\n}else if($\".\"controller_templet->getAction()=='viewCombo'){ \\n\\t\\t $\".$this->className.\"=new \".$this->className.\"Service();\\n \\t\\t echo json_encode( $\".$this->className.\"->viewConbox());\\n\\t\\t} \\n} ?>\";\n fwrite($fn,$string5);\n fclose($fn);\n }", "title": "" } ]
eacd7f1b35aa4f04a3a5223e5b09fd79
Get decimal brightness value
[ { "docid": "73615d6c061213769bf803bb500bcac0", "score": "0.68088514", "text": "public static function get_brightness($hex) {\n\n\t\t $hex = str_replace('#', '', $hex);\n\n\t\t $c_r = hexdec(substr($hex, 0, 2));\n\t\t $c_g = hexdec(substr($hex, 2, 2));\n\t\t $c_b = hexdec(substr($hex, 4, 2));\n\n\t\t return (($c_r * 299) + ($c_g * 587) + ($c_b * 114)) / 1000;\n\t\t}", "title": "" } ]
[ { "docid": "d9a289b4df75e30ceb2e57bba89c3f64", "score": "0.75222886", "text": "function get_brightness($hex) {\n\n// strip off any leading #\n$hex = str_replace('#', '', $hex);\n\n$c_r = hexdec(substr($hex, 0, 2));\n$c_g = hexdec(substr($hex, 2, 2));\n$c_b = hexdec(substr($hex, 4, 2));\n\nreturn (($c_r * 299) + ($c_g * 587) + ($c_b * 114)) / 1000;\n}", "title": "" }, { "docid": "86bb7da954cce1a0ddc37cfd17f069e6", "score": "0.7509571", "text": "function get_brightness($hex)\n{\n\n// strip off any leading #\n$hex = str_replace('#', '', $hex);\n\n$c_r = hexdec(substr($hex, 0, 2));\n$c_g = hexdec(substr($hex, 2, 2));\n$c_b = hexdec(substr($hex, 4, 2));\n\nreturn (($c_r * 299) + ($c_g * 587) + ($c_b * 114)) / 1000;\n}", "title": "" }, { "docid": "c9143573f2b97c37316fc7d5e72f9e37", "score": "0.7440616", "text": "function lib_get_brightness($hex) { \r\n\r\n\t// strip off any leading # \r\n\t$hex = str_replace('#', '', $hex); \r\n\t\r\n\t$c_r = hexdec(substr($hex, 0, 2)); \r\n\t$c_g = hexdec(substr($hex, 2, 2)); \r\n\t$c_b = hexdec(substr($hex, 4, 2)); \r\n\t\r\n\treturn (($c_r * 299) + ($c_g * 587) + ($c_b * 114)) / 1000; \r\n}", "title": "" }, { "docid": "060873890376f4628903e3db0194558d", "score": "0.73802394", "text": "function get_brightness($hex) {\n // strip off any leading #\n $c_r = hexdec(substr($hex, 0, 2));\n $c_g = hexdec(substr($hex, 2, 2));\n $c_b = hexdec(substr($hex, 4, 2));\n\n return (($c_r * 587) + ($c_g * 299) + ($c_b * 114)) / 1000;\n}", "title": "" }, { "docid": "36ac2f353dbabcd01fae6ed8add568f1", "score": "0.70905226", "text": "private function get_brightness($hex) {\n\t\t\n\t\t// strip off any leading #\n\t\t$hex = str_replace('#', '', $hex);\n\t\t\n\t\t$c_r = hexdec(substr($hex, 0, 2));\n\t\t$c_g = hexdec(substr($hex, 2, 2));\n\t\t$c_b = hexdec(substr($hex, 4, 2));\n\t\t\n\t\treturn (($c_r * 299) + ($c_g * 587) + ($c_b * 114)) / 1000;\n\t}", "title": "" }, { "docid": "32ee90b55f5795153e57f5f3c30a05b7", "score": "0.6956685", "text": "function shoestrap_get_brightness( $hex ) {\n // returns brightness value from 0 to 255\n // strip off any leading #\n $hex = str_replace( '#', '', $hex );\n\n $c_r = hexdec( substr( $hex, 0, 2 ) );\n $c_g = hexdec( substr( $hex, 2, 2 ) );\n $c_b = hexdec( substr( $hex, 4, 2 ) );\n\n return ( ( $c_r * 299 ) + ( $c_g * 587 ) + ( $c_b * 114 ) ) / 1000;\n}", "title": "" }, { "docid": "479a2078daddfb8c1550c90852aa0e8f", "score": "0.634068", "text": "public function brightness(string $hex = null): int\n {\n if ($hex) {\n $this->parse($hex);\n }\n\n return intval(round($this->red * 299 + $this->green * 587 + $this->blue * 114) / 10);\n }", "title": "" }, { "docid": "4ea5795bebb9922f5c3b8d533be559d9", "score": "0.6251021", "text": "public function getRainVolume(): float\n {\n return (float)($this->details['rain']['3h'] ?? 0);\n }", "title": "" }, { "docid": "ffdba619b9b2785b4e02a5b361f98f4f", "score": "0.6131632", "text": "public function getValue() {\n\t\treturn (float) $this->value / 100;\n\t}", "title": "" }, { "docid": "3aafa3392bf55b0f3f8aa09a855f5d20", "score": "0.6082981", "text": "public function getIlluminance()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ILLUMINANCE, $payload);\n\n $payload = unpack('v1illuminance', $data);\n\n return $payload['illuminance'];\n }", "title": "" }, { "docid": "3804cdf192b0c4fc6378497a4076509b", "score": "0.6066219", "text": "public function brightness($val='+')\n\t{\n\t\tif ( $this->test() )\n\t\t{\n\t\t\tif ( class_exists('\\\\Imagick') )\n\t\t\t{\n\t\t\t\t$p = ( $val == '-' ) ? 90 : 110;\n\t\t\t\tif ( !$this->img->modulateImage($p,100,100) ){\n\t\t\t\t\t$this->error = defined('BBN_THERE_HAS_BEEN_A_PROBLEM') ? \n\t\t\t\t\t\tBBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( function_exists('imagefilter') )\n\t\t\t{\n\t\t\t\t$p = ( $val == '-' ) ? -20 : 20;\n\t\t\t\tif ( !imagefilter($this->img,IMG_FILTER_BRIGHTNESS,-20) ){\n\t\t\t\t\t$this->error = defined('BBN_THERE_HAS_BEEN_A_PROBLEM') ? \n\t\t\t\t\t\tBBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "479af34b71e955bad756853c6a6ecdcf", "score": "0.6064442", "text": "public function brightness($val='+')\n\t{\n\t\tif ( $this->test() )\n\t\t{\n\t\t\tif ( class_exists('\\\\Imagick') )\n\t\t\t{\n\t\t\t\t$p = ( $val == '-' ) ? 90 : 110;\n\t\t\t\tif ( !$this->img->modulateImage($p,100,100) ){\n\t\t\t\t\t$this->error = defined('BBN_THERE_HAS_BEEN_A_PROBLEM') ?\n\t\t\t\t\t\tBBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( function_exists('imagefilter') )\n\t\t\t{\n\t\t\t\t$p = ( $val == '-' ) ? -20 : 20;\n\t\t\t\tif ( !imagefilter($this->img,IMG_FILTER_BRIGHTNESS,-20) ){\n\t\t\t\t\t$this->error = defined('BBN_THERE_HAS_BEEN_A_PROBLEM') ?\n\t\t\t\t\t\tBBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "34e2ca3986c53065ede92fc669924bf7", "score": "0.6023592", "text": "public function brightness($level)\n {\n imagefilter($this->data, IMG_FILTER_BRIGHTNESS, $level);\n\n return $this->save();\n }", "title": "" }, { "docid": "269d3ee0cf54d19af4156a9952467fa0", "score": "0.59699947", "text": "public function vndtoaud() {\n return $this->moneyinput*0.000059;\n }", "title": "" }, { "docid": "7d5a4aaac66df2fda65bded877e0f4f2", "score": "0.5960434", "text": "function c5_get_lum($color) {\n // http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color\n $r = ($color >> 16) & 0xFF;\n $g = ($color >> 8) & 0xFF;\n $b = $color & 0xFF;\n\n // choose a simple luminance formula from here\n // http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color\n $lum = round( ($r+$r+$b+$g+$g+$g)/6 );\n return $lum;\n }", "title": "" }, { "docid": "925d03a1c0feb6c56a37d6cb22409db0", "score": "0.589963", "text": "public function calculateBrightness($color)\n {\n $components = is_array($color) ? $color : $this->hex2rgb($color);\n return sqrt(0.241 * pow($components[0], 2) + 0.691 * pow($components[1], 2) + 0.068 * pow($components[2], 2));\n }", "title": "" }, { "docid": "7c41a6d5b4096bf4dcc64383021a4615", "score": "0.5852316", "text": "function sp_color_brightness( $color, $change ) {\n\t$hexcolor = str_replace( '#', '', $color );\n\t$red = hexdec( substr( $hexcolor, 0, 2 ) );\n\t$green = hexdec( substr( $hexcolor, 2, 2 ) );\n\t$blue = hexdec( substr( $hexcolor, 4, 2 ) );\n\t$red = max( 0, min( 255, $red + $change ) );\n\t$green = max( 0, min( 255, $green + $change ) );\n\t$blue = max( 0, min( 255, $blue + $change ) );\n\treturn '#' . dechex( $red ) . dechex( $green ) . dechex( $blue );\n}", "title": "" }, { "docid": "3c4f858bc5838ea86b9dc9a87f154570", "score": "0.5835985", "text": "public function usdtoaud() {\n return $this->moneyinput*1.35;\n }", "title": "" }, { "docid": "f393802d88ab08585a183fcfe18ada84", "score": "0.5823956", "text": "function segenvita_color_brightness( $color, $change ) {\n\n\t$hexcolor = str_replace( '#', '', $color );\n\n\t$red = hexdec( substr( $hexcolor, 0, 2 ) );\n\t$green = hexdec( substr( $hexcolor, 2, 2 ) );\n\t$blue = hexdec( substr( $hexcolor, 4, 2 ) );\n\n\t$red = max( 0, min( 255, $red + $change ) );\n\t$green = max( 0, min( 255, $green + $change ) );\n\t$blue = max( 0, min( 255, $blue + $change ) );\n\n\treturn '#' . dechex( $red ) . dechex( $green ) . dechex( $blue );\n\n}", "title": "" }, { "docid": "aad4fe16200cd3e4647902fe513d9b42", "score": "0.57829285", "text": "public function getBloodiedValue() {\n\t\treturn floor($this->health_max/2);\n\t}", "title": "" }, { "docid": "4ac50a1174c130257754c9281dd3c865", "score": "0.5750789", "text": "public function getHumidity(){\n\t\treturn $this->humidity.' %';\n\t}", "title": "" }, { "docid": "cf86c2dec006e244dffc4e3194957b6b", "score": "0.57326025", "text": "public function getDiffPixByVal($value) { \n //check max diff_pix_hue and diff_pix_shade\n $diff_pix_type = $value['MonitoringLog']['diff_pix_hue'];\n if($value['MonitoringLog']['diff_pix_shade'] > $value['MonitoringLog']['diff_pix_hue']){\n $diff_pix_type = $value['MonitoringLog']['diff_pix_shade'];\n }\n return $diff_pix_type;\n }", "title": "" }, { "docid": "3625f76bdc955454efb5880d1309e792", "score": "0.5704899", "text": "public function getValue(): float;", "title": "" }, { "docid": "3625f76bdc955454efb5880d1309e792", "score": "0.5704899", "text": "public function getValue(): float;", "title": "" }, { "docid": "fd0c64f1f7b3e7ca9699459cc16bd763", "score": "0.5699396", "text": "public function lightness(string $hex = null): int\n {\n if ($hex) {\n $this->parse($hex);\n }\n\n return intval(round(($this->min + $this->max) * 100 / 2));\n }", "title": "" }, { "docid": "a4a8f9e9c33f13243bd30d6339d5b36f", "score": "0.5678437", "text": "public function getVolumeValue();", "title": "" }, { "docid": "239a44d7849b63d059e63838b54acb1f", "score": "0.56415826", "text": "function linearizeLed($x) {\n\t// http://www.picbasic.co.uk/forum/showthread.php?t=16187\n\t$gamma=0.75;\n\t// return intVal(round((255^((($x+1)/255)^gamma)+.3)));\n\t\n\t// http://electronics.stackexchange.com/questions/1983/correcting-for-non-linear-brightness-in-leds-when-using-pwm\t\n\treturn intVal(round(1/(1+exp((($x/21)-6)*-1))*255));\n}", "title": "" }, { "docid": "f5f3b7322c32489d65706e90e7cea30b", "score": "0.5624743", "text": "public function getKnightValue()\n\t{\n\t\treturn 350;\n\t}", "title": "" }, { "docid": "d43110b413201a0e43c719c7bc9a47f7", "score": "0.5618873", "text": "public function toHSV()\n {\n return $this->toRGB()->toHSV();\n }", "title": "" }, { "docid": "d43110b413201a0e43c719c7bc9a47f7", "score": "0.5618873", "text": "public function toHSV()\n {\n return $this->toRGB()->toHSV();\n }", "title": "" }, { "docid": "e7bce42f5ddfd13924fec3e8ae7d3ddb", "score": "0.5611156", "text": "public function getValue()\n {\n return $this->ratio;\n }", "title": "" }, { "docid": "bf3c08ba56b16347739021f48db6955e", "score": "0.5607178", "text": "function ColorToFloat($value){\n\n\t// Only convert valid colors\n\tif($value < 0){\n\t\t$value = 0;\n\t}\n\t// Only convert valid colors\n\tif($value > 255){\n\t\t$value = 255;\n\t}\n\n $max = 255;\n $increment = $max / 100;\n $value = ($value / $increment) / 100;\n\n\t// If the value isn't a float\n\tif(!is_float($value)){ // value is 0 or 1\n\t\t$value .= '.00'; // append dot zero zero\n\t}\n return $value;\n}", "title": "" }, { "docid": "9ccaedc7ab2ecba42dcb0d52d46e9b66", "score": "0.5585424", "text": "public function getResistanceValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "068edc4b72d1735364b669129f14408d", "score": "0.55504656", "text": "public function getWater(): float\n {\n // Return the float for litres of water\n return $this->water;\n }", "title": "" }, { "docid": "1e50130d0033f3876d94f2f5f0762fe5", "score": "0.55476725", "text": "function getBaseHappiness(){\n\t\t\t$basehappiness=0.98 - ($this->_round_number-1)/100;\n\t\t\treturn $basehappiness;\n\t\t}", "title": "" }, { "docid": "f75d2b5ea5cd0013f413b3b78d3f5230", "score": "0.5528312", "text": "public function getLightNum() {\n return $this->get(self::LIGHT_NUM);\n }", "title": "" }, { "docid": "adf92955ea3b20b0bbc85ae8d4c24fa6", "score": "0.5527781", "text": "public function reduceScale()\n {\n return dec($this->getValue());\n }", "title": "" }, { "docid": "a2ff5cb327c8b15c5fc21d1d62138459", "score": "0.55014205", "text": "function shoestrap_adjust_brightness( $hex, $steps ) {\n // Steps should be between -255 and 255. Negative = darker, positive = lighter\n $steps = max( -255, min( 255, $steps ) );\n\n // Format the hex color string\n $hex = str_replace( '#', '', $hex );\n if ( strlen( $hex ) == 3 ) {\n $hex = str_repeat( substr( $hex, 0, 1 ), 2 ).str_repeat( substr( $hex, 1, 1 ), 2 ).str_repeat( substr( $hex, 2, 1 ), 2 );\n }\n\n // Get decimal values\n $r = hexdec( substr( $hex, 0, 2 ) );\n $g = hexdec( substr( $hex, 2, 2 ) );\n $b = hexdec( substr( $hex, 4, 2 ) );\n\n // Adjust number of steps and keep it inside 0 to 255\n $r = max( 0, min( 255, $r + $steps ) );\n $g = max( 0, min( 255, $g + $steps ) );\n $b = max( 0, min( 255, $b + $steps ) );\n\n $r_hex = str_pad( dechex( $r ), 2, '0', STR_PAD_LEFT );\n $g_hex = str_pad( dechex( $g ), 2, '0', STR_PAD_LEFT );\n $b_hex = str_pad( dechex( $b ), 2, '0', STR_PAD_LEFT );\n\n return '#'.$r_hex.$g_hex.$b_hex;\n}", "title": "" }, { "docid": "85546d4c0e0a2127a850af2f4a0cb344", "score": "0.54655576", "text": "public function getVolatility(): float;", "title": "" }, { "docid": "e169fe36c09dab4e3b32fb84bf17482a", "score": "0.5460573", "text": "public function getRawPercent() : float\n\t{\n\t\treturn $this->rawPercent;\n\t}", "title": "" }, { "docid": "8433954f11166c12b4b7a467ad7dc940", "score": "0.5458326", "text": "public function getAlpha(): int\n {\n $this->updateFromCData();\n return $this->alpha;\n }", "title": "" }, { "docid": "8b4f1e8236c6966b2767fac1c0bd33e7", "score": "0.5430802", "text": "public function get() : float\n {\n return $this->value;\n }", "title": "" }, { "docid": "8b4f1e8236c6966b2767fac1c0bd33e7", "score": "0.5430802", "text": "public function get() : float\n {\n return $this->value;\n }", "title": "" }, { "docid": "8133b2d6d03e4b5936fd1e5a48b98340", "score": "0.54295564", "text": "public function getRgb();", "title": "" }, { "docid": "ba8a137c550a235929f44877ae576e86", "score": "0.54008275", "text": "public function getIlluminanceCallbackThreshold()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ILLUMINANCE_CALLBACK_THRESHOLD, $payload);\n\n $payload = unpack('c1option/v1min/v1max', $data);\n\n $result['option'] = chr($payload['option']);\n $result['min'] = IPConnection::fixUnpackedInt16($payload['min']);\n $result['max'] = IPConnection::fixUnpackedInt16($payload['max']);\n\n return $result;\n }", "title": "" }, { "docid": "55f9441ee4ad0d3fb61a4c76c662ad21", "score": "0.53954643", "text": "function RGB_TO_HSV($R, $G, $B) // RGB values: 0-255, 0-255, 0-255\n{\n // Convert the RGB byte-values to percentages\n $R = ($R / 255);\n $G = ($G / 255);\n $B = ($B / 255);\n\n // Calculate a few basic values, the maximum value of R,G,B, the\n // minimum value, and the difference of the two (chroma).\n $maxRGB = max($R, $G, $B);\n $minRGB = min($R, $G, $B);\n $chroma = $maxRGB - $minRGB;\n\n // Value (also called Brightness) is the easiest component to calculate,\n // and is simply the highest value among the R,G,B components.\n // We multiply by 100 to turn the decimal into a readable percent value.\n $computedV = 100 * $maxRGB;\n\n // Special case if hueless (equal parts RGB make black, white, or grays)\n // Note that Hue is technically undefined when chroma is zero, as\n // attempting to calculate it would cause division by zero (see\n // below), so most applications simply substitute a Hue of zero.\n // Saturation will always be zero in this case, see below for details.\n if ($chroma == 0)\n return array(0, 0, $computedV);\n\n // Saturation is also simple to compute, and is simply the chroma\n // over the Value (or Brightness)\n // Again, multiplied by 100 to get a percentage.\n $computedS = 100 * ($chroma / $maxRGB);\n\n // Calculate Hue component\n // Hue is calculated on the \"chromacity plane\", which is represented\n // as a 2D hexagon, divided into six 60-degree sectors. We calculate\n // the bisecting angle as a value 0 <= x < 6, that represents which\n // portion of which sector the line falls on.\n if ($R == $minRGB)\n $h = 3 - (($G - $B) / $chroma);\n elseif ($B == $minRGB)\n $h = 1 - (($R - $G) / $chroma);\n else // $G == $minRGB\n $h = 5 - (($B - $R) / $chroma);\n\n // After we have the sector position, we multiply it by the size of\n // each sector's arc (60 degrees) to obtain the angle in degrees.\n $computedH = 60 * $h;\n\n return array($computedH, $computedS, $computedV);\n}", "title": "" }, { "docid": "193ec4b83a4b1882cebd6e1425b43ac4", "score": "0.5374875", "text": "public function colorBrightness(int $brightness): void\n {\n }", "title": "" }, { "docid": "7e2a2db2d3dd196bc6e4adae14ac3c79", "score": "0.5368964", "text": "public static function emuToPixels($pValue = 0)\n {\n if ($pValue == 0) {\n return 0;\n }\n\n return round($pValue / 9525);\n }", "title": "" }, { "docid": "226efd480654e69b7c38377a510d2263", "score": "0.5367482", "text": "public function getValue(): float\n {\n return $this->value;\n }", "title": "" }, { "docid": "ec83e36ae358093639a6ec899b7589b3", "score": "0.536543", "text": "public function getOverlayOpacity() {\n return Mage::helper('chargepayment')->getConfigData($this->_paymentCode, 'overlay_opacity');\n }", "title": "" }, { "docid": "19d14618385401e868dd286acf97ea5c", "score": "0.5364454", "text": "function c5_get_avg_luminance($filename, $num_samples=10) {\n if (!function_exists('exif_imagetype')) {\n return 0;\n }\n $options = get_option('c5_images_luminance');\n if (is_array($options)) {\n if (isset($options[$filename])) {\n return $options[$filename];\n }\n }else {\n $options =array();\n }\n\n\n $img = c5_imageCreateFromAny($filename);\n\n $width = imagesx($img);\n $height = imagesy($img);\n\n $x_step = intval($width/$num_samples);\n $y_step = intval($height/$num_samples);\n\n $total_lum = 0;\n\n $sample_no = 1;\n\n for ($x=0; $x<$width; $x+=$x_step) {\n for ($y=0; $y<$height; $y+=$y_step) {\n\n $rgb = imagecolorat($img, $x, $y);\n $lum = c5_get_lum($rgb);\n\n $total_lum += $lum;\n\n // debugging code\n // echo \"$sample_no - XY: $x,$y = $r, $g, $b = $lum<br />\";\n $sample_no++;\n }\n }\n\n // work out the average\n $avg_lum = round( $total_lum/$sample_no);\n\n\n $options[$filename] = $avg_lum;\n update_option('c5_images_luminance' , $options);\n return $avg_lum;\n }", "title": "" }, { "docid": "2912f9feccd7341a0970aa84e121f915", "score": "0.53575456", "text": "public static function delta()\n {\n return 0.5 / (app('currency')->divisao ?: 100);\n }", "title": "" }, { "docid": "e1fa82810a45645c1855c509688fc3d9", "score": "0.53503436", "text": "function townhub_colourBrightness($hex, $percent) {\n \n // Work out if hash given\n $hash = '';\n if (stristr($hex, '#')) {\n $hex = str_replace('#', '', $hex);\n $hash = '#';\n }\n \n /// HEX TO RGB\n $rgb = townhub_hex2rgb($hex);\n \n //// CALCULATE\n for ($i = 0; $i < 3; $i++) {\n \n // See if brighter or darker\n if ($percent > 0) {\n \n // Lighter\n $rgb[$i] = round($rgb[$i] * $percent) + round(255 * (1 - $percent));\n } \n else {\n \n // Darker\n $positivePercent = $percent - ($percent * 2);\n $rgb[$i] = round($rgb[$i] * $positivePercent) + round(0 * (1 - $positivePercent));\n }\n \n // In case rounding up causes us to go to 256\n if ($rgb[$i] > 255) {\n $rgb[$i] = 255;\n }\n }\n \n //// RBG to Hex\n $hex = '';\n for ($i = 0; $i < 3; $i++) {\n \n // Convert the decimal digit to hex\n $hexDigit = dechex($rgb[$i]);\n \n // Add a leading zero if necessary\n if (strlen($hexDigit) == 1) {\n $hexDigit = \"0\" . $hexDigit;\n }\n \n // Append to the hex string\n $hex.= $hexDigit;\n }\n return $hash . $hex;\n }", "title": "" }, { "docid": "4a9dafa3b8d7df9cca8d65686c2390df", "score": "0.53477794", "text": "public function getRgb()\n {\n return $this->_rgb;\n }", "title": "" }, { "docid": "ab95c33c195a6a8acad95318445d3848", "score": "0.5334705", "text": "public function getBalance(): float;", "title": "" }, { "docid": "7ac958f4d59dc50d58a58a67c1ef0de7", "score": "0.53320295", "text": "function ActionBrightness($light)\n\t\t{\n\t\t\tif (function_exists('imagefilter'))\n\t\t\t\timagefilter($this->resourceWorkWith, IMG_FILTER_BRIGHTNESS, $light);\n\t\t\telse\n\t\t\t\tPIE_Brightness($this->resourceWorkWith, $light);\n\t\t}", "title": "" }, { "docid": "bc7449e6cd64b2c2880dfaa342e8e541", "score": "0.5331042", "text": "public function b() {\n return $this->blue();\n }", "title": "" }, { "docid": "881bcc1db0df05f2723b74641bec0315", "score": "0.5324675", "text": "function adjustBrightness($hex, $steps) {\n // Steps should be between -255 and 255. Negative = darker, positive = lighter\n $steps = max(-255, min(255, $steps));\n\n // Format the hex color string\n $hex = str_replace('#', '', $hex);\n if (strlen($hex) == 3) {\n $hex = str_repeat(substr($hex,0,1), 2).str_repeat(substr($hex,1,1), 2).str_repeat(substr($hex,2,1), 2);\n }\n\n // Get decimal values\n $r = hexdec(substr($hex,0,2));\n $g = hexdec(substr($hex,2,2));\n $b = hexdec(substr($hex,4,2));\n\n // Adjust number of steps and keep it inside 0 to 255\n $r = max(0,min(255,$r + $steps));\n $g = max(0,min(255,$g + $steps)); \n $b = max(0,min(255,$b + $steps));\n\n $r_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT);\n $g_hex = str_pad(dechex($g), 2, '0', STR_PAD_LEFT);\n $b_hex = str_pad(dechex($b), 2, '0', STR_PAD_LEFT);\n\n return '#'.$r_hex.$g_hex.$b_hex;\n}", "title": "" }, { "docid": "3a0d95732ee2d029ee7b68644f02e1d6", "score": "0.53196776", "text": "public function getColorLevel(): int;", "title": "" }, { "docid": "32f47656898a1a0c9af917b3ad8199c6", "score": "0.5308555", "text": "public function luminance(string $hex = null): float\n {\n if ($hex) {\n $this->parse($hex);\n }\n\n $components = [\n 'red' => $this->red,\n 'green' => $this->green,\n 'blue' => $this->blue,\n ];\n\n foreach ($components as $color => $value) {\n if ($value <= 0.04045) {\n $components[$color] = $value / 12.92;\n } else {\n $components[$color] = pow((($value + 0.055) / 1.055), 2.4);\n }\n }\n\n // ITU-R BT. 709\n $luminance_perc = (($components['red'] * 0.2126) + ($components['green'] * 0.7152) + ($components['blue'] * 0.0722)) * 100;\n\n return round($luminance_perc, 2);\n }", "title": "" }, { "docid": "b985bcac715fdf56245c5fb69944ccea", "score": "0.53081465", "text": "public function get_colour() {\n return $this->persistent->get('colour');\n }", "title": "" }, { "docid": "ba9dbe5c85595d3151838795138928fb", "score": "0.5302657", "text": "function detail_preci($value){\r\n\t\t\tif($value<=0.0001){return \"N/A\";}\r\n\t\t\telseif ($value<=0.015) {return \"Very Light\";}\r\n\t\t\telseif ($value<=0.05) {return \"Light\";}\r\n\t\t\telseif ($value<=0.1) {return \"Moderate\";}\r\n\t\t\telseif ($value > 01) {return \"Heavy\";}\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "246123a31a17035f216907baff66380e", "score": "0.5299747", "text": "function get_pixel_acc_balance()\n {\n\n // query to read single record\n $query = \"SELECT AccountBalance FROM \". $this->table_name . \" WHERE AccountNumber = ? LIMIT 0,1\";\n\n // prepare query statement\n $stmt = $this->DBconnect->prepare( $query );\n\n // bind id of product to be updated\n $stmt->bindParam(1, $this->pix);\n\n // execute query\n $stmt->execute();\n\n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n // set values to object properties\n $this->AccountBalance = $row['AccountBalance'];\n\n return $this->AccountBalance;\n\n }", "title": "" }, { "docid": "4efafc338164db4376e810d6f80d4e1e", "score": "0.5296904", "text": "public function value()\r\n\t{\r\n\t\treturn number_format($this->valueNumeric(), 2);\r\n\t}", "title": "" }, { "docid": "8c5e724dbcad63c4a840bc0f948efa9b", "score": "0.52950245", "text": "private function colourBrightness($hex, $percent) {\n\t\t$hash = '';\n\t\tif (stristr($hex,'#')) {\n\t\t\t$hex = str_replace('#','',$hex);\n\t\t\t$hash = '#';\n\t\t}\n\t\t/// HEX TO RGB\n\t\t$rgb = array(hexdec(substr($hex,0,2)), hexdec(substr($hex,2,2)), hexdec(substr($hex,4,2)));\n\t\t//// CALCULATE \n\t\tfor ($i=0; $i<3; $i++) {\n\t\t\t// See if brighter or darker\n\t\t\tif ($percent > 0) {\n\t\t\t\t// Lighter\n\t\t\t\t$rgb[$i] = round($rgb[$i] * $percent) + round(255 * (1-$percent));\n\t\t\t} else {\n\t\t\t\t// Darker\n\t\t\t\t$positivePercent = $percent - ($percent*2);\n\t\t\t\t$rgb[$i] = round($rgb[$i] * $positivePercent) + round(0 * (1-$positivePercent));\n\t\t\t}\n\t\t\t// In case rounding up causes us to go to 256\n\t\t\tif ($rgb[$i] > 255) {\n\t\t\t\t$rgb[$i] = 255;\n\t\t\t}\n\t\t}\n\t\t//// RBG to Hex\n\t\t$hex = '';\n\t\tfor($i=0; $i < 3; $i++) {\n\t\t\t// Convert the decimal digit to hex\n\t\t\t$hexDigit = dechex($rgb[$i]);\n\t\t\t// Add a leading zero if necessary\n\t\t\tif(strlen($hexDigit) == 1) {\n\t\t\t$hexDigit = \"0\" . $hexDigit;\n\t\t\t}\n\t\t\t// Append to the hex string\n\t\t\t$hex .= $hexDigit;\n\t\t}\n\t\treturn $hash.$hex;\n\t}", "title": "" }, { "docid": "233595a946d0d6404f865f3aa33f19b4", "score": "0.5290494", "text": "public function cast(){\n return floor(100*50*(150-$this->dex)/150)/50;\n }", "title": "" }, { "docid": "76c4afa1e4961bb48f506e4a875626b5", "score": "0.52784705", "text": "public function getStatus() : int\n\t{\n\t\treturn $this->get( 'slider.status', 1 );\n\t}", "title": "" }, { "docid": "f40c61488e9f5456605e7d7e7156ef7c", "score": "0.527452", "text": "public function valueChangeNumeric()\r\n\t{\r\n\t\treturn $this->shares * $this->stock->change();\r\n\t}", "title": "" }, { "docid": "67bbd9cc24b72066b3e4c461f64c0795", "score": "0.5273397", "text": "public function getArduinoMean()\n {\n// $arduino1 = $last->arduino_1;\n// $arduino2 = $last->arduino_2;\n// $sum = ($arduino1 + $arduino2);\n// $mean = (float)$sum / 2;\n//\n// return $mean;\n }", "title": "" }, { "docid": "66c88986b577d678e55b2a510bdd9e64", "score": "0.527316", "text": "public function getVolume () {\n return ($this->getBaseArea() * $this->getHeight()); // radius * radius * pi * height\n }", "title": "" }, { "docid": "eb4f909071748e09941f2473d5632d82", "score": "0.525253", "text": "public function toRGB()\n {\n return $this->toCMY()->toRGB();\n }", "title": "" }, { "docid": "84efd70f0a599cf03197778371be9e69", "score": "0.5247096", "text": "public function getAlpha() : int {\n return $this -> alpha;\n }", "title": "" }, { "docid": "926e8a76c824c4871a0f672b39a57cee", "score": "0.52405244", "text": "public function getGainRaw()\n {\n return $this->gain_raw;\n }", "title": "" }, { "docid": "b1cf93316b2045a6dd2be4398a250eda", "score": "0.5237938", "text": "public function getValueOfVAT(): int|float;", "title": "" }, { "docid": "26ec2ff485baf0b95e45e4d31dc743cf", "score": "0.5235248", "text": "function et_hsl_to_rgb($hue, $saturation, $lightness){\n\t//$c = $lightness * $saturation;\n\t$c = (1 - abs((2 * $lightness) - 1)) * $saturation;\n\n\t$hcomma = $hue / 60; \n\n\t$mod = $hcomma - ( floor( floor($hcomma) / 2 ) * 2 );\n\n\t$x = $c * ( 1 - abs( $mod - 1 ) );\n\n\t$return = array();\n\t$t = floor($hcomma);\n\tswitch ($t) {\n\t\tdefault:\n\t\tcase 0:\n\t\t\t$return = array( 'red' => $c, 'green' => $x, 'blue' => 0 );\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t$return = array( 'red' => $x, 'green' => $c, 'blue' => 0 );\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$return = array( 'red' => 0, 'green' => $c, 'blue' => $x );\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$return = array( 'red' => 0, 'green' => $x, 'blue' => $c );\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\t$return = array( 'red' => $x, 'green' => 0, 'blue' => $c );\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\t$return = array( 'red' => $c, 'green' => 0, 'blue' => $x );\n\t\t\tbreak;\n\t}\n\t$m = $lightness - ($c * 0.5);\n\n\t$return['red'] = round( ($return['red'] + $m )* 255);\n\t$return['green'] = round( ($return['green'] + $m )* 255);\n\t$return['blue'] = round( ($return['blue'] + $m )* 255);\n\n\treturn '#' . str_pad(dechex($return['red']), 2, 0, STR_PAD_LEFT) . \n\t\tstr_pad(dechex($return['green']), 2, 0, STR_PAD_LEFT) . \n\t\tstr_pad(dechex($return['blue']), 2, 0, STR_PAD_LEFT);\n}", "title": "" }, { "docid": "a946471b1e026454d193ec6939c676ce", "score": "0.5227727", "text": "function redondear_dos_decimal($valor) {\n $float_redondeado=round($valor * 100) / 100;\n return $float_redondeado;\n}", "title": "" }, { "docid": "2984af9b2edc65a4d4eeaf6ab8dfc27f", "score": "0.5226424", "text": "function getLightColor($x){\n\tif(preg_match(\"/([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])/ims\", $x, $matches)){\n\t\t$r=(255+hexdec($matches[1]))/2;\n\t\t$b=(255+hexdec($matches[2]))/2;\n\t\t$g=(255+hexdec($matches[3]))/2;\n\t\t\n\t\t$r=($r>255?255:$r);\n\t\t$b=($b>255?255:$b);\n\t\t$g=($g>255?255:$g);\n\t\t\n\t\treturn dechex($r).dechex($b).dechex($g);\n\t}\n\telse\n\t\treturn \"\";\n\n}", "title": "" }, { "docid": "eb46b6e4a07ab45e7713b5df5f4cc75e", "score": "0.5225378", "text": "function lightColor( $data ) {\n return $data['p1'];\n }", "title": "" }, { "docid": "9ee99582047ec1272d29a04fc40073fe", "score": "0.52214664", "text": "public function getChange()\r\n\t{\r\n\t\t$change = $this->valueChange();\r\n\t\tif($change > 0)\r\n\t\t\treturn \"<span class=\\\"gain\\\">\".$change.\" (\".$this->percentChange().\"%)</span>\";\r\n\t\telse if($change < 0)\r\n\t\t\treturn \"<span class=\\\"loss\\\">\".$change.\" (\".$this->percentChange().\"%)</span>\";\r\n\t\telse\r\n\t\t\treturn $change.\" (\".$this->percentChange().\"%)\";\r\n\t}", "title": "" }, { "docid": "113560feb309c6b6d447c9ecbe6ede22", "score": "0.5219659", "text": "public function hexVal() {\r\n return $this->value->hexVal();\r\n }", "title": "" }, { "docid": "edd15e9c4a34db45a926d1e9a2cba843", "score": "0.52183425", "text": "public function getValueWithVAT(): int|float;", "title": "" }, { "docid": "ac838d3be48c985ec20b0493f77f14c3", "score": "0.5213257", "text": "public function percentage()\n {\n return intval($this->percentage);\n }", "title": "" }, { "docid": "4c4c9950c66d4da80cf0dc8539b7ec43", "score": "0.52083415", "text": "function get_color($poucentage,$mini=0,$max=100){\r\n\t\t$valeur = (int) $poucentage - $mini;\r\n\t\t$div=$max-$mini;\r\n\t\tif($div<1) $div=1;\r\n\t\t$couleur=255-($valeur*255/($div));\r\n\t\tif($couleur>16) $couleur=dechex($couleur);\r\n\t\telse $couleur=\"0\".dechex($couleur);\r\n\t\t$couleurHexa=\"FF\".$couleur.$couleur;\r\n\t\treturn $couleurHexa;\r\n}", "title": "" }, { "docid": "04b659d98fc12d66afd6adbb4ed60e7d", "score": "0.52038854", "text": "public function getImageBrightness($colorRgb)\n {\n list($red, $green, $blue) = $colorRgb;\n if ( 0.299 * $red + 0.587 * $green + 0.114 * $blue > 127.5 ) {\n $imageBrigtness = 'light';\n }\n else {\n $imageBrigtness = 'dark';\n }\n\n return $imageBrigtness;\n }", "title": "" }, { "docid": "3cf2996a49e865d4797e0b500c21753e", "score": "0.5193407", "text": "public function getImportanceFraction()\n {\n return $this->importance_fraction;\n }", "title": "" }, { "docid": "0afeb6d7007bcb5e7d75eca917fa4cfd", "score": "0.51929474", "text": "public function rate(): float;", "title": "" }, { "docid": "ea7aac24025cd59c11df2d542786a962", "score": "0.5188252", "text": "public function getCurrentChangePercent()\n {\n $oldPrice = $this->currentPrice - $this->currentChange;\n return $this->currentChange / $oldPrice;\n }", "title": "" }, { "docid": "4d8c358a3621c3d9fc7cbc86e2562152", "score": "0.517391", "text": "public function bitsPerPixel() { return $this->_m_bitsPerPixel; }", "title": "" }, { "docid": "4d273d7200e14602a1e609338e7a8a41", "score": "0.5170599", "text": "public function volume(): int\n {\n return $this->model->height * $this->model->width * $this->model->length;\n }", "title": "" }, { "docid": "9bee0e85fdfbb42c77493e7f03f3539e", "score": "0.5169198", "text": "function _value($value)\n {\n return $value + 0.5;\n }", "title": "" }, { "docid": "70e6a13acdb4b38687af1d51dc4784d4", "score": "0.5159673", "text": "public function getRealPercent() : float\n\t{\n\t\treturn $this->realPercent;\n\t}", "title": "" }, { "docid": "ec8424b888c7fc6553e3d8dfe7804f41", "score": "0.5159269", "text": "public function getResult(): float\n {\n return $this->result;\n }", "title": "" }, { "docid": "2f670b0169c323668df79c985e98309e", "score": "0.51591414", "text": "public function getValue() {\r\n // will be used in fights \r\n \r\n $value = 0;\r\n \r\n if(false) {\r\n $value = ($this->kda + $this->leagueDivisionNumber + $this->leagueTierId);\r\n }\r\n \r\n if(false) {\r\n $value = $this->leagueDivisionNumber * 100;\r\n $value = $value / (10 - $this->leagueTierId);\r\n $value = $value * $this->kda;\r\n $value = $value;\r\n $value = round($value);\r\n }\r\n \r\n if(true) {\r\n $value = 0;\r\n $value = $value + ($this->leagueTierId * 0.65);\r\n $value = $value + ((4 - $this->leagueDivisionNumber) * 0.20); \r\n $value = $value + ($this->kda * 0.15);\r\n $value = $value * 100;\r\n $value = round($value);\r\n }\r\n \r\n return $value;\r\n }", "title": "" }, { "docid": "a1d2ec8645ee057243c044f47af4eb5c", "score": "0.5158651", "text": "public function calculateVolume(): int\n {\n return $this->width * $this->height * $this->depth;\n }", "title": "" }, { "docid": "ec240523a49f69a00fca00ef8dd8de2e", "score": "0.51573825", "text": "public function float()\n {\n return round($this->percentage / 100, 2);\n }", "title": "" }, { "docid": "46ae3ea8dd2a803bb4715972a0d72426", "score": "0.51544374", "text": "public function getPercent() : float\n {\n return $this->percent;\n }", "title": "" }, { "docid": "a9b953cb7a4d36abad1d0f12e750f188", "score": "0.5153248", "text": "public function valueChange()\r\n\t{\r\n\t\treturn number_format($this->shares * $this->stock->change(), 2);\r\n\t}", "title": "" }, { "docid": "f5e7b1179a804606dc84d68e33de4391", "score": "0.51526666", "text": "public function getNumericValue();", "title": "" }, { "docid": "efde31644dbd0de8c598f23a98d05ce0", "score": "0.5143976", "text": "public function getColor (){\n return $this->color; \n }", "title": "" }, { "docid": "b82a4f868db1f85ea782df4d8bc0560e", "score": "0.5142242", "text": "public function getBaseAf(): ?float {\n return $this->baseAf;\n }", "title": "" } ]
f4d0955c44f0c9289e5a9eacc636a8a9
Set the response model to use for this API action.
[ { "docid": "87b6e26451e3747a1f1f088bc398a48d", "score": "0.6846061", "text": "public function setResponse(\\Klevu\\Search\\Model\\Api\\Response $response_model)\n {\n $this->response = $response_model;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "ddbedee92580acf1897c7cbcc5dc745b", "score": "0.71075505", "text": "public function setResponse(Klevu_Search_Model_Api_Response $response_model) \n {\n $this->response = $response_model;\n\n return $this;\n }", "title": "" }, { "docid": "7df7b2e8744bb876f77dce7f497d9c9c", "score": "0.6308559", "text": "abstract protected function updateResponse(Model $model);", "title": "" }, { "docid": "65144f8f69c97dc36722ef8421bfe1c1", "score": "0.6301516", "text": "public function setResponse(Response $response);", "title": "" }, { "docid": "65144f8f69c97dc36722ef8421bfe1c1", "score": "0.6301516", "text": "public function setResponse(Response $response);", "title": "" }, { "docid": "4d1a56153d1b7448402f57f9c0fbf2c7", "score": "0.6279984", "text": "public function setResponse($response)\n {\n $this->response = $response;\n\n return $this;\n }", "title": "" }, { "docid": "dbce9a81b9176fbdf5d8946ef42cccb9", "score": "0.6230457", "text": "public function set($response);", "title": "" }, { "docid": "97023541b5d5046e1fcf0590c31dcc81", "score": "0.6128975", "text": "public function setResponse(Response $response): self;", "title": "" }, { "docid": "55264484d2295a36107db6dc12d9105f", "score": "0.61087763", "text": "public function setResponse($response) \n {\n $this->response = $response;\n return $this;\n }", "title": "" }, { "docid": "4e8216cd2c60c846904442f382d2525a", "score": "0.60821843", "text": "public function setResponse($response)\n {\n $this->response = $response;\n\n return $this;\n }", "title": "" }, { "docid": "b5aa45316cf857f8dbf7bfe0d7b2c5b5", "score": "0.6022705", "text": "protected function setResponseType() {\n }", "title": "" }, { "docid": "b5aa45316cf857f8dbf7bfe0d7b2c5b5", "score": "0.6022705", "text": "protected function setResponseType() {\n }", "title": "" }, { "docid": "b15fc41e59accba815642de60072e433", "score": "0.599576", "text": "public function setProperties()\n {\n $this->modelResponseMessage = new ResponseMessage();\n $this->method = strtolower(Yii::$app->getRequest()->getMethod());\n $this->setParamsByMethod();\n }", "title": "" }, { "docid": "5ed3a698d9bd45423e67311a4fb3f1d3", "score": "0.5976679", "text": "public function asResponse()\r\n {\r\n $this->isJson = true;\r\n }", "title": "" }, { "docid": "e5369fcf0b6a967c7bdb52b3e1daa462", "score": "0.5925194", "text": "public function setResponse($response)\n {\n $this->_response = $response;\n \n return $this;\n }", "title": "" }, { "docid": "e385688d514d169ec0307c9886c53284", "score": "0.5859505", "text": "public function setResponse($response)\n {\n\n $this->response = $response;\n \n }", "title": "" }, { "docid": "9dfb23098beef318d74073932e64291c", "score": "0.5858982", "text": "public function setResponseObject($obj)\n {\n $this->responseObject = $obj;\n }", "title": "" }, { "docid": "9dfb23098beef318d74073932e64291c", "score": "0.5858982", "text": "public function setResponseObject($obj)\n {\n $this->responseObject = $obj;\n }", "title": "" }, { "docid": "9dfb23098beef318d74073932e64291c", "score": "0.5858982", "text": "public function setResponseObject($obj)\n {\n $this->responseObject = $obj;\n }", "title": "" }, { "docid": "9dfb23098beef318d74073932e64291c", "score": "0.5858982", "text": "public function setResponseObject($obj)\n {\n $this->responseObject = $obj;\n }", "title": "" }, { "docid": "9dfb23098beef318d74073932e64291c", "score": "0.5858982", "text": "public function setResponseObject($obj)\n {\n $this->responseObject = $obj;\n }", "title": "" }, { "docid": "9c59f8b7589f8a68230ec61264cf09e5", "score": "0.5843081", "text": "public function setResponse($response)\n {\n $this->response = $response;\n\n return $this;\n }", "title": "" }, { "docid": "0e18fed20996faa9719c3a9a0aaa3e39", "score": "0.574361", "text": "public function setResponse(Jaf_Response $response) {\n $this->_response = $response;\n return $this;\n }", "title": "" }, { "docid": "f0afea2c83f6ebafc4e1d8477120da48", "score": "0.5737018", "text": "public function getResponse() \n {\n if (!$this->response) {\n $this->response = Mage::getModel(static::DEFAULT_RESPONSE_MODEL);\n }\n\n return $this->response;\n }", "title": "" }, { "docid": "8ca7ff52de21d1d606bc68e2332a17ba", "score": "0.57240963", "text": "abstract public function assignResponse($response);", "title": "" }, { "docid": "528d02c618b512aaf16036afabff257e", "score": "0.5718455", "text": "public function resp_set($resp) {\n\t\t$this->response = $resp;\n\t}", "title": "" }, { "docid": "6a11e60c56b4fd5efe0d4d75e7268e56", "score": "0.5689489", "text": "public function setResponse( $pValue );", "title": "" }, { "docid": "8cf55fc5fdaad7aa33bb8a5f18f422e8", "score": "0.5681576", "text": "public function setHttpResponseObject($response){\n\t\t$this->responseObject = $response;\n\t\t$this->createSimpleXMLBody();\n\t}", "title": "" }, { "docid": "dc17ae5c1c4687279781ba8c0f9e1747", "score": "0.56491965", "text": "public function setResponse(Response $response)\n {\n $this->response = $response;\n return $this;\n }", "title": "" }, { "docid": "dc17ae5c1c4687279781ba8c0f9e1747", "score": "0.56491965", "text": "public function setResponse(Response $response)\n {\n $this->response = $response;\n return $this;\n }", "title": "" }, { "docid": "e339e15f34633798b2c50b3f17fea7fe", "score": "0.5647748", "text": "public function setModel();", "title": "" }, { "docid": "c332ca0c71e56437a4da9143a6907e08", "score": "0.56472415", "text": "public function setResponse(Response $response) {\n $this->response = $response;\n }", "title": "" }, { "docid": "532dd04344956289c2ba7b6bd08c4d70", "score": "0.56353366", "text": "public function response()\n {\n return $this->belongsTo('App\\Response');\n }", "title": "" }, { "docid": "5254571ebdca31222c150b75620de625", "score": "0.5628555", "text": "public function responseClass() {\n return 'GenericAPI\\GenericAPIResponse';\n }", "title": "" }, { "docid": "5137bbe02cd35cc3ff71e62113dfa473", "score": "0.5627393", "text": "public function setJsonResponse() {\n $this->view->disable();\n\n $this->_isJsonResponse = true;\n $this->response->setContentType('application/json', 'UTF-8');\n }", "title": "" }, { "docid": "5bbef20b4e7b999e46ef89dc00b4ea37", "score": "0.56099904", "text": "private function setResponse($resp){\n $this->response = $resp;\n }", "title": "" }, { "docid": "b41d35fe0c8086f76943672cdb800c6a", "score": "0.56031454", "text": "public function setResponse($response)\n {\n \t$this->_responses = array($response);\n \t$this->_responseIndex = 0;\n }", "title": "" }, { "docid": "4c604fe6427ab08e9bd426cb3a310c8a", "score": "0.5599047", "text": "public function setResponse(Response $response)\r\n {\r\n $this->response = $response;\r\n }", "title": "" }, { "docid": "04dea7dd64d3fd4eed7057e934d3f169", "score": "0.5596581", "text": "public function setResponse($response)\n {\n $this->response = $response !== null ? (string) $response : null;\n return $this;\n }", "title": "" }, { "docid": "d8acc333d3fecdddcb7c37ab61849aa6", "score": "0.5593216", "text": "public function setResponse(HttpResponse $response) {\n $this->response = $response;\n }", "title": "" }, { "docid": "f6a4326dcbe979426e6fb2cc7d9e70ed", "score": "0.5583611", "text": "private function _setResponse($response){\n $this->_response = $response;\n return $response;\n }", "title": "" }, { "docid": "c0fb538e09d1f56b83516b0ca7d97005", "score": "0.5574086", "text": "public function model()\n {\n return AllQuestionResponse::class;\n }", "title": "" }, { "docid": "7d5b1de13aca91a287119376eca99568", "score": "0.55698866", "text": "public function set(TOL_API_Request $request, TOL_API_Response $response);", "title": "" }, { "docid": "8884deb33bef3928d5791b0974ea01fb", "score": "0.5567654", "text": "private function setup_response() {\n\t\t$this->response = array(\n\t\t\t'status' => 'error',\n\t\t\t'message' => 'An error occurred.',\n\t\t);\n\t}", "title": "" }, { "docid": "bd9bb315e0a72b00e9ad99e8122215e4", "score": "0.55642295", "text": "public function setResponse(Response $response)\n\t{\n\t\t$this->response = $response;\n\t}", "title": "" }, { "docid": "fa55ba108cc8a8c32341279a4d84bdc5", "score": "0.556334", "text": "public function setResponse($responseData){\n\n return $this->response = $responseData;\n }", "title": "" }, { "docid": "756e61d7200a93dd72c4ada03b928da5", "score": "0.5562431", "text": "protected function setResponse($response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "eff6ffe5f2907dad1464af7ee58e06bd", "score": "0.5560462", "text": "public function setResponse(Response $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "df4e862d6d2f1be2e34c1d33ef2afe42", "score": "0.5559101", "text": "public function setResponse(Response $response)\n {\n $this->response = $response;\n\n return $this;\n }", "title": "" }, { "docid": "df4e862d6d2f1be2e34c1d33ef2afe42", "score": "0.5559101", "text": "public function setResponse(Response $response)\n {\n $this->response = $response;\n\n return $this;\n }", "title": "" }, { "docid": "a006585472f691016e50c13949317388", "score": "0.5538831", "text": "public function setResponse(ResponseInterface $Response);", "title": "" }, { "docid": "44a84cab48b626906844489ee6e00a42", "score": "0.55331546", "text": "public function response()\n {\n return $this->hasOne('App\\Response');\n }", "title": "" }, { "docid": "5fb6a3d68470d8805188fad41a3a307a", "score": "0.5532697", "text": "public function setJsonResponse()\n {\n $this->jsonResponse = true;\n\n return $this;\n }", "title": "" }, { "docid": "27970b734e9a4d5f7b46bbe9f8b020c9", "score": "0.5508954", "text": "public function set(ResponseDefinitionInterface $apiResponse): void;", "title": "" }, { "docid": "b495bc67a87ee3138d32fd170be5105e", "score": "0.55062455", "text": "public function responseJSON()\n {\n $this->setDefault(RouteAttribute::JSON_RESPONSE, true);\n\n return $this;\n }", "title": "" }, { "docid": "6335b9962353c5bdf9d09b497f111d74", "score": "0.55004394", "text": "public function modelResponse(): array\n {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n 'place_id' => $this->place_id,\n 'menu_categories' => MenuCategoryResource::collection($this->categories)\n ];\n }", "title": "" }, { "docid": "125a35c186656071d6c6716155898749", "score": "0.5474463", "text": "function setHttpResponse($response) {\n $this->httpResponse = $response;\n }", "title": "" }, { "docid": "f918db7862f0cb9a7a5b33f80c108120", "score": "0.5462906", "text": "function setResponse($inResponse) {\n\t\tif ( $this->_Response !== $inResponse ) {\n\t\t\t$this->_Response = $inResponse;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3145ee38585917ec692d4f63032be452", "score": "0.54600847", "text": "public function setResponse(ResponseInterface $response);", "title": "" }, { "docid": "6d52a85b05fa945ae77d468fc9f6c0bb", "score": "0.5457811", "text": "public function __toObject()\n {\n return json_decode($this->response);\n }", "title": "" }, { "docid": "d75e7fa11a06c8c5859d2c5104bfc812", "score": "0.5437245", "text": "public function getResponse()\n {\n if (!$this->response) {\n $this->response = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(static::DEFAULT_RESPONSE_MODEL);\n }\n\n return $this->response;\n }", "title": "" }, { "docid": "7f4843830cb101c11945957b346894e4", "score": "0.54369664", "text": "protected function _initResponse()\n {\n return new HttpResponse();\n }", "title": "" }, { "docid": "b696672cfd4ddc371ad36689c0c00fd6", "score": "0.54309905", "text": "public function setResponse(IO\\AbstractResponse $response)\n {\n\t $this->_response = $response;\n return $this;\n }", "title": "" }, { "docid": "9f9f00b1fbd816e9e8ccef439faa3e5b", "score": "0.54186904", "text": "public function object(){\r\n\t\t\treturn $this->response;\r\n\t\t}", "title": "" }, { "docid": "6a01f9913625033541b8b49c3479c57c", "score": "0.54152757", "text": "protected function setResponse(Response $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "c5bab00d4fc3a89c616c24a4088cb0b5", "score": "0.54117304", "text": "function setResponse(puzzle_message_ResponseInterface $response);", "title": "" }, { "docid": "c712bc14d35b04610300066e26ef2b03", "score": "0.5393668", "text": "private function loadResponseIfNeeded() {\n if (!isset($this->response)) {\n $this->response = new APIResponse($this->id, $this->configModule, $this->command);\n }\n }", "title": "" }, { "docid": "bdeeda5b80ab77d6ae84b34f66620859", "score": "0.5391124", "text": "public function setResponse($response) : self\n {\n $this->initialized['response'] = true;\n $this->response = $response;\n return $this;\n }", "title": "" }, { "docid": "326606a5d01b5eee2947eaec3eb71f57", "score": "0.53866434", "text": "protected function _getAuthorizationResponseInstance()\n {\n return Mage::getModel(\n 'tigo_tigomoney/payment_redirect_api_authorizationResponse',\n new Varien_Object()\n );\n }", "title": "" }, { "docid": "19f8c1018fbb7a8c1b7ead8c8e31836a", "score": "0.53859407", "text": "function response() {\n\t\t\treturn new Response;\n\t\t}", "title": "" }, { "docid": "87aa9fe01f84ce2204043c34e5aba89c", "score": "0.5356842", "text": "public function setResponse($result = '')\n {\n $this->_response = $result;\n parse_str(urldecode($result), $this->parameters);\n return $this;\n }", "title": "" }, { "docid": "414910b7aa01419c1068d6211adc8ac5", "score": "0.53535485", "text": "public function setFromApiResponse(array $data): self\n {\n $this->content = $data['content'] ?? null;\n $this->disabled = isset($data['disabled']) ? (bool) $data['disabled'] : null;\n $this->name = $data['name'];\n $this->objectType = $data['object_type'];\n $this->ttl = isset($data['ttl']) ? (int) $data['ttl'] : null;\n $this->type = $data['type'] ?? null;\n $this->zone = $data['zone'] ?? null;\n $this->zoneId = $data['zone_id'];\n\n return $this;\n }", "title": "" }, { "docid": "f6744c4f55de8d9226a6550f56f31d28", "score": "0.53526217", "text": "public function setResponse(array $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "8b78c87f7166dba8fd68bd24b022e967", "score": "0.53494424", "text": "public function processResponse($responseIsModel=false) {\n\t\tif(is_array($this->responseObject)){\n\t\t\t// Server responded with a valid JSON\n\t\t\tif(array_key_exists('modelErrors',$this->responseObject))\n\t\t\t\t// Populate model errors if any:\n\t\t\t\t$this->_modelErrors = $this->responseObject['modelErrors'];\n\t\t\tif(array_key_exists('model', $this->responseObject) && array_key_exists('error',$this->responseObject)){\n\t\t\t\t// API is responding using the data structure where the returned\n\t\t\t\t// model's attributes are stored in the \"model\" property of the\n\t\t\t\t// JSON object.\n\t\t\t\tif(!$this->responseObject['error'] && $this->responseCode == 200) {\n\t\t\t\t\t// No error. Update local attributes:\n\t\t\t\t\t$this->attributes = $this->responseObject['model'];\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\t// API responded with error=true due to validation error\n\t\t\t\t\t$this->errors = $this->responseObject['message'];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else if($responseIsModel && $this->responseCode == 200){\n\t\t\t\t// The action was using the older format where the returned JSON\n\t\t\t\t// *is* the model's attributes. Update local attributes:\n\t\t\t\t$this->attributes = $this->responseObject;\n\t\t\t\treturn true;\n\t\t\t}else if($this->responseCode == 200){\n\t\t\t\t// API responded with error=false, but there's no \"model\" property.\n\t\t\t\t// Whatever happened, it succeeded, so do nothing else (nothing\n\t\t\t\t// else is necessary) and return true.\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// API responded with a valid JSON, but the request did not\n\t\t\t\t// succeed due to validation error, permissions/authentication\n\t\t\t\t// error, or some other error. Thus, simply return false.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\t// In this case, there's an unrecognized error message that the server\n\t\t\t// returned for whatever reason.\n\t\t\t$this->errors = $this->responseObject;\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "45fd3a852f5a2ea34bd0c632102450da", "score": "0.53403354", "text": "private function assignDefaultResponses(): void\n {\n if ($this->operation->hasSuccessResponseCode()) {\n return;\n }\n\n if (strtolower($this->route->getAction()) == 'delete') {\n $this->operation->pushResponse(\n (new Response())\n ->setCode('204')\n ->setDescription('Resource deleted')\n );\n\n return;\n }\n\n $response = (new Response())->setCode('200');\n\n if (in_array($this->operation->getHttpMethod(), ['OPTIONS','HEAD'])) {\n $this->operation->pushResponse($response);\n\n return;\n }\n\n foreach ($this->config->getResponseContentTypes() as $mimeType) {\n $schema = (new Schema())->setDescription('');\n\n if ($mimeType == 'application/xml') {\n $schema->setXml((new Xml())->setName('response'));\n }\n\n $response->pushContent(\n (new Content())->setMimeType($mimeType)->setSchema($schema)\n );\n }\n\n $this->operation->pushResponse($response);\n }", "title": "" }, { "docid": "1cdaaf3689f4764255ebda3b86282b9e", "score": "0.5340031", "text": "public function response() {\n $method = $this->getOutputMethod();\n if ($class = $this->getClass($method)) {\n new $class();\n }\n }", "title": "" }, { "docid": "e034a497045115c8e79a198d7bc838c8", "score": "0.5339451", "text": "public function setResponseData($data) {\n }", "title": "" }, { "docid": "7c58fdf09514384e41a088a3da295269", "score": "0.53335375", "text": "function response() {\n return new Response;\n }", "title": "" }, { "docid": "7ac3dc85882c5f62a8816996631fb2b6", "score": "0.532914", "text": "public function setResponse(Response $response): void\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "f1afaed500d93444ee67a92cb3433a50", "score": "0.5328716", "text": "private function initResponse()\n {\n $this->response = new Response(\n $this->request,\n new SymfonyResponse(),\n new Blade(ROOT.'resource/views', ROOT.'resource/cache')\n );\n }", "title": "" }, { "docid": "a06975e4ad983bca9e8b68153556ca9a", "score": "0.5314311", "text": "public function setResponse(array $response = []);", "title": "" }, { "docid": "489197aa3e7add2d451963114bfae5a7", "score": "0.5309785", "text": "public function setResponse(ResponseInterface $response): self\r\n {\r\n $this->response = $response;\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "bfa152b835f688553b3bd28701c18b79", "score": "0.53090066", "text": "public function setResponse(\\Zend_Controller_Response_Abstract $response)\n {\n $this->_escort->setResponse($response);\n\n return parent::setResponse($response);\n }", "title": "" }, { "docid": "8819df45018e17f16eec23cf228c38ea", "score": "0.5305741", "text": "public function returnJsonAction()\n {\n return new MyResponse\\Api();\n }", "title": "" }, { "docid": "0502ccbff344ba9cdce1790c43a56973", "score": "0.5297344", "text": "public function makeResponse()\n {\n $this->_response = new Response();\n return $this->_response;\n }", "title": "" }, { "docid": "f745adc1eb64e5be50d3129278626c4c", "score": "0.5295178", "text": "public function getResponse()\n {\n return new Response($this);\n }", "title": "" }, { "docid": "5dea4a7514eb8f667b6b9ec147fb2a7f", "score": "0.52950907", "text": "public function setResponse(Response $response = null)\n {\n $this->response = $response;\n\n return $this;\n }", "title": "" }, { "docid": "380674a5b9d4fabe81961e9af8abdd21", "score": "0.52923596", "text": "public function invoke(){\r\n $response = $this->model->$this->request->action();\r\n $this->model=$response;\r\n }", "title": "" }, { "docid": "c53b5c84970fc630c4a17e318d052262", "score": "0.5276835", "text": "public function getResponse()\n {\n return $this;\n }", "title": "" }, { "docid": "7307e66b1cd2521155858b51843900b5", "score": "0.52753055", "text": "private function _convertResponseToModel($response, $resourceName)\n {\n if (!is_array($response) || empty($response)) {\n return $response;\n }\n\n $model = null;\n switch (strtolower($resourceName)) {\n case 'client':\n $model = $this->_createClient($response);\n break;\n case 'payment':\n $model = $this->_createPayment($response);\n break;\n case 'transaction':\n $model = $this->_createTransaction($response);\n break;\n case 'preauthorization':\n if (isset($response['preauthorization'])) {\n $response = $response['preauthorization'];\n }\n $model = $this->_createPreauthorization($response);\n break;\n case 'refund':\n $model = $this->_createRefund($response);\n break;\n case 'offer':\n $model = $this->_createOffer($response);\n break;\n case 'subscription':\n $model = $this->_createSubscription($response);\n break;\n case 'webhook':\n $model = $this->_createWebhook($response);\n break;\n case 'fraud':\n $model = $this->_createFraud($response);\n break;\n case 'checksum':\n $model = $this->_createChecksum($response);\n break;\n }\n\n return $model;\n }", "title": "" }, { "docid": "0931533073866439e672338d509618e8", "score": "0.5261318", "text": "protected function decode() {\n\n // Switch based on the format.\n switch ($this->config['format']) {\n\n case 'json':\n $this->response = json_decode($this->response);\n break;\n\n default:\n // TO-DO: IMPLEMENT OTHER FORMATS!\n break;\n }\n\n return $this;\n }", "title": "" }, { "docid": "e033fbfdc3124c16c180d182f7b7dade", "score": "0.5260445", "text": "public function toObject()\n {\n $this->checkDataIsValid();\n return json_decode($this->response);\n }", "title": "" }, { "docid": "d2c719af1fe165bfaf194a280b22b870", "score": "0.52573055", "text": "protected function setModel() {\n\t\t$this->model = new Moondee_Opinion_Model_Opinion();\n\t}", "title": "" }, { "docid": "f963150b4c86703aabf45aedb9a8f03c", "score": "0.5256221", "text": "public function __construct()\n {\n $this->APIResponse = new APIResponse();\n }", "title": "" }, { "docid": "ad78274349d48e5e8637795c0b222fa3", "score": "0.5249031", "text": "protected function setEntities(): void\n {\n $this->entity = Classes::cutEntity(Classes::getObjectName($this), DefaultInterface::CONTROLLER_POSTFIX);\n $formRequestEntity = $this->getFormRequestEntity(conf::getModuleName(), $this->entity);\n\n $this->formRequest = new $formRequestEntity();\n $this->props = get_object_vars($this->formRequest);\n\n $this->modelEntity = Classes::getModelEntity($this->entity);\n $this->model = new $this->modelEntity();\n\n $container = Container::getInstance();\n $this->response = $container->make(\\SoliDry\\Containers\\Response::class);\n $this->response->setFormRequest($this->formRequest);\n $this->response->setEntity($this->entity);\n }", "title": "" }, { "docid": "12d5160078d94c7a9b8aac2be5e689ac", "score": "0.5247667", "text": "public function response_as_object() {\r\n return json_decode($this->repsonse_data, false);\r\n }", "title": "" }, { "docid": "7c15e2e9338e5b6c33e19a8e66c7a814", "score": "0.5244021", "text": "protected function modelResponse() : array\n {\n return [\n 'id' => $this->id,\n 'feedback' => new FeedbackStructureResource($this->feedback),\n 'every' => $this->every,\n 'number' => $this->number\n ];\n }", "title": "" }, { "docid": "761333569f87d666a7be4ef3247770bc", "score": "0.5242746", "text": "public static function handleResponse(Model $model, array $response, int $from = null, int $size = null)\n {\n $hits = [];\n if (Arr::has($response, \"hits.hits\")) {\n $hits = $response['hits']['hits'];\n }\n\n $self = new self();\n $self->data = $self->hydrate($model, $hits);\n $self->took = $response['took'] ?? null;\n $self->timedOut = $response['timed_out'] ?? null;\n $self->shards = $response['_shards'] ?? null;\n $self->maxScore = $response['hits']['max_score'] ?? null;\n $self->from = $from;\n $self->size = $size;\n\n if (Arr::has($response, \"hits.total\")) {\n $self->total = $response['hits']['total'];\n } elseif (Arr::has($response, \"count\")) {\n $self->total = $response['count'];\n\n }\n return $self;\n }", "title": "" }, { "docid": "f6d875ed9b8e44a52f3af6a3587b91c4", "score": "0.5230953", "text": "public function withResponse(self $response): ResponseInterface;", "title": "" }, { "docid": "7c39fe89653b3fec9c53f90e33e65690", "score": "0.52231383", "text": "protected function setResponse($response) {\n $this->loadResponseIfNeeded();\n $this->response->setResponse($response);\n }", "title": "" }, { "docid": "985976100ad660b3fe081638f4ac3ee0", "score": "0.5220936", "text": "protected function modelResponse() : array\n {\n return [\n 'id' => $this->id,\n 'value' => $this->value,\n 'option' => new RegulationTypeOptionResource($this->regulationTypeOption),\n ];\n }", "title": "" } ]
d8c7fba305658d869a7a9a0167151d90
/ Register a Module with his system function on defined section
[ { "docid": "3092393c471ea095e19729b4e490c78f", "score": "0.7598839", "text": "public function\n\tregister(\n\t\tint $section,\n\t\tcallable $systemFunction\n\t) : void\n\t{\n\t\tif(!property_exists($this, 'systemFunctionList'))\n\t\t{\n\t\t\t$this -> systemFunctionList = [];\n\t\t}\n\n\t\t$this -> systemFunctionList[] = new cmsSystemModulesFunction($section, $systemFunction);\n\t}", "title": "" } ]
[ { "docid": "018e7dd914d66d9c0fba7fdc2ffa67db", "score": "0.6927167", "text": "public static function register() {\n\t\tself::register_module();\n\t}", "title": "" }, { "docid": "3ad14bb8c56adcb542afd0b318060fd4", "score": "0.67800283", "text": "function register() {}", "title": "" }, { "docid": "930f0783695bb9695b0b53023f6138cc", "score": "0.62345594", "text": "public function register(): void;", "title": "" }, { "docid": "930f0783695bb9695b0b53023f6138cc", "score": "0.62345594", "text": "public function register(): void;", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.6192517", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.6192517", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.6192517", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.6192517", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.6192517", "text": "public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.6063517", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.6063517", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.6063517", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.6063517", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.6063517", "text": "abstract public function register();", "title": "" }, { "docid": "968fdebde57a8fb3b6e7eb563e46382d", "score": "0.60517275", "text": "private function registerModule($module, $moduleInfo){\n\t\t\t$this->_Modules[$module] = $moduleInfo;\n\n\t\t\t$this->_storeModules();\n\t\t}", "title": "" }, { "docid": "a9d4db8882b4002bed6b4bb942230709", "score": "0.6044001", "text": "abstract protected function register();", "title": "" }, { "docid": "0f0f79647e7b465df83a876c453f67c4", "score": "0.5993634", "text": "function register(): void {\n JKNAPI::registry()->register_module_dependency($this);\n }", "title": "" }, { "docid": "6eb3dea9751d4c4dff438a6a502b0ec1", "score": "0.59628284", "text": "private function register()\n {\n foreach ((array)Helper::registry() as $name => $function) {\n if (substr($name, -6, 6) == \"_block\") {\n // TODO: handle special case when helper is named myhelper_block\n } else {\n $this->smarty->registerPlugin('function', $name, $name);\n $this->smarty->registerPlugin('modifier', $name, $name);\n }\n }\n foreach ((array)self::plugins() as $name => $plugin) {\n $this->smarty->registerPlugin($plugin['type'], $name, $plugin['handler']);\n }\n }", "title": "" }, { "docid": "dba72196cb0a46ad95ff37b3f3fdbf8b", "score": "0.59044427", "text": "public function register(): void\r\n {\r\n //\r\n }", "title": "" }, { "docid": "7bebe2b4f99f8c4d55deb3a3009ea0a4", "score": "0.59038615", "text": "public function register() : void\n {\n //\n }", "title": "" }, { "docid": "4d32d478ae5c5bae60e20ecd72905088", "score": "0.5885163", "text": "public function registerModule() {\n $xml = str_replace(\"Package_Module\", $this->magentoName, file_get_contents( __DIR__ . \"/templates/etc/Package_Module.xml\"));\n file_put_contents(\"{$this->appDir}/etc/modules/{$this->magentoName}.xml\", $xml);\n }", "title": "" }, { "docid": "7f81f6d557d00eac50107cecb523d584", "score": "0.587148", "text": "public function doRegister();", "title": "" }, { "docid": "5eec260a203b5d565017ee9b518a4690", "score": "0.5828998", "text": "public function register()\n {}", "title": "" }, { "docid": "afa6c6bd19dd9fd94cf736a83af0479d", "score": "0.582349", "text": "public function initializeModule($module){}", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.5814392", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.5814392", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "c2d59bc338bef06a6e2eb061289b483b", "score": "0.57848775", "text": "public function register(): void\n {\n\n }", "title": "" }, { "docid": "740153475c304ce80ab0ebeb5662e66f", "score": "0.57661974", "text": "function module($file) {\r\n\tif (is_file(\"mod/$file.php\")) {\r\n\t\tif (!function_exists(\"$file\")) { // If the module dont was loaded\r\n\t\t\tinclude(\"mod/$file.php\");\r\n\t\t}\r\n\t\treturn $file();\r\n\t}\r\n\telse {\r\n\t\techo \"Install the module first\";\r\n\t}\r\n}", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5756128", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5756128", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5756128", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5756128", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5756128", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5756128", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5756128", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "609ae9b381bcb21017d430938583a9de", "score": "0.5697371", "text": "abstract protected function registering();", "title": "" }, { "docid": "9055cdada46dc478f9540e5546c4958a", "score": "0.5676531", "text": "function dmili_registerFunction($class) {\n if ( 0 !== strpos( $class, 'dmili_' ) ) {\n return;\n }\n require_once(\"classes/class.$class.php\");\n}", "title": "" }, { "docid": "9489470e04b2b018e52783ef22af50db", "score": "0.56296235", "text": "abstract public function register($method);", "title": "" }, { "docid": "bc46044adb6a4367ee3a0c66d1afe30d", "score": "0.5604381", "text": "public function register()\n {\n $this->loadSnippetsFrom(\n dirname(__DIR__). '/snippets/',\n $this->namespace\n );\n\n $this->loadChunksFrom(\n dirname(__DIR__) . '/chunks/',\n $this->namespace\n );\n\n //Тут работаем с событиями как EVO так и Laravel:\n foreach (glob(dirname(__DIR__) . '/plugins/*.php') as $file) {\n include $file;\n }\n\n $this->app->registerModule('module from file', dirname(__DIR__).'/module/module.php');\n\n// //Подключение контроллеров по названию шаблона\n// Event::listen('evolution.OnWebPageInit', function($params) {\n// $modx = EvolutionCMS();\n// $doc = $modx->getDocument($modx->documentIdentifier);\n// $templateAlias = SiteTemplate::select('templatealias')->find($doc['template'])->templatealias;\n// $className = '\\EvolutionCMS\\Example\\\\' . ucfirst($templateAlias) . 'Controller';\n// $controller = new $className();\n// $controller->render();\n// });\n\n\n }", "title": "" }, { "docid": "69d3f167e184a4c4449b045cd6a3eea6", "score": "0.55900526", "text": "public function register()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "083294714951a745563511e0e1dda76f", "score": "0.5576046", "text": "public function register()\n\t{\n \n\t}", "title": "" }, { "docid": "e643eb343558993f26a5a12149ca48ec", "score": "0.552223", "text": "public function register()\n\t{\n\t\tif (!$this->registered) {\n\t\t\tspl_autoload_register([$this, 'load'], true, true);\n\t\t\t$this->registered = true;\n\t\t}\n\t}", "title": "" }, { "docid": "44605950ac341e2fec6dfa170f5df283", "score": "0.55109906", "text": "public function register()\n\t{\n\n \n\t}", "title": "" }, { "docid": "b86646c5176b71412d4e9059a742c6ae", "score": "0.55031246", "text": "function setup(){\n\t$n = function( $function ){\n\t\treturn __NAMESPACE__ . '\\\\' . $function;\n\t};\n\t\n\t//add the hooks and filters here\n\tadd_action( \"init\", $n(\"register_block\") );\n}", "title": "" }, { "docid": "9368084e0b384bc2b05da977e309bb0b", "score": "0.54564315", "text": "function module_exist(){\n \n}", "title": "" }, { "docid": "470168dfd59e8ba67775dda8b058fdc9", "score": "0.5450261", "text": "public function register()\n {\n foreach (array_keys(config('modules.locations')) as $location) {\n $repository = $this->repository($location);\n $modules = $repository->enabled();\n\n $modules->each(function ($module) use ($repository) {\n try {\n $this->registerServiceProvider($repository, $module);\n\n $this->autoloadFiles($module);\n } catch (ModuleNotFoundException $e) {\n //\n }\n });\n }\n }", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.54062957", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.54062957", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.54062957", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.54062957", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.54062957", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "a86c4c183d91cb80786d91af119f1af5", "score": "0.5404146", "text": "public function register() {\n\t\tspl_autoload_register(array($this, 'loadClass'));\n\t}", "title": "" }, { "docid": "d0d5e1cf349bf0ba70dda638f3419c13", "score": "0.5402022", "text": "public function register()\n\t{\n\t\tforeach ($this->enabled() as $module) {\n\t\t\t$this->registerServiceProvider($module);\n\t\t}\n\t}", "title": "" }, { "docid": "a988ae76e0b56b307298fcfc0cdfd1bb", "score": "0.5391769", "text": "public function register() { }", "title": "" }, { "docid": "a988ae76e0b56b307298fcfc0cdfd1bb", "score": "0.5391769", "text": "public function register() { }", "title": "" }, { "docid": "c33fc9404c6dcd1fb655df138c9f8917", "score": "0.5387773", "text": "public function register(){\n }", "title": "" }, { "docid": "71dc355ea2fd7efa85a49fe1a7e4927c", "score": "0.5384046", "text": "public function register()\n\t{\n\n\t}", "title": "" }, { "docid": "71dc355ea2fd7efa85a49fe1a7e4927c", "score": "0.5384046", "text": "public function register()\n\t{\n\n\t}", "title": "" }, { "docid": "eabd815034401d3f6854450d41c76313", "score": "0.53782344", "text": "function hw_register_activation_hook($module_file, $callback) {\r\n HW_HOANGWEB::register_activation_hook($module_file, $callback);\r\n}", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5375772", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5375772", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5375772", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5375772", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "9e71c46f386e18494f9e512146294219", "score": "0.5375772", "text": "public function register()\r\n {\r\n //\r\n }", "title": "" }, { "docid": "2885d1c82761fe657ba1f51ae21eb79e", "score": "0.5375287", "text": "protected function registerModules() {\r\n\t\tparent::registerModules();\r\n\r\n\t\t$base = $this->getBasePath();\r\n\t\t$app = dirname(__DIR__);\r\n\r\n\t\t$this->getModules()->addFromDetails('application', $app);\r\n\t\t$this->getModules()->addFromYaml(\"$app/modules.yml\");\r\n\t\t$this->getModules()->addThemesFromDirectory(\"$base/themes\");\r\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.53669435", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "f926923b28bf989eef14286c11b4a583", "score": "0.5362087", "text": "public function module( $_name, $_register_as = null, $_contruct_parameters = null ) {\n global $bitphp;\n $_file = 'core/modules/'. $_name .'.php';\n\n if( file_exists( $_file ) )\n {\n require_once( $_file );\n if( $_register_as === false ) { return; }\n\n $module_obj = new $_name( $_contruct_parameters );\n if( $bitphp->controller === null ) { return $module_obj; }\n\n $_register_as = $_register_as ? $_register_as : strtolower( $_name ) ;\n $bitphp->controller->$_register_as = $module_obj;\n }\t\n else \n {\n $_d = 'El modulo \"'.$_name.'\" no se pudo cargar.';\n $_c = 'El fichero \"'.$_file.'\" no existe.';\n $bitphp->error->trace($_d, $_c);\n }\n }", "title": "" }, { "docid": "a2f40d79aacf0545e25c1e522e15c249", "score": "0.53592485", "text": "public function register()\n {\n //\n\t\t\n }", "title": "" }, { "docid": "0133c0e610b42fc49c7b8b14ba885936", "score": "0.5348702", "text": "private function registerMakeModuleCommand()\n {\n $this->app->bindShared('command.make.module', function ($app) {\n return new MakeModuleCommand($app['files'], $app['modules']);\n });\n\n $this->commands('command.make.module');\n }", "title": "" }, { "docid": "6505dd6ce3072f9ef4c6e8c9ee064df6", "score": "0.5348392", "text": "public function register()\n {\n $commands = array('MakeModule', 'MakeController', 'MakeModel', 'MakeMigration', 'MakeSeeder');\n\n foreach ($commands as $command) {\n $this->{'register' .$command .'Command'}();\n }\n }", "title": "" }, { "docid": "9e0d8a2ab14598a49a81355b41802b4f", "score": "0.53482664", "text": "public static function register() {\n\t\tspl_autoload_register(\"Utils\\\\AutoLoader::loader\");\n\t}", "title": "" }, { "docid": "5b113fd34f4810ab93c973214f46c271", "score": "0.5345278", "text": "public function register()\n {\n require_once __DIR__ . \"/../Helpers/License.php\";\n require_once __DIR__ . \"/../Helpers/Question.php\";\n require_once __DIR__ . \"/../Helpers/Report.php\";\n require_once __DIR__ . \"/../../content/apl_core_configuration.php\";\n require_once __DIR__ . \"/../../content/apl_core_functions.php\";\n \n \n version_compare(PHP_VERSION, \"5.5.0\", \"<\") ? require_once __DIR__ . \"/../../content/password_hash.php\" : \"\";\n }", "title": "" }, { "docid": "85456da8a5da85c12066b370e5e4812e", "score": "0.5338752", "text": "public function register(): void\n {\n if ($this->isRegistered) {\n return;\n }\n \n spl_autoload_register([$this, 'loadClass'], false, true);\n $this->isRegistered = true;\n }", "title": "" }, { "docid": "e8b5ede5633ab6fcc34f7115a4f3dcf7", "score": "0.53379226", "text": "public function register ( $sKey, $mValue );", "title": "" }, { "docid": "0b5eaf3f733441151e03d7ac39a444ea", "score": "0.53313017", "text": "public function register(){\n \n }", "title": "" }, { "docid": "b6aa9aa69344cef4ee0a8c1c3f303bce", "score": "0.5323298", "text": "function regfun1(){\n echo \"this is regular manual function\";\n}", "title": "" }, { "docid": "021aeac363e6028f26ffb61cf3ee1ba6", "score": "0.5304602", "text": "public static function register() {\n\t\t\tif (defined('REQUESTS_AUTOLOAD_REGISTERED') === false) {\n\t\t\t\tspl_autoload_register([self::class, 'load'], true);\n\t\t\t\tdefine('REQUESTS_AUTOLOAD_REGISTERED', true);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c0c325553cf930924eebc9a8f7ea11a7", "score": "0.5302787", "text": "public function register()\n {\n // 1.注册别名\n AliasLoader::getInstance([\n 'BaseController' => \\Modules\\Base\\Libraries\\BaseController::class,\n 'BaseLogic' => \\Modules\\Base\\Libraries\\BaseLogic::class,\n 'BaseModel' => \\Modules\\Base\\Libraries\\BaseModel::class,\n// 'BaseService' => \\Apk\\Base\\Libraries\\BaseService::class,\n ])->register();\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.0", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" } ]
[ { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.7570922", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.7570922", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "735e465640db5c659ac193ab8af1f08c", "score": "0.7563855", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.74913627", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "1f9733369c1aaf55c73aa4d1a8a80882", "score": "0.74565136", "text": "public function create()\n {\n\n return view('resources.create');\n\n }", "title": "" }, { "docid": "1da53c4d224bfa3bc44c0fabd927bedd", "score": "0.74534214", "text": "public function create()\n {\n return view ('rol.form_create');\n }", "title": "" }, { "docid": "1b16c1f4677bd0ac799e087490d4d05b", "score": "0.73494786", "text": "public function create() {\n return view($this->className . '/form', [\n 'className' => $this->className,\n 'pageTitle' => $this->classNameFormatado . '- Cadastro de registro'\n ]);\n }", "title": "" }, { "docid": "edabb98341a0b5aadd47c2864942b8db", "score": "0.73385465", "text": "protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7278556", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "6ed61a57fb61b517537e754054cffc2f", "score": "0.72562546", "text": "public function create()\n {\n return view(\"stok.form\");\n }", "title": "" }, { "docid": "42de9969dbd16cbf3f496acd505422d8", "score": "0.72473806", "text": "public function create()\n {\n // shows a view to create a new resource\n return view('dashboard.admin.create');\n \n }", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.72355145", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "8a257056a97a8ef04b6027c8bfb8cad1", "score": "0.7228952", "text": "public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }", "title": "" }, { "docid": "f5f050d80230f2f0b6313a13b65e7a0b", "score": "0.7222419", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4b9c0332c0bc5feb4fa5c4c15ff4cda0", "score": "0.72191864", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "29282129b8e24a976f037c589580f34b", "score": "0.7207599", "text": "public function create()\n {\n $this->page_title = trans('resource_sub_type.new');\n\n return view('resource_sub_type.new', $this->vdata);\n }", "title": "" }, { "docid": "85bc1c405768493e40df217a0040f018", "score": "0.7190343", "text": "function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }", "title": "" }, { "docid": "9493a84894964b34fd6021b3786bcc7a", "score": "0.7187436", "text": "public function create()\n {\n return view('crops.forms.create');\n }", "title": "" }, { "docid": "68716ed8c8a7c02d13766dd274f478a3", "score": "0.71828926", "text": "public function create()\n {\n return view('user_resources/create');\n }", "title": "" }, { "docid": "f6d3fc80bf700f89fa22e42e685b217d", "score": "0.71820563", "text": "public function create()\n {\n return view ('penilaiansmp.form');\n }", "title": "" }, { "docid": "643073da4582f0c5ee209f1f696bb305", "score": "0.7164142", "text": "public function create()\n {\n return view('admin/records/forms/record-create-form');\n }", "title": "" }, { "docid": "86e44150333771a80ff3634ffc76f344", "score": "0.7150526", "text": "public function create()\n {\n return view('dashboard.form.create');\n }", "title": "" }, { "docid": "75889c35cd5f200bf02a5b21774293e1", "score": "0.7134671", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "7e262dd36752e23255d5ea03566e8de7", "score": "0.71207356", "text": "public function create()\n {\n $model = $this->model;\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "0a067c68f8000d9eb913daf36e5e607c", "score": "0.71185845", "text": "public function create()\n {\n return view('FullForm.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7113886", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7113886", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "c88daeaad1f2ef73dd9534351ceea67a", "score": "0.7094838", "text": "public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a7352ebb77d0418eb30e8fe2e7bfb857", "score": "0.70844066", "text": "public function actionCreate()\n\t{\n\t\t$this->render('create');\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.70783395", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "8e0fde88926c98fb2c54ba67ab5b36a7", "score": "0.7059982", "text": "public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}", "title": "" }, { "docid": "345c70747deda30c3482e759c25c4d12", "score": "0.7058071", "text": "public function create()\n {\n return view('passenger.forms.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70560604", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "20ab9d62fc4da5013c56daa9183bfe28", "score": "0.7054722", "text": "public function create()\n {\n return view('admin.client.form');\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.7048917", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "b7f63db5c5ecb7bba494b8a81ce69874", "score": "0.7047597", "text": "public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "8f53ed51f8136e8e32a2c0525120a50f", "score": "0.7042886", "text": "public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }", "title": "" }, { "docid": "f1f40cbb0cad3cf320b4c0ec09b3b428", "score": "0.7038219", "text": "public function create()\n {\n return view('form');\n\n }", "title": "" }, { "docid": "607b994b80e66fe45602a00379ab7779", "score": "0.70291454", "text": "public function create()\n {\n //return the create view (form)\n return view('books.create');\n }", "title": "" }, { "docid": "643fd44e4ced88a8aac481ced428c5ca", "score": "0.7024861", "text": "public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70137095", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "06af90c4292c136aaaf9329cfae0b3fc", "score": "0.7010354", "text": "public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }", "title": "" }, { "docid": "8074165780da4d1be303d3e9d8c535ba", "score": "0.7009752", "text": "public function create()\n {\n return view ('owner/form');\n }", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70026135", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "75fb4bc6a7a5df1f1f5cd380b0cd4aec", "score": "0.6998329", "text": "public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }", "title": "" }, { "docid": "91dd937891cf552bdb6c058f3730d93b", "score": "0.69976574", "text": "public function newAction()\n {\n $entity = new foo();\n $form = $this->createForm(new fooType(), $entity);\n\n return $this->render('ScrunoBoardBundle:foo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c6f4cc7fdd05567403f39d82ae477eb4", "score": "0.6992617", "text": "public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}", "title": "" }, { "docid": "68eb563182e9ed0d6524bc0b6aac22af", "score": "0.69918597", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/professor/create.blade.php)\n\t\t$this->layout->content = View::make('professor.create');\n\t}", "title": "" }, { "docid": "6c77fcad45300d9322c483f2cf6f0bf9", "score": "0.6987729", "text": "public function create()\n\t{\n\t\treturn view('proyek.create');\n\t}", "title": "" }, { "docid": "033dad9a04f818507b4dc909e40e2cca", "score": "0.6986465", "text": "public function create()\n {\n $data[\"action\"] = 'anggota.store';\n return view('anggota.form', $data);\n }", "title": "" }, { "docid": "355b502cb4384aeb8c0d1322a57b7677", "score": "0.69859046", "text": "public function create()\n {\n return view ('show.create', [\n ]); \n }", "title": "" }, { "docid": "afec885a1ddf009d317c5bca27be7983", "score": "0.69841343", "text": "public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }", "title": "" }, { "docid": "93cdfcc841a0d10e976bbc17fe7020ec", "score": "0.6975793", "text": "public function create()\n {\n return view('rombel.create');\n }", "title": "" }, { "docid": "eb3ba5c68f25897de6ed50346b9959f7", "score": "0.6974125", "text": "public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "432a42bd0e4b7b7dd13b0343e81c9f33", "score": "0.697269", "text": "public function create()\n {\n //\n return view('libros/libroForm');\n }", "title": "" }, { "docid": "27f66e57741013d1d7bd227b0a1ae6cc", "score": "0.6968434", "text": "public function create()\n {\n return view('radars/create');\n }", "title": "" }, { "docid": "db317dc07de792187038b7e4a5f863fd", "score": "0.69639033", "text": "public function newAction()\n {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ManuTfeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "58119c678c7b859b3d2fcb9d4e2544e9", "score": "0.69602984", "text": "public function create()\n {\n return view('forms.girders.create');\n }", "title": "" }, { "docid": "cfb06a7f594e86d7fe22432b5bd18371", "score": "0.6956708", "text": "public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6956705", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "121c8c321a85cfc3184f64d92ecfca6c", "score": "0.69533813", "text": "public function create()\n\t{\n\t\treturn view ('oficinas.create');\n\t}", "title": "" }, { "docid": "9cc1ebbeb06fe2564e0fa603d2c72f75", "score": "0.6952849", "text": "public function create()\n {\n //\n return view('product.form');\n }", "title": "" }, { "docid": "ad86bd025139be91b2df85c83f79d4bd", "score": "0.69505876", "text": "public function create()\n {\n return view('syllabus.create');\n }", "title": "" }, { "docid": "1276876980c60661df1af9ecd3659454", "score": "0.69438666", "text": "public function create()\n\t{\n\t\treturn View::make('nssf.create');\n\t}", "title": "" }, { "docid": "29d1eb6a37de9bf5891c3b5b4ef4fa2d", "score": "0.69435644", "text": "public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }", "title": "" }, { "docid": "7c12821aa5d613a86cc8ba0cf190e6fd", "score": "0.6929494", "text": "public function create()\n {\n return view('tutores.new');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69257337", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "60c9cc4899b058bc51c74601c8025ebe", "score": "0.69230914", "text": "public function create()\n {\n return view('adminCreateForm');\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69203645", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "466006539e9b1da8c7c2e06a069c4e2e", "score": "0.6919252", "text": "public function create()\n {\n return view('layout_admin.thenew.create_new');\n }", "title": "" }, { "docid": "83ebdde393be7960c0a3149b40b830fa", "score": "0.6919028", "text": "public function create()\n {\n //\n return view('guest.sample.submit-property2');\n }", "title": "" }, { "docid": "50d6adc18861a552fb9ddb0969a2630f", "score": "0.69180536", "text": "public function create()\n {\n return view('umbooks::admin.models.book.create');\n }", "title": "" }, { "docid": "1b49a8bc053be1715bbf5620cf797e18", "score": "0.69171077", "text": "public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}", "title": "" }, { "docid": "ce1853ac01959995d112bb4d44014367", "score": "0.6916754", "text": "public function create()\n {\n //\n return view('ijinkeluars.create');\n }", "title": "" }, { "docid": "87632e3ed9e4e251e3f5a4dfa4cc4e5e", "score": "0.69161016", "text": "public function create()\n {\n // Place here the initial data and show\n // Ahh screw it, Show Everything!!!\n\n return view('record.create');\n\n }", "title": "" }, { "docid": "27e5069596828984f14a92c012c1e448", "score": "0.6914167", "text": "public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "98e3bff438d778b0a9ccaad60778cf09", "score": "0.6907316", "text": "public function create()\n {\n return view('admin/car/add-car');\n }", "title": "" }, { "docid": "51a5131df9fc2dcd5b65b5ca8aa614d0", "score": "0.6906534", "text": "public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }", "title": "" }, { "docid": "4b3f5241c4a2f638b9ee19747079b7a2", "score": "0.69055235", "text": "public function create()\n {\n return view('stus.add');\n }", "title": "" }, { "docid": "0b940b83fdd9503e0b64330c52106d41", "score": "0.69042766", "text": "public function create()\n {\n return view('inventariss.create');\n }", "title": "" }, { "docid": "eec374cbf73315b7af3e5f2b21f37d4d", "score": "0.6903917", "text": "public function create()\n {\n return view('linhvuc.create');\n }", "title": "" }, { "docid": "ecc913c81504bfd8529f7b7feaef7080", "score": "0.6903085", "text": "public function create(){\n return view('person/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "64d616e79a29573ea35b962756917c05", "score": "0.68993753", "text": "public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "61066352fa31a37b0f1d8bc9fd229ea9", "score": "0.68963885", "text": "public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }", "title": "" }, { "docid": "70820d35b4d8e319baa89b6f91a3d029", "score": "0.68951714", "text": "public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "27fad6d884340578087d232e3218a94d", "score": "0.6894065", "text": "public function create()\n {\n return view('backpages.formInfo');\n }", "title": "" }, { "docid": "619fa64afd3457bdc8d1c1a041acff47", "score": "0.6888073", "text": "public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6887824", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "09fab99adf688ea100aa90694eab5889", "score": "0.6886876", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "985e9c7c0b741b5b1eb67c091e5ad371", "score": "0.68849856", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('oficinas.create');\n\t}", "title": "" }, { "docid": "9664795bf81cca0f3e65d94f0f595082", "score": "0.6878483", "text": "public function create()\n\t{\n\t\treturn view('questao.create');\n\t}", "title": "" }, { "docid": "623f899bed6c6f380a03ffc99508b73d", "score": "0.68781745", "text": "public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a3b3bbcce8f8a6239dadc2917240252b", "score": "0.68769866", "text": "public function showForm()\n {\n return view('AdminView.create');\n }", "title": "" }, { "docid": "6648fe4f8fd4df24b091c04829b92bbb", "score": "0.6876538", "text": "public function create()\n\t{\n\t\treturn View::make('powerful.create');\n\t}", "title": "" }, { "docid": "06fe0499ccb2038bd9c25e7ef14289e2", "score": "0.6875604", "text": "public function create()\n {\n //Return item details form\n return view('home.create');\n }", "title": "" }, { "docid": "b3998fa6dce49f97902e942f97d98ede", "score": "0.68726563", "text": "public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "60ee9672a795f51a440ede1e68b26045", "score": "0.68686527", "text": "public function create()\n {\n return view('smp.create');\n }", "title": "" }, { "docid": "9f18b1b1a35a9af23eb1d4bbdba665f8", "score": "0.6867638", "text": "public function create()\n {\n return view('admin.car_com.create');\n }", "title": "" }, { "docid": "d14776cad1affd8d37756a185e7fe660", "score": "0.6865186", "text": "public function create()\n {\n return view('relasi.create');\n }", "title": "" }, { "docid": "96c76b820b73f95fa584de07ad04ad0a", "score": "0.6863636", "text": "public function create()\n {\n return view('nasabah/addnasabah');\n }", "title": "" }, { "docid": "e3cfac3178d9c5cb5ab322fa4785604c", "score": "0.68602115", "text": "public function create()\n {\n return view('Prenda.create');\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "45903628ff69251019708b230944f6f0", "score": "0.6915523", "text": "public function store(StoreResourceRequest $request)\n {\n\n $data = $request->input();\n\n if ( empty($data['teacher_id']) ) {\n $data['teacher_id'] = null;\n }\n\n DB::transaction(function() use ($request, $data)\n {\n $resource = Resource::create($data);\n $uploadedFile = $request->file('file');\n\n $type = $uploadedFile->getClientOriginalExtension();\n $name = $resource->generateResourceName();\n $path = $resource->generateResourcePath();\n\n Storage::put(\"{$path}.{$type}\", file_get_contents($uploadedFile->getRealPath()));\n\n $file = File::create([\n 'resource_id' => $resource->id,\n 'name' => $name,\n 'type' => $type,\n 'url' => \"{$path}.{$type}\"\n ]);\n\n if ( !$resource || !$file ) {\n return redirect()->back()->with('error', 'Failed :( Try Again!');\n }\n });\n\n return redirect()\n ->route('home')\n ->with('info', 'Resource Uploaded. Pending of revision.');\n }", "title": "" }, { "docid": "3142727ee8880b6b9792726e4513dca0", "score": "0.680377", "text": "public function store()\n {\n $validation = new $this->resourceRequestValidation;\n $this->validate(request(), $validation->rules());\n DB::beginTransaction();\n try {\n $store = $this->repository->eloquentCreate($this->resourceCreateRequestInputs);\n if ($store) {\n Session::flash(\"success\", \" [ \". (!is_array($store->name) && $store->name ? $store->name : $store->name_val) .\" ] \" . __(\"main.session_created_message\"));\n } else {\n Session::flash(\"danger\", __(\"main.session_falid_created_message\"));\n }\n DB::commit();\n } catch (Exception $e) {\n DB::rollback();\n Session::flash(\"danger\", $e->getMessage());\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "8a450d988729c270cfacfb2daffbda8e", "score": "0.6761625", "text": "public function store(ResourceCreateRequest $request)\n {\n Resource::create([\n 'title' => $request->input('title'),\n 'description' => $request->input('description'),\n 'cat_id' => $request->input('category'),\n 'link' => $request->input('url'),\n 'user_id' => Auth::user()->id\n ]);\n return redirect(route('index'))->with('status', 'Resource Created Successfully');\n }", "title": "" }, { "docid": "a15cea6cc2c6f1b34e41fa10dc7a85e9", "score": "0.6512059", "text": "public function save()\n {\n $this->_storage->modify($this->id, $this->toHash(true));\n }", "title": "" }, { "docid": "8ee7e267114dc7aff05b19f9ebc39079", "score": "0.6424367", "text": "public function create($resource);", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "2013cf53419c1746030f01635e54fbc5", "score": "0.6349437", "text": "public function storeAndNew()\n {\n $this->storeAndNew = true;\n $this->store();\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
f771ef2f75f97a864a4928502823eb2b
Gets the reviewedDateTime property value. The reviewedDateTime property
[ { "docid": "10559c646366723fb0b636c376d29563", "score": "0.6546578", "text": "public function getReviewedDateTime(): ?DateTime {\n $val = $this->getBackingStore()->get('reviewedDateTime');\n if (is_null($val) || $val instanceof DateTime) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'reviewedDateTime'\");\n }", "title": "" } ]
[ { "docid": "e985016a2328a99e0e48d8476f4ede87", "score": "0.828692", "text": "public function getReviewDateTime() : \\DateTime {\n\t\treturn ($this->reviewDateTime);\n\t}", "title": "" }, { "docid": "a9cefcccb3ab3e9494a58232b1c0d46c", "score": "0.76030153", "text": "public function getReviewDate() {\n\t\t\t\treturn ($this->reviewDate);\n\t\t\t}", "title": "" }, { "docid": "29e18ac934279d9e068c3fab9a2cdd40", "score": "0.7013479", "text": "public function getVoteDateTime(): \\DateTime {\n\t\treturn ($this->voteDateTime);\n\t}", "title": "" }, { "docid": "67aa04a21419ccd35b15d3adafb8d34a", "score": "0.6797309", "text": "function getDateRated() {\n\t\treturn $this->getData('dateRated');\n\t}", "title": "" }, { "docid": "9878717e7c46e23a3dfe8639d13fc93e", "score": "0.66090834", "text": "public function getPostDateTime() {\n\t\treturn $this->postDateTime;\n\t}", "title": "" }, { "docid": "483d103eb56b45fbf42fefe085cfcbba", "score": "0.6597511", "text": "public function getDateTime()\n {\n return $this->dateTime;\n }", "title": "" }, { "docid": "ab5aff6399fcb56d821b73d4b3c6aa57", "score": "0.65792024", "text": "public function getDateTime()\n {\n return $this->dateTime;\n }", "title": "" }, { "docid": "ab5aff6399fcb56d821b73d4b3c6aa57", "score": "0.65792024", "text": "public function getDateTime()\n {\n return $this->dateTime;\n }", "title": "" }, { "docid": "5587e4817d72d96db2b2d75f10cc79be", "score": "0.65654016", "text": "public function getLastReviewed()\n {\n return $this->lastReviewed;\n }", "title": "" }, { "docid": "79fba585fbfbef8bb8c3d55dce510c92", "score": "0.65052783", "text": "public function getDateTime() {\n\t\treturn $this->datetime;\n\t}", "title": "" }, { "docid": "fcb555241d2ec4d6b1f53316f0de5286", "score": "0.6505089", "text": "public function getDateTaken()\n {\n if (!isset($this->dateTaken)) {\n $this->dateTaken = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getDateTakenQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->dateTaken;\n }", "title": "" }, { "docid": "0b5fe65478078d9f44d8d73ff8e54f5d", "score": "0.64759445", "text": "public function getVerifiedDate()\n {\n return $this->getProperty()->verifiedDate;\n }", "title": "" }, { "docid": "31e56bfce95d6979debb387d6f75cb50", "score": "0.6444798", "text": "public function getDatetime()\n {\n return $this->datetime;\n }", "title": "" }, { "docid": "31e56bfce95d6979debb387d6f75cb50", "score": "0.6444798", "text": "public function getDatetime()\n {\n return $this->datetime;\n }", "title": "" }, { "docid": "31e56bfce95d6979debb387d6f75cb50", "score": "0.6444798", "text": "public function getDatetime()\n {\n return $this->datetime;\n }", "title": "" }, { "docid": "63ebfc0393c0407de413efd09cad9405", "score": "0.6436829", "text": "public\n\tfunction getPostDate(): \\DateTime {\n\t\treturn ($this->postDate);\n\t}", "title": "" }, { "docid": "de23c70a8507aa67cd3de1e82b5dd456", "score": "0.64232975", "text": "public function GetDateTime() {\n return $this->DateTime;\n }", "title": "" }, { "docid": "a11fc62d5e769957845dfe7239399afe", "score": "0.6382344", "text": "public function getUpdatedDate()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "89d3b1291dfd60f82f8ef1604350c688", "score": "0.6368006", "text": "public function getDatetime()\r\n {\r\n return $this->m_datetime;\r\n }", "title": "" }, { "docid": "5938c34b096872b52c7538514070b694", "score": "0.6363772", "text": "public function getDate()\n {\n return $this->date = new \\DateTime($this->get()->post_date);\n }", "title": "" }, { "docid": "9aa281f3685100ef36a34bb385ccf847", "score": "0.63604987", "text": "public function getDate()\n\t{\n\t\treturn $this->datetime;\n\t}", "title": "" }, { "docid": "e904f4e11d13b13dd8c1bb4be66e88fd", "score": "0.63560975", "text": "public function getPostedDate()\n {\n return $this->_fields['PostedDate']['FieldValue'];\n }", "title": "" }, { "docid": "e904f4e11d13b13dd8c1bb4be66e88fd", "score": "0.63560975", "text": "public function getPostedDate()\n {\n return $this->_fields['PostedDate']['FieldValue'];\n }", "title": "" }, { "docid": "ee12457794ebb5c34d91526bbee537e0", "score": "0.6346666", "text": "public function getDatetime()\n {\n return $this->_datetime;\n }", "title": "" }, { "docid": "138d66a2eb49cea2ffe604bb0ddb3f71", "score": "0.6334782", "text": "public function getAssociatedDateTime()\n {\n return $this->associatedDateTime;\n }", "title": "" }, { "docid": "64f192e59dc6de76acfa7334f01f39a1", "score": "0.63068473", "text": "public function get()\n {\n return $this->date;\n }", "title": "" }, { "docid": "d7c9f91b624d326e2c781c71ab851b82", "score": "0.6282021", "text": "public function getRunDate(): DateTime\n {\n return $this->runDate;\n }", "title": "" }, { "docid": "18d1368be6c8fd9f59c917bcc40d4b5b", "score": "0.6273769", "text": "public function getUseDateTime() \n \t{\n \t\treturn $this->use_datetime;\n \t}", "title": "" }, { "docid": "31904b7cfb9d1137a96d6e08dcd2a28a", "score": "0.6270659", "text": "public function getValueDateTime()\n {\n\n return $this->valueDateTime;\n }", "title": "" }, { "docid": "157fe7bbbed706ab19d3374b4395636a", "score": "0.6243762", "text": "public function getDatetime()\n {\n // Look for value only if not already set\n if(!isset($this->content)) {\n $us = SemanticScuttle_Service_Factory::get('User');\n $user = $us->getUser($this->id);\n $this->datetime = $user['uDatetime'];\n }\n return $this->datetime;\n }", "title": "" }, { "docid": "a97b39177d9e4bf4498df26aa0eb76c2", "score": "0.6239708", "text": "public function getDCreatedAt()\r\n {\r\n return $this->dCreatedAt;\r\n }", "title": "" }, { "docid": "13b2e37cf39259f87cfee1226113e10d", "score": "0.62389493", "text": "public function getCommentTimestamp(): \\DateTime {\n\t\treturn ($this->commentTimestamp);\n\t}", "title": "" }, { "docid": "fa9b34f4eaec42700c6e0dc1c068d4f0", "score": "0.6235307", "text": "public function getDateUpdated()\n {\n $rtn = $this->data['date_updated'];\n\n if (!empty($rtn)) {\n $rtn = new \\DateTime($rtn);\n }\n\n return $rtn;\n }", "title": "" }, { "docid": "62a71d251758c354bed17d863229938f", "score": "0.6223834", "text": "function getDateReminded() {\n\t\treturn $this->getData('dateReminded');\n\t}", "title": "" }, { "docid": "7b74fc9e90da5837ccb34a49dff2947f", "score": "0.62075025", "text": "public function getUpdatedDate()\n {\n return $this->updated_date;\n }", "title": "" }, { "docid": "f408ce98b9cf0102c23638f26e5750b4", "score": "0.6182489", "text": "public function getDateUpdated() {\n return $this->dateUpdated;\n }", "title": "" }, { "docid": "ddcd9a04301e5b88fcfab913b382d8d8", "score": "0.6179614", "text": "public function getTransactionPostedDate()\n {\n return $this->_fields['TransactionPostedDate']['FieldValue'];\n }", "title": "" }, { "docid": "aa2b42a131bea3548fd5b4a3e4de265a", "score": "0.61736274", "text": "public function getRecDate()\n {\n return $this->rec_date;\n }", "title": "" }, { "docid": "68be506b0a758139e9b183b63325aa48", "score": "0.6154901", "text": "function getDateApproved() {\n\t\treturn $this->getData('dateApproved');\n\t}", "title": "" }, { "docid": "b937df0bd79aa4dd14e25a0e9d586f0f", "score": "0.61548764", "text": "function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}", "title": "" }, { "docid": "e14b8c21ac9328fe446cc25cb360d4f4", "score": "0.6146722", "text": "public function getDateUpdated()\n {\n return $this->date_updated;\n }", "title": "" }, { "docid": "e14b8c21ac9328fe446cc25cb360d4f4", "score": "0.6146722", "text": "public function getDateUpdated()\n {\n return $this->date_updated;\n }", "title": "" }, { "docid": "c71f31ca32a416e8d071e538afc7b519", "score": "0.61430573", "text": "public function getUpdatedDate() {\n\t\treturn $this->updatedDate;\n\t}", "title": "" }, { "docid": "c71f31ca32a416e8d071e538afc7b519", "score": "0.61430573", "text": "public function getUpdatedDate() {\n\t\treturn $this->updatedDate;\n\t}", "title": "" }, { "docid": "ad2f3144a6fc99244bed28c43365e9d8", "score": "0.61353314", "text": "public function getDatetime();", "title": "" }, { "docid": "3c590f84fc526e1b2773b0a7742190d5", "score": "0.6134232", "text": "public function getStatusDate()\n {\n return $this->statusDate;\n }", "title": "" }, { "docid": "8c7de63fa4b397fc3bb453a965b4bcb3", "score": "0.61011153", "text": "public function getApplicantSubmissionDate()\n {\n return $this->getProperty('applicant_submission_date');\n }", "title": "" }, { "docid": "2c90368d4da4e748c1b45c3cffebdf31", "score": "0.6098384", "text": "function getDateAssigned() {\n\t\treturn $this->getData('dateAssigned');\n\t}", "title": "" }, { "docid": "5fdc544a5631ec1699bda67e366d7cde", "score": "0.6072971", "text": "public function getReceptionDate();", "title": "" }, { "docid": "afbbcfde12ea5e3c1baf09ec5e0675de", "score": "0.60719687", "text": "public function getDateUpdated() : DateTime\n {\n $rtn = $this->data['date_updated'];\n\n if (!empty($rtn)) {\n $rtn = new DateTime($rtn);\n }\n\n return $rtn;\n }", "title": "" }, { "docid": "ce313842b90032ee0240a44be88c2bfe", "score": "0.6063372", "text": "public function getCommentTime() {\n\t\treturn ($this->commentTime);\n\t}", "title": "" }, { "docid": "2e79ca6f437eefda7d42acc56f948178", "score": "0.60520864", "text": "public function getModifiedDateTime()\n {\n if (array_key_exists(\"modifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"modifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"modifiedDateTime\"])) {\n return $this->_propDict[\"modifiedDateTime\"];\n } else {\n $this->_propDict[\"modifiedDateTime\"] = new \\DateTime($this->_propDict[\"modifiedDateTime\"]);\n return $this->_propDict[\"modifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "2e79ca6f437eefda7d42acc56f948178", "score": "0.60520864", "text": "public function getModifiedDateTime()\n {\n if (array_key_exists(\"modifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"modifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"modifiedDateTime\"])) {\n return $this->_propDict[\"modifiedDateTime\"];\n } else {\n $this->_propDict[\"modifiedDateTime\"] = new \\DateTime($this->_propDict[\"modifiedDateTime\"]);\n return $this->_propDict[\"modifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "2e79ca6f437eefda7d42acc56f948178", "score": "0.60520864", "text": "public function getModifiedDateTime()\n {\n if (array_key_exists(\"modifiedDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"modifiedDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"modifiedDateTime\"])) {\n return $this->_propDict[\"modifiedDateTime\"];\n } else {\n $this->_propDict[\"modifiedDateTime\"] = new \\DateTime($this->_propDict[\"modifiedDateTime\"]);\n return $this->_propDict[\"modifiedDateTime\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0ed299277701d98145e3f11dcae23f2a", "score": "0.6047395", "text": "public function getEditDate() { return $this->tstamp; }", "title": "" }, { "docid": "933627880abe9ff0f3a028f194c1f770", "score": "0.60401034", "text": "function getDateNotified() {\n\t\treturn $this->getData('dateNotified');\n\t}", "title": "" }, { "docid": "54e2508154e0b4147627aec09e0df7c6", "score": "0.60377467", "text": "public function getUpdated(): \\DateTime\n {\n return $this->updated;\n }", "title": "" }, { "docid": "c90b17b852e49024e3ab75e4b6df571b", "score": "0.60263294", "text": "public function getDateModified(): DateTime\n {\n return $this->dateModified;\n }", "title": "" }, { "docid": "2fa4c38e06cd1cf0b011fcba188c228f", "score": "0.6015469", "text": "public function getRepeatPropertyBookerDate()\n {\n if ($this->repeatPropertyBookerDate) {\n return new \\DateTime($this->repeatPropertyBookerDate);\n } else {\n return;\n }\n }", "title": "" }, { "docid": "4b32f623e94b09e4da11cfc29790c4b8", "score": "0.6009617", "text": "public function getDateTime()\n {\n $date = Carbon::parse($this->created_at)->diffForHumans();\n return $date;\n }", "title": "" }, { "docid": "4cb15a270029e03e6018a794da9faf8c", "score": "0.59848565", "text": "public function getIssueDate()\n {\n return $this->issueDate;\n }", "title": "" }, { "docid": "88de62d76661522732e6f363d8072036", "score": "0.59745705", "text": "public function getDateCreated()\n {\n return $this->date_created;\n }", "title": "" }, { "docid": "88de62d76661522732e6f363d8072036", "score": "0.59745705", "text": "public function getDateCreated()\n {\n return $this->date_created;\n }", "title": "" }, { "docid": "3ca0e5569b59b6856978e4de3e8466c2", "score": "0.59711003", "text": "public function getDateCreated()\n {\n return $this->_DateCreated;\n }", "title": "" }, { "docid": "bfba70f741a397ce3834321533fd952a", "score": "0.596535", "text": "public function getDate()\r\n {\r\n return $this->date;\r\n }", "title": "" }, { "docid": "8b51ad574fe742f54b5eaf6fbc7615fd", "score": "0.59628475", "text": "public function currentDate()\n {\n return $this->dateTime->gmtDate();\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "29401d60599228ab7a9dcaece649a984", "score": "0.59582675", "text": "public function getDate()\n {\n return $this->date;\n }", "title": "" }, { "docid": "97bd11e32d35543ff147eac1974aa0eb", "score": "0.5956774", "text": "public function getQuestionDate() {\n\t\treturn $this->questionDate;\n\t}", "title": "" }, { "docid": "37676f6f3192af904c9d23b41674f30e", "score": "0.5955691", "text": "public function getDateCreated() {\r\n return $this->_date_created;\r\n }", "title": "" }, { "docid": "985cb49297932c6700b6a806c2611324", "score": "0.5950628", "text": "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "title": "" }, { "docid": "985cb49297932c6700b6a806c2611324", "score": "0.5950628", "text": "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "title": "" }, { "docid": "985cb49297932c6700b6a806c2611324", "score": "0.5950628", "text": "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "03e52612019e0ff77a21db95b3c64500", "score": "0.0", "text": "public function run()\n {\n //\n for ($i = 1; $i <=20; $i++) {\n $question = new Question();\n $question->fill([\n 'title' => 'question title ' . ' ' . $i,\n 'text' => 'question text ' . ' ' . $i\n ]);\n\n $question->save();\n }\n }", "title": "" } ]
[ { "docid": "fe865198b7339ada0253770db050b45a", "score": "0.7975537", "text": "public function run()\n {\n $this->call(ContinentSeeder::class);\n $this->call(GenreSeeder::class);\n $this->call(RoleSeeder::class);\n DB::table(\"equipes\")->insert([\n \"nom\" => \"Sans Equipe\",\n \"ville\" => \"null\",\n \"pays\" => \"null\",\n \"max\" => 1000,\n \"att\" => 200,\n \"ct\" => 200,\n \"dc\" => 300,\n \"rp\" => 300,\n \"continent_id\" => 1\n ]);\n Team::factory(5)->create();\n Player::factory(15)->create();\n }", "title": "" }, { "docid": "def0e002a739b23c5ce75c2f4a5b60ba", "score": "0.7960287", "text": "public function run()\n {\n $permissions = new PermissionsTableSeeder();\n $permissions->run();\n $roles = new RolesTableSeeder();\n $roles->run();\n $headings = new headingsSeeder();\n $headings->run();\n $posts = new postsSeeder();\n $posts->run();\n\n $user = [\n [\n 'name' => 'Joe',\n 'email' => 'jo@jo.com',\n 'password' => bcrypt('password'),\n ],\n ];\n\n foreach ($user as $key => $value) {\n User::create($value);\n }\n\n $role = [\n [\n 'user_id' => 1,\n 'role_id' => 1,\n ],\n ];\n\n foreach ($role as $key => $value) {\n DB::table('role_user')->insert($value);\n }\n\n\n }", "title": "" }, { "docid": "cbed0f656974d268b41fddcd9a665e9c", "score": "0.7946394", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n Article::create([\n 'body' => $faker->paragraph,\n 'heading' => $faker->sentence,\n 'subheading' => $faker->sentence,\n 'slug' => $faker->unique()->slug(),\n 'meta' => $faker->sentence,\n 'version' => $faker->numberBetween(1, 5),\n 'user_id' => 3,\n 'photo_id' => 12,\n ]);\n }\n }", "title": "" }, { "docid": "45e58516482f7ffcb96904e69bc69eff", "score": "0.79225564", "text": "public function run()\n {\n Eloquent::unguard();\n\n $faker= Faker\\Factory::create();\n\n foreach (range(1,5) as $key => $index) {\n $title = str_replace('.', '', $faker->sentence(2));\n $slug = str_slug($title, \"-\");\n NewsPost::create([\n 'active' => $faker->randomElement($array = array('active','inactive')),\n 'language' => locale(),\n 'title' => $title,\n 'slug' => $slug,\n 'meta_title' => str_replace('.', '', $faker->sentence(3)),\n 'meta_keywords' => str_replace('.', '', $faker->sentence(3)),\n 'meta_description' => $faker->realText(50),\n 'content' => $faker->realText(500), \n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(), \n ]);\n }\n }", "title": "" }, { "docid": "cafb15a42a31714bd832585fe9064750", "score": "0.792249", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n app('db.connection')->table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => app('hash')->make('secret'),\n 'email_verified_at' => date('Y-m-d H:i:s'),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n\n app('db.connection')->table('posts')->insert([\n 'user_id' => 1,\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "8c188dde223b9cb3601be82fc53c11dd", "score": "0.7905214", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,50) as $index) {\n\t \\DB::table('users')->insert([\n\t \t'uuid' => Uuid::uuid4()->getHex(),\n\t 'name' => $faker->name,\n\t 'email' => $faker->email,\n\t 'password' => bcrypt('admin'),\n\t 'role_id' => 1,\n\t 'username' => $faker->username,\n\t 'gender' => 'L',\n\t 'phone' => $faker->phoneNumber,\n\t 'birthdate' => $faker->date($format = 'Y-m-d', $max = 'now')\n\t ]);\n\t }\n\n\t $role = ['admin', 'writter', 'member'];\n\t for ($i = 0; $i < 3; $i++) {\n\t \t\\DB::table('roles')->insert([\n\t \t\t'name' => $role[$i]\n\t \t]);\n\t }\n }", "title": "" }, { "docid": "bfcf0b9eb675e9685b1f439b58c20b58", "score": "0.79041165", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n// DB::statement('drop database blog');\n// DB::statement('create database blog');\n factory(App\\Models\\UsersModel::class, 10)->create();\n factory(App\\Models\\TagsModel::class, 5)->create();\n factory(App\\Models\\ArticlesModel::class, 20)->create();\n factory(App\\Models\\FriendlyLinksModel::class, 5)->create();\n factory(App\\Models\\CommentsModel::class, 60)->create();\n factory(App\\Models\\RepliesModel::class, 180)->create();\n// factory(App\\Models\\AdvertsModel::class, 10)->create();\n $articles = App\\Models\\ArticlesModel::query()->get();\n $tags = App\\Models\\TagsModel::query()->get();\n $data = [];\n $articles->map(function ($item) use ($tags, &$data) {\n $tow = $tags->random(2);\n $data[] = [\n 'article_id' => $item->id,\n 'tag_id' => $tow->first()->id\n ];\n $data[] = [\n 'article_id' => $item->id,\n 'tag_id' => $tow->last()->id\n ];\n });\n App\\Models\\ArticleTagModel::query()->insert($data);\n }", "title": "" }, { "docid": "956f8d1cb5383bddc4ac094153d68875", "score": "0.7901195", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n\n //modo Laravel official site (utilizza helper \"factory\")\n\n //factory(\\App\\User::class, 50)->create()->each(function($u) {\n //\t$u->post()->save(factory(\\App\\Post::class)->make());\n //});\n\n \n /*\n $authors = factory(App\\Author::class, 5)->create();\n\n $authors->each(function ($author) {\n $author\n ->profile()\n ->save(factory(App\\Profile::class)->make());\n \n $author\n ->posts()\n ->saveMany(\n factory(App\\Post::class, rand(20,30))->make()\n );\n });\n */\n\n\n\n\n $this->call(ArticlesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n\n }", "title": "" }, { "docid": "e98ca58a614a2e587dc869a8561ff53e", "score": "0.78984624", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Album::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Album::create([\n 'album_name' => $faker->name,\n 'album_description' => $faker->paragraph,\n 'cover_image' => $faker->url,\n 'user_id' => $faker->numberBetween(0, 10)\n ]);\n }\n }", "title": "" }, { "docid": "ebc3450d00c6f694252757b995f49049", "score": "0.7897771", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $products = [\n \t'Piłka',\n \t'Buty sportowe',\n \t'Skarpetki',\n \t'Dresy piłkarskie',\n \t'Bluzka',\n \t'T-shirt',\n \t'Kurtka przeciwdeszczowa',\n \t'Kurtka zimowa'\n ];\n\n $faker = Faker::create();\n\n $id = 1;\n\n foreach($products as $product) {\n\n \tDB::table('products')->insert([\n \t\t'name' => $product,\n \t\t'description' => $faker->sentence($nbWords = 6, $variableNbWords = true),\n 'created_at' => $faker->dateTimeThisYear(),\n 'updated_at' => $faker->dateTimeThisYear()\n \t]);\n\n DB::table('prices')->insert([\n 'product_id' => $id++,\n 'price' => $faker->numberBetween($min = 10, $max = 2000)\n ]);\n\n }\n\n \n\n }", "title": "" }, { "docid": "e56ca4e58ec7f68a1082b8357e7ad60b", "score": "0.7896924", "text": "public function run()\n {\n // Truncate the table\n Player::truncate();\n \n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n Player::create([\n 'first_name' => $faker->firstNameMale,\n 'last_name' => $faker->lastName,\n 'form' => $faker->randomFloat(2, 0, 1000),\n 'total_points' => $faker->randomDigitNotNull,\n 'influence' => $faker->randomFloat(2, 0, 1000),\n 'creativity' => $faker->randomFloat(2, 0, 1000),\n 'threat' => $faker->randomFloat(2, 0, 1000),\n 'ict_index' => $faker->randomFloat(2, 0, 1000),\n ]);\n }\n }", "title": "" }, { "docid": "c97f05061b43ec8fea282d5f3213d6ac", "score": "0.7894218", "text": "public function run()\n\t{\n\t\tDB::table('news')->delete();\n\t\t$faker = Faker::create();\n\t\t$categories = Category::all()->lists('id');\n\t\t$tags = Tag::all()->lists('id');\n\t\t$users = User::all()->lists('id');\n\t\tforeach(range(1,100) as $index)\n\t\t{\n\t\t\tNews::create([\n\t\t\t\t'slug'=>$faker->word,\n\t\t\t\t'text'=>$faker->text($maxNbChars = 800, $index = 2 ),\n\t\t\t\t'category_id'=>$faker->randomElement($categories),\n\t\t\t\t'tag_id'=> $faker->randomElement($tags),\n\t\t\t\t'user_id'=>$faker->randomElement($users),\n\t\t\t\t]);\n\t\t}\n\t\t\n\t\t\n\t\tEloquent::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "2adc405bf0b1c0e815d1221f71529e3b", "score": "0.78856826", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n User::create([\n 'name' => 'Leo Buchner',\n 'email' => 'admin@admin.com',\n 'password' => Hash::make('password')\n ]);\n\n Page::create([\n 'parent_id' => null,\n 'title' => 'Quem Somos',\n 'slug' => 'quem-somos',\n 'body' => 'Conteúdo de Quem somos'\n ]);\n\n Page::create([\n 'parent_id' => 1,\n 'title' => 'Missão',\n 'slug' => 'missao',\n 'body' => 'Conteúdo de Missão'\n ]);\n\n Page::create([\n 'parent_id' => 1,\n 'title' => 'Visão',\n 'slug' => 'visao',\n 'body' => 'Conteúdo de Visão'\n ]);\n }", "title": "" }, { "docid": "0bd0f1606d68cef700792f0dd441bd4d", "score": "0.7885222", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 50)->create();\n factory(Category::class, 15)->create();\n factory(Post::class, 500)->create();\n factory(Comment::class, 1500)->create();\n }", "title": "" }, { "docid": "567e23c56d50f67ffb0efde7e5d4625c", "score": "0.78843975", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('projets')->truncate();\n\n $models = array(\n ['title' => 1, 'user_id' => 1]\n );\n\n // Uncomment the below to run the seeder\n DB::table('projets')->insert($models);\n }", "title": "" }, { "docid": "7f9a14a4c0bc145934c8c161a34f4f54", "score": "0.7878623", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('admin'),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]);\n\n DB::table('authors')->insert([\n 'id' => 1,\n 'name' => 'Joanne',\n 'surname' => 'Rowling',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]);\n\n DB::table('books')->insert([\n 'title' => \"Harry Potter and the Philosopher's Stone\",\n 'author_id' => 1,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]);\n }", "title": "" }, { "docid": "75367f324e8fc349a7f7a4b71729043a", "score": "0.7878553", "text": "public function run()\n {\n // Disable Foreign key check for this connection before running seeder\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table( 'document_types' )->truncate();\n \n //create document types\n $types = [\n [\n 'name' => 'Vendors Supporting Documents',\n 'description' => 'These are the documents vendors upload during registration. This type should never be deleted.'\n ],\n [\n 'name' => 'Proposal Document',\n 'description' => 'Document submitted by xyz for xyz purpose'\n \n ],\n [\n 'name' => 'Others',\n 'description' => 'Other types of documents' \n ]\n ];\n\n foreach ($types as $type) {\n $documentFormat = new DocumentType($type);\n $documentFormat->save();\n };\n\n // enable Foreign key check \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "9176f195933997b4883dd0f7505f9cf5", "score": "0.787096", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n \n 'name' => $faker->name,\n 'type' => $faker->company,\n 'category' => $faker->creditCardType,\n 'sub' => $faker->userName\n 'price' => $faker->biasedNumberBetween($min = 10, $max = 20, $function = 'sqrt'),\n 'quantity' => $faker->biasedNumberBetween($min = 10, $max = 20, $function = 'sqrt')\n\n \t\t\t\t\t\n ]);\n }\n }", "title": "" }, { "docid": "49aa7e2235ee60d3e4e3da48fe378ddf", "score": "0.78695685", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Post::truncate();\n\n $faker = \\Faker\\Factory::create();\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Post::create([\n 'category_name' => $faker->sentence,\n 'category_slug' => PostHelper::post_slug($faker->sentence),\n 'meta_description' => $faker->paragraph,\n 'meta_title' => $faker->sentence,\n 'meta_keywords' => $faker->sentence,\n 'publication_status' => $faker->numberBetween(0,1),\n ]);\n }\n }", "title": "" }, { "docid": "1bf093e5298bec6ab9623533f62b1138", "score": "0.786323", "text": "public function run()\n {\n User::factory()->create([\n 'role' => 'admin',\n ]);\n User::factory()->count(4)->create([\n 'role' => 'author',\n ]);\n User::factory()->count(8)->create();\n\n // insert default user \n DB::table('users')->insert([\n [\n 'name' => 'samia',\n 'email' => 'mahisamia13@gmail.com',\n 'password' => Hash::make('12345678'),\n 'role' => 'admin',\n 'valid' => 1\n ]\n ]);\n\n // insert categories\n DB::table('categories')->insert([\n [\n 'title' => 'Category 1',\n ],\n [\n 'title' => 'Category 2',\n ],\n [\n 'title' => 'Category 3',\n ],\n ]);\n\n // insert tags \n DB::table('tags')->insert([\n [\n 'tag' => 'Tag 1', \n ],\n [\n 'tag' => 'Tag 2',\n ],\n [\n 'tag' => 'Tag 3',\n ],\n [\n 'tag' => 'Tag 4',\n ],\n [\n 'tag' => 'Tag 5',\n ],\n [\n 'tag' => 'Tag 6',\n ]\n ]);\n\n // seed some posts \n foreach (range(1, 3) as $i) {\n Post::factory()->create([\n 'title' => 'Post ' . $i,\n 'slug' => 'post-' . $i,\n 'user_id' => 3,\n 'image' => 'img0' . $i . '.jpg',\n ]);\n }\n foreach (range(4, 10) as $i) {\n Post::factory()->create([\n 'title' => 'Post ' . $i,\n 'slug' => 'post-' . $i,\n 'user_id' => 4,\n 'image' => 'img0' . $i . '.jpg',\n ]);\n }\n }", "title": "" }, { "docid": "522cd5fdba487ddde3d6b9d32593e2af", "score": "0.7858243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\User', 20)->create();\n factory('App\\Company', 20)->create();\n factory('App\\job', 20)->create();\n\n\n $categories = [\n 'Government','Banking','BITM','Medical','Software','Engineering'\n ];\n\n foreach ($categories as $category){\n Category::create(['name' => $category]);\n }\n }", "title": "" }, { "docid": "5f2cca1fa3a2c50a447bcf26be71b5fc", "score": "0.78552336", "text": "public function run()\n {\n //\n Staff::truncate();\n\n $faker = \\Faker\\Factory::create('zh_CN');\n $position=array('后端工程师','前端工程师','总监','主任','项目组长');\n $sex=array(10,20,30);\n // And now, let's create a few articles in our database:\n DB::statement(\"ALTER TABLE staff AUTO_INCREMENT = 1000;\");\n for ($i = 0; $i < 1000; $i++) {\n Staff::insert([\n// 'name' => $faker->addProvider(new \\Faker\\Provider\\zh_CN\\Person($faker)),\n// 'name'=>$faker->addProvider(new \\Faker\\Provider\\zh_CN\\Person()),\n 'name'=>$faker->name,\n 'age' => array_random([20,22,25,26,30,28,33,31,30,29,27,38,40,39]),\n 'sex'=>array_random($sex),\n 'position'=>array_random($position),\n 'state'=>0,\n 'created_at'=>date('Y-m-d H-i-s'),\n 'updated_at'=>date('Y-m-d H-i-s'),\n ]);\n }\n }", "title": "" }, { "docid": "71ef9086bdef705406c334abd42529e9", "score": "0.783668", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n \n $tags = factory('App\\Tag', 8)->create();\n\n factory('App\\Post', 30)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory('App\\Comment')->make());\n $post->categories()->attach(mt_rand(1,5));\n $post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "b80ba6a80746c13a65e6a74dc9c32a63", "score": "0.7836474", "text": "public function run()\n {\n //invoke seeder faker package to seed the database with dummy data\n $faker = Faker::create();\n\n $new = News::create([\n 'user_id' => 2,\n 'title' => $faker->sentence,\n 'abst' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'mediapath' => $faker->url,\n ]);\n \n }", "title": "" }, { "docid": "9094efdb19f24a063107ecf5940ecdfb", "score": "0.78354853", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n RolesTableSeeder::class,\n PermissionRoleTableSeeder::class,\n UsersTableSeeder::class,\n RoleUserTableSeeder::class,\n StatusTableSeeder::class,\n ProductTableSeeder::class,\n ]);\n\n Category::factory()->count(3)->create();\n // Product::factory()->count(5)->create();\n\n $categories = Category::all();\n Product::all()->each(function ($product) use ($categories){\n $product->categories()->attach(\n $categories->random(1)->pluck('id')->toArray()\n );\n });\n\n \n }", "title": "" }, { "docid": "1ac2f951ea20568364995cb478f4c848", "score": "0.7827812", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // create mock data using php artisan db:seed\n\n // create mock user data\n factory(App\\User::class,10)->create();\n\n // create mock role data\n $this->call(RolesTableSeeder::class);\n\n // factory(App\\Role::class,5)->create();\n // Using the below seed method to insert roles in specific order using array instead of randomizing it and making sure it only appearts once.\n // $roles = ['project owner', 'project leader', 'junior developer', 'medior developer', 'senior developer'];\n // for($i=0; $i < count($roles); $i++){\n // DB::table('roles')->insert([\n // 'role' => $roles[$i]\n // ]);\n // }\n\n\n // create mock level data\n // factory(App\\Level::class)->create();\n\n // create mock user_projects data\n $this->call(UsersProjectsTableSeeder::class);\n\n // create mock project data\n factory(App\\Project::class,10)->create();\n\n // create mock task data\n factory(App\\Task::class,20)->create();\n }", "title": "" }, { "docid": "d8dbbd6952e51afba458d100498efcf6", "score": "0.78265905", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $todoLists = factory(TodoList::class, 3)->create();\n\n $todoLists->each(function ($list) {\n factory(Todo::class, 6)->create(['todo_list_id'=>$list->id]);\n });\n }", "title": "" }, { "docid": "dfe051095ab9dad76a095becab65d15f", "score": "0.78256834", "text": "public function run()\n {\n //\n //Rubros::truncate();\n $faker = \\Faker\\Factory::create();\n\n\n for ($i = 0; $i < 50; $i++) {\n Rubros::create([\n 'nombre'=> $faker->name,\n 'created_at'=>$faker->dateTimeBetween(),\n 'updated_at'=>$faker->dateTimeBetween(),\n ]);\n }\n\n //Articles::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Articles::create([\n 'rubro_id' => $faker->numberBetween(1,50),\n 'nombre'=> $faker->name,\n 'descripcion'=>$faker->text(200),\n 'codigo'=>$faker->numberBetween(000000,5555555),\n 'precio'=>$faker->numberBetween(1,200),\n 'caracteristicas'=>$faker->text(200),\n 'created_at'=>$faker->dateTimeBetween(),\n 'updated_at'=>$faker->dateTimeBetween(),\n ]);\n }\n }", "title": "" }, { "docid": "f983241a695a5e39eb832ac04acb5dbe", "score": "0.782249", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,5)->create();\n factory(Category::class,10)->create();\n factory(Article::class,100)->create();\n factory(Comment::class,500)->create();\n }", "title": "" }, { "docid": "6a91bbe4cd963f04b1edf9ac5661b1e5", "score": "0.7819753", "text": "public function run()\n {\n $faker = Faker\\Factory::create('pl_PL');\n DB::table('role')->insert([\n 'id'=>1,\n 'name'=>'User',\n ]);\n DB::table('role')->insert([\n 'id'=>2,\n 'name'=>'Kucharz',\n ]);\n DB::table('role')->insert([\n 'id'=>3,\n 'name'=>'Dostawca',\n ]);\n DB::table('role')->insert([\n 'id'=>4,\n 'name'=>'Admin',\n ]);\n }", "title": "" }, { "docid": "8b57fa3b60e07bc383b7c7950c199b92", "score": "0.78077936", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'id' => '1',\n 'name' => 'Sergio Sanchez',\n 'email' => 'sergio@gmail.com',\n 'password' => bcrypt('12345678'),\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('categories')->insert([\n 'id' => '1',\n 'name' => 'Programación',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('categories')->insert([\n 'id' => '2',\n 'name' => 'Diseño',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('categories')->insert([\n 'id' => '3',\n 'name' => 'Software',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('categories')->insert([\n 'id' => '4',\n 'name' => 'Tecnología',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n }", "title": "" }, { "docid": "391e06a0577efad849ffd33edc20c4af", "score": "0.7802653", "text": "public function run()\n {\n $this->cleanDatabase();\n $this->call(CitiesTableSeeder::class);\n $this->call(AcademiesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(IngredientsTableSeeder::class);\n $this->call(CriteriaTableSeeder::class);\n\n factory('App\\Judge', 5)->create();\n factory('App\\User', 50)->create();\n factory('App\\Recipe', 102)->create();\n \n// $this->IngredientRecipeTableSeeder();\n $this->VotesTableSeeder();\n $this->RoleUserTableSeeder();\n }", "title": "" }, { "docid": "bc18e1b07936000ee483f32bf7332f03", "score": "0.779398", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(App\\Author::class, 50)->create();\n// factory(App\\Publisher::class, 50)->create();\n //factory(App\\Book::class, 50)->create();\n factory(App\\User::class, 5)->create();\n// factory(App\\Item::class, 50)->create();\n// factory(App\\Order::class, 50)->create();\n// factory(App\\Invoice::class, 50)->create();\n\n// factory(App\\Account::class, 50)->create();\n }", "title": "" }, { "docid": "226907a8e7d8adb8c96e7797871e7037", "score": "0.77881116", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0 ');\n\n Role::truncate();\n User::truncate();\n Vendor::truncate();\n Customer::truncate();\n Category::truncate();\n Offer::truncate();\n Bookmark::truncate();\n Category_has_offer::truncate();\n\n\n $usersQuantity=20;\n $vendorsQuantity=5;\n $customersQuantity=15;\n $categoriesQuantity=5;\n $offersQuantity=20;\n $bookmarksQuantity=20;\n $category_has_offersQuantity=20;\n\n\n factory(Role::class,2)->create();\n factory(User::class,$usersQuantity)->create();\n factory(Vendor::class,$vendorsQuantity)->create();\n factory(Customer::class,$customersQuantity)->create();\n factory(Category::class,$categoriesQuantity)->create();\n factory(Offer::class,$offersQuantity)->create();\n factory(Bookmark::class,$bookmarksQuantity)->create();\n factory(Category_has_offer::class,$category_has_offersQuantity)->create();\n\n }", "title": "" }, { "docid": "f952b220e598b5188cd9160f6854f6cd", "score": "0.77875453", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@admin.com',\n 'password' => bcrypt('admin')\n ]);\n\n // $this->call(UsersTableSeeder::class);\n DB::table('datosempresas')->insert([\n 'nombreEmpresa' => 'Moto Boxes',\n 'nit' => '11454337',\n 'direccion' => 'México # 131 Esquina Av. De las Américas',\n 'telefono' => 'S/N',\n 'celular' => '68620333'\n ]);\n\n }", "title": "" }, { "docid": "1881d531d91c3c81f91ad0f0c8328ad1", "score": "0.7786826", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n Category::factory()->count(5)->create();\n Category::factory()->count(20)->create([\n 'category_id' => rand(1,4),\n ]);\n Post::factory()->count(20)->create();\n }", "title": "" }, { "docid": "802bb77125f03e0915c06d50346e98f8", "score": "0.77848125", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n penalitzacions::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \tpenalitzacions::create([\n \t\t'pentipus' => $faker->randomElement($array = array('exclusio','baneig')),\n \t\t'pendata_inici' => $faker->date,\n \t\t'pendata_final' => $faker->date,\n \t]);\n }\n }", "title": "" }, { "docid": "ef3b1a3883f3d079a4d8dfe5989ab713", "score": "0.7781416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*\n $faker = Faker::create();\n \tforeach (range(1,20) as $index) {\n\t DB::table('companies')->insert([\n\t 'name' => $faker->name,\n\t 'email' => $faker->email,\n\t 'website' => $faker->domainName,\n ]);\n } */\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n list($first_name,$last_name) = explode(' ',$faker->name);\n\t DB::table('employees')->insert([\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n\t 'email' => $faker->email,\n 'phone' => $faker->phoneNumber,\n 'id_company' => rand(30, 33),\n ]);\n }\n }", "title": "" }, { "docid": "de4eb402a27ca0b92fe133e4278163eb", "score": "0.7777538", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n /* Seed the most basic tables */\n $this->call([\n MuscleSeeder::class,\n CategorySeeder::class,\n ExerciseSeeder::class,\n ]);\n\n /* Seed test user */\n $user = new \\App\\Models\\User;\n $user->name = 'Tony Stark';\n $user->email = 'ironman@avengers.com';\n $user->email_verified_at = now();\n $user->password = Hash::make('PepperPotts<3');\n $user->remember_token = Str::random(10);\n $user->birthdate = Carbon::today()->subYears(rand(0, 30));\n $user->genre = 'Hombre';\n $user->description = 'HOMBRE DE ACERO. Genio. Multimillonario. Filántropo. La confianza de Tony Stark solo se compara con sus habilidades de alto vuelo como el héroe llamado Iron Man.';\n $user->save();\n /* Seed the users and routines via factories */\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Routine::factory(40)->create();\n \\App\\Models\\Workout::factory(750)->create();\n\n $users = \\App\\Models\\User::all();\n $routines = \\App\\Models\\Routine::all();\n $categories = \\App\\Models\\Category::all();\n $sets = \\App\\Models\\Set::all();\n $workouts = \\App\\Models\\Workout::all();\n $exercises = \\App\\Models\\Exercise::all();\n\n /* Seed the many to many relationships */\n \\App\\Models\\User::all()->each(function ($user) use ($routines) { \n $user->favouriteRoutines()->attach(\n $routines->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\User::all()->each(function ($user) use ($users) { \n $user->followers()->attach(\n $users->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Exercise::all()->each(function ($exercise) use ($exercises) { \n $exercise->similar()->attach(\n $exercises->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Routine::all()->each(function ($routine) use ($routines) { \n $routine->similar()->attach(\n $routines->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Routine::all()->each(function ($routine) use ($categories) { \n $routine->categories()->attach(\n $categories->random(rand(1, 3))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Routine::all()->each(function ($routine) use ($sets) { \n $routine->sets()->attach(\n $sets->random(rand(1, 5))->pluck('id')->toArray()\n ); \n });\n\n \\App\\Models\\Workout::all()->each(function ($workout) use ($sets) {\n $workout->sets()->attach(\n $sets->random(rand(1, 5))->pluck('id')->toArray(),\n ['weight' => rand(0, 100)]\n );\n });\n\n /* Seed the comments */\n \\App\\Models\\Comment::factory(40)->create();\n \\App\\Models\\Rating::factory(40)->create();\n\n\n\n }", "title": "" }, { "docid": "7ae21bf6d66f3a33452b6cb157df32da", "score": "0.7776954", "text": "public function run()\n {\n $this->call(StateSeeder::class);\n $this->call(DocumentSeeder::class);\n /*$categories=factory(App\\Category::class, 6)->create();\n\n $products = factory(App\\Product::class,300)->create();\n\n $customers = factory(App\\Customer::class,10)->create();\n\n $customers->each(function(App\\Customer $customer)\n {\n factory(App\\Order::class,8)->create(['customer_id'=> $customer->id])\n ->each(function(App\\Order $order)\n {\n \n for ($i=0; $i < rand(1,10); $i++) \n {\n $order->products()->attach(rand(1,300),['quantity' => rand(1,10)]); \n }\n\n });\n });*/\n \n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "ca90d8592dcc8dabba72ec0ea966f14a", "score": "0.77743125", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n // 获取作者的 id\n $authors = App\\Models\\User::activated()->lists('id')->toArray();\n // 获取栏目的 id\n $columns = App\\Models\\Column::visible()->lists('id')->toArray();\n // 生成 100 篇测试文章内容\n $articles = factory(App\\Models\\Article::class)->times(100)->make()->each(function($ele) use ($faker, $authors, $columns) {\n $ele->user_id = $faker->randomElement($authors);\n $ele->column_id = $faker->randomElement($columns);\n })->toArray();\n // 保存测试数据\n App\\Models\\Article::insert($articles);\n }", "title": "" }, { "docid": "c107b0e64a3c47feca08f929f10d419c", "score": "0.7771645", "text": "public function run()\n {\n // DB::table('articles')->insert([\n // 'title' => 'BeritaUtama',\n // 'content' => \"Lorem, ipsum dolor sit amet consectetur adipisicing elit. Deleniti, officiis asperiores fugiat nam, reiciendis minima ratione exercitationem alias, possimus delectus corporis ullam perferendis veniam odio nobis eius ducimus doloremque a.\",\n // 'created_at' => Carbon::now()\n // ]); \n\n $faker = Faker::create('id_ID');\n\n for ($i = 1; $i < 20; $i++) {\n DB::table('articles')->insert([\n 'title' => $faker->word,\n 'content' => $faker->text\n ]);\n }\n }", "title": "" }, { "docid": "6d836f21914828ae17c384b3f209f115", "score": "0.7771384", "text": "public function run()\n {\n User::factory(3)->create();\n // Student::factory(10)->create();\n // Subject::factory(20)->create();\n // Post::factory(10)->create();\n // Comment::factory(10)->create();\n // Category::factory(10)->create();\n // CategoryPost::factory(10)->create();\n // $this->call([\n // StudentsTableSeeder::class,\n // SubjectsTableSeeder::class,\n // ]);\n }", "title": "" }, { "docid": "a19a863a3c172b1e3a5f89379a980807", "score": "0.77686507", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(10)->create();\n Car::factory(50)->create();\n Customer::factory(100)->create();\n Rental::factory(100)->create();\n }", "title": "" }, { "docid": "c5105a8b1575468d787e6846d5ac9104", "score": "0.7767463", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $actors = factory(Actor::class)->times(3)->create();\n $movies = factory(Movie::class)->times(3)->create();\n\n foreach($movies as $movie) {\n $movie->actors()->saveMany($actors->random(1));\n }\n foreach($actors as $actor) {\n $actor->favoriteMovie()->associate($movies->random(1)->first())->save();\n }\n }", "title": "" }, { "docid": "77bc83bb77c84b6a32d69a26bb84cc8c", "score": "0.7764518", "text": "public function run()\n {\n $this->call(DefaultSeeder::class);\n\n factory(User::class, 10)->create();\n factory(Person::class, 10)->create();\n factory(Warehouse::class, 10)->create();\n }", "title": "" }, { "docid": "e6dd5ab1ad8ada2d2ed87bf4b12f83e9", "score": "0.77591866", "text": "public function run()\n {\n if (!DatabaseSeeder::$seedDemo) return;\n\n $this->seedCategories();\n\n $this->seedMenuOptions();\n\n $this->seedMenuItems();\n }", "title": "" }, { "docid": "72aedb6158851cf44c9d6084118effa4", "score": "0.77547807", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*for($i=0; $i<100; $i++) {\n DB::table('products')->insert([\n 'name' => 'Элик'.str_random(5),\n 'alias' => str_random(10),\n 'small_description' => str_random(10),\n 'description' => str_random(10),\n 'price' => 5,\n 'image_menu' => str_random(10),\n 'image_item' => str_random(10),\n 'category_id' => 1\n ]);\n }*/\n }", "title": "" }, { "docid": "5a433d20681743d4ddb252825dc36aaa", "score": "0.77538455", "text": "public function run()\n {\n // Trunkate the databse so we don't repeat the seed\n DB::table('specialties')->delete();\n\n Specialty::create(['name' => 'BTO']);\n Specialty::create(['name' => 'CSI']);\n Specialty::create(['name' => 'FTS']);\n Specialty::create(['name' => 'FTO']);\n }", "title": "" }, { "docid": "ba7e0fd641cb31099e2c5fa54faa8e77", "score": "0.7753819", "text": "public function run()\n {\n $this->call(RolesAndPermissionsSeeder::class);\n $this->call(DefaultUserSeeder::class);\n User::factory(15)->create();\n Article::factory(500)->create();\n ShoutBox::factory(100)->create();\n }", "title": "" }, { "docid": "05e7312b7e2cb072c0c676e15665b127", "score": "0.7752797", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory(App\\Models\\User::class, 10)->create();\n $this->call(CategoriesTableSeeder::class);\n factory(App\\Models\\Product::class, 150)->create();\n $this->call(ProductCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "12c9b31b505f5dfffae32aa5afae328d", "score": "0.7749977", "text": "public function run()\n {\n $this->call([\n AdminSeeder::class,\n AuthorSeeder::class\n ]);\n\n User::factory(50)->create();\n Book::factory(50)->create();\n }", "title": "" }, { "docid": "913d91c0a927c572219a293692dfe0e4", "score": "0.7745714", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Aspirante::class,200)\n ->create()\n ->each(function(\\App\\Aspirante $a){\n $a->families()->saveMany(factory(\\App\\Family::class,3)->create());\n $a->schools()->saveMany(factory(\\App\\School::class,2)->create());\n });\n }", "title": "" }, { "docid": "6533a8576521ed0b51140445635dbc1c", "score": "0.7737327", "text": "public function run()\n {\n // Create users & posts factory\n User::factory(15)\n ->has(\n Post::factory()->count(rand(0, 20))\n )->create();\n\n $this->call(PostTagTableSeeder::class);\n $this->call(CommentTableSeeder::class);\n }", "title": "" }, { "docid": "d5c6e8dbb5ab0124c21111d415bacac3", "score": "0.77356786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\Models\\User::class, 19)->create()->each(function ($user) {\n // $user->profile()->save(factory(App\\Models\\Profile::class)->make())->each(function ($profile) {\n\t // $profile->education()->save(factory(App\\Models\\Education::class)->make());\n\t // $profile->family()->save(factory(App\\Models\\Family::class)->make());\n\t // });\n // });\n factory(App\\Models\\Education::class, 9)->create();\n factory(App\\Models\\Family::class, 9)->create();\n \n }", "title": "" }, { "docid": "8a8d6c0890f498137961596d881803f3", "score": "0.7733169", "text": "public function run()\n {\n // Llamadas a los seeds creados\n $this->call([\n UserTableSeeder::class,\n ProvinceSeeder::class,\n LocalitiesSeeder::class,\n PropertyTableSeeder::class,\n AddressTableSeeder::class,\n SaleTableSeeder::class,\n RentalTableSeeder::class,\n ImageTableSeeder::class,\n Visiting_hourTableSeeder::class,\n //PostSeeder::class,\n //CommentSeeder::class,\n ]);\n }", "title": "" }, { "docid": "d92013d87584b99403c59872bc05f603", "score": "0.77330625", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(CompanyTableSeeder::class);\n //factory(App\\Models\\Position::class, 2000)->create(); //插入2000个职位\n \n //factory(App\\Models\\Resume::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemBasic::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemEducation::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemContact::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemProject::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemWork::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemAward::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemJob::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemSkill::class, 100)->create(); //插入2000个职位\n //factory(App\\Models\\ItemComment::class, 2000)->create(); //插入2000个职位\n //factory(App\\Models\\ItemAttach::class, 2000)->create(); //插入2000个职位\n factory(App\\Models\\CareerTalk::class, 1000)->create(); //插入2000个职位\n factory(App\\Models\\JobFair::class, 20)->create();\n }", "title": "" }, { "docid": "5914f265808c32f93ca0d075523a7744", "score": "0.7732018", "text": "public function run()\n {\n DB::table('admin_users')->truncate();\n DB::table('classes')->truncate();\n DB::table('admin_menus')->truncate();\n DB::table('base_area')->truncate();\n DB::table('base_dictionary_option')->truncate();\n DB::table('base_settings')->truncate();\n \n $fileSystem = new Filesystem();\n $database = $fileSystem->get(base_path('database/seeds') . '/' . 'init.sql');\n DB::connection()->getPdo()->exec($database);\n DB::table('admin_users')->insert([\n 'name' => 'user1',\n 'real_name' => 'user1',\n 'password' => bcrypt('123456'),\n 'email' => 'user1@163.com',\n 'mobile' => '123456',\n 'avatar' => 'http://webimg-handle.liweijia.com/upload/avatar/avatar_0.jpg',\n 'type' => 0,\n 'is_root' => 1\n ]);\n\n DB::table('classes')->insert([\n 'class' => '未分类',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n // $this->call(NeedSeeder::class);\n $this->call(TestSeeder::class);\n $this->call(UserWeightSeeder::class);\n $this->call(SendRangeSeeder::class);\n // $this->call(CountySeeder::class);\n $this->call(FoodSetSeeder::class);\n }", "title": "" }, { "docid": "b066733d83ed33033a7498684d0b7ab4", "score": "0.77264494", "text": "public function run()\n {\n $faker=Faker::create();\n DB::table('proveedors')->insert([\n 'nombre' => 'No Proveedor',\n 'nit'=>000000,\n 'direccion'=>'Sin direccion',\n 'telefono'=>00000,\n 'estado'=>1,\n \t\n ]);\n }", "title": "" }, { "docid": "cbaca813899707dac06e08e37cf5ef72", "score": "0.7725645", "text": "public function run()\n {\n //\n\n $faker = Faker::create();\n $count = 20;\n\n foreach (range(1,$count) as $index) {\n\t DB::table('doujinshis')->insert([\n\t 'author' => $faker->name,\n\t 'title' => $faker->sentence(3),\n\t 'published_at' => $faker->date('Y-m-d')\n\t ]);\n\t}\n }", "title": "" }, { "docid": "6da5b1895275bf537422e69e8f38b733", "score": "0.772362", "text": "public function run()\n {\n //\n $faker = \\Faker\\Factory::create();\n $store = Store::all()->pluck('id')->toArray();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->colorName,\n 'description' => $faker->sentence(6, true),\n 'price' => $faker->randomFloat(2, 100, 999999),\n 'total_in_shelf' => $faker->numberBetween(1, 30),\n 'total_in_vault' => $faker->numberBetween(20, 100),\n 'store_id' => $faker->randomElement($store),\n ]);\n }\n }", "title": "" }, { "docid": "426529b7aca5b6fa857b2025bfe1d04d", "score": "0.77212536", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('categories')->insert([\n ['code' => 'tn', 'name' => 'tai nghe'],\n ['code' => 'bp', 'name' => 'bàn phím'],\n ['code' => 'ch', 'name' => 'chuột']\n ]);\n DB::table('brands')->insert([\n ['code' => 'rz', 'name' => 'razor'],\n ['code' => 'lt', 'name' => 'logitech'],\n ['code' => 'du', 'name' => 'dareu'],\n ['code' => 'as', 'name' => 'asus'],\n ['code' => 'cs', 'name' => 'corsair'],\n ['code' => 'ed', 'name' => 'e-dra'],\n ['code' => 'ss', 'name' => 'steelseries']\n ]);\n DB::table('sliders')->insert([\n 'img1'=>'uploads/hinh-slider.jpg',\n 'img2'=>'uploads/hinh-slider1.jpg',\n 'img3'=>'uploads/hinh-slider2.png',\n 'img4'=>'uploads/hinh-slider3.jpg',\n 'img5'=>'uploads/hinh-slider4.jpg'\n ]);\n\n }", "title": "" }, { "docid": "609cd7f299c3c08ad820677c3406ecd0", "score": "0.77187014", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $index) {\n Db::table('transportatoris')->insert([\n 'nume' => $faker->company,\n 'persoana_contact' => $faker->name,\n 'numar_telefon' => $faker->phoneNumber,\n 'email' => $faker->email,\n ]);\n }\n }", "title": "" }, { "docid": "9638067e470dc0f60e70e7951a8808de", "score": "0.77170426", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n $role = collect([\"Owner\", \"Manager\", \"Staff\"]);\n $role->each(function($r) {\n \\App\\Role::create([\n 'role' => $r\n ]);\n });\n\n $categories = collect([\"Alat Masak\", \"Alat Olahraga\",\"Perabotan Rumah\"]);\n $categories->each(function($c) {\n \\App\\Category::create([\n 'name' => $c,\n ]);\n });\n\n $rooms = collect([\"Gudang 1\", \"Gudang 2\", \"Gudang 3\"]);\n $rooms->each(function($room) {\n \\App\\Room::create([\n 'name' => $room\n ]);\n });\n\n \\App\\User::create([\n 'role_id' => 1,\n 'name' => \"Fizar Rama Waluyo\",\n 'email' => \"fizardev@gmail.com\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n 'avatar' => \"images/users/avatar.png\",\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }", "title": "" }, { "docid": "dd797f58badcb0d75964f3f26aa64b0d", "score": "0.77166605", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert([\"title\"=>\"Πελάτης\"]);\n // DB::table('roles')->insert([\"title\"=>\"Διαχειριστής\"]);\n // DB::table('roles')->insert([\"title\"=>\"Τεχνικός\"]);\n // DB::table('roles')->insert([\"title\"=>\"Admin\"]);\n // DB::table('roles')->insert([\"title\"=>\"Super Admin\"]);\n // factory(App\\Manufacturer::class,5)->create();\n // factory(App\\Mark::class,5)->create();\n // factory(App\\Device::class,10)->create();\n // factory(App\\DamageType::class,5)->create();\n // factory(App\\Damage::class,25)->create();\n DB::table('users')->insert([\"firstname\" => \"TestAdmin\", \"lastname\" => \"Progressnet\", \"email\" => \"testadmin@progressnet.gr\", \"password\" => bcrypt(\"progressnet\"), \"telephone\" => \"2111828724\", \"active\" => true]);\n $admin_id = DB::table('users')->where('email', 'testadmin@progressnet.gr')->value('id');\n DB::table('role_user')->insert([\"role_id\" => 5, \"user_id\" => $admin_id]);\n }", "title": "" }, { "docid": "6417c94284d2ecfa7f85acad0d1c77b7", "score": "0.77159977", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n App\\Student::create([\n 'name' => $faker->name,\n 'phone' => $faker->phoneNumber,\n 'email' => $faker->email,\n 'address' => $faker->address,\n 'matric_no' => $faker->randomNumber($nbDigits = null, $strict = false),\n 'password' => $faker->password,\n 'date_of_birth' => $faker->date,\n 'department' => 'computer science',\n ]);\n }\n }", "title": "" }, { "docid": "f4924a7cee9b80ce57e70727ff2b56d3", "score": "0.7714849", "text": "public function run()\n {\n $roles = array('Admin','Inventory','Budget');\n foreach($roles as $role){\n \\DB::table('roles')->insert([\n 'role' => $role\n ]);\n }\n\n \\DB::table('links')->insert([\n 'url' => 'https://devinv.efulife.com/'\n ]);\n\n \n\n \\DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => 'admin@gmail.com',\n 'password' => Hash::make('secret') ,\n 'role_id' => 1\n ]);\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "65d3ab32705054a2ea9c046b128713fd", "score": "0.77113473", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('users')->insert([\n 'name' => \"sasuke uchia\",\n 'email' => \"sasuke@gmail.com\",\n 'email_verified_at' => now(),\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n 'remember_token' => Str::random(10),\n ]);\n\n factory(App\\User::class, 10)->create();\n\n $this->call([PostSeeder::class, ArticleSeeder::class]);\n\n $i = 10;\n\t\twhile ($i--) {\n\t\t\tPost::find(rand(1, 5))->rating(\n\t\t\t\t[\n\t\t\t\t\t\"title\" => Str::random(5),\n\t\t\t\t\t\"body\" => Str::random(10),\n\t\t\t\t\t\"rating\" => rand(1, 5),\n\t\t\t\t],\n\t\t\t\tUser::find(rand(1, 10))\n\t\t\t);\n\n\t\t\tArticle::find(rand(1, 5))->rating(\n\t\t\t\t[\n\t\t\t\t\t\"title\" => Str::random(5),\n\t\t\t\t\t\"body\" => Str::random(10),\n\t\t\t\t\t\"rating\" => rand(1, 5),\n\t\t\t\t],\n\t\t\t\tUser::find(rand(1, 10))\n\t\t\t);\n\t\t}\n\n $this->call([ReviewReplySeeder::class, ReviewLikeSeeder::class]);\n }", "title": "" }, { "docid": "dc0c7e250bf5314ea23e0ea59f3f133a", "score": "0.7711072", "text": "public function run()\n {\n Factory(User::class,10)->create();\n Factory(Albums::class,4)->create()->each(function ($album) {\n $album->audios()->save(factory(Audio::class)->make());\n });\n Factory(Events::class,10)->create();\n Factory(Category::class,6)->create();\n Factory(Products::class,40)->create();\n\n DB::table('users')->insert([\n 'name' => 'Abraham Kivondo',\n 'email' => 'abrahamkivosh@gmail.com',\n 'phone' => '0707585566',\n 'password' => '$2y$10$R98BYALxEPcH0TlGK3xckOmpLaFHoGKgHTg38wBIOv1NVGkWVNS6y' //12345678\n ]);\n\n }", "title": "" }, { "docid": "c0af7490e96cc60f0b79f5e406e73121", "score": "0.7710323", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //$this->call(UserRolesSeeder::class);\n DB::table('roles')->insert([\n 'nombre' => 'Administrador'\n ]);\n DB::table('roles')->insert([\n 'nombre' => 'Director de Escuela'\n ]);\n DB::table('roles')->insert([\n 'nombre' => 'Profesor'\n ]);\n DB::table('roles')->insert([\n 'nombre' => 'Tutor'\n ]);\n }", "title": "" }, { "docid": "971f80406e455b142db58bad5527fa2e", "score": "0.7709564", "text": "public function run()\n {\n Model::unguard();\n\n $seeds = [\n [\n 'content_type_id' => 2,\n 'created_by' => 1,\n 'category_id' => 1,\n 'language_id' => 1,\n 'mime_type' => 'text/html',\n 'title' => 'About',\n 'summary' => 'About our team',\n 'body' => '<p>Everything you ever wanted to know about us, but were afraid to ask.</p>',\n ],\n ];\n\n foreach ($seeds as $seed) {\n Content::create($seed);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "1f09d8a77b5b6bb263ad745d038d7964", "score": "0.77075446", "text": "public function run()\n {\n \t/* $Model::unguard();\n \t\n \tDB::table('posts')->truncate();\n \t$faker = Faker::create();\n \t \t\n \tforeach (range(1,50) as $index) {\n \t\tDB::table('posts')->insert([\n \t\t\t\t'title' => $faker->sentence(3),\n \t\t\t\t'body' => $faker->paragraph(4)\n \t\t\t\t//'created_at'=> $faker->unixTime($max = 'now') ,\n \t\t]);\n \t} */\n \t\n \tfactory('App\\Post',50)->create();\n }", "title": "" }, { "docid": "eea2224b1a696a86a3771f6042ff6603", "score": "0.7706848", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(StaresineTableSeeder::class);\n $this->call(SmeroviTableSeeder::class);\n $this->call(UceniciTableSeeder::class);\n // $faker = Faker::create('sr_Latn_RS');\n \t// foreach (range(1,10) as $index) {\n // $gender = $faker->randomElement(['male', 'female']);\n // if ($gender == 'male') {\n // $pol = 1;\n // $jmbg_pol = 850;\n // $ime = $faker->firstNameMale();\n // } else {\n // $pol = 2;\n // $jmbg_pol = 750;\n // $ime = $faker->firstNameFemale();\n // }\n // $rodjendan = $faker->dateTimeBetween('2007-01-01', '2007-12-31');\n // $jmbg = \\Carbon\\Carbon::parse($rodjendan)->format('dmY');\n // $jmbg .= $jmbg_pol.$faker->numberBetween(100,999);\n\t // DB::table('ucenici')->insert([\n\t // 'ime_prezime' => $ime.' '.$faker->lastName(),\n\t // 'datum_rodjenja' => $faker->dateTimeBetween('2007-01-01', '2007-12-31'),\n // 'pol' => $pol,\n // 'jmbg' => $jmbg,\n // 'broj_bodova' => $faker->numberBetween(50,100),\n // 'odeljenje_id' => null\n\t // ]);\n\t // }\n }", "title": "" }, { "docid": "2035c36fe09b0a6f28a0b69bb54fb5cc", "score": "0.7700806", "text": "public function run()\n {\n // Seed roles\n $roles = ['administrator', 'publisher'];\n foreach($roles as $role) {\n Role::create(['name' => $role]);\n }\n\n // Seed admin\n Role::where('name', 'administrator')->first()\n ->users()->create([\n 'name' => 'Admin',\n 'email' => 'admin@system.com',\n 'password' => '$2y$10$7FeLPtByNZQtSOyfZcLm7.RttEFyd3luWPzF1uXF9cwgxms.1l2EC',\n ]);\n\n // Seed devices\n $devices = ['Device 1', 'Device 2', 'Device 3'];\n foreach($devices as $device) {\n Device::create([\n 'name' => $device,\n 'password' => '$2y$10$7FeLPtByNZQtSOyfZcLm7.RttEFyd3luWPzF1uXF9cwgxms.1l2EC',\n ]);\n }\n\n // Seed publishers\n $publishers = ['Ahmad', 'Usama', 'Mohammad'];\n $publisher_role = Role::where('name', 'publisher')->first();\n foreach($publishers as $publisher) {\n $publisher_role->users()->create([\n 'name' => $publisher,\n 'email' => strtolower($publisher).'@system.com',\n 'password' => '$2y$10$7FeLPtByNZQtSOyfZcLm7.RttEFyd3luWPzF1uXF9cwgxms.1l2EC',\n ]);\n }\n }", "title": "" }, { "docid": "cb6f282d3642b226d1ff24dbcffeffe5", "score": "0.76973236", "text": "public function run()\n {\n User::factory(10)->create();\n Product::factory(10)->create();\n Category::factory(10)->create();\n Comment::factory(10)->create();\n DB::table('roles')->insert(\n [\n [\n 'name' => 'User',\n ],\n [\n 'name' => 'Admin',\n ],\n [\n 'name' => 'Super admin',\n ],\n ]\n );\n }", "title": "" }, { "docid": "6a8e11e9a3ca3b1475c1657aad881d5c", "score": "0.7697183", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n Author::factory()->count(10)->create();\n Book::factory()->count(10)->create();\n Library::factory()->count(10)->create();\n\n // populate book_library table\n $books = Book::all();\n Library::all()->each(function ($library) use ($books) {\n $library->books()->attach(\n $books->random(2)->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "cfbccd2dcfc81691ff9d209d605d6cc6", "score": "0.7696808", "text": "public function run()\n {\n $this->seed('lelframeworkMenuDataRowsTableSeeder');\n $this->seed('SettingsVoyagerTableSeeder');\n $this->seed('ChapitreDataTypesTableSeeder');\n $this->seed('ChapitrePermissionsTableSeeder');\n $this->seed('ChapitrePermissionRoleTableSeeder');\n }", "title": "" }, { "docid": "e0f964329c2a72b1870ad1ec590add4b", "score": "0.76955813", "text": "public function run()\n {\n User::factory(5)->create();\n Product::factory(20)->create();\n // Category::factory(3)->create();\n Category::create([\n 'name' => 'Web Programming',\n 'slug' => 'web-programming'\n ]);\n\n Category::create([\n 'name' => 'Web Design',\n 'slug' => 'web-design'\n ]);\n\n Category::create([\n 'name' => 'Personal',\n 'slug' => 'personal'\n ]);\n }", "title": "" }, { "docid": "7ffac702dfbc13e5962980bf191f840d", "score": "0.76919836", "text": "public function run()\n {\n $faker=Factory::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('users')->insert(\n [\n [\n 'name'=>'Cim Bederri',\n 'slug'=>'cim-bederri',\n 'email'=>'cimbederri@gmail.com',\n 'password'=>bcrypt('admin123'),\n 'bio'=>$faker->text(rand(250,300))\n ],[\n 'name'=>'Dengje Bederri',\n 'slug'=>'dengje-bederri',\n 'email'=>'dengjebederri@gmail.com',\n 'password'=>bcrypt('admin123'),\n 'bio'=>$faker->text(rand(250,300))\n ],[\n 'name'=>'Cim dengje',\n 'slug'=>'cim-dengje',\n 'email'=>'cimdengje@gmail.com',\n 'password'=>bcrypt('admin123'),\n 'bio'=>$faker->text(rand(250,300))\n ]\n ]\n );\n }", "title": "" }, { "docid": "9b171ddfee6b2d7bde0c9cd36fe5c980", "score": "0.76910377", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n for($i = 0; $i < 50; $i++) {\n \\App\\Models\\Customers::create([\n 'name' => $faker->name(),\n 'cmnd' => $faker->regexify('[A-Za-z0-9]{10}'),\n 'address' => $faker->address(),\n 'birthday' => $faker->date(),\n 'household' => $faker->address(),\n 'phone' => $faker->phoneNumber()\n ]);\n }\n\n \\App\\Models\\Project::create(['name' => 'Riverside', 'description' => 'Dự án Riverside']);\n \\App\\Models\\Project::create(['name' => 'Novaland', 'description' => 'Dự án Novaland']);\n \\App\\Models\\Project::create(['name' => 'Diamond', 'description' => 'Dự án Diamond']);\n\n $this->call([\n PermissionSeeder::class ,\n RoleSeeder::class ,\n RoleHasPermissionSeeder::class ,\n UserSeeder::class ,\n ExperimentSeeder::class,\n ]);\n }", "title": "" }, { "docid": "403f3670b426f8eab8481b81acaae173", "score": "0.7690881", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n //Insert Roles:\n\n $rroot = Role::create([\n 'id'=>3,\n 'name'=>'root',\n 'display_name'=>'Root',\n 'description'=>'Dueño del sistema'\n ]);\n\n $radmin = Role::create([\n 'id'=>2,\n 'name'=>'admin',\n 'display_name'=>'Administrador',\n 'description'=>'Administrador del sistema'\n ]);\n\n \n\n $rcliente = Role::create([\n 'id'=>1,\n 'name'=>'cliente',\n 'display_name'=>'Cliente',\n 'description'=>'Cliente del sistema'\n ]);\n\n $admin = User::create([\n 'user' => 'admin',\n 'name' => 'admin',\n 'email' => 'admin@unitedcompany.com',\n 'password' => bcrypt('admin'),\n ]);\n $admin->attachRole($rroot);\n \n\n\n $gold = Memberships::create([\n 'id'=>1,\n 'tipo'=>'GOLD',\n 'precio'=>100\n \n ]);\n $silver = Memberships::create([\n 'id'=>2,\n 'tipo'=>'SILVER',\n 'precio'=>70\n ]);\n $bronce = Memberships::create([\n 'id'=>3,\n 'tipo'=>'BRONCE',\n 'precio'=>50\n ]);\n\n //$this->call(MembershipTableSeeder::class);\n }", "title": "" }, { "docid": "acb7d491148c575144b4e8f6d8b2cbdc", "score": "0.76899445", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('tipousuario')->insert([\n 'descripcion'=>'admin',\n 'estado'=>'1',\n ]);\n DB::table('users')->insert([\n \t'nombre'=>'admin',\n \t'apellido'=>'admin',\n \t'cedula'=>'12345678',\n \t'usuario'=>'admin',\n \t'direccion'=>'admin',\n \t'telefono'=>'091233123',\n \t'email'=>'admin@sistema.com',\n \t'password'=>bcrypt('12345678'),\n 'idtipoUsuario'=>'1',\n 'estado'=>'1',\n ]);\n\n DB::table('dineros')->insert([\n 'dinero_disponible' => 0 ,\n ]);\n }", "title": "" }, { "docid": "7d138fbb5d4f1ef56c6a508fe8e8c241", "score": "0.76879454", "text": "public function run()\n {\n User::create([\n 'name' => 'Test User',\n 'email' => 'user@thin-the-herd.app',\n 'password' => bcrypt('thinherd'),\n ]);\n\n $faker = \\Faker\\Factory::create();\n for ($i = 0; $i < Config::get('seeds.users'); $i++) {\n User::create([\n 'name' => \"{$faker->firstName} {$faker->lastName}\",\n 'email' => $faker->email,\n 'password' => bcrypt('thinherd')\n ]);\n }\n }", "title": "" }, { "docid": "d0025cde4d47d4ec25529491a601fd54", "score": "0.76868474", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // \n factory(App\\Account::class, 5)->create();\n factory(App\\Construction::class, 5)->create();\n factory(App\\GeneralExpenditure::class, 30)->create();\n factory(App\\ExpenditureType::class, 100)->create();\n factory(App\\Expenditure::class, 3000)->create();\n factory(App\\Income::class, 100)->create();\n }", "title": "" }, { "docid": "a5e19d0c2645e773a1163c03199bb052", "score": "0.7682829", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n $actors = array (\n array (\n 'id' => '1',\n 'nom' => 'François Truffaut'\n ),\n array (\n 'id' => '2',\n 'nom' => 'Alfred Hitchcock'\n ),\n array (\n 'id' => '3',\n 'nom' => 'Federico Fellini'\n ),\n array (\n 'id' => '4',\n 'nom' => 'Alain Resnais'\n ),\n );\n $faker = \\Faker\\Factory::create();\n for($i=0; $i<=50; $i++):\n DB::table('films')\n ->insert([\n 'nom' => $faker->userName,\n 'annee' => $faker->numberBetween(1980,2021),\n 'acteurs' => serialize($actors)\n ]);\n endfor;\n }", "title": "" }, { "docid": "7d7db54c2b09e7ac8a6bc7ee04a8d0c8", "score": "0.768187", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(EstadoSeeder::class);\n $this->call(DocumentoSeeder::class);\n $this->call(EtapaSeeder::class);\n $this->call(PolizaSeeder::class);\n $this->call(CanalSeeder::class);\n $this->call(ContactoSeeder::class);\n $this->call(AccionSeeder::class);\n //$this->call(TipoEmpresaSeeder::class);\n //NOTA: SE DEBEN VOLVER A CREAR LAS TABLAS TIPO_SERVICIOS Y TIPO_EMPRESAS YA QUE LOS NOMBRES FUERON MODIFICADOS Y NO SON RECONOCIDOS\n }", "title": "" }, { "docid": "bf00554b81e51b6d86d031e3948b56a0", "score": "0.76803976", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n \\App\\Models\\User::factory(20)->create();\n Product::factory(30)->create();\n Order::factory(30)->create()->each(function (Order $order) {\n OrderItem::factory(random_int(1,5))->create([\n 'order_id' => $order->id,\n ]);\n });\n\n Permission::insert([\n ['name' => 'view_users'],\n ['name' => 'edit_users'],\n ['name' => 'view_roles'],\n ['name' => 'edit_roles'],\n ['name' => 'view_products'],\n ['name' => 'edit_products'],\n ['name' => 'view_orders'],\n ['name' => 'edit_orders'],\n ]);\n }", "title": "" }, { "docid": "20ae14124baa4279206056c183739f5b", "score": "0.7680361", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"Admin\",\n 'phone' => \"666\",\n 'email' => \"admin\",\n 'password' => bcrypt(\"admin\"),\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n DB::table('users')->insert([\n 'name' => \"Son Dao\",\n 'phone' => \"01633460820\",\n 'email' => \"sondaoduy@gmail.com\",\n 'password' => bcrypt(\"test\"),\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n $faker = Faker::create();\n $faker->seed(time());\n foreach (range(1, 100) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'phone' => $faker->phoneNumber,\n 'email' => $faker->email,\n 'password' => bcrypt(1111),\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n }\n }", "title": "" }, { "docid": "5f5fcd257d97fb7b1cc40477c360c943", "score": "0.76800436", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // esto sirve para insertar datos en la base DB los seeds\n\n DB::table('categories')->insert([\n 'name' => 'Frituras',\n 'description' => 'Cualquier cosa'\n ]);\n\n DB::table('categories')->insert([\n 'name' => 'Dulces',\n 'description' => 'Cualquier cosa'\n ]);\n\n DB::table('categories')->insert([\n 'name' => 'Salado',\n 'description' => 'Cualquier cosa'\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Chettos bolita',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 1\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Doritos',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 1\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Paleta',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 2\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Chocolate',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 2\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Cacahuates',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 3\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Habas',\n 'price' => 10,\n 'description' => 'Algo',\n 'category_id' => 3\n ]);\n\n }", "title": "" }, { "docid": "07dc877427a22cbb7e30262753978501", "score": "0.76798505", "text": "public function run()\n {\n \t $faker = Faker::create();\n\n\n \t //Seeder de Proveedores\n \t DB::table('proveedores')->delete();\n \t foreach (range(1, 20) as $index) \n {\n \t \t$proveedor = new Proveedore;\n \t \t$proveedor->nombre = $faker->firstName;\n \t \t$proveedor->telefono = $faker->randomNumber;\n \t \t$proveedor->direccion = $faker->city;\n $proveedor->save();\n \t }\n \t}", "title": "" }, { "docid": "7aa3cf8a74ef9865d5a0edd7b5e88bd0", "score": "0.7678149", "text": "public function run()\n {\n $faker = Faker::create();\n DB::table('users')->insert([\n 'name' => 'John',\n 'email' => 'correo@ejemplo.com',\n 'password' => bcrypt('123456789'),\n 'confirmed' => 1,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n\n DB::table('datos__usuarios')->insert([\n 'nombre' => 'John',\n 'apellidos' => 'Doe',\n 'fecha_nacimiento' => $faker->dateTime,\n 'celular' => $faker->tollFreePhoneNumber,\n 'id_pais' => rand(1,214),\n 'id_ciudad' => rand(1,1000),\n 'correo' => 'correo@ejemplo.com',\n 'id_usuario' => 1,\n 'id_rol' => 1,\n 'created_at' => $faker->dateTime,\n 'updated_at' => $faker->dateTime,\n ]);\n\n }", "title": "" }, { "docid": "23b0133e7d1e2e6667c2d12ccd090041", "score": "0.76758325", "text": "public function run()\n {\n DB::table('users')->delete();\n DB::table('categories')->delete();\n DB::table('products')->delete();\n\n $this->call(PlansSeeder::class);\n\n factory(User::class)->create([\n 'email' => 'team@devsquad.com',\n ]);\n\n factory(Category::class, 2)->create()->each(function ($category) {\n factory(Product::class, 10)->create(['category_id' => $category->id]);\n });\n }", "title": "" }, { "docid": "1e12f6904559c36d53a178e7b032c4ef", "score": "0.76697963", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,1) as $index) {\n DB::table('posts')->insert([\n 'title' =>$faker->sentence(3),\n 'body' =>$faker->sentence(500)\n ]);\n }\n }", "title": "" }, { "docid": "145e033afe331c698b8d3fddc7c182e4", "score": "0.7669658", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Administrator',\n 'email' => 'admin@app.com',\n 'password' => bcrypt('_Arowosegbe1'),\n ]);\n\n $faker = Faker::create('App\\Courses');\n\n for ($i = 0; $i <= 100; $i++) {\n DB::table('rooms')->insert([\n 'room_id' => '0' . $i,\n 'floor' => $i + 1,\n ]);\n }\n\n\n $customers = Faker::create('App\\Customers');\n\n for ($i = 0; $i <= 200; $i++) {\n DB::table('customers')->insert([\n 'customer_id' => $customers->randomNumber(9),\n 'fullname' => $customers->name,\n 'email' => $customers->email,\n 'number' => $customers->phoneNumber,\n 'address' => $customers->address\n ]);\n }\n\n\n }", "title": "" }, { "docid": "a73b97f270795a3decf85ff1003b9090", "score": "0.7669066", "text": "public function run()\n {\n $this->call(FilmsTableSeeder::class);\n\n $this->call(RoomTableSeeder::class);\n\n factory(App\\Seance::class, 10)->create()->each(function (App\\Seance $s) {\n $s->tickets()->saveMany(factory (App\\Ticket::class, 10)->create());\n\n });\n\n }", "title": "" }, { "docid": "17df07d161b199f3bfd69574ab023d6b", "score": "0.76662344", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('shoes')->insert([\n 'created_at' => $faker->dateTimeBetween($startDate = '-30 days', $endDate = 'now', $timezone = null),\n 'name' => $faker->word,\n 'details' => $faker->text($maxNbChars = 200),\n 'sex' => 'F',\n 'id_category' => $faker->numberBetween($min = 73, $max = 82),\n 'id_style' => $faker->numberBetween($min = 64, $max = 74),\n 'id_brand' => $faker->numberBetween($min =68, $max = 79),\n 'id_promo' => $faker->numberBetween($min = 1, $max = 80),\n 'id_news' => $faker->numberBetween($min = 10, $max = 100),\n ]);\n }\n }", "title": "" }, { "docid": "78a18644be7bcafdeb323157eab11b93", "score": "0.76646423", "text": "public function run()\r\n {\r\n // $this->call(UsersTableSeeder::class); \r\n\r\n\r\n //$usuarios = factory(App\\User::class)->times(150)->create(); \r\n //EJECUTAR PRIMERO ESTA\r\n\r\n\r\n //$posteos = factory(App\\Posteo::class)->times(500)->create(); \r\n //LUEGO VERIFICAR EN LA DB EL ID MAX Y MIN DE LA TABLA USUARIOS Y MODIFICAR EL POST_FACTORY USER_ID\r\n\r\n $seguidos = App\\User::All();\r\n\r\n App\\User::All()->each(function ($user) use ($seguidos){\r\n $user->seguidos()->saveMany($seguidos->random(50));\r\n });\r\n }", "title": "" }, { "docid": "8480f4e7964590727ca802a9e2da19f6", "score": "0.7663058", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n # create 3 specific users\n $users = [\n [\n 'name' => 'admin',\n 'email' => 'admin@datatables.com',\n 'is_admin' => true,\n 'password' => Hash::make('secret'),\n 'remember_token' => Str::random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(), \n ],\n [\n 'name' => 'Hans',\n 'email' => 'hans@datatables.com',\n 'is_admin' => true,\n 'password' => Hash::make('secret'),\n 'remember_token' => Str::random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'name' => 'Manfred',\n 'email' => 'manfred@datatables.com',\n 'is_admin' => true,\n 'password' => Hash::make('secret'),\n 'remember_token' => Str::random(10),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n ]; \n DB::table('users')->insert($users);\n \n # creating fake entries\n factory(User::class, 10)->create();\n factory(Data::class, 100)->create();\n }", "title": "" }, { "docid": "1e37d96ca188a3a2053d7c0215acb3ed", "score": "0.7662772", "text": "public function run()\n {\n\n //seeder de paises\n DB::table('paises')->insert([\n [\n 'id'=>1,\n 'pais' => 'Colombia',\n \n ],\n [\n 'id'=>2,\n 'pais' => 'México',\n \n ],\n [\n 'id'=>3,\n 'pais' => 'Brazil',\n \n ],\n [\n 'id'=>4,\n 'pais' => 'Argentina',\n \n ],\n ]);\n }", "title": "" }, { "docid": "6d906d1cede1a83855f4d257c35331d8", "score": "0.7660167", "text": "public function run()\n {\n Projects::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Projects::create([\n 'projectTitle' => $faker->sentence,\n 'description' => $faker->paragraph,\n 'level' => $faker->word,\n 'status'=> $faker->word,\n 'developersIds'=> '1,2',\n 'ngo_id' => $i,\n 'dueDate'=> $faker->date,\n ]);\n }\n }", "title": "" }, { "docid": "4bae8363c376ac6bd31966b852a18755", "score": "0.76591355", "text": "public function run()\n\t{\n\t\t DB::table('products')->delete();\n\n\t\t$items = array(\n\n//['cat_id'=>'1', 'artist_id'=>'2', 'genre_id'=>'1', 'img'=>'sample.jpg', 'name'=>'Album Name', 'description'=>'Description', 'catalog'=>'DL001', 'barcode'=>'0001'],\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\t DB::table('products')->insert($items);\n\t}", "title": "" } ]
ad8b90a12a6133db51040bb6482db9cc
Get the Client associated with the Timer
[ { "docid": "26da8a3c1a787e8c6149cbecedc461e9", "score": "0.0", "text": "public function client()\n {\n return $this->hasOneThrough(Client::class, Project::class, 'client_id', 'id');\n }", "title": "" } ]
[ { "docid": "9e8c94fb5c9b81431d6b8e988a0ab2aa", "score": "0.6801139", "text": "public function client() {\n return $this->_client;\n }", "title": "" }, { "docid": "0da52b592fdf7c1c6cd6162710095b4b", "score": "0.6694582", "text": "public function client()\n {\n return $this->client;\n }", "title": "" }, { "docid": "a2c1dd94270a397a1b3ec7aaa5a0b4da", "score": "0.6690721", "text": "public static function get() {\n\t\tif (self::$client == null)\n\t\t\tself::$client = new Client();\n\t\treturn self::$client;\n\t}", "title": "" }, { "docid": "1ddef56327c342d9774b55c6ea56eeee", "score": "0.6643383", "text": "protected function _getInstanceOfClient()\n\t{\n\t\treturn minimee()->makeClient();\n\t}", "title": "" }, { "docid": "4a24a8f2640631c89e464e6ac45269c8", "score": "0.6609275", "text": "public function client()\n {\n return $this->client;\n }", "title": "" }, { "docid": "b0d1e0c92b80d547da248712edb48211", "score": "0.65200293", "text": "public function client()\n {\n return $this->connection;\n }", "title": "" }, { "docid": "0a554f95cb77bf4255d0f79b688bb029", "score": "0.6432934", "text": "public function __getClient()\n\t{\n\t\treturn $this->_client;\n\t}", "title": "" }, { "docid": "f1c8d8d6d35b974f32b3adfe6a3c6de6", "score": "0.6429079", "text": "private function get_client() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "f1c8d8d6d35b974f32b3adfe6a3c6de6", "score": "0.6429079", "text": "private function get_client() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "f1c8d8d6d35b974f32b3adfe6a3c6de6", "score": "0.6429079", "text": "private function get_client() {\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "5f19c53a1e901d59229e8b908d5ded77", "score": "0.6314103", "text": "public function getClient(): Client\n {\n return $this->client;\n }", "title": "" }, { "docid": "5f19c53a1e901d59229e8b908d5ded77", "score": "0.6314103", "text": "public function getClient(): Client\n {\n return $this->client;\n }", "title": "" }, { "docid": "a996c0cf80deaf8b59dfb57d80d07782", "score": "0.6309422", "text": "protected function getClient(): Client\n {\n return $this->client;\n }", "title": "" }, { "docid": "74481aa6de46082cbc00396b45322088", "score": "0.62969136", "text": "public function getClient() {\n return $this->_get( 'client' );\n }", "title": "" }, { "docid": "2c8fad204fffce82500f286845812e1e", "score": "0.62894565", "text": "public function getClient()\n {\n return $this->_client;\n }", "title": "" }, { "docid": "6da070c8cd02cd8505f5422df0f228e5", "score": "0.6270425", "text": "public static function client(){\n\t\tif(!self::$client){\n\t\t\tself::$client = new self();\n\t\t}\n\t\treturn self::$client;\n\t}", "title": "" }, { "docid": "1b4b18a35bd5e8c30c0336b7dfe04ef6", "score": "0.62414026", "text": "private function getClient()\n {\n if ($this->client) {\n return $this->client;\n }\n\n return new Client();\n }", "title": "" }, { "docid": "38e65270be52100e3a5d171e7285d060", "score": "0.6241164", "text": "public function getClient()\n {\n if (!$this->client instanceof Client) {\n $this->client = new Client(\n $this->config->get('amocrm.domain'),\n $this->config->get('amocrm.login'),\n $this->config->get('amocrm.hash')\n );\n }\n\n return $this->client;\n }", "title": "" }, { "docid": "8fc90a3288b498200156217949b351eb", "score": "0.62265044", "text": "public function getClient()\n {\n // If the client is a closure, resolve it\n if($this->client instanceof Closure) {\n return $this->client = call_user_func($this->client);\n }\n\n // Return the client\n return $this->client;\n }", "title": "" }, { "docid": "f4d7ff9c6f78c8c013d3eeb8e954c42b", "score": "0.6223669", "text": "function getClient(): ClientInterface {\n return $this->client;\n }", "title": "" }, { "docid": "3d9676cbea551109bb4002b5877ffaec", "score": "0.61904335", "text": "public function getClient()\n\t{\n\t\treturn $this->client;\n\t}", "title": "" }, { "docid": "26b3e221d5e1ffa79339fef87f251f36", "score": "0.61870134", "text": "public function client($id)\n {\n return $this->clients->client($id);\n }", "title": "" }, { "docid": "baabc1a90230cf18955336a7f61d666d", "score": "0.61869955", "text": "public static function getClient() {\n return self::$client;\n }", "title": "" }, { "docid": "3e0542fcd4e259147b889785bb8960e1", "score": "0.61868197", "text": "public function getClient(): Client\n {\n return $this->getFc()->client($this->client);\n }", "title": "" }, { "docid": "5ef37db2e9c49ddc135c03f565ec386d", "score": "0.61666197", "text": "protected function getClient()\n {\n return $this->httpClient;\n }", "title": "" }, { "docid": "4c4f7ba0c3e2e9cb9f9c5c0bcbeadc28", "score": "0.6140508", "text": "private function getClient(): Client\n {\n // create the client object and call\n return new Client();\n }", "title": "" }, { "docid": "c37b905630affdef1d14d8f19ca182e0", "score": "0.6134199", "text": "private function getClient()\n {\n if (!$this->client) {\n $this->client = new Client(['base_uri' => self::BASE_URI]);\n }\n\n return $this->client;\n }", "title": "" }, { "docid": "fd6fffc6bcc528f7b72a2d91cb2a8a5d", "score": "0.6127722", "text": "protected function getClient() {\n\n\t\t\tif (!$this->client) {\n\n\t\t\t\t$client = $this->createClient();\n\n\t\t\t\treturn $this->client = $client;\n\t\t\t}\n\n\t\t\treturn $this->client;\n\n\t\t}", "title": "" }, { "docid": "a7e9200ba14cd76ae83d60b4b0182bac", "score": "0.6123404", "text": "public function client($name = 'default')\n {\n if (! $this->clients->has($name)) {\n $config = $this->getConfig($name);\n\n $this->clients->put($name, $this->make($config));\n }\n\n return $this->clients->get($name);\n }", "title": "" }, { "docid": "a3dc37429809d43d28a6fc490bd9f429", "score": "0.6121137", "text": "private function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "47f4edc4ffb6fa060acc11c17d0f7d90", "score": "0.60208553", "text": "public function getClient(): \\Swoole\\Coroutine\\Http2\\Client\n {\n return $this->client->getClient();\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "4c739fa1613c8302b52413986e35ba76", "score": "0.60012454", "text": "public function getClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "f4d0ab4ae120fe080eb58af55b3ac00f", "score": "0.59932774", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "09cacd00bf0842f43c58086448b52154", "score": "0.5969145", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "09cacd00bf0842f43c58086448b52154", "score": "0.5969145", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "09cacd00bf0842f43c58086448b52154", "score": "0.5969145", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "d4ab90092e508150ef9009d632996b23", "score": "0.59448415", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "9bfc9390626e8851a5085d6971239c9d", "score": "0.5933675", "text": "public function getDiscordClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "d7f69d255f7f396d5e5c855675d5c4e1", "score": "0.5908123", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "d7f69d255f7f396d5e5c855675d5c4e1", "score": "0.5908123", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "d7f69d255f7f396d5e5c855675d5c4e1", "score": "0.5908123", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "d7f69d255f7f396d5e5c855675d5c4e1", "score": "0.5908123", "text": "public function getClient() {\n return $this->client;\n }", "title": "" }, { "docid": "196ff9cdb83b58b822c5e992f4862aa5", "score": "0.58871", "text": "public function getClient($client = null)\n {\n return new CyclosClient($client);\n }", "title": "" }, { "docid": "425147fe9b3d5e03b4741bee05f505ec", "score": "0.58848006", "text": "public function getHttpClient()\n {\n \treturn $this->_client;\n }", "title": "" }, { "docid": "cad027fc2d78b8be38d4ecfe7224c93c", "score": "0.5858531", "text": "public function getClient() {\n if (!$this->_client instanceof Client) {\n $this->_client = new Client();\n $options = [\n 'maxredirects' => 0,\n 'timeout' => 30\n ];\n $this->_client->setOptions($options);\n $this->_client->setHeaders([\n 'Authorization' => 'Bearer ' . $this->token,\n 'Content-Type' => 'application/json'\n ]);\n }\n\n return $this->_client;\n }", "title": "" }, { "docid": "f4580d81699f403ed297a649374086c5", "score": "0.5851742", "text": "private function getClient()\n {\n return new \\GuzzleHttp\\Client([\n 'base_uri' => $this->url,\n 'timeout' => 2.0,\n ]);\n }", "title": "" }, { "docid": "5200050cce2e5c3b79e7ffaadd1de002", "score": "0.5841758", "text": "public function getClient()\n {\n if($this->client == null)\n $this->client = $this->kernel->getContainer()->get('test.client');\n return $this->client;\n }", "title": "" }, { "docid": "f93daa377b33565e55981642b488df8a", "score": "0.581816", "text": "public function get_client()\n {\n return $this->_api->getClient();\n }", "title": "" }, { "docid": "1cf2ccb12672d4084f2172c3faaced04", "score": "0.58096856", "text": "public function getRedisClient( ){\n if( empty( $this->redisHandler ) ){\n $this->redisHandler = new RedisHandler();\n }\n return $this->redisHandler->getConnection();\n }", "title": "" }, { "docid": "e50002e5ca37095fc684b369f7d7c2de", "score": "0.5797965", "text": "public function getTimer(): TimerInterface\n {\n return $this->timer;\n }", "title": "" }, { "docid": "e76b473485e2644051c34b05b7e35e87", "score": "0.5790279", "text": "private function getClient()\n {\n if(!$this->client){\n $this->client = new GuzzleHttpClient();\n }\n return $this->client;\n }", "title": "" }, { "docid": "bce48c184d90761175dc8a458a3879a0", "score": "0.57626224", "text": "public function getWssClient() {\n\t\tif ( ! $this->wssClient ) {\n\t\t\t$this->wssClient = new Client( \"wss://socket.bittrex.com/signalr/connect?transport=webSockets&clientProtocol=1.5&connectionToken=GdZ4Rx88j7PkWtqp5ttcw1F%2FDGMFPBegN3KLQi7uK5GyeF5hCH9%2BiV8kPz0hyI%2B0OugNzGbwkoPjRiosWQBQACwZQx2ccxHcEYdev7UeZbjobRR0&connectionData=%5B%7B%22name%22%3A%22corehub%22%7D%5D&tid=3\",\n\t\t\t\t[\n\t\t\t\t\t'headers' =>\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'user-agent' => self::$userAgent,\n\t\t\t\t\t\t\t'Cookie' => $this->cookies\n\t\t\t\t\t\t]\n\t\t\t\t]\n\t\t\t);\n\t\t\t$this->wssClient->receive();\n\t\t}\n\n\t\treturn $this->wssClient;\n\t}", "title": "" }, { "docid": "11c13141997d2e47354f4d8d4ee51cd5", "score": "0.5745041", "text": "public function getClient()\n {\n if ($this->http === null) {\n $this->http = $this->initClient();\n }\n return $this->http;\n }", "title": "" }, { "docid": "562acbcbf0810310d450acbc2fc5fe49", "score": "0.57412344", "text": "protected function getClient()\n {\n if ($this->_guzzle == null) {\n $this->_guzzle = new HttpClient();\n }\n return $this->_guzzle;\n }", "title": "" }, { "docid": "a525bbdd421aa1f2867307ca8c2da1fa", "score": "0.5709953", "text": "public static function client()\n {\n $client = new Client(['verify' => false]);\n return $client;\n }", "title": "" }, { "docid": "848260a3e96b5555f8ec0ac6e7d00a76", "score": "0.56984717", "text": "protected function getClient()\n {\n return new Client([\n 'base_uri' => $this->baseUrl(), 'handler' => $this->createHandler()\n ]);\n }", "title": "" }, { "docid": "c68c83110a80c1722c575dd429c6b02e", "score": "0.5691777", "text": "protected function getRequest(){\n $client = $this->client;\n if(!$client instanceof Client){\n $client = new Client();\n }\n return $client;\n }", "title": "" }, { "docid": "2ad019f85987225e87a77570ae454571", "score": "0.5689762", "text": "public function getHttpClient(): ClientInterface\n\t{\n\t\tif( empty($this->httpClient) ){\n\t\t\t$this->httpClient = new Shuttle;\n\t\t}\n\n\t\treturn $this->httpClient;\n\t}", "title": "" }, { "docid": "df7e6fb795f2eaebbaf944e7e031ef10", "score": "0.5683844", "text": "public function getClient() {\n if ($this->client === null) {\n $user = isset($this->server['user']) ? $this->server['user'] : $this->server['publicKey'];\n \n $this->setClient(ImboClient::factory(array(\n 'serverUrls' => array($this->server['url']),\n 'user' => $user,\n 'publicKey' => $this->server['publicKey'],\n 'privateKey' => $this->server['privateKey'],\n )));\n }\n\n return $this->client;\n }", "title": "" }, { "docid": "520d9a4e12ac42b21c74664c5736de48", "score": "0.5679429", "text": "protected function getClient()\n {\n static $client;\n\n if (empty($client)) {\n $client = new Client('https://www.scrumdo.com/api/v2');\n\n $client->setDefaultOption('auth', [\n $this->parameters['user'],\n $this->parameters['token'],\n 'Basic'\n ]);\n }\n\n return $client;\n }", "title": "" }, { "docid": "e3e123c1e57a969cd0e045e8a9ae04b9", "score": "0.5669692", "text": "function getIdClient() {\n return $this->IdClient;\n }", "title": "" }, { "docid": "5a2f3955f983ad78e0073564277f42c3", "score": "0.5652599", "text": "public static function getClient()\n {\n if (!static::$client) {\n static::$client = new UrlOembedHttpClient();\n }\n\n return static::$client;\n }", "title": "" }, { "docid": "b53f9fb497725ad4e85d47fb8a94233d", "score": "0.5650611", "text": "public function getIdClient()\n {\n return $this->idClient;\n }", "title": "" }, { "docid": "b53f9fb497725ad4e85d47fb8a94233d", "score": "0.5650611", "text": "public function getIdClient()\n {\n return $this->idClient;\n }", "title": "" }, { "docid": "5c0a035cfb3d22f3cf65b3e6959e22d8", "score": "0.56496763", "text": "public function getClient(): string\n {\n return $this->client;\n }", "title": "" }, { "docid": "1439c8c00fe487fb1fddc2ec788b917d", "score": "0.56366885", "text": "public function getClient()\n\t{\n\t\treturn new \\Guzzle\\Http\\Client;\n\t}", "title": "" }, { "docid": "001f1cec49af7829a40d3c001306c57a", "score": "0.56359285", "text": "public function getClient()\n {\n return $this->api->getClient();\n }", "title": "" }, { "docid": "0064273f87d44eb4cb244d912d01eabc", "score": "0.5627049", "text": "protected function getDocumentClient()\n\t{\n\t\tif (!isset($this->doc_client))\n\t\t{\n\t\t\t$this->doc_client = ECash::getFactory()->getDocumentClient();\n\t\t}\n\n\t\treturn $this->doc_client;\n\t}", "title": "" }, { "docid": "e8d938b04ba533b0c206a955673ce98e", "score": "0.5626568", "text": "public function getTimer()\n {\n return $this->_timer;\n }", "title": "" }, { "docid": "839dcb15dbdb797ebd09434f149518e2", "score": "0.5618581", "text": "public function get_id_client()\n {\n return $this->_id_client;\n }", "title": "" }, { "docid": "69db0770db7244efc804b0b4abcd3b4b", "score": "0.56135947", "text": "public function getClient($service, $id){\n return $this->softlayer_client($service, $id);\n }", "title": "" }, { "docid": "c6fe9e19ea15438efd247a2d1f1c2610", "score": "0.560915", "text": "public function getRawThriftClient()\n {\n return $this->client;\n }", "title": "" }, { "docid": "521b29a35eb871bbc25c26a83a232f3d", "score": "0.56006616", "text": "public function getClient()\n\t{\n\t\treturn new Client([\n\t\t\t'headers' => [\n\t\t\t\t'Authorization' => 'ZXWS ' . $this->connect_id . ':' . $this->getSignature(),\n\t\t\t\t'Date' => $this->timestamp,\n\t\t\t\t'nonce' => $this->nonce\n\t\t\t]\n\t\t]);\n\t}", "title": "" }, { "docid": "101760e4fff51fb412896435463b2349", "score": "0.55968416", "text": "public function getMultiClient()\n {\n return $this->multi_client;\n }", "title": "" }, { "docid": "9b4b6be5fa1997c37e78e09c3013cb45", "score": "0.5588594", "text": "protected function getHttpClient()\n {\n return $this->getOAuthClient()->getHttpClient()->getClient();\n }", "title": "" }, { "docid": "dd0ddeca36b2be4c19193b1ed1c6a0b0", "score": "0.55616647", "text": "protected function getClient($protocol)\n {\n if (!isset($this->clients[$protocol])) {\n throw new \\Exception(sprintf('The protocol \"%s\" does not exist.', $protocol));\n }\n\n return $this->clients[$protocol];\n }", "title": "" }, { "docid": "930f5945aa49d6d11fcfbaa4712e9247", "score": "0.5550456", "text": "protected function getHttpClient()\n {\n $factory = ClientFactory::getInstance();\n $httpClient = $factory->getHttpClient();\n return $httpClient;\n }", "title": "" }, { "docid": "9d16f075e49368adbd8a075ebf70bc04", "score": "0.5548834", "text": "protected function client() : GuzzleClient {\n return $this->client;\n }", "title": "" } ]
a7437cf91e24e15cc21164eaa0125f48
/ OLD NOT WORKING Gives the last status of the bin
[ { "docid": "cd7b910a7ca2af862be1403a1d48ab9e", "score": "0.6589805", "text": "public function getLastBinStatus($id) {\n\t\t$data = array();\n\t\t$sql = \"SELECT h.height, h.total_height, weight, time\n\t\t\t\tFROM bin_height AS h\n\t\t\t\tJOIN bin_weight AS w ON \n\t\t\t\tWHERE bin_id = ? AND time = (\n\t\t\t\t\tSELECT MAX(time)\n\t\t\t\t\tFROM bin_data\n WHERE bin_id = ?\n\t\t\t\t)\";\n\t\t$stmt = $this->db_connection->prepare($sql);\n\t\t$stmt->bind_param(\"ii\", $id, $id);\n\t\t$stmt->execute();\n\t\t$stmt->store_result();\n\t\t$stmt->bind_result(\n\t\t\t$data['size'], \n\t\t\t$data['fill_level'], \n\t\t\t$data['weight'], \n\t\t\t$data['time']\n\t\t);\n\t\t$stmt->fetch();\n\t\t$stmt->close();\t\t\n\t\treturn $data;\n\t}", "title": "" } ]
[ { "docid": "6728d447a364cb398644359f61fd0868", "score": "0.6899179", "text": "public function getLastStatus();", "title": "" }, { "docid": "3dbbd6498f141792366d3b4292a55e68", "score": "0.6470702", "text": "function get_status() {\n\n\t\t\tif($this->debug)\n\t\t\t\techo \"* drive::get_status(\".$this->device.\")\\n\";\n\n\t\t\t$arg_device = escapeshellarg($this->device);\n\t\t\t$command = $this->binary.\" $arg_device\";\n\t\t\t$return = 0;\n\t\t\texec($command, $arr, $return);\n\n\t\t\tif($this->debug)\n\t\t\t\techo \"* drive status: \".$this->arr_drive_status[$return].\"\\n\";\n\n\t\t\treturn $return;\n\t\t}", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.63921404", "text": "function getStatus() ;", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.6392008", "text": "function getStatus() ;", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.6392008", "text": "function getStatus() ;", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.6392008", "text": "function getStatus() ;", "title": "" }, { "docid": "196da543dca578a86953affc0c38fca3", "score": "0.638035", "text": "public function getLastStatus()\n {\n return (int)$this->lastStatus;\n }", "title": "" }, { "docid": "90a5f3a390730c877329aa0a6d2e4707", "score": "0.6283455", "text": "function BURN_getStatus()\n{\n\tif (!file_exists(\"/tmp/m23cdBurner.LOCK\"))\n\t\treturn(BURNSTATE_IDLE);\n\telse\n\t\t{\n\t\t\t$file = fopen(\"/tmp/m23cdBurner.LOCK\",\"r\");\n\t\t\t$code = fgets($file);\n\t\t\tfclose($file);\n\n\t\t\tswitch ($code)\n\t\t\t\t{\n\t\t\t\t\tcase \"blank\": return(BURNSTATE_BLANK);\n\t\t\t\t\tcase \"burn\": return(BURNSTATE_BURN);\n\t\t\t\t};\n\t\t};\n}", "title": "" }, { "docid": "551454cdfed0fd6225f04cf9f7831431", "score": "0.62733036", "text": "public function getStatus() {\n if ($this->exec('STATUS')) {\n $get_status = $this->_getBuffer();\n return implode(\"\", $get_status);\n }\n }", "title": "" }, { "docid": "a8d1e265c2515bcae886ea841076b6ff", "score": "0.62277806", "text": "function getStatus(){\n\t\treturn proc_get_status($this->pref);\n\t}", "title": "" }, { "docid": "c1d7c3ad46363b6da1996da9f3967a94", "score": "0.61660355", "text": "function getStatus() {\n if (!(isset($this->changed['status'])))\n {\n return $this->status;\n }\n else\n {\n return $this->changed['status'];\n }\n }", "title": "" }, { "docid": "1b07b90338dec0ccbb6d45d13d578a9a", "score": "0.61435914", "text": "public function getStatus() {\n\t\t\n\t\treturn $this->bitcoin->status;\n\n\t}", "title": "" }, { "docid": "f8b4f1244e0dfeb4b06e4374014dd1fa", "score": "0.609774", "text": "public function getLastStatus(){\n return $this->net->getLastResponse()->getStatus();\n }", "title": "" }, { "docid": "8c44fbd5dd27914d6b894865fea033ba", "score": "0.6038521", "text": "public function get_status()\n {\n if( ( $this->status == \"running\" ) && (!$this->is_running()) )\n {\n $this->status = \"terminated\";\n }\n return $this->status;\n }", "title": "" }, { "docid": "10fa913fc94a42073fb4e0338961671b", "score": "0.60362256", "text": "public function getStatus() {\n return $this->bStatus;\n }", "title": "" }, { "docid": "30196f26c630c3db6d614da2e90c580e", "score": "0.6035477", "text": "public function getStatus(){\n return $this->statue;\n }", "title": "" }, { "docid": "48fd568c2cbb18e3f9be30a8034b97da", "score": "0.5975076", "text": "protected function getSelfStatus() {}", "title": "" }, { "docid": "48fd568c2cbb18e3f9be30a8034b97da", "score": "0.5975076", "text": "protected function getSelfStatus() {}", "title": "" }, { "docid": "f19c2b1a91b928011f8bf90368f8b099", "score": "0.59473956", "text": "function getStatus()\n\t{\n\t return $retval;\n\t}", "title": "" }, { "docid": "4f7dd6a190f68adc46efe8004d1480d6", "score": "0.59461385", "text": "function getCurrentStatus() {\n $status = file_get_contents('curstatus.txt');\n if ($status === false) $status = '0';\n\n return $status;\n}", "title": "" }, { "docid": "f552f08c50ea8bca8ceac08252b32108", "score": "0.5936093", "text": "public static function get_bin() {\n\t\treturn self::$bin;\n\t}", "title": "" }, { "docid": "914594f513384c9462635e246c8a609d", "score": "0.5912703", "text": "public function getStatus() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"status\");\n\t}", "title": "" }, { "docid": "914594f513384c9462635e246c8a609d", "score": "0.5912703", "text": "public function getStatus() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"status\");\n\t}", "title": "" }, { "docid": "a571d3a11e4455cc0896f9bd850833f8", "score": "0.5894833", "text": "function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.588854", "text": "public function getStatus();", "title": "" }, { "docid": "2c61d4271292179a51c16bbd1f386347", "score": "0.5839939", "text": "public function getStatus(){\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "2c61d4271292179a51c16bbd1f386347", "score": "0.5839939", "text": "public function getStatus(){\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "cde8aeef260a63b80ecb43bb377add5f", "score": "0.58283156", "text": "function getstatus() {\n return $this->status;\n }", "title": "" }, { "docid": "e3ad1f76c1a492b7b50cbef207e92ab3", "score": "0.5821889", "text": "public function getStatus()\n {\n $output = $this->querySabnzbd('mode=queue&output=json');\n $response = json_decode($output, true);\n\n $status = $response['queue'];\n\n $result = [];\n $result['queue']['status'] = $status['status'];\n $result['queue']['paused'] = $status['paused'];\n $result['queue']['speedlimit'] = (int) $status['speedlimit'];\n $result['queue']['freediskspace'] = $status['diskspace2'];\n $result['queue']['totaldiskspace'] = $status['diskspacetotal2'];\n $result['queue']['bytepersec'] = (int) ($status['kbpersec'] * 1024);\n $result['queue']['mbsize'] = $status['mb'];\n $result['queue']['mbremaining'] = $status['mbleft'];\n\n $timeleft = explode(':', $status['timeleft']);\n $secondsremaining = $timeleft[0] * 3600 + $timeleft[1] * 60 + $timeleft[2];\n $result['queue']['secondsremaining'] = $secondsremaining;\n\n $slots = $status['slots'];\n $downloads = [];\n for ($i = 0; $i < count($slots); $i++) {\n $downloads[$i]['paused'] = ($slots[$i]['status'] == 'Paused');\n $downloads[$i]['id'] = $slots[$i]['nzo_id'];\n $downloads[$i]['filename'] = $slots[$i]['filename'];\n $downloads[$i]['category'] = $slots[$i]['cat'];\n $downloads[$i]['mbsize'] = $slots[$i]['mb'];\n $downloads[$i]['mbremaining'] = $slots[$i]['mbleft'];\n $downloads[$i]['percentage'] = $slots[$i]['percentage'];\n }\n\n $result['queue']['slots'] = $downloads;\n $result['queue']['nrofdownloads'] = count($downloads);\n\n return $result;\n }", "title": "" }, { "docid": "538cd1b970e2ef52f1d75f0dd2d9f6d0", "score": "0.5817668", "text": "public function getCurrentstatus()\n\t{\n\t\treturn $this->currentstatus;\n\t}", "title": "" }, { "docid": "efc0a825d690750db478427e5e508bed", "score": "0.5816746", "text": "public function get_status()\n {\n $this->db->order_by('updated','desc');\n $query = $this->db->get('status');\n\n $res= $query->row(); \n /*\n if(!isset($res)){\n $this->set_status('free',0,'');\n return $this->get_status();\n }*/\n return $res;\n \n }", "title": "" }, { "docid": "721766cd12c1ecdb291f126337363322", "score": "0.5815089", "text": "public function getStatus(){\n\t\treturn $this->_STATUS;\n\t}", "title": "" }, { "docid": "230c5efb6d44d448181943c5a2af996f", "score": "0.5814084", "text": "function getStatus (){\n return $this->status;\n }", "title": "" }, { "docid": "cc3a5d4c3634c3155300eab0ad4f6366", "score": "0.57942206", "text": "function getStatus() {\n\t\treturn $this->_Status;\n}", "title": "" }, { "docid": "6fe434e15f3bb993ed6c07237bdfc48a", "score": "0.57893413", "text": "public function get_status(){\n\t\treturn (int) $this->v_status;\n\t}", "title": "" }, { "docid": "1fa32c5ee124e47256f2fc907c164bb8", "score": "0.5776569", "text": "public function get_status()\r\n { \r\n return $this->status;\r\n }", "title": "" }, { "docid": "2af60a62674592240efcab877dbd0887", "score": "0.5775217", "text": "public function get_status(){\n\n return $this->curl_node->get_status();\n\n }", "title": "" }, { "docid": "a4b918cacc82ae4c3c5a50a180c16f79", "score": "0.5767648", "text": "public function getStatus()\r\n {\r\n // starting? wait a while...\r\n if ($this->status == self::STARTING)\r\n sleep(1);\r\n \r\n // aborted?\r\n if ($this->status == self::ABORTED)\r\n return $this->status;\r\n\r\n // check error output \r\n $err = $this->getError();\r\n if ($err === FALSE)\r\n {\r\n // running?\r\n if ($this->getPID() == 0)\r\n {\r\n $this->status = self::ENDED;\r\n }\r\n else\r\n {\r\n $this->status = self::STARTED;\r\n }\r\n }\r\n else\r\n {\r\n // ended with error\r\n $this->status = self::FAILED;\r\n }\r\n\r\n return $this->status;\r\n }", "title": "" }, { "docid": "d50d19b2e72695e5540a94269a4afeb3", "score": "0.5765635", "text": "function get_status() {\n return $this->status;\n }", "title": "" }, { "docid": "959ce46850c8dd8552e30d7d83daea6e", "score": "0.57595074", "text": "public function getStatus()\n {\n return proc_get_status($this->mProcess);\n }", "title": "" }, { "docid": "31490bdeb101c1efc3ab5521824cffc1", "score": "0.5756911", "text": "function getcomposerStatus()\r\n\t{\r\n\t$statusFile = fopen(\"/var/www/tmp/composerstatus.txt\", \"r\");\r\n\tif ($statusFile == false)\r\n\t{\r\n\t\t$statusFile = fopen(\"/var/www/tmp/composerstatus.txt\", \"w\");\r\n\t\tfwrite($statusFile, \"stop\");\r\n\t\tfclose($statusFile);\r\n\t\techo \"test\";\r\n\t\t$runstop = false;\r\n\t}\r\n\telseif ($statusFile)\r\n\t{\r\n\t\t$statusWord = trim(fgets($statusFile, 5));\r\n\t\tfclose($statusFile);\r\n\r\n\t\r\n\t\tswitch ($statusWord){\r\n\t\tcase \"stop\":\r\n\t\t\t$runstop = false;\r\n\t\t\tbreak;\r\n\t\tcase \"run\":\r\n\t\t\t$runstop = true; \r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn $runstop;\r\n\t}", "title": "" }, { "docid": "ec4038018b7ed6bf6439882a3dad171a", "score": "0.57551616", "text": "protected function currentStatus()\n {\n return $this->status['queues'][$this->qName];\n }", "title": "" }, { "docid": "47231b79dce63a7ee342df657f9f78d7", "score": "0.5752352", "text": "public function cronJobUpdateStatus(){\r\n $sql = $this->createNameQuery(\"cronJobUpdateStatus\");\r\n return $this->db->query($sql); \r\n }", "title": "" }, { "docid": "8008eca20bee944df5bc76b6688d0f29", "score": "0.57456064", "text": "abstract public function getStatus();", "title": "" }, { "docid": "d6db68e21ee07d875980331d82ee1321", "score": "0.5735514", "text": "public function getLastApiStatus() {\n\t\treturn $this->apiStatus;\n\t}", "title": "" }, { "docid": "d8061e1fe92026e967ff3fde382eeb6c", "score": "0.57300174", "text": "public function get_status(){\n\t\t\t\n\t\t\treturn $this->status;\n\t\t}", "title": "" }, { "docid": "c1b862db11f3caac45d822dd39a7b02f", "score": "0.5727215", "text": "function getDetailedStatus() ;", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57253915", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.57246846", "text": "public function getStatus() {}", "title": "" }, { "docid": "ec76edab020da1faba690a033db0c6bc", "score": "0.57242614", "text": "public function getStatus()\n\t{\n\t\treturn $this->status; \n\n\t}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.5724016", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.5724016", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.5724016", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.5724016", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.5724016", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.5724016", "text": "public function getStatus() {}", "title": "" }, { "docid": "1aa7503b77fbbd3abaa5d2e8b91f0115", "score": "0.5723286", "text": "function getStatus() {\n\t\treturn $this->_Status;\n\t}", "title": "" }, { "docid": "1aa7503b77fbbd3abaa5d2e8b91f0115", "score": "0.5723286", "text": "function getStatus() {\n\t\treturn $this->_Status;\n\t}", "title": "" }, { "docid": "e4b181bd49b49ab540c740c253516585", "score": "0.5715852", "text": "public function getCurrentStatus()\n {\n $states = $this->getStates();\n return end($states);\n }", "title": "" }, { "docid": "b669e7265b8f7639d6ee71dbe4111db3", "score": "0.57035685", "text": "public function getStatus () {\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "95d4e39a2dc4110b508482dfaf6c2cc0", "score": "0.5697829", "text": "public function mb_get_status() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_status() : $this->status;\n\t}", "title": "" }, { "docid": "e0d9ef3191ca4bb432699fa536005f68", "score": "0.5695586", "text": "public function getStatus(){\n return $this->status;\n }", "title": "" }, { "docid": "fbc895ef1f96c325ff6a07c31627dc95", "score": "0.5692989", "text": "public function getPreviousReadStatus();", "title": "" }, { "docid": "7b6547defb97cd8c15eced8bf4db06ee", "score": "0.5687918", "text": "public function status() {\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "d1cea73f31dd30dcc5e4f815ccd97143", "score": "0.5687714", "text": "function getArticleLastStatus($status) {\n switch($status) {\n case \"6\":\n case \"5\":\n $last_status = $status-1;\n break;\n case \"4\":\n $last_status = \"failed\";\n break;\n case \"3\":\n $last_status = 4;\n break;\n case \"2\":\n $last_status = \"failed\";\n break;\n case \"1gc\":\n $last_status = 1;\n break;\n case \"1gd\":\n $last_status = 1;\n break;\n case \"1\":\n $last_status = \"failed\";\n break;\n default :\n $last_status = \"failed\";\n break;\n }\n return $last_status;\n }", "title": "" }, { "docid": "d533b61eac6ad3ed2baeb7c3b25b29dd", "score": "0.5687415", "text": "function get_update_status($force_update=false){\n static $running = false; //set to true will shell script is running\n $cache_file = '/usr/local/pia/cache/webui-update_status.txt';\n\n\n //make sure the Internet is up before going further\n $running = true; //set to true to prevent multiple checks at the same time\n if( $this->is_internet_up() !== true ){\n $running = false;\n return 'Internet down';\n }\n $running = false; //back to false for normal operations\n\n\n if( $force_update === true ){\n $git_ret = $this->get_revlist_count();\n if( $git_ret !== false ){\n $txt = strtotime('now').'|'.$git_ret;\n $this->_files->writefile($cache_file, $txt);\n return (int)$git_ret;\n }else{\n //file does not exist. create dummy file to show page as quickly as possible\n // the next javascript status update will run the actuall check in the background\n $txt = '0|0';\n $this->_files->writefile($cache_file, $txt);\n return 'error checking for updates';\n }\n }\n\n //read from cache file or get fresh info\n if( file_exists($cache_file) === true ){\n $cont = explode('|', $this->_files->readfile($cache_file));\n\n //cont(0) is timestamp of creation\n //cont(1) contains the value\n $expires = strtotime('-48 hours'); //time until session expires\n if( trim($cont[0]) < $expires ){\n unlink($cache_file);\n if( $running === false ){\n $running = true;\n $this->get_revlist_count();\n }\n return 'checking ...';\n\n }else{\n //return info from cache file\n $running = false;\n return (int)trim($cont[1]);\n }\n\n }else{\n $running = true;\n $this->get_revlist_count();\n return 'checking ...';\n }\n }", "title": "" }, { "docid": "7ae7cf9ff12b20fe1dc1210b7b01306f", "score": "0.56856304", "text": "function &getStatus(){\n\t\tif ( !isset( $this->status ) ){\n\t\t\t/*\n\t\t\t * Get the table status - when was it last updated, etc...\n\t\t\t */\n\t\t\t$res = mysql_query(\"SHOW TABLE STATUS LIKE '\".addslashes($this->tablename).\"'\",$this->db);\n\t\t\tif ( !$res ){\n\t\t\t\ttrigger_error(\"Error performing mysql query to obtain status for table '\".$this->tablename.\"': \".mysql_error($this->db).Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t\t}\n\t\t\t\n\t\t\t$this->status = mysql_fetch_array($res);\n\t\t\tmysql_free_result($res);\n\t\t} \n\t\t\n\t\treturn $this->status;\n\t\t\n\t\n\t}", "title": "" }, { "docid": "79aff9b0261c605dbcfddd63ebe4d297", "score": "0.5682286", "text": "function getStatus() {\n\n\t\t\treturn $this->status;\n\t\t}", "title": "" }, { "docid": "888cab4ea670686964a210318a9fa3ed", "score": "0.5677758", "text": "public function status() {\n $arrStatus = [];\n $arrStatus[\"pending\"] = $this->file->check_num_rows();\n return $arrStatus;\n }", "title": "" }, { "docid": "6a6c9e34d24838bf9899e4f17082005a", "score": "0.5673692", "text": "public function get_status() {\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "6a6c9e34d24838bf9899e4f17082005a", "score": "0.5673692", "text": "public function get_status() {\n\t\treturn $this->status;\n\t}", "title": "" }, { "docid": "4be85272e2736ff87b15099debf63f30", "score": "0.5671861", "text": "protected function getMainRepositoryStatus() {}", "title": "" }, { "docid": "f81f3b4d9c1f13464705e31e928f7c0c", "score": "0.5669944", "text": "public function status()\n {\n return self::$statuses[$this->status];\n }", "title": "" }, { "docid": "ae1b03f6d4ecc58922fbdc4ea68b0494", "score": "0.56688726", "text": "function stat() {\n exec( 'sudo wpa_cli -i wlan0 status', $out );\n $arr=array();\n foreach( $out as $x) {\n $t=explode('=', $x);\n $arr[ $t[0] ]=$t[1];\n }\n return $arr;\n }", "title": "" } ]
838b24a8ab87447820feddbf2ac9acc2
Load users from file (csv)
[ { "docid": "f747ee48b13fdfa0145d65023b49436e", "score": "0.7869458", "text": "static function load_users($file)\n\t\t{\n\t\t\tdebug(\"Load users from {$file}\");\n\t\t\t$d = read_csv($file);\n\t\t\t$result = array();\n\t\t\tforeach($d as $user)\n\t\t\t{\n\t\t\t\t$result[$user['profile']] = $user;\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "title": "" } ]
[ { "docid": "d45afd84e22ed4aba2b8106a6a186c60", "score": "0.7643244", "text": "private function loadUsers() {\n\t\t$this->usersFile = new \\common\\model\\PHPFileStorage(\"data/users.php\");\n\n\t\t$usersArray = $this->usersFile->readAll();\n\n\t\tforeach ($usersArray as $key => $userString) {\n\t\t\t$user = UserCredentials::fromString($userString);\n\t\t\t$this->users[$user->getUserName()->__toString()] = $user;\n\t\t}\n\t}", "title": "" }, { "docid": "c98e91d3c099dbebd30803b0642e2276", "score": "0.7225426", "text": "public function getImportusers()\n\t{\n\t\t$users = file(app_path().'/users.txt');\n foreach ($users as $line) {\n $line = trim($line);\n $a = explode(\"\\t\", $line);\n $name=$a[0];\n $type=$a[1];\n $user = new User;\n $user->username=$name;\n $user->type = $type;\n $user->password = Hash::make('');\n $user->isadmin = 0;\n $user->save();\n echo \"$name\\t$type\\n\";\n }\n\n echo 'ok';\n }", "title": "" }, { "docid": "24ef59839dda67abbd1107cafede7f46", "score": "0.6964915", "text": "public function upload_users( $file_name ) {\n\t\t$file = fopen( $file_name, 'r' );\n\n\t\t//After the while loop, ids contains all ids of users that are still member\n\t\t$ids = [];\n\n\t\t$nr = 0;\n\n\t\t//While not end of file\n\t\twhile( ! feof( $file ) ) {\n\t\t\t$data = fgetcsv( $file, 0, ';' );\n\t\t\tif( $data === FALSE ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//Remove all additional '\n\t\t\tforeach( $data as $key => $value ) {\n\t\t\t\t$val = str_replace( \"'\", \"\", $value );\n\t\t\t\t$data[ $key ] = $val;\n\t\t\t}\n\n\t\t\t//Push the id to the array ids\n\t\t\t$id = intval( preg_replace(\"/[^0-9]/\", \"\", $data[ self::ID ] ) );\n\t\t\tarray_push( $ids, $id );\n\n\t\t\t//Create a user ID with all relevant data\n\t\t\t//Note: new datafields will have to be added here\n\t\t\t$user = [\n\t\t\t\t\"id\" => $id,\n\t\t\t\t\"naam\" => $data[ self::VOOR ] . \" \" . ( $data[ self::TUSSEN ] === \"\" ? \"\" : $data[ self::TUSSEN ] . \" \" ) . $data[ self::ACHTER ],\n\t\t\t\t\"email\" => $data[ self::EMAIL ],\n\t\t\t\t\"geboortedatum\" => date_format( date_create( $data[ self::GEBOORTEDATUM ] ), \"Y-m-d\" ),\n\t\t\t\t\"engels\" => ( $data[ self::ENGELS ] === 'Nee' ) ? 0 : 1,\n\t\t\t];\n\n\t\t\tvar_dump( $user );\n\n\t\t\t//Translate the lidmaatschap field into database ready data\n\t\t\tswitch( $data[ self::LIDMAATSCHAP ] ) {\n\t\t\t\tcase 'Waterpolo - wedstrijd' :\n\t\t\t\t\t$user[\"lidmaatschap\"] = 'waterpolo_competitie';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Zwemmers' :\n\t\t\t\t\t$user[\"lidmaatschap\"] = 'zwemmer';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Waterpolo - recreatief' :\n\t\t\t\t\t$user[\"lidmaatschap\"] = 'waterpolo_recreatief';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Trainers' :\n\t\t\t\t\t$user[\"lidmaatschap\"] = 'trainer';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Overige' :\n\t\t\t\t\t$user[\"lidmaatschap\"] = 'overig';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\t$user[\"lidmaatschap\"] = 'zwemmer';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//Check if this is an existing user\n\t\t\t$profile = $this->get_profile( $user[\"id\"] );\n\t\t\tif( ! empty( $profile ) ) {\n\t\t\t\t$this->db->set( $user );\n\t\t\t\t$this->db->where( 'id', $user[\"id\"] );\n\t\t\t\t$this->db->update( 'gebruikers' );\n\t\t\t\t$nr += $this->db->affected_rows();\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->load->model( 'login_model' );\n\t\t\t\t$this->db->insert( 'gebruikers', $user );\n\t\t\t\t$result = $this->login_model->set_recovery( $user['email'], TRUE );\n\t\t\t\t//Send a welcome mail to new users :D\n\t\t\t\tif( $result !== FALSE ) {\n\t\t\t\t\tif( $this->send_welcome_mail( $data[ self::VOOR ], $user['email'], $result['recovery'], $user['engels'] ) ) {\n\t\t\t\t\t\t$nr += $this->db->affected_rows();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif( ( $key = array_search( $user['id'], $ids ) ) !== FALSE ) {\n\t\t\t\t\t\t\tunset( $ids[ $key ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfclose( $file );\n\t\t//Remove the file\n\t\tunlink( $file_name );\n\n\t\t//Remove all users not in ids as they are no longer member\n\t\t$this->db->where_not_in( 'id', $ids );\n\t\t$this->db->delete( 'gebruikers' );\n\n\t\treturn $nr + $this->db->affected_rows();\n\t}", "title": "" }, { "docid": "efd64105e769c4eec0cf430ebefccb05", "score": "0.6871394", "text": "public function FromCSV($file_name)\n {\n\n $file = fopen($file_name, 'r');\n // Reading line by line - a little bit slower but doesn't require a lot of memory.\n while (($line = fgetcsv($file)) !== false) {\n\n // Insert user into DB\n $this->InsertUser($line);\n }\n fclose($file);\n }", "title": "" }, { "docid": "17cf0103d7d5f54e5a7ba40c3c30cc17", "score": "0.66677344", "text": "private function loadUser($userList, $userFromFile)\n\t{\n\t\tif(!$userFromFile)\n\t\t{\n\t\t\t$this->users = $userList;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$file = $userList;\n\t\t\tif(file_exists($file))\n\t\t\t{\n\t\t\t\t$this->users = array();\n\t\t\t\t$row = file($file);\n\t\t\t\tforeach($row as $idx=>$line)\n\t\t\t\t{\n\t\t\t\t\t$row[$idx] = trim($line, \" \\r\\n\\t \");\n\t\t\t\t}\n\t\t\t\t$this->users = implode(\"\\r\\n\", $row);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "092f75bcc263abe908b7540d6ed87120", "score": "0.66474503", "text": "public static function import_users($usersfile, $formdata, $courseid, $db) {\n $iid = \\csv_import_reader::get_new_iid('usersfile');\n $csvreader = new \\csv_import_reader($iid, 'usersfile');\n\n $csvreader->load_csv_content($usersfile, $formdata->encoding, $formdata->delimiter_name);\n\n $csvreader->init();\n\n $fields = $csvreader->get_columns();\n\n while ($fields) {\n $userid = $fields[0];\n $grade = $fields[1];\n\n $db->insert_historic_user_enrol($userid, $grade, $courseid);\n self::$lastinsertedusers++;\n\n $fields = $csvreader->next();\n }\n\n $csvreader->close();\n }", "title": "" }, { "docid": "50fe42c3fcf17bb49f8c2a0bd41063ca", "score": "0.6567607", "text": "function readAuthorizedUsers()\n{\n $filename = \"userinfo.txt\";\n $fh = file($filename);\n $authorized_users = [];\n\n if ($fh) {\n foreach ($fh as $row) {\n $buffer = explode(\",\", $row);\n\n $username = cleanInput($buffer[0]);\n $password = cleanInput($buffer[1]);\n\n $authorized_users[] = array(\"username\" => $username, \"password\" => $password);\n }\n } else {\n echo \"Error: unable to open file: \" . $filename . \"for read\";\n }\n\n return $authorized_users;\n}", "title": "" }, { "docid": "a90d964717b990eb97806d716cd1901c", "score": "0.6531757", "text": "public function handle(){\n $file = public_path('user_data.csv');\n $delimiter = ','; \n if(!file_exists($file) || !is_readable($file))\n return false;\n\n $header = null;\n $data = array();\n\n if (($handle = fopen($file,'r')) !== false){\n while (($row = fgetcsv($handle, 1000, $delimiter)) !==false){\n if (!$header)\n $header = $row;\n else\n $data[] = array_combine($header, $row);\n }\n fclose($handle);\n }\n\n $meta_descArr = $data;\n for ($i = 0; $i < count($meta_descArr); $i ++){\n User::firstOrCreate($meta_descArr[$i]);\n }\n echo \"Users data added\".\"\\n\";\n }", "title": "" }, { "docid": "014f7f346c27103a4ea9cc4d08fd476e", "score": "0.6407593", "text": "public function uploadCSV(){\n\n\t\t// Get file uploaded by user.\n\t\t$CSV = $_FILES['usersCSV'];\n\n\t\t// Define user array for User creation.\n\t\t$user = array();\n\t\t$errors = array();\n\t\t$password = '';\n\n\t\t// Create variable to ensure we skip first row.\n\t\t$skipped = false;\n\n\t\t// Now open it so we can parse through it.\n\t\tif (($file = fopen($CSV['tmp_name'], \"r\")) !== false) {\n\t\t\t// Pass opened file to fgetcsv for parsing.\n\t \twhile (($row = fgetcsv($file)) !== false) {\n\t \t\t// Check if we skipped.\n\t \t\tif ($skipped) {\n\t\t \t\t// Loop through all columns in current row.\n\t \t\tfor ($column=0; $column < count($row); $column++) {\n\t \t\tswitch($column) {\n\t \t\t\tcase 0:\n\t \t\t\t\t$user['username'] = $row[$column];\n\t \t\t\tbreak;\n\t \t\t\tcase 1:\n\t \t\t\t\t$user['name'] = $row[$column];\n\t \t\t\tbreak;\n\t \t\t\tcase 2:\n\t \t\t\t\t$user['email'] = $row[$column];\n\t \t\t\tbreak;\n\t \t\t\tcase 3:\n\t \t\t\t\t// Make copy of plaintext password in case we return error.\n\t \t\t\t\t$password = $row[$column];\n\t \t\t\t\t$user['password'] = Hash::make($row[$column]);\n\t \t\t\tbreak;\n\t \t\t\tcase 4:\n\t \t\t\t\t$user['rank'] = $row[$column];\n\t \t\t\tbreak;\n\t \t\t\tcase 5:\n\t \t\t\t\t$user['department'] = $row[$column];\n\n\t \t\t\t\t// This should be the last iteration so generate code.\n\t \t\t\t\t$code = str_random(60);\n\t \t\t\t\t$user['code'] = $code;\n\n\t \t\t\t\t// Verify that user id and email are unique.\n\t \t\t\t\t$unique = true;\n\n\t \t\t\t\tif(!filter_var($user['email'], FILTER_VALIDATE_EMAIL) || User::where('email', $user['email'])->count() > 0) {\n\t \t\t\t\t\t$unique = false;\n\t \t\t\t\t}\n\n\t \t\t\t\tif(User::where('username', $user['username'])->count() > 0) {\n\t \t\t\t\t\t$unique = false;\n\t \t\t\t\t}\n\n\t \t\t\t\t// Verify that all input is correct.\n\t \t\t\t\t$correct = true;\n\n\t \t\t\t\tif(!is_numeric($user['rank']) || !is_numeric($user['department'])) {\n\t \t\t\t\t\t$correct = false;\n\t \t\t\t\t}\n\n\t \t\t\t\tif($unique && $correct){\n\t \t\t\t\t\t// Create user.\n\t \t\t\t\t\tUser::create($user);\n\t \t\t\t\t} else {\n\t \t\t\t\t\t// Reset password to plaintext.\n\t \t\t\t\t\t$user['password'] = $password;\n\t \t\t\t\t\t// Remove code.\n\t \t\t\t\t\tunset($user['code']);\n\t \t\t\t\t\t// Save to array to return for csv file.\n\t \t\t\t\t\tarray_push($errors, $user);\n\t \t\t\t\t}\n\t \t\t\tbreak;\n\t \t\t}\n\t \t\t}\n \t\t}\n \t\t$skipped = true;\n \t\t}\n \t\tfclose($file);\n\t\t}\n\n\t\t// If we got errors return them.\n\t\tif(count($errors) > 0) {\n\t\t\treturn Response::json(array(\n\t\t\t\t\t\t\t\t'success' => false,\n\t\t\t\t\t\t\t\t'filename' => $CSV['name'],\n\t\t\t\t\t\t\t\t'errors' => $errors\n\t\t\t\t\t\t\t\t));\n\n\t\t} else {\n\t\t\t// Return successful response to user.\n\t\t\treturn Response::json(array(\n\t\t\t\t\t\t\t\t'success' => true\n\t\t\t\t\t\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "16ef2a5c5e962a4c4520693f7946387a", "score": "0.64028955", "text": "static function import_csv($file_name)\n {\n global $_ARRAYLANG;\n \\Env::get('ClassLoader')->loadFile(ASCMS_LIBRARY_PATH.'/importexport/lib/csv.class.php');\n\n//DBG::activate(DBG_ADODB_ERROR|DBG_LOG_FIREPHP|DBG_PHP);\n\n $objUser = \\FWUser::getFWUserObject()->objUser;\n $objCsv = new \\CsvLib();\n $arrCsv = $objCsv->parse($file_name);\n// $arrFields = $arrCsv['fieldnames'];\n $arrUsers = $arrCsv['data'];\n//DBG::log(\"Found \".count($arrUsers).\" Users in the CSV file\");\n foreach ($arrUsers as $arrUser) {\n//echo(var_export($arrUser, true).\"<br />\");// var_export($objUser, true).\"<hr />\"\n $email = $arrUser['3'];\n//DBG::log(\"Found e-mail $email\");\n if (!\\FWValidator::isEmail($email)) {\n self::$arrStatusMsg['error'][] = sprintf(\n $_ARRAYLANG['TXT_ACCESS_IMPORT_MESSAGE_TEMPLATE'],\n $email, $_ARRAYLANG['TXT_ACCESS_IMPORT_ERROR_INVALID_EMAIL']);\n continue;\n }\n// TODO: I suppose that the imported file is ISO-8859-1 or so\n $title = utf8_encode($arrUser[0]);\n $gender = (preg_match('//', $title)\n ? 'gender_male' : 'gender_female');\n $firstname = utf8_encode($arrUser[1]);\n $lastname = utf8_encode($arrUser[2]);\n $company = utf8_encode($arrUser[4]);\n $address = utf8_encode($arrUser[5]).' '.utf8_encode($arrUser[6]);\n $zip = utf8_encode($arrUser[7]);\n $city = utf8_encode($arrUser[8]);\n $country = utf8_encode($arrUser[9]);\n $state = utf8_encode($arrUser[10]);\n if ($state) {\n $city .= \", $state\";\n }\n $phone_office = utf8_encode($arrUser[11]).' '.utf8_encode($arrUser[12]);\n $phone_fax = utf8_encode($arrUser[13]).' '.utf8_encode($arrUser[14]);\n $phone_mobile = utf8_encode($arrUser[15]).' '.utf8_encode($arrUser[16]);\n $p1_lists = utf8_encode($arrUser[17]);\n $unsubscribed = utf8_encode($arrUser[24]);\n $language = utf8_encode($arrUser[27]);\n// These are all unused for the time being\n// $p2_answer = $arrUser[18];\n// $p3 = $arrUser[19];\n// $p4_title = $arrUser[20];\n// $p5 = $arrUser[21];\n// $source = $arrUser[22];\n// $permission = $arrUser[23];\n// $bounces = $arrUser[25];\n// $status = $arrUser[26];\n// $id = $arrUser[28];\n// $date_subscribed = $arrUser[29];\n// $date_changed = $arrUser[30];\n// $date_unsubscribe = $arrUser[31];\n $objUser = new \\User();\n $objUser = $objUser->getUsers(array('email' => array($email)));\n $new_user = false;\n if (!$objUser) {\n $new_user = true;\n $objUser = new \\User();\n $objUser->setUsername(\\User::makeUsername($lastname, $firstname));\n $objUser->setPassword(\\User::makePassword());\n $objUser->setEmail($email);\n }\n// TODO: Make new Users active or inactive?\n// $objUser->setActiveStatus(0);\n// $objUser->setAdminStatus(0);\n $lang_id = \\FWLanguage::getLanguageIdByCode($language);\n $objUser->setFrontendLanguage($lang_id);\n $objUser->setBackendLanguage($lang_id);\n $objUser->setProfile(array(\n// 'picture' => array(''),\n 'gender' => array($gender),\n 'title' => array($title),\n 'firstname' => array($firstname),\n 'lastname' => array($lastname),\n 'company' => array($company),\n 'address' => array($address),\n 'city' => array($city),\n 'zip' => array($zip),\n 'country' => array($country),\n 'phone_office' => array($phone_office),\n// 'phone_private' => array(''),\n 'phone_mobile' => array($phone_mobile),\n 'phone_fax' => array($phone_fax),\n// 'birthday' => array(''),\n// 'website' => array(''),\n// 'profession' => array(''),\n// 'interests' => array(''),\n// 'signature' => array(''),\n ));\n $arrLists = preg_split('/\\s*,\\s*/', $p1_lists, null, PREG_SPLIT_NO_EMPTY);\n $arrListId = array();\n if (preg_match('/false/i', $unsubscribed)) {\n // User has not unsubscribed (yet), collect the List IDs\n foreach ($arrLists as $list_name) {\n $list_id = \\Cx\\Modules\\Newsletter\\Controller\\NewsletterLib::getListIdByName($list_name);\n//DBG::log(\"List '$list_name' => ID $list_id\");\n if (!$list_id) {\n// TODO: Shall I do this?\n $list_id = \\Cx\\Modules\\Newsletter\\Controller\\NewsletterLib::_addList(addslashes($list_name));\n self::$arrStatusMsg['ok'][] = sprintf(\n $_ARRAYLANG['TXT_ACCESS_IMPORT_MESSAGE_TEMPLATE'],\n $list_name, $_ARRAYLANG['TXT_ACCESS_IMPORT_SUCCESS_LIST_CREATED']);\n }\n $arrListId[$list_id] = $list_id;\n }\n }\n $objUser->setNewsletterCategories($arrListId);\n if ($objUser->store()) {\n self::$arrStatusMsg['ok'][] = sprintf(\n $_ARRAYLANG['TXT_ACCESS_IMPORT_MESSAGE_TEMPLATE'],\n $email,\n ($new_user\n ? $_ARRAYLANG['TXT_ACCESS_IMPORT_SUCCESS_USER_CREATED']\n : $_ARRAYLANG['TXT_ACCESS_IMPORT_SUCCESS_USER_UPDATED']));\n } else {\n self::$arrStatusMsg['error'][] = sprintf(\n $_ARRAYLANG['TXT_ACCESS_IMPORT_MESSAGE_TEMPLATE'],\n $email, $_ARRAYLANG['TXT_ACCESS_IMPORT_ERROR_CREATING_USER']);\n }\n }\n }", "title": "" }, { "docid": "87e549c843816bb129c3b851b5092aea", "score": "0.63846123", "text": "public static function userInCSV(){\n if(isset($_POST['nom']) && isset($_POST['prenom'])){\n $csv = fopen(UserManager::$usersfile, \"r\");\n while (($row = fgetcsv($csv, 1000, \",\")) !== FALSE) {\n if ($row[0] == $_POST['nom'] && $row[1] == $_POST['prenom']) {\n fclose($csv);\n return TRUE;\n }\n }\n fclose($csv);\n return FALSE;\n }\n }", "title": "" }, { "docid": "b72e1c6e3052720e234da1af306b5679", "score": "0.6341634", "text": "public function import_users()\n {\n $config['upload_path'] = './uploads/';\n $config['allowed_types'] = 'csv';\n $config['max_size'] = 100;\n $config['max_width'] = 1024;\n $config['max_height'] = 768;\n\n $this->load->library('upload', $config);\n\n if (!$this->upload->do_upload('leden')) {\n $error = ['error' => $this->upload->display_errors()];\n $this->loadView('beheer/leden/importeren', $error);\n } else {\n $data = $this->upload->data();\n $full_path = $data[\"full_path\"];\n if (($result = $this->profile_model->upload_users($full_path)) > 0) {\n success($result . ' rijen bijgewerkt.');\n } elseif ($result === 0) {\n success('De database was up-to-date.');\n } else {\n error('Er is helaas iets fout gegaan.');\n }\n redirect('/beheer/leden');\n }\n }", "title": "" }, { "docid": "3c6165b3d5377ff8828fabfc6eca20c0", "score": "0.6339725", "text": "function getUsers($file) {\n return json_decode(file_get_contents($file), true);\n }", "title": "" }, { "docid": "152411e17b498cb26c4c2daf0db85019", "score": "0.6319011", "text": "private function importUsers() {\n $users = $this->getUsers();\n if(is_foreachable($users)) {\n foreach($users as $bc_user) {\n $this->importUser($bc_user);\n } //foreach\n } //if\n }", "title": "" }, { "docid": "d975a4e2a37fcc4f58b405718d260299", "score": "0.62772644", "text": "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n 'course' => elispm::file('tests/fixtures/mdlcourse.csv'),\n 'user' => elispm::file('tests/fixtures/mdluser.csv'),\n classmoodlecourse::TABLE => elispm::file('tests/fixtures/class_moodle_course.csv'),\n pmclass::TABLE => elispm::file('tests/fixtures/pmclass.csv'),\n usermoodle::TABLE => elispm::file('tests/fixtures/usermoodle.csv'),\n user::TABLE => elispm::file('tests/fixtures/pmuser.csv'),\n ));\n $this->loadDataSet($dataset);\n }", "title": "" }, { "docid": "25e623088bf73689e9d7f97c48ab6f25", "score": "0.61395967", "text": "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n user::TABLE => elispm::file('tests/fixtures/pmuser.csv'),\n course::TABLE => elispm::file('tests/fixtures/pmcompletioncourse.csv'),\n pmclass::TABLE => elispm::file('tests/fixtures/pmclass.csv'),\n student::TABLE => elispm::file('tests/fixtures/completionstudent.csv'),\n coursecompletion::TABLE => elispm::file('tests/fixtures/course_completion.csv'),\n student_grade::TABLE => elispm::file('tests/fixtures/class_graded.csv'),\n ));\n $this->loadDataSet($dataset);\n }", "title": "" }, { "docid": "9eb8e79d2942ff0bf03fff5ac65878c8", "score": "0.6128958", "text": "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n 'user' => elispm::file('tests/fixtures/mdluser.csv'),\n 'user_info_field' => elispm::file('tests/fixtures/user_info_field.csv'),\n 'user_info_data' => elispm::file('tests/fixtures/user_info_data.csv'),\n user::TABLE => elispm::file('tests/fixtures/pmuser.csv'),\n usermoodle::TABLE => elispm::file('tests/fixtures/usermoodle.csv'),\n field::TABLE => elispm::file('tests/fixtures/user_field.csv'),\n field_owner::TABLE => elispm::file('tests/fixtures/user_field_owner.csv'),\n ));\n $dataset = new PHPUnit_Extensions_Database_DataSet_ReplacementDataSet($dataset);\n $dataset->addSubStrReplacement('\\n', \"\\n\");\n $this->loadDataSet($dataset);\n\n // Load field data next (we need the user context ID and context level).\n $usercontext = \\local_elisprogram\\context\\user::instance(103);\n\n $dataset = $this->createCsvDataSet(array(\n field_contextlevel::TABLE => elispm::file('tests/fixtures/user_field_contextlevel.csv'),\n field_category_contextlevel::TABLE => elispm::file('tests/fixtures/user_field_category_contextlevel.csv'),\n field_data_int::TABLE => elispm::file('tests/fixtures/user_field_data_int.csv'),\n field_data_char::TABLE => elispm::file('tests/fixtures/user_field_data_char.csv'),\n field_data_text::TABLE => elispm::file('tests/fixtures/user_field_data_text.csv'),\n ));\n $dataset = new PHPUnit_Extensions_Database_DataSet_ReplacementDataSet($dataset);\n $dataset->addFullReplacement('##USERCTXID##', $usercontext->id);\n $dataset->addFullReplacement('##USERCTXLVL##', CONTEXT_ELIS_USER);\n $this->loadDataSet($dataset);\n }", "title": "" }, { "docid": "2758f00e21534f38dbe1a8f97f431a7d", "score": "0.61101377", "text": "function get_users_login_password($file_name)\n\t{\n\t\t\t$data = read_csv($file_name);\n\t\t\treturn $data;\n\t}", "title": "" }, { "docid": "5b5223f120d0e73fc8a6e143245959c1", "score": "0.60720736", "text": "protected function loadUsers()\n {\n $this->logger->notice(sprintf('Loading %d users', self::NUM_OF_USERS));\n\n for ($i = 1; $i <= self::NUM_OF_USERS; $i++) {\n\n $this->um->create(\n array(\n 'username' => 'user' . $i,\n 'email' => 'user' . $i . '@nekuno.com',\n )\n );\n $profileData = array(\n 'birthday' => '1970-01-01',\n 'gender' => 'male',\n 'orientation' => array('heterosexual'),\n 'interfaceLanguage' => 'es',\n 'location' => array(\n 'latitude' => 40.4167754,\n 'longitude' => -3.7037902,\n 'address' => 'Madrid',\n 'locality' => 'Madrid',\n 'country' => 'Spain'\n ),\n 'mode' => 'contact',\n 'objective' => array('human-contact')\n );\n $this->pm->create($i, $profileData);\n }\n }", "title": "" }, { "docid": "10a45cd2c46d60e69b83514a31b42b6f", "score": "0.60456634", "text": "public function importUsers(Request $request)\n {\n $this->validate($request, array(\n 'file' => 'required'\n ));\n\n if ($request->hasFile('file')) {\n $extension = File::extension($request->file->getClientOriginalName());\n if ($extension == \"xlsx\" || $extension == \"xls\" || $extension == \"csv\") {\n $path = $request->file->getRealPath();\n $data = Excel::load($path, function ($reader) {\n })->get();\n if (!empty($data) && $data->count()) {\n $new_entries = 0;\n foreach ($data as $key) {\n $password = Hash::make('123456');\n $insert_users[] = [\n 'first_name' => $key->pe_fornamn,\n 'last_name' => $key->pe_efternamn,\n 'telephone' => $key->pe_mobiltelefon_for_sms,\n 'email' => $key->pe_e_post,\n 'user_types_id' => 3,\n 'password' => $password,\n ];\n if ($key->pe_kommun == null) {\n $new_city = City::create(\n [\n 'city_name' => 'Ange kommun',\n ]);\n } else {\n $find_city = City::where('city_name', $key->pe_kommun);\n if ($find_city->count() == 0) {\n $new_city = City::create(\n [\n 'city_name' => $key->pe_kommun,\n ]);\n } else\n $new_city = $find_city->first();\n }\n\n if ($key->pe_skola == null) {\n $new_school = School::create(\n [\n 'school_name' => 'Ange skola',\n 'cities_id' => $new_city->id,\n ]);\n } else {\n $find_school = School::where('school_name', $key->pe_skola);\n if ($find_school->count() == 0) {\n $new_school = School::create(\n [\n 'school_name' => $key->pe_skola,\n 'cities_id' => $new_city->id,\n ]);\n } else {\n $new_school = $find_school->first();\n }\n }\n\n $new_user = User::where('email', $key->pe_e_post)->first();\n if (User::where('email', $key->pe_e_post)->count() == 0) {\n $user = User::create(\n [\n 'first_name' => $key->pe_fornamn,\n 'last_name' => $key->pe_efternamn,\n 'telephone' => $key->pe_mobiltelefon_for_sms,\n 'email' => $key->pe_e_post,\n 'user_types_id' => 3,\n 'password' => $password,\n 'schools_id' => $new_school->id,\n 'cities_id' => $new_city->id,\n ]);\n Student::create(\n [\n 'users_id' => $user->id,\n ]\n );\n $new_entries = $new_entries + 1;\n } else {\n $student = Student::where('users_id', $new_user->id);\n// return $student->count();\n if ($student->count() != 0) {\n// return $student;\n if ($student->first()->teaching_grade == null)\n if ($new_user->last_login == null) {\n// return Student::where('users_id', $new_user->id)->first();\n// Student::where('users_id', $new_user->id)->delete();\n $new_user->first_name = $key->pe_fornamn;\n $new_user->last_name = $key->pe_efternamn;\n $new_user->telephone = $key->pe_mobiltelefon_for_sms;\n $new_user->email = $key->pe_e_post;\n// $new_user->password = $pass;\n// $new_user->user_types_id = $request->user_type_id;\n $new_user->schools_id = $new_school->id;\n $new_user->cities_id = $new_city->id;\n $new_user->save();\n $new_entries = $new_entries + 1;\n// return 'User existed and deleted';\n }\n }\n\n }\n// return $new_entries;\n }\n if ($new_entries != 0) {\n return redirect('/users')->with('success', 'Your Data was successfully imported!');\n// Session::flash('success', 'Your Data has successfully imported');\n } else {\n return redirect('/users')->with('warning', 'No Data was inserted');\n// Session::flash('error', 'No Data was inserted');\n// return back();\n }\n// }\n }\n\n return back();\n\n } else {\n// Session::flash('error', 'File is a ' . $extension . ' file.!! Please upload a valid xls/csv file..!!');\n return redirect()->back()->with('error', 'File is a ' . $extension . ' file.!! Please upload a valid xls/csv file..!!');\n }\n }\n }", "title": "" }, { "docid": "50473f231aa686452940f1e7f169a686", "score": "0.603528", "text": "private function exportUsers()\n {\n $filePath = tempnam(sys_get_temp_dir(), '');\n $file = fopen($filePath, 'w');\n\n $db = wfGetDB( DB_MASTER );\n $users = $db->select('user', array('user_name', 'user_email'));\n \n fputcsv($file, array('login', 'email'));\n\n while ( $user = $db->fetchObject( $users ) ) {\n fputcsv($file, array($user->user_name, $user->user_email));\n }\n\n fclose($file);\n\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Cache-Control: public\");\n header(\"Content-Description: File Transfer\");\n header(\"Content-type: text/csv\");\n header(\"Content-Transfer-Encoding: binary\"); \n header(\"Content-Disposition: attachment; filename=\\\"mediawiki_users.csv\\\"\");\n header(\"Content-Length: \" . filesize($filePath)); \n header(\"Accept-Ranges: bytes\"); \n\n readfile($filePath);\n unlink($filePath);\n die;\n }", "title": "" }, { "docid": "cb6a99973a9b0cb692d7fbf60fe4215c", "score": "0.5984526", "text": "function userList() {\n\t$userFile = trim(file_get_contents('username.txt'));\n\t$_SESSION['usernameArray'] = explode(\"\\n\", $userFile);\n}", "title": "" }, { "docid": "492c15d8187cc6085f33c87afa953205", "score": "0.5979408", "text": "public function loadFile() {\n $first = true;\n fseek($this->fp, $this->options['fileDataStartPos']);\n while ($data = fgetcsv($this->fp)) {\n $this->csv[] = new Record($this, $data);\n }\n fclose($this->fp);\n $this->loaded = true;\n }", "title": "" }, { "docid": "d31227554521ca68bb4b2e74533eb444", "score": "0.5962504", "text": "function getUsersFromCSV($handle, $delimiter)\n{\n while ($user = fgetcsv($handle, 0, $delimiter))\n {\n // If column count is not 2, then wrong file or wrong delimiter used\n if (count($user) != PEOPLE_COLUMN_COUNT)\n {\n outError();\n exit(-1);\n }\n if ($user[0] == null)\n continue;\n yield $user;\n }\n}", "title": "" }, { "docid": "c363ade52606dee312f91ce58e90077e", "score": "0.5944297", "text": "function getUsers($databaseFileName = './users.db') {\r\n \r\n $lines = file($databaseFileName);\r\n\r\n $users = [];\r\n \r\n foreach ($lines as $line) {\r\n if (!$line) {\r\n continue;\r\n }\r\n \r\n $fields = explode(\"\\t\", $line);\r\n\r\n $name = str_replace(array(' ', \"\\n\", \"\\t\", \"\\r\"), '', $fields[0]);\r\n $email = str_replace(array(' ', \"\\n\", \"\\t\", \"\\r\"), '', $fields[1]);\r\n $password = str_replace(array(' ', \"\\n\", \"\\t\", \"\\r\"), '', $fields[2]);\r\n \r\n $users[$email] = [\r\n \"name\" => $name,\r\n \"password\" => $password\r\n ];\r\n }\r\n\r\n return $users;\r\n }", "title": "" }, { "docid": "d2c6609785a59e3adc96303741dd345f", "score": "0.59166634", "text": "public function run()\n {\n if (User::all()->count() > 0) {\n return;\n }\n\n $file = storage_path('data/users.csv');\n $userArr = $this->convert($file);\n\n for ($i = 0; $i < count($userArr); $i ++) {\n User::firstOrCreate($userArr[$i]);\n }\n }", "title": "" }, { "docid": "3aba2fa497b310207fcf5f1a96cb26a5", "score": "0.59162575", "text": "function getData() {\n $file = file('resultats_users.csv') or die(\"Unable to open file!\");\n $rows = array_map(function($row) {\n return str_getcsv($row, ';');\n }, $file);\n $header = array_shift($rows);\n $result = array();\n foreach ($rows as $row) {\n $result[] = array_combine($header, $row);\n }\n //var_dump($result); \n return $result;\n }", "title": "" }, { "docid": "8ce1b0ba8b46b0af70fd8d2b8ffdf40a", "score": "0.59014744", "text": "function LoadUsers()\n\t{\n\t\t$users = $this->LoadAll(\"\n\t\t\tSELECT *\n\t\t\tFROM \".$this->GetConfigValue('table_prefix').\"users\n\t\t\tORDER BY name\"\n\t\t\t);\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "bd92c4b0a90597629ea2a10fba1d8b24", "score": "0.58905274", "text": "protected function importUsers()\n {\n $this->dataService->preloadUsers();\n $this->dataService->preloadWorkCategories();\n\n $updateFunction = function ($userData) {\n $username = $userData->username;\n\n // Convert all times to current timezone\n $gmt = new DateTimeZone('GMT');\n $current_tz = new DateTimeZone(self::DEFAULT_TIMEZONE);\n $userData->{'created_at'} = (new DateTime($userData->{'created_at'}, $gmt))->setTimezone($current_tz);\n\n $userUpdater = app(UserUpdater::class, [\n [\n 'username' => $username,\n 'clocking_id' => $userData->id,\n 'created_at' => $userData->{'created_at'},\n 'updated_at' => Carbon::now(),\n ],\n ]);\n $success = $userUpdater->update();\n\n if (!$success) {\n $this->printWarning(\n \"Failed to find user \\\"$username\\\" in LDAP; creating or updating with default values.\"\n );\n $success = $userUpdater->createWithDefaults();\n if (!$success) {\n throw new SkipRowImportException(\n 'User',\n \"Unable to add the user \\\"{$username}\\\". An error occurred.\"\n );\n }\n }\n };\n\n $this->runImportOrUpdate('users', 'username', $updateFunction);\n }", "title": "" }, { "docid": "b871cfa619620b73bb63223610b05685", "score": "0.5861361", "text": "private static function getUsers() {\n return json_decode(file_get_contents(Url::to('@app/db_files/ban_user.json')), true);\n }", "title": "" }, { "docid": "26030377d7450f816c5cf1132e9a7979", "score": "0.5860337", "text": "protected function load()\n\t{\n\t\tif (($handle = fopen($this->origin, \"r\")) !== FALSE)\n\t\t{\n\t\t\t$first = true;\n\t\t\twhile (($data = fgetcsv($handle)) !== FALSE)\n\t\t\t{\n\t\t\t\tif ($first)\n\t\t\t\t{\n\t\t\t\t\t// populate field names from first row\n\t\t\t\t\t$this->fields = $data;\n\t\t\t\t\t$first = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// build object from a row\n\t\t\t\t\t$record = new \\stdClass();\n\t\t\t\t\tfor ($i = 0; $i < count($this->fields); $i ++ )\n\t\t\t\t\t\t$record->{$this->fields[$i]} = $data[$i];\n\t\t\t\t\t$key = $record->{$this->keyField};\n\t\t\t\t\t$this->data[$key] = $record;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tfclose($handle);\n\t\t}\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t}", "title": "" }, { "docid": "99eccb5957b51135f0cd0056f6474938", "score": "0.58491087", "text": "public function _load()\n {\n if( $this->manual_load ) {\n return true;\n }\n\n $query = new Query(\n \"SELECT *\n FROM `#table`\n WHERE `team_id` = '#team_id'\n ORDER BY `name` ASC\n \",\n [\n 'table' => User::TABLE,\n 'team_id' => $this->getTeamId()\n ]\n );\n $res = $query->run();\n \n while($row = Query::fetch($res)) {\n $this->add( new User( $row ));\n }\n }", "title": "" }, { "docid": "04394c3924b1bf8bc4f10425b2f2e291", "score": "0.5836458", "text": "public function ImportUsers()\n\t{\n\t\t$start = $this->_importSession['ImportUsers']['done'];\n\n\t\t// On our first iteration, store the number of records in this table we'll be importing\n\t\tif($this->_importSession['ImportUsers']['done'] == 0) {\n\t\t\t$query = \"SELECT COUNT(login) FROM xcart_customers WHERE usertype='A'\";\n\t\t\t$result = $GLOBALS['XCART_DB']->Query($query);\n\t\t\t$this->_importSession['ImportUsers']['count'] = $GLOBALS['XCART_DB']->FetchOne($query);\n\t\t\t$this->_importSession['ImportUsers']['done'] = 0;\n\t\t}\n\n\t\t$query = \"SELECT * FROM xcart_customers WHERE usertype='A' ORDER BY login ASC\";\n\t\t$query .= $GLOBALS['XCART_DB']->AddLimit($start, ISC_IMPORT_USERS_PER_PAGE);\n\t\t$result = $GLOBALS['XCART_DB']->Query($query);\n\t\twhile($user = $GLOBALS['XCART_DB']->Fetch($result)) {\n\t\t\t$importUser = array(\n\t\t\t\t\"username\" => $user['login'],\n\t\t\t\t\"userpass\" => md5($this->GetXCartPassword($user['password'])),\n\t\t\t\t\"userfirstname\" => $user['b_firstname'],\n\t\t\t\t\"userlastname\" => $user['b_lastname'],\n\t\t\t\t\"useremail\" => $user['email']\n\t\t\t);\n\t\t\t$err = '';\n\t\t\t$this->UpdateProgress(GetLang('StatusImportingUser'), $this->_importSession['ImportUsers']['done'], $this->_importSession['ImportUsers']['count']);\n\t\t\t$this->InsertUser($user['login'], $importUser, $err);\n\t\t\t++$this->_importSession['ImportUsers']['done'];\n\t\t}\n\t}", "title": "" }, { "docid": "1757ad3d6a3d2e636817389a27768f68", "score": "0.58115035", "text": "function load_csvs($csv_to_scrape) {\n $csv_arr = array();\n $openFile = fopen($csv_to_scrape, 'r');\n if($openFile){\n while (($line = fgetcsv($openFile)) !== FALSE) {\n if ($line[0] == \"\"){}\n elseif ($line[0] == \"playerID\") {}\n else {\n $csv_arr[] = $line;\n }\n }\n\n fclose($openFile);\n } else {\n error_log(\"Unable to open file!\", 0);\n }\n return $csv_arr;\n }", "title": "" }, { "docid": "0c045d1d3e2d35e295394df1298637dc", "score": "0.5808669", "text": "public function run()\n {\n $file = fopen(database_path('csv/members.csv'),\"r\");\n $data = array();\n while (($row = fgetcsv($file, 0, \",\")) !== FALSE) {\n $data[] = $row;\n }\n foreach ($data as $d) {\n $s = new Member();\n $s->id = $d[0];\n $s->user_id = $d[1];\n $s->name = $d[2];\n $s->alamat = $d[3];\n $s->save();\n } \n }", "title": "" }, { "docid": "f1461e1f93bdfa2552dce7861858715e", "score": "0.57909954", "text": "private function loadUser($userID)\n\t{\n\t\t$file = new SplFileObject($this->database->getBlocksBytesFile());\n\t\t$ratingFilehandler = fopen($this->database->getRatingFile(), \"r\");\n\n\t\t$file->seek($userID);\n\t\t$userData = split(\" \", $file->current());\n\t\treturn $this->getUser($userData, $ratingFilehandler);\n\t}", "title": "" }, { "docid": "5d345b8e2e9bdb57ae795fadd98798d5", "score": "0.5782189", "text": "private function loadAdmin() {\n\t\t\n\t\t$this->usersFile = new \\common\\model\\PHPFileStorage(\"data/users.php\");\n\t\ttry {\n\t\t\t//Read admin from file\n\t\t\t$adminUserString = $this->usersFile->readItem(\"Admin\");\n\t\t\t$admin = UserCredentials::fromString($adminUserString);\n\n\t\t} catch (\\Exception $e) {\n\t\t\t\\Debug::log(\"Could not read file, creating new one\", true, $e);\n\n\t\t\t//Create a new user\n\t\t\t$userName = new UserName(\"Admin\");\n\t\t\t$password = Password::fromCleartext(\"Password\");\n\t\t\t$admin = UserCredentials::create( $userName, $password);\n\t\t\t$this->update($admin);\n\t\t}\n\n\t\t$this->users[$admin->getUserName()->__toString()] = $admin;\n\t}", "title": "" }, { "docid": "56908875f0c0316b881321fa926a7b17", "score": "0.5763388", "text": "function _loadUsers()\n\t{\n\n\t\t$this->_users = TableUser::getUsers();\n\t}", "title": "" }, { "docid": "0a3612714623a8bb8fd9ca9dc168773f", "score": "0.57520324", "text": "public function load_user_list() {\n $user_list = $this->db_wrapper->select_data($this->table_name, array(\n 'user_id',\n 'username',\n 'display_name',\n 'email',\n 'bio',\n 'date_registered',\n 'is_logged_in',\n 'last_login_from',\n 'display_picture',\n 'password',\n 'active',\n '(SELECT COUNT(site_id) FROM fancentr__sites WHERE user_added = user_id) AS num_sites'\n ));\n if($user_list) {\n return $user_list;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "275719e5b7cf6992bac72977a3ef76dc", "score": "0.5746987", "text": "public function importCSV()\n\t{\n\n\t\t$csv = $_FILES['csv_file']['tmp_name'];\n\t\t$handle = fopen($csv,\"r\");\n\t\t$row = fgetcsv($handle, 10000, \",\");\n\t\t$data = array();\n\t\t$iterator = 0;\n\t\twhile (($row = fgetcsv($handle, 10000, \",\")) != FALSE) //get row vales\n\t\t{\n\t\t\t$employee = array(\n\t\t\t\t'ID' => $row[0],\n\t\t\t\t'NAME' => $row[1],\n\t\t\t\t'GENDER' => strtoupper($row[2]),\n\t\t\t\t'PLACE_OF_BIRTH' => $row[3],\n\t\t\t\t'DATE_OF_BIRTH' => $row[4],\n\t\t\t\t'RELIGION' => $row[5],\n\t\t\t\t'ADDRESS' => $row[6],\n\t\t\t\t'PHONE' => $row[7],\n\t\t\t\t'EMAIL' => $row[8],\n\t\t\t\t'NOTES' => $row[9],\n\t\t\t);\n\t\t\t$iterator ++;\n\t\t\t$explodedDate = explode('/', $employee['DATE_OF_BIRTH']);\n\t\t\t$day = $explodedDate[0];\n\t\t\tif (isset($explodedDate[1])) {\n\t\t\t\t$month = $explodedDate[1];\n\t\t\t}\n\t\t\tif (isset($explodedDate[2])) {\n\t\t\t\t$year = $explodedDate[2];\n\t\t\t}\n\t\t\tif (checkdate($month, $day, $year)) {\n\t\t\t\tif (strtoupper($employee['GENDER']) == 'MALE' || strtoupper($employee['GENDER']) == 'FEMALE'){\n\t\t\t\t\t$origDate = $year.'-'.$month.'-'.$day ;\n\t\t\t\t\t$employee['DATE_OF_BIRTH'] = $origDate;\n\t\t\t\t\tif (is_numeric($employee['PHONE'])) {\n\t\t\t\t\t\tif (filter_var($employee['EMAIL'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t\t\tarray_push($data, $employee);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$this->session->set_flashdata('error', 'Invalid email format. At record '.$iterator);\n\t\t\t\t\t\t\tredirect('/','refresh');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->session->set_flashdata('error', 'Wrong Phone value. Phone should only contain number. At record '.$iterator);\n\t\t\t\t\t\tredirect('/','refresh');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$this->session->set_flashdata('error', 'Wrong Gender value. Gender should be either MALE or FEMALE. At record '.$iterator);\n\t\t\t\t\tredirect('/','refresh');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata('error', 'Wrong date format or wrong date. Date format should be dd/mm/yyyy. At record '.$iterator);\n\t\t\t\tredirect('/','refresh');\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\t$this->load->model('Employee');\n\t\t$result = $this->Employee->clearAll();\n\t\tif ($result) {\n\n\t\t\t$result = $this->Employee->insert_batch($data);\n\t\t\tif ($result) {\n\t\t\t\t$this->session->set_flashdata('success', 'Successfully upload csv and insert '.$iterator .' employee data');\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata('error', 'There is an error when uploading csv or insert employee data');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->session->set_flashdata('error', 'There is an error when deleting all employee data');\n\n\t\t}\n\t\tredirect('/','refresh');\n\t\t\n\t\treturn;\n\t\t\n\t}", "title": "" }, { "docid": "b6dde2d607c4e2f2426e83a5a8e6496f", "score": "0.57158184", "text": "public function __construct($file)\n {\n //$this->_members = include($file);\n $handle = fopen($file, 'r');\n while ($record = fgetcsv($handle, 256))\n $this->_members[] = $record;\n fclose($handle);\n }", "title": "" }, { "docid": "642284721c9113cb61fd09d2eb6ea8ff", "score": "0.57105833", "text": "function load_user(&$username, $all_columns = false)\n{\n global $db;\n \n $cols = $all_columns ? \"*\" : \"user_id, username, user_password, user_passchg, user_email, user_type\";\n\n $sql = \"SELECT $cols \" . \n\t\t\" FROM \" . USERS_TABLE . \n\t\t\" WHERE username = '\" . $db->sql_escape($username) . \"'\";\n\t$result = $db->sql_query($sql);\n\t$row = $db->sql_fetchrow($result);\n\t$db->sql_freeresult($result);\n\n\treturn $row;\n}", "title": "" }, { "docid": "1022ec4fcbb3859b03539efe48b872be", "score": "0.5686831", "text": "function loadUsers($userIds){\r\n\t\tif(empty($userIds))\r\n\t\t\treturn;\r\n\t\t\r\n\t\t$ids = implode(\",\", $userIds);\r\n\t\t$db\t\t=& JFactory::getDBO();\r\n\t\t$query = \"SELECT \"\r\n\t\t\t\t. \"\ta.`userid` as _userid , \"\r\n\t\t\t\t. \"\ta.`status` as _status , \"\r\n\t\t\t\t. \"\ta.`points`\tas _points, \"\r\n\t\t\t\t. \"\ta.`posted_on` as _posted_on, \" \t\r\n\t\t\t\t. \"\ta.`avatar`\tas _avatar , \"\r\n\t\t\t\t. \"\ta.`thumb`\tas _thumb , \"\r\n\t\t\t\t. \"\ta.`invite`\tas _invite, \"\r\n\t\t\t\t. \"\ta.`params`\tas _cparams, \"\r\n\t\t\t\t. \"\ta.`view`\tas _view, \"\r\n\t\t\t\t. \" a.`friendcount` as _friendcount, \"\r\n\t\t\t\t. \"s.`userid` as _isonline, u.* \"\r\n\t\t\t\t. \" FROM #__community_users as a \"\r\n\t\t\t\t. \" LEFT JOIN #__users u \"\r\n\t \t\t\t. \" ON u.`id`=a.`userid` \"\r\n\t\t\t\t. \" LEFT OUTER JOIN #__session s \"\r\n\t \t\t\t. \" ON s.`userid`=a.`userid` \"\r\n\t\t\t\t. \"WHERE a.`userid` IN ($ids)\";\r\n\t\t\t\t\r\n\t\t$db->setQuery($query);\r\n\t\t$objs = $db->loadObjectList();\r\n\t\t\r\n\t\tforeach($objs as $obj){\r\n\t\t\r\n\t\t\t$user \t\t\t= new CUser($obj->_userid);\r\n\t\t\t$isNewUser\t\t= $user->init($obj);\r\n\t\t\t$user->getThumbAvatar();\r\n\t\t\t\r\n\t\t\t// technically, we should not fetch any new user here\r\n\t\t\tif( $isNewUser )\r\n\t\t\t{\r\n\t\t\t\t// New user added to jomSocial database\r\n\t\t\t\t// trigger event onProfileInit\r\n\t\t\t\t$appsLib\t= CAppPlugins::getInstance();\r\n\t\t\t\t$appsLib->loadApplications();\r\n\t\t\t\t\r\n\t\t\t\t$args \t= array();\r\n\t\t\t\t$args[] = $user;\r\n\t\t\t\t$appsLib->triggerEvent( 'onProfileCreate' , $args );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tCFactory::getUser($obj->_userid, $user);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "736290b9072baea16f80942b890199d0", "score": "0.5686237", "text": "public function csv_reader($file_path) {\n // $file_path = path/to/your/csv/file.csv -> example\n $csv = Reader::createFromPath($file_path, 'r');\n $csv->setHeaderOffset(0); //set the CSV header offset\n\n//get 25 records starting from the 11th row\n $stmt = (new Statement())\n ->offset(10)\n ->limit(25)\n ;\n\n $records = $stmt->process($csv);\n foreach ($records as $record) {\n //do something here\n }\n }", "title": "" }, { "docid": "5759b66b6472a973fca0c79904d9d724", "score": "0.5664842", "text": "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n field::TABLE => elispm::file('tests/fixtures/course_custom_fields.csv'),\n field_contextlevel::TABLE => elispm::file('tests/fixtures/course_custom_fields_contextlevels.csv'),\n field_owner::TABLE => elispm::file('tests/fixtures/course_custom_fields_owner.csv'),\n ));\n $this->loadDataSet($dataset);\n }", "title": "" }, { "docid": "4fc35afb4a54ad79a04f07f2f3c39e3e", "score": "0.5653673", "text": "public function admin_csv() {\n\t\t$users = $this->User->find('all');\n\t\t$this->set('users', $users);\n\t\t$this->layout = false;\n\t}", "title": "" }, { "docid": "8b9cfa90ef29c975708c1e049cdc304a", "score": "0.5636409", "text": "protected function load_csv_data() {\n $dataset = $this->createCsvDataSet(array(\n track::TABLE => elispm::file('tests/fixtures/track.csv'),\n trackassignment::TABLE => elispm::file('tests/fixtures/trackassignment_trackassignment_listing.csv'),\n student::TABLE => elispm::file('tests/fixtures/student_trackassignment_listing.csv'),\n usertrack::TABLE => elispm::file('tests/fixtures/usertrack_trackassignment_listing.csv'),\n user::TABLE => elispm::file('tests/fixtures/user_trackassignment_listing.csv'),\n pmclass::TABLE => elispm::file('tests/fixtures/pmclass.csv'),\n curriculumcourse::TABLE => elispm::file('tests/fixtures/curriculum_course_trackassignment_listing.csv'),\n ));\n $this->loadDataSet($dataset);\n }", "title": "" }, { "docid": "43814debcf01a5ddd37adca725388eb6", "score": "0.56160456", "text": "public function insertContactFromCSV() {\n try {\n /* Check if for the empty or null parameters */\n if (isset($_FILES[\"file\"])) {\n $tmpName = $_FILES['file']['tmp_name'];\n move_uploaded_file($_FILES['file']['tmp_name'], 'contact.csv');\n $file_content = file('contact.csv', FILE_SKIP_EMPTY_LINES);\n $totalLine = count($file_content);\n $_SESSION['csv_file_name'] = 'contact.csv';\n // Select all users\n $query = \"\n select tc.id\n from tb_contact tc\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query without paramters\n $statement->execute();\n // Get rows count\n $totalContact = $statement->rowCount();\n $data[] = array('nLines' => $totalLine, 'nContacts' => $totalContact);\n } else {\n // Check for missing parameters\n $data[] = array('result' => 'Missing file parameter!');\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message\" . $e->getMessage());\n }\n }", "title": "" }, { "docid": "367acae66ebecefd57ee892a9b163b06", "score": "0.5593554", "text": "protected function importData($values, &$users)\n {\n global $wpdb, $srm_pagamentos_tbl_name;\n\n $values = array_map(function($item) {\n return is_string($item) ? trim($item) : $item;\n }, $values);\n\n if (empty($values[1])) {\n throw new \\InvalidArgumentException('Vencimento não informado');\n }\n\n if (empty($values[2])) {\n throw new \\InvalidArgumentException('Valor não informado.');\n }\n\n if (empty($values[4])) {\n throw new \\InvalidArgumentException('Arquivo não informado.');\n }\n\n $filePath = $this->folderFiles . $values[4];\n if (!file_exists($filePath)) {\n throw new \\InvalidArgumentException('Arquivo não existe: ' . $values[4]);\n }\n\n if (!isset($users[$values[0]])) {\n $usuarios = $wpdb->get_results(\n 'SELECT * FROM ' . $wpdb->prefix . 'users WHERE ' .\n 'user_email = \"' . $values[0] . '\"'\n );\n\n if ($wpdb->num_rows == 0) {\n throw new \\InvalidArgumentException(\n sprintf(\n 'Nenhum usuário encontrado com o e-mail: %s.',\n $values[0]\n )\n );\n }\n\n $usuario = array_shift($usuarios);\n $users[$values[0]] = $usuario->ID;\n } else {\n $usuario = new stdClass();\n $usuario->ID = $users[$values[0]];\n }\n\n $entidades = $wpdb->get_results(\n 'SELECT * FROM ' . $srm_pagamentos_tbl_name\n . ' WHERE email = \"' . $values[0] . '\"'\n . ' AND vencimento = \"' . $values[1]->format('Y-m-d') . '\"'\n// . ' AND valor = ' . $values[2]\n );\n\n $atualiza = false;\n $entidade = null;\n if ($wpdb->num_rows > 0) {\n $entidade = array_shift($entidades);\n if ($entidade->valor == $values[2]) {\n throw new \\InvalidArgumentException(\n sprintf(\n 'Arquivo %s já existe no sistema.',\n $values[4]\n )\n );\n }\n\n $dados = [\n 'valor' => $values[2],\n ];\n $atualiza = true;\n } else {\n $dados = [\n 'user_id' => $usuario->ID,\n 'email' => $values[0],\n 'vencimento' => $values[1]->format('Y-m-d'),\n 'valor' => $values[2],\n ];\n }\n\n if (!empty($values[3])) {\n if ($values[3] instanceof \\DateTime) {\n $dados['pagamento'] = $values[3]->format('Y-m-d');\n $dados['pago'] = 1;\n }\n }\n\n $fileTmp = explode('/', $values[4]);\n $filename = time() . '_' . sha1($values[4]) . '_' . sanitize_title(array_pop($fileTmp));\n if(!copy($filePath, SRM_PAGAMENTO_UPLOAD_DIR . 'pagamentos/' . $filename)) {\n throw new \\InvalidArgumentException(\n sprintf(\n 'Erro ao importar arquivo de \"%s\" para \"%s\".',\n $filePath,\n SRM_PAGAMENTO_UPLOAD_DIR . 'pagamentos/' . $filename\n )\n );\n }\n\n $dados['arquivo'] = $filename;\n\n if ($atualiza && $entidade) {\n $wpdb->update($srm_pagamentos_tbl_name, $dados, ['id' => $entidade->id]);\n\n return -1;\n } else {\n $wpdb->insert($srm_pagamentos_tbl_name, $dados);\n\n return $wpdb->insert_id;\n }\n }", "title": "" }, { "docid": "c32d84717f745dbcf929b283881c8dc0", "score": "0.5590345", "text": "public function importFromCsv($file,$configKey);", "title": "" }, { "docid": "1fa86121074782986f09165eeb30c16b", "score": "0.5579659", "text": "public function loadCSVFile($path)\n {\n if($this->truncate == true)\n {\n $this->db->query(\"DELETE FROM `{$this->table_name}`\");\n }\n \n $handle = fopen($path,'r');\n \n $imported = 0;\n $i = 0;\n while($data = fgetcsv($handle,0,$this->seperator,$this->quote))\n {\n $i++;\n if($i == 1 && $this->header_row == true)\n {\n continue;\n }\n \n $CREATE = $this->map_fields($data);\n $CREATE = $this->handle_formatters($CREATE);\n eval('$tmp = new '.get_class($this).'($this->db);');\n\n if($this->debug == true)\n {\n $tmp->debug = true;\n }\n\n $tmp->create($CREATE);\n $imported++;\n } // end line loop\n\n return $imported;\n }", "title": "" }, { "docid": "b4119506e6ff8c4353f12cf666f87400", "score": "0.5566937", "text": "private function read(){\n\t\tConfiguration::trace(\"UserManager : reading \" . $this->db_file ) ;\n\t\t$this->data = simplexml_load_file($this->db_file) ;\t\n\t}", "title": "" }, { "docid": "4fbe5444cc3aa8ac43d92efe54165e0e", "score": "0.55536747", "text": "function readCSV($csvFile) {\n $urlsfile = fopen($csvFile, \"r\");\n if (! $urlsfile)\n header('Location: error.php');\n while (!feof($urlsfile) && !empty($urlsfile)) {\n $rows[] = fgetcsv($urlsfile);\n }\n fclose($urlsfile);\n return $rows;\n }", "title": "" }, { "docid": "8a9e3cc1c65e86284cd1c83c8412b228", "score": "0.5552469", "text": "public function loadAllUsers()\n {\n /** vous pouvez écrire les requêtes pour les différents managers de DB, ou bien vous focaliser sur celui de votre choix */\n if (DB_MANAGER == PDO) // version PDO\n {\n $req = $this->getDatabase()->prepare(\"SELECT * FROM users \");\n $req->execute();\n $users = $req->fetchAll(PDO::FETCH_ASSOC);\n $req->closeCursor();\n }\n else if (DB_MANAGER == MEDOO) // version MEDOO\n {\n $users = $this->getDatabase()->select(\"users\", \"*\") ;\n }\n\n // on a récupéré tous les utilisateurs, on les ajoute au manager de users\n foreach ($users as $user) {\n $new_user = new User(\n $user['id'],\n $user['username'],\n $user['password']\n );\n $this->addUser($new_user);\n }\n }", "title": "" }, { "docid": "ddeba6628c1a246c6cec533f3ca75819", "score": "0.5544741", "text": "public static function GetAll()\n {\n $retornoArray = array();\n $path = \"./archivos/users.json\";\n\n if(file_exists($path)) { //si existe\n $ar = fopen($path, \"r\"); //abro archivo\n if($ar != false) {\n while(!feof($ar)) {\n $linea = trim(fgets($ar)); //obtiene la linea sin espacios\n if($linea != \"\") //si llegamos a la linea vacia\n { \n $auxJWT = json_decode($linea); //convierte la linea en un jwt para que lo lea y sea guardable en ufolo\n $obj = new Usuario($auxJWT->email, $auxJWT->clave, $auxJWT->foto);\n array_push($retornoArray, $obj); //agrega el objeto leido al array \n }\n }\n fclose($ar); //cierro el archivo\n }\n }\n return $retornoArray;\n }", "title": "" }, { "docid": "6dd02e35acedd0c4ced1ce07122b611d", "score": "0.5519041", "text": "public function __construct($firstname, $lastname, $contact, $email, $csv_filepath, $img_filepath, $user_id)\n {\n $this->firstname = $firstname;\n $this->lastname = $lastname;\n $this->contact = $contact;\n $this->email = $email;\n $this->csv_filepath = $csv_filepath;\n $this->img_filepath = $img_filepath;\n $this->user_id = $user_id;\n $this->delimiter = ',';\n $csv_file = Storage::disk('local_csvfiles')->get($this->csv_filepath);\n $lines = \\explode(\"\\n\", $csv_file);\n $line = $lines[0];\n if (\\mb_substr_count($line, ';') > \\mb_substr_count($line, ',')) {\n $this->delimiter = ';';\n }\n $validation_data = \\str_getcsv($line, $this->delimiter);\n if (!((\\mb_strpos(\\mb_strtolower($validation_data[0]), 'our') !== false && (\\mb_strpos(\\mb_strtolower($validation_data[0]), 'id') !== false)) || (\\mb_strpos(\\mb_strtolower($validation_data[1]), 'empresa') !== false))) {\n $this->delete();\n throw new \\Exception('VOSTPT_INVALID_CSV');\n }\n }", "title": "" }, { "docid": "f6c413e9009100f12a90f70da3700048", "score": "0.5490561", "text": "function import_csv_data() {\n global $wpdb;\n\n // check if user has rights\n if (!current_user_can('manage_options')) wp_die('Access denied.');\n\n // check if nonce field is present\n check_admin_referer('whp_data');\n\n // check if file has been uploaded\n if (array_key_exists('importcsvdata', $_FILES) && !$_FILES['importcsvdata']['error']) {\n $upDir = wp_upload_dir();\n $upFile = $upDir['basedir'].'/'.$_FILES['importcsvdata']['name'];\n move_uploaded_file($_FILES['importcsvdata']['tmp_name'], $upFile);\n\n $h = fopen($upFile, 'r');\n if ($h) {\n $wpdb->query('truncate table '.$wpdb->prefix.'population');\n $query = $wpdb->prepare('load data local infile \"%s\" into table '.$wpdb->prefix.'population fields terminated by \"\\t\"', $upFile);\n $delete = $wpdb->query($query);\n fclose($h);\n }\n }\n\n // Redirect the page to the admin page\n wp_redirect(add_query_arg('page', 'location-search', admin_url('options-general.php')));\n }", "title": "" }, { "docid": "19bec3f22cf552a7ce219651ad19307a", "score": "0.5485164", "text": "protected function loadUserProfiles()\n {\n\n $db = $this->getDb();\n\n /// TODO add this in an external datasource\n // Load User Rights\n $sql = 'SELECT\n buiz_profile.name,\n buiz_profile.access_key\n FROM\n buiz_profile\n JOIN\n buiz_user_profiles\n ON buiz_profile.rowid = buiz_user_profiles.id_profile\n WHERE\n buiz_user_profiles.id_user = '.$this->userId.'\n ORDER BY\n buiz_profile.name';\n\n $roles = $db->select($sql);\n\n foreach ($roles as $role) {\n $kPey = trim($role['access_key']);\n\n if (trim($role['name']) == '') {\n $this->profiles[$kPey] = SParserString::subToName($role['access_key']);\n } else {\n $this->profiles[$kPey] = $role['name'];\n }\n\n }//end foreach */\n\n // wenn keine gruppen vorhanden sind müssen auch keine gruppenprofile\n // geladen werden\n if (!count($this->groupRoles))\n return;\n\n /// TODO add this in an external datasource\n // Load User Rights\n $sql = 'SELECT\n buiz_profile.name ,\n buiz_profile.access_key\n from\n buiz_profile\n join\n buiz_group_profiles on buiz_profile.rowid = buiz_group_profiles.id_profile\n where\n buiz_group_profiles.id_group IN('.implode(', ',$this->groupRoles).') ';\n\n $roles = $db->select($sql);\n\n foreach ($roles as $role) {\n $kPey = trim($role['access_key']);\n $this->profiles[$kPey] = SParserString::subToCamelCase($role['access_key']);\n }//end foreach */\n\n }", "title": "" }, { "docid": "62040a5339a17effe74c62fccc9e3522", "score": "0.5464464", "text": "public static function import_authentication() {\n\t\t$csv_file = get_option( self::FILE_OPTION );\n\n\t\tif ( ! $csv_file ) {\n\t\t\t// Completed previously\n\t\t\tself::return_progress( array(\n\t\t\t\t'authentication' => array(\n\t\t\t\t'message' => __( 'Skipping credit import without a CSV to process...', 'sprout-invoices' ),\n\t\t\t\t'progress' => 100,\n\t\t\t\t'next_step' => 'complete',\n\t\t\t\t),\n\t\t\t) );\n\t\t\treturn;\n\t\t}\n\n\t\t$credits = self::csv_to_array( $csv_file );\n\t\t$total_records = count( $credits );\n\n\t\t// Suppress notifications\n\t\tadd_filter( 'suppress_notifications', '__return_true' );\n\n\t\tforeach ( $credits as $key => $credit ) {\n\t\t\t$credit_id = self::create_credit( $credit );\n\t\t\tif ( ! $credit_id ) {\n\t\t\t\t$total_records--;\n\t\t\t}\n\t\t}\n\n\t\t// Complete\n\t\tself::return_progress( array(\n\t\t\t'authentication' => array(\n\t\t\t'message' => sprintf( __( 'Successfully imported %s credits...', 'sprout-invoices' ), $total_records ),\n\t\t\t'progress' => 100,\n\t\t\t'next_step' => 'complete',\n\t\t\t),\n\t\t) );\n\n\t}", "title": "" }, { "docid": "637702be67f2380fc1a9d1c4fa32ed80", "score": "0.5447149", "text": "public function insertUsersData( $fileName,$fileTmpName )\n {\n $fileExtension =pathinfo($fileName,PATHINFO_EXTENSION);\n\n $allowedType=array('csv');\n if(!in_array($fileExtension, $allowedType))\n {\n echo 'Invalid file extension'; //change to html success message\n }\n else\n {\n //upload the file\n $handle = fopen($fileTmpName,'r'); \n while (($myData = fgetcsv($handle,1000,',')) !=FALSE) \n { \n //echo $myData[0].'<br>';\n if(strlen($myData[0])==11 && strpos($myData[0],\"0494\") !==FALSE) \n {\n //echo 'Land no found<br>';\n \n $stmt = $this->conn->prepare(\"INSERT INTO users (number,type) VALUES (?,?)\");\n $stmt->bind_param(\"ss\",$number,$type);\n \n $number = $myData[0];\n $type= \"landline\";\n \n $stmt->execute();\n }\n else if(strlen($myData[0])==10)\n { \n //echo \"Mob no found<br>\";\n $stmt = $this->conn->prepare(\"INSERT INTO users (number,type) VALUES (?,?)\");\n $stmt->bind_param(\"ss\",$number,$type);\n\n $number = $myData[0];\n $type = \"mobile\";\n \n $stmt->execute();\n }\n else\n {\n echo \"Invalid Number<br>\";\n }\n \n\n //$result = $stmt->get_result();\n // $row = $result->fetch_assoc();\n //echo $row;\n }\n\n if($stmt->affected_rows===0)\n {\n die(\"error in uploading file\".mysql_connect_error());\n\n }\n else\n {\n echo 'contacts uploaded successfully'; //change to html success message\n }\n\n $stmt->close();\n $this->conn->close();\n \n }\n\n }", "title": "" }, { "docid": "b0e98a8365e5026d79bfbb77f1f7fa2a", "score": "0.542641", "text": "function cargarDatostxt(){\n // Si no existe lo creo\n $tabla=[]; \n if (!is_readable(FILEUSER) ){\n // El directorio donde se crea tiene que tener permisos adecuados\n $fich = @fopen(FILEUSER,\"w\") or die (\"Error al crear el fichero.\");\n fclose($fich);\n }\n $fich = @fopen(FILEUSER, 'r') or die(\"ERROR al abrir fichero de usuarios\"); // abrimos el fichero para lectura\n \n while ($linea = fgets($fich)) {\n $partes = explode('|', trim($linea));\n // Escribimos la correspondiente fila en tabla\n $tabla[]= [ $partes[0],$partes[1],$partes[2],$partes[3]];\n }\n fclose($fich);\n return $tabla;\n}", "title": "" }, { "docid": "4576b868882ddcc6582d8b44566a1423", "score": "0.54011166", "text": "function setUsuarios() {\n $archivo = fopen(\"archivoUsuarios\", \"r\") or exit('No puede abrir archivo!');\n $i = 0;\n while(!feof($archivo)){ \n $this->usuarios[$i] = trim(fgets($archivo));\n $i++;\n }\n fclose($archivo); \n }", "title": "" }, { "docid": "07e1dc2cd4181c267fac8757a62df10c", "score": "0.5398348", "text": "function readUser($id, $cnx)\n{\n\t$sql = \"SELECT iduser, name, email, password, description, photo, coders, city\n\t\t\tFROM users, cities\n\t\t\tWHERE cities.idcity = users.cities_idcity AND\n\t\t\t users.iduser = \" . $id . \";\";\n\t\n\t$arrayUsers = query($sql, $cnx);\n\t$arrayUser = $arrayUsers[0];\n\t\n\t$arrayUser['pets'] = implode(',', readUserPets($arrayUser['iduser'], $cnx));\n\t$arrayUser['languages'] = implode(',', readUserLanguages($arrayUser['iduser'], $cnx));\n\t\n\treturn $arrayUser;\n}", "title": "" }, { "docid": "a9fa5bbd6da8a98ff0e3e5a86c992e12", "score": "0.5394228", "text": "public function importCustomerCsv($path)\n {\n $file = fopen('var/import/'.$path, 'r');\n if ($file !== false)\n {\n $header = fgetcsv($file);\n while ($row = fgetcsv($file, 3000, \",\"))\n {\n $data_count = count($row);\n if ($data_count < 1)\n {\n continue;\n }\n\n $customerArr = [];\n $customerArr = array_combine($header, $row);\n $email = $customerArr['emailaddress'];\n\n $websiteId = $this->websiteId;\n $customerObj = $this\n ->customerFactory\n ->create()\n ->setWebsiteId($websiteId);\n $customer = $customerObj->loadByEmail($customerArr['emailaddress']);\n try\n {\n $customer->setFirstname($customerArr['fname'])\n ->setWebsiteId($websiteId)\n ->setLastname($customerArr['lname'])\n ->setEmail($customerArr['emailaddress']);\n\n $customAttribute = $customer->getDataModel();\n $customer->updateData($customAttribute);\n $customer->save();\n }\n catch(\\Exception $e)\n {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__($e->getMessage()));\n }\n }\n }\n }", "title": "" }, { "docid": "fde8739dcc5659a656146e0a7c26b87c", "score": "0.5390356", "text": "private function load_csv_data($createprogram, $createtrack, $createcourse, $createclass, $createuserset, $createuser) {\n global $CFG;\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/course.class.php'));\n require_once(elispm::lib('data/curriculum.class.php'));\n require_once(elispm::lib('data/pmclass.class.php'));\n require_once(elispm::lib('data/track.class.php'));\n require_once(elispm::lib('data/userset.class.php'));\n\n // Load PM entities from CSV files.\n $csvs = array();\n $csvloc = dirname(__FILE__).'/fixtures';\n if ($createprogram) {\n $csvs[curriculum::TABLE] = $csvloc.'/phpunit_program_success.csv';\n }\n if ($createtrack) {\n $csvs[track::TABLE] = $csvloc.'/phpunit_track_success.csv';\n }\n if ($createcourse) {\n $csvs[course::TABLE] = $csvloc.'/phpunit_course_success.csv';\n }\n if ($createclass) {\n $csvs[pmclass::TABLE] = $csvloc.'/phpunit_class_success.csv';\n }\n if ($createuserset) {\n $csvs[userset::TABLE] = $csvloc.'/phpunit_userset_success.csv';\n }\n\n $dataset = $this->createCsvDataSet($csvs);\n $this->loadDataSet($dataset);\n\n if ($createuser) {\n // Need to use API to create Moodle user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'testuser@email.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n }\n }", "title": "" }, { "docid": "f9b9e8213fd5197fffa574d429ea92c4", "score": "0.53730136", "text": "function _cmd_insertImportedUsers($input, $output)\n {\n $aUsers = $this->_readCsvFile($input->csvFile);\n\n // wrap _insert method to import users\n foreach ($aUsers as $aUser) {\n $user = new StdClass();\n $user->first_name = $aUser['firstname'];\n $user->last_name = $aUser['lastname'];\n $user->email = $aUser['email'];\n $user->role_id = $input->role;\n $user->organisation_id = $input->organisation;\n $user->username = strtolower($user->first_name);\n $user->passwd = 'password';\n\n // assign to input object\n $input->user = $user;\n\n // call parent _insert method\n parent::_cmd_insert($input, $output);\n }\n }", "title": "" }, { "docid": "cd0c6699e3db9f8eadbfff84d7f0afa5", "score": "0.5368225", "text": "private function dumpCSV() {\n\t\t$csv_filename = \"d_\" . date( 'Y_m_d' ) . \".csv\";\n\n\t\t// fetch the user data then prepare the fields\n\t\tif ( file_exists( $csv_filename ) ) {\n\t\t\tforeach ( $this->user_data as $k => $v ) {\n\t\t\t\t$data[] = $v;\n\t\t\t}\n\t\t} else {\n\t\t\tforeach ( $this->user_data as $k => $v ) {\n\t\t\t\t$label[] = $k;\n\t\t\t\t$data[] = $v;\n\t\t\t}\n\n\t\t\t$list[] = $label;\n\t\t}\n\t\t$list[] = $data;\n\n\t\t$fp = fopen( $csv_filename, \"a\" );\n\t\tforeach ( $list as $fields ) {\n\t\t\t// insert data to csv\n\t\t\tfputcsv( $fp, $fields );\n\t\t}\n\n\t\t// close csv file\n\t\tfclose( $fp );\n\t}", "title": "" }, { "docid": "06e153ea90c5294c0f41a4948d62ebde", "score": "0.5361698", "text": "public function loadListOfUsers(): array\n {\n return $this->_getContainer()->getUserAdapter()->getIds();\n }", "title": "" }, { "docid": "86f348e0084c4bcbacdc3e3ed1c374b5", "score": "0.5359083", "text": "public function loadEditableUsers() {\n try {\n // set the PDO error mode to exception\n $this->db_connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $db = $this->db_connection->prepare(\"Select user_id, user_name FROM user_has_chat JOIN user USING (user_id) WHERE chat_id = ?\");\n $db->execute(array($_SESSION['chat_id']));\n\n return($db->fetchAll(PDO::FETCH_ASSOC));\n }\n catch(PDOException $e)\n {\n $this->_log(\"Error: chat_id: \" . $_SESSION['chat_id'] . \" SQL error: \" . $e->getMessage());\n }\n }", "title": "" }, { "docid": "845fb48061226aa56842b6386aaa831d", "score": "0.53315645", "text": "static function loadUserFile($file,$defaultLocation = '.',$globalize=null){\n\t\tif($file){\n\t\t\t$file = self::userFileLocation($file,$defaultLocation);\n\t\t\tFiles::req($file,$globalize);\n\t\t}\n\t}", "title": "" }, { "docid": "bac90c4f67884439507b65f4180cb732", "score": "0.5325582", "text": "public function read_csv_file($user,$course,$assignment){\n $csv_file_path = \"~/srccodes/$user/$course/$assignment/testResults\"; // the csv file path\n $csv_file = \"testResult.csv\";\n $command = \"cd $csv_file_path && cat $csv_file\"; // command to read the file\n return $this->execute_command($command); // execute and return the result\n }", "title": "" }, { "docid": "a857fd6947b7d4424ffff06e63e40ff6", "score": "0.5318109", "text": "public function loadUser($username) {\n\t\t$where = array();\n\t\t$where['username'] = $username;\n\t\t\n\t\t$db = new DB();\n\t\t$db->connect();\n\t\t$result = $db->select(\"users\", $where);\n\t\t$db->disconnect();\n\t\t\n\t\tforeach($result as $row) {\n\t\t\t$user = $this->setUser($row);\n\t\t\treturn $user;\n\t\t}\n\t}", "title": "" }, { "docid": "dcd0b831d70c82222ce587b06e5b8bc3", "score": "0.53143626", "text": "function local_movegroup_cron_process_file($filename, $filedir='') {\n global $CFG, $DB;\n // List the specific user right\n list($STD_FIELDS, $PRF_FIELDS, $settings, $strings) = local_movegroup_cron_values();\n $iid = csv_import_reader::get_new_iid('uploaduser');\n $cir = new csv_import_reader($iid, 'uploaduser');\n\n // If read contents != true (read a file into a string)\n if (!($content = file_get_contents($filedir.'/'.$filename))) {\n return false;\n }\n $returnurl = new moodle_url('/admin/settings.php?section=local_movegroup_settings'); // /admin/tool/uploaduser/index.php\n $bulknurl = new moodle_url('/admin/user/user_bulk.php');\n $today = time();\n $today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);\n // Loading csv file and follow the setting clicsvencoding = utf8 and clicsvdelimiter = comma\n $readcount = $cir->load_csv_content($content, $settings->clicsvencoding, $settings->clicsvdelimiter);\n if ($readcount === false) { // When csv file can not read\n print_error('csvloaderror', '', $returnurl); // An error occurred while loading the CSV file: {$a}\n } else if ($readcount == 0) { // When csv file content is empty\n print_error('csvemptyfile', 'error', $returnurl); // Show the error on page content, get the string 'csvemptyfile' from /public_html/lang/en/error.php and set the website address to $returnurl\n }\n // Validation of csv columns\n $filecolumns = local_movegroup_validate_user_upload_columns($cir, $STD_FIELDS, $PRF_FIELDS, $returnurl);\n // An options of user uploaded \n $optype = $settings->cliuutype;\n $updatetype = isset($settings->cliuuupdatetype) ? $settings->cliuuupdatetype : 0;\n $createpasswords = (!empty($settings->cliuupasswordnew) and $optype != UU_USER_UPDATE);\n $updatepasswords = (!empty($settings->cliuupasswordold) and $optype != UU_USER_ADDNEW and $optype != UU_USER_ADDINC and ($updatetype == UU_UPDATE_FILEOVERRIDE or $updatetype == UU_UPDATE_ALLOVERRIDE));\n $allowrenames = (!empty($settings->cliuuallowrenames) and $optype != UU_USER_ADDNEW and $optype != UU_USER_ADDINC);\n $allowdeletes = (!empty($settings->cliuuallowdeletes) and $optype != UU_USER_ADDNEW and $optype != UU_USER_ADDINC);\n $allowsuspends = (!empty($settings->cliuuallowsuspends));\n $bulk = $settings->cliuubulk;\n $noemailduplicates = $settings->cliuunoemailduplicates;\n //$standardusernames = $settings->cliuustandardusernames;\n //$resetpasswords = isset($settings->cliuuforcepasswordchange) ? $settings->cliuuforcepasswordchange : UU_PWRESET_NONE;\n\n // verification moved to two places: after upload and into form2\n //$usersnew = 0;\n //$usersupdated = 0;\n //$usersuptodate = 0; //not printed yet anywhere\n //$userserrors = 0;\n //$deletes = 0;\n //$deleteerrors = 0;\n //$renames = 0;\n //$renameerrors = 0;\n //$usersskipped = 0;\n //$weakpasswords = 0;\n\n // caches\n $ccache = array(); // Course cache - do not fetch all courses here, we will not probably use them all anyway!\n //$cohorts = array();\n //$rolecache = uu_allowed_roles_cache(); // Roles lookup cache\n $manualcache = array(); // Cache of used manual enrol plugins in each course\n $supportedauths = uu_supported_auths(); // Officially supported plugins that are enabled\n\n // We use only manual enrol plugin here, if it is disabled no enrol is done\n if (enrol_is_enabled('manual')) {\n $manual = enrol_get_plugin('manual');\n } else {\n $manual = NULL;\n }\n\n // Clear bulk selection\n if ($bulk) {\n $SESSION->bulk_users = array();\n }\n\n // Init csv import helper\n $cir->init();\n $linenum = 1; // Column header is first line\n\n // Init upload progress tracker\n $upt = new uu_progress_tracker();\n $upt->start(); // Start table\n\n while ($line = $cir->next()) {\n $upt->flush(); // Output cache area\n $linenum++;\n\n $upt->track('line', $linenum);\n\n $user = new stdClass();\n\n // Add fields to user object\n foreach ($line as $keynum => $value) {\n if (!isset($filecolumns[$keynum])) {\n // This should not happen\n continue;\n }\n $key = $filecolumns[$keynum];\n \n if (strpos($key, 'profile_field_') === 0) {\n // NOTE: bloody mega hack alert!!\n if (isset($USER->$key) and is_array($USER->$key)) {\n // This must be some hacky field that is abusing arrays to store content and format\n $user->$key = array();\n $user->$key['text'] = $value;\n $user->$key['format'] = FORMAT_MOODLE;\n } else {\n $user->$key = $value;\n }\n } else {\n $user->$key = $value;\n }\n\n if (in_array($key, $upt->columns)) {\n // Default value in progress tracking table, can be changed later\n $upt->track($key, s($value), 'normal');\n }\n }\n\n if (!isset($user->username)) {\n // Prevent warnings below\n $user->username = '';\n }\n\n if (uu_progress_tracker) {\n $user->username = clean_param($user->username, PARAM_USERNAME);\n }\n \n // Make sure we really have username\n if (empty($user->username)) {\n $upt->track('status', get_string('missingfield', 'error', 'username'), 'error');\n $upt->track('username', $strings->error, 'error');\n $userserrors++;\n continue;\n } else if ($user->username === 'guest') {\n $upt->track('status', get_string('guestnoeditprofileother', 'error'), 'error');\n $userserrors++;\n continue;\n }\n\n if ($user->username !== clean_param($user->username, PARAM_USERNAME)) {\n $upt->track('status', get_string('invalidusername', 'error', 'username'), 'error');\n $upt->track('username', $strings->error, 'error');\n $userserrors++;\n }\n\n if (empty($user->mnethostid)) {\n $user->mnethostid = $CFG->mnet_localhost_id;\n }\n\n if ($existinguser = $DB->get_record('user', array('username' => $user->username, 'mnethostid' => $user->mnethostid))) {\n $upt->track('id', $existinguser->id, 'normal', false);\n }\n\n // Add default values for remaining fields\n $formdefaults = array();\n foreach ($STD_FIELDS as $field) {\n if (isset($user->$field)) {\n continue;\n }\n // All validation moved to form2\n if (isset($settings->{\"cli$field\"})) {\n // Process templates\n $user->$field = uu_process_template($settings->{\"cli$field\"}, $user);\n $formdefaults[$field] = true;\n if (in_array($field, $upt->columns)) {\n $upt->track($field, s($user->$field), 'normal');\n }\n }\n }\n foreach ($PRF_FIELDS as $field) {\n if (isset($user->$field)) {\n continue;\n }\n if (isset($settings->{\"cli$field\"})) {\n // Process templates\n $user->$field = uu_process_template($settings->{\"cli$field\"}, $user);\n $formdefaults[$field] = true;\n }\n }\n if ($existinguser) {\n $user->id = $existinguser->id;\n\n $upt->track('username', html_writer::link(new moodle_url('/user/profile.php', array('id' => $existinguser->id)), s($existinguser->username)), 'normal', false);\n $upt->track('suspended', $strings->yesnooptions[$existinguser->suspended] , 'normal', false);\n $upt->track('auth', $existinguser->auth, 'normal', false);\n\n if (is_siteadmin($user->id)) {\n $upt->track('status', $strings->usernotupdatedadmin, 'error');\n $userserrors++;\n continue;\n }\n\n $existinguser->timemodified = time();\n // Do NOT mess with timecreated or firstaccess here!\n\n // Load existing profile data\n profile_load_data($existinguser);\n\n $doupdate = false;\n $dologout = false;\n\n if ($updatetype != UU_UPDATE_NOCHANGES and !$remoteuser) {\n if (!empty($user->auth) and $user->auth !== $existinguser->auth) {\n $upt->track('auth', s($existinguser->auth).'-->'.s($user->auth), 'info', false);\n $existinguser->auth = $user->auth;\n if (!isset($supportedauths[$user->auth])) {\n $upt->track('auth', $strings->userauthunsupported, 'warning');\n }\n $doupdate = true;\n if ($existinguser->auth === 'nologin') {\n $dologout = true;\n }\n }\n $allcolumns = array_merge($STD_FIELDS, $PRF_FIELDS);\n foreach ($allcolumns as $column) {\n if ($column === 'username' or $column === 'password' or $column === 'auth' or $column === 'suspended') {\n // These can not be changed here\n continue;\n }\n if (!property_exists($user, $column) or !property_exists($existinguser, $column)) {\n // This should never happen\n debugging(\"Could not find $column on the user objects\", DEBUG_DEVELOPER);\n continue;\n }\n if ($updatetype == UU_UPDATE_MISSING) {\n if (!is_null($existinguser->$column) and $existinguser->$column !== '') {\n continue;\n }\n } else if ($updatetype == UU_UPDATE_ALLOVERRIDE) {\n // We override everything\n\n } else if ($updatetype == UU_UPDATE_FILEOVERRIDE) {\n if (!empty($formdefaults[$column])) {\n // Do not override with form defaults\n continue;\n }\n }\n if ($existinguser->$column !== $user->$column) {\n if ($column === 'email') {\n if ($DB->record_exists('user', array('email' => $user->email))) {\n if ($noemailduplicates) {\n $upt->track('email', $strings->emailduplicate, 'error');\n $upt->track('status', $strings->usernotupdated, 'error');\n $userserrors++;\n continue 2;\n } else {\n $upt->track('email', $strings->emailduplicate, 'warning');\n }\n }\n if (!validate_email($user->email)) {\n $upt->track('email', get_string('invalidemail'), 'warning');\n }\n }\n\n if ($column === 'lang') {\n if (empty($user->lang)) {\n // Do not change to not-set value.\n continue;\n } else if (clean_param($user->lang, PARAM_LANG) === '') {\n $upt->track('status', get_string('cannotfindlang', 'error', $user->lang), 'warning');\n continue;\n }\n }\n\n if (in_array($column, $upt->columns)) {\n $upt->track($column, s($existinguser->$column).'-->'.s($user->$column), 'info', false);\n }\n $existinguser->$column = $user->$column;\n $doupdate = true;\n }\n }\n }\n\n try {\n $auth = get_auth_plugin($existinguser->auth);\n } catch (Exception $e) {\n $upt->track('auth', get_string('userautherror', 'error', s($existinguser->auth)), 'error');\n $upt->track('status', $strings->usernotupdated, 'error');\n $userserrors++;\n continue;\n }\n }\n\n // Find course enrolments, groups, roles/types and enrol periods\n // This is again a special case, we always do this for any updated or created users\n foreach ($filecolumns as $column) {\n \n $shortname = $user->courseshortname;\n\n /* if (!preg_match('/^course\\d+$/', $column)) {\n continue;\n }\n $i = substr($column, 6);\n var_dump($i);\n echo('</br>');\n if (empty($user->{'course'.$i})) {\n continue;\n }\n $shortname = $user->{'course'.$i};*/\n\n if (!array_key_exists($shortname, $ccache)) {\n if (!$course = $DB->get_record('course', array('shortname' => $shortname), 'id, shortname')) {\n $upt->track('enrolments', get_string('unknowncourse', 'error', s($shortname)), 'error');\n continue;\n }\n $ccache[$shortname] = $course;\n $ccache[$shortname]->groups = null;\n }\n $courseid = $ccache[$shortname]->id;\n $coursecontext = context_course::instance($courseid);\n if (!isset($manualcache[$courseid])) {\n $manualcache[$courseid] = false;\n if ($manual) {\n if ($instances = enrol_get_instances($courseid, false)) {\n foreach ($instances as $instance) {\n if ($instance->enrol === 'manual') {\n $manualcache[$courseid] = $instance;\n break;\n }\n }\n }\n }\n }\n\n // Make sure two group fields is not empty\n if (!empty($user->from_group) && !empty($user->to_group)) {\n $upt->track(\"Group fields\", \"from_group & to_group field not empty\");\n $fromgroupname = $user->from_group;\n $togroupname = $user->to_group;\n // Check two field's group of this spicific course is exist or not\n // Return from group id\n $isfromgroupnameexist = groups_get_group_by_name($courseid, $fromgroupname);\n // Return to group id\n $istogroupnameexist = groups_get_group_by_name($courseid, $togroupname);\n $isuserinfromgroupmember = groups_is_member($isfromgroupnameexist, $user->id);\n $isuserintogroupmember = groups_is_member($istogroupnameexist, $user->id);\n if ($isfromgroupnameexist == true && $istogroupnameexist == true) {\n mtrace(\"</br> Enter from_group exist && to_group exist\");\n // If the user is a member of the group\n if ($isuserinfromgroupmember == true) {\n try {\n // Remove user from group\n if (groups_remove_member($isfromgroupnameexist, $user->id)) {\n mtrace(\"</br> remove user from from_group successfully\");\n $upt->track('enrolments', \"remove member from \" . $fromgroupname . \" successfully\");\n } else {\n mtrace(\"</br> remove user from from_group unsuccessfully\");\n $upt->track('enrolments', \"remove member from \" . $fromgroupname . \" unsuccessfully\");\n }\n } catch (moodle_exception $e) {\n mtrace(\"</br> remove user from from_group thrown exceptions\");\n $upt->track('enrolments', \"remove member from \" . $fromgroupname . \" thrown exception\");\n continue;\n }\n } else{\n // If the user isn't a member of the group\n // Do nothing\n }\n \n if ($isuserintogroupmember == true) {\n // Do nothing because the user is already in the new group of this course\n mtrace(\"</br> user is a member of to_group, won't add to it!!!!\");\n } else {\n try {\n if (groups_add_member($istogroupnameexist, $user->id)) {\n mtrace(\"</br> add user to new to_group successfully\");\n $upt->track('enrolments', get_string('addedtogroup', '', s($togroupname)));\n } else {\n mtrace(\"</br> add user to new to_group unsuccessfully\");\n $upt->track('enrolments', get_string('addedtogroupnot', '', s($togroupname)), 'error');\n }\n } catch (moodle_exception $e) {\n mtrace(\"</br> add user to new to_group thrown exception\");\n $upt->track('enrolments', get_string('addedtogroupnot', '', s($togroupname)), 'error');\n continue;\n }\n }\n mtrace(\"</br> Out from_group exist && to_group exist\");\n }\n \n if ($isfromgroupnameexist == true && $istogroupnameexist == false) {\n mtrace(\"</br> Enter from_group exist && to_group not exist\");\n if($isuserinfromgroupmember == true) { // If the user is a member of the group\n try {\n // Remove user from group\n if (groups_remove_member($isfromgroupnameexist, $user->id)) {\n mtrace(\"</br> remove user from from_group successfully\");\n $upt->track('enrolments', \"remove member from \" . $fromgroupname . \" successfully\");\n } else {\n mtrace(\"</br> remove user from from_group unsuccessfully\");\n $upt->track('enrolments', \"remove member from \" . $fromgroupname . \" unsuccessfully\");\n }\n } catch (moodle_exception $e) {\n mtrace(\"</br> remove user from from_group thrown exceptions\");\n $upt->track('enrolments', \"remove member from \" . $fromgroupname . \" thrown exception\");\n continue;\n }\n } else {\n // If the user isn't a member of the group\n // Do nothing\n }\n \n // Create new group and add user inside the group\n // Build group cache\n if (is_null($ccache[$shortname]->groups)) {\n $ccache[$shortname]->groups = array();\n if ($groups = groups_get_all_groups($courseid)) {\n foreach ($groups as $gid => $group) {\n $ccache[$shortname]->groups[$gid] = new stdClass();\n $ccache[$shortname]->groups[$gid]->id = $gid;\n $ccache[$shortname]->groups[$gid]->name = $group->name;\n if (!is_numeric($group->name)) { // only non-numeric names are supported!!!\n $ccache[$shortname]->groups[$group->name] = new stdClass();\n $ccache[$shortname]->groups[$group->name]->id = $gid;\n $ccache[$shortname]->groups[$group->name]->name = $group->name;\n }\n }\n }\n }\n // Group exists?\n if (!array_key_exists($togroupname, $ccache[$shortname]->groups)) {\n // If group doesn't exist, create it\n $newgroupdata = new stdClass();\n $newgroupdata->name = $togroupname;\n $newgroupdata->courseid = $ccache[$shortname]->id;\n $newgroupdata->description = '';\n $gid = groups_create_group($newgroupdata);\n if ($gid){\n $ccache[$shortname]->groups[$togroupname] = new stdClass();\n $ccache[$shortname]->groups[$togroupname]->id = $gid;\n $ccache[$shortname]->groups[$togroupname]->name = $newgroupdata->name;\n } else {\n $upt->track('enrolments', get_string('unknowngroup', 'error', s($togroupname)), 'error');\n continue;\n }\n }\n $gid = $ccache[$shortname]->groups[$togroupname]->id;\n $gname = $ccache[$shortname]->groups[$togroupname]->name;\n \n try {\n if (groups_add_member($gid, $user->id)) {\n mtrace(\"</br> add user to new from_group successfully\");\n $upt->track('enrolments', get_string('addedtogroup', '', s($gname)));\n } else {\n mtrace(\"</br> add user to new from_group unsuccessfully\");\n $upt->track('enrolments', get_string('addedtogroupnot', '', s($gname)), 'error');\n }\n } catch (moodle_exception $e) {\n mtrace(\"</br> add user to new from_group thrown exception\");\n $upt->track('enrolments', get_string('addedtogroupnot', '', s($gname)), 'error');\n continue;\n }\n mtrace(\"</br> Out from_group exist && to_group not exist\");\n }\n if ($isfromgroupnameexist == false && $istogroupnameexist == true) {\n mtrace(\"</br> Enter from_group not exist && to_group exist\");\n if ($isuserintogroupmember == true) {\n // Do nothing because user already in To group\n } else { // Add the user to To group\n try {\n if (groups_add_member($istogroupnameexist, $user->id)) {\n mtrace(\"</br> add user to new from_group successfully\");\n $upt->track('enrolments', get_string('addedtogroup', '', s($togroupname)));\n } else {\n mtrace(\"</br> add user to new from_group unsuccessfully\");\n $upt->track('enrolments', get_string('addedtogroupnot', '', s($togroupname)), 'error');\n }\n } catch (moodle_exception $e) {\n mtrace(\"</br> add user to new from_group thrown exception\");\n $upt->track('enrolments', get_string('addedtogroupnot', '', s($togroupname)), 'error');\n continue;\n }\n }\n mtrace(\"</br> Out from_group not exist && to_group exist\");\n }\n if ($isfromgroupnameexist == false && $istogroupnameexist == false) {\n mtrace(\"</br> Enter from_group not exist && to_group not exist\");\n // Create new group and add user inside the group\n // Build group cache\n if (is_null($ccache[$shortname]->groups)) {\n $ccache[$shortname]->groups = array();\n if ($groups = groups_get_all_groups($courseid)) {\n foreach ($groups as $gid => $group) {\n $ccache[$shortname]->groups[$gid] = new stdClass();\n $ccache[$shortname]->groups[$gid]->id = $gid;\n $ccache[$shortname]->groups[$gid]->name = $group->name;\n if (!is_numeric($group->name)) { // only non-numeric names are supported!!!\n $ccache[$shortname]->groups[$group->name] = new stdClass();\n $ccache[$shortname]->groups[$group->name]->id = $gid;\n $ccache[$shortname]->groups[$group->name]->name = $group->name;\n }\n }\n }\n }\n // Group exists?\n if (!array_key_exists($togroupname, $ccache[$shortname]->groups)) {\n // If group doesn't exist, create it\n $newgroupdata = new stdClass();\n $newgroupdata->name = $togroupname;\n $newgroupdata->courseid = $ccache[$shortname]->id;\n $newgroupdata->description = '';\n $gid = groups_create_group($newgroupdata);\n if ($gid) {\n $ccache[$shortname]->groups[$togroupname] = new stdClass();\n $ccache[$shortname]->groups[$togroupname]->id = $gid;\n $ccache[$shortname]->groups[$togroupname]->name = $newgroupdata->name;\n } else {\n $upt->track('enrolments', get_string('unknowngroup', 'error', s($togroupname)), 'error');\n continue;\n }\n }\n $gid = $ccache[$shortname]->groups[$togroupname]->id;\n $gname = $ccache[$shortname]->groups[$togroupname]->name;\n try {\n if (groups_add_member($gid, $user->id)) {\n mtrace(\"</br> add user to new from_group successfully\");\n $upt->track('enrolments', get_string('addedtogroup', '', s($gname)));\n } else {\n mtrace(\"</br> add user to new from_group unsuccessfully\");\n $upt->track('enrolments', get_string('addedtogroupnot', '', s($gname)), 'error');\n }\n } catch (moodle_exception $e) {\n mtrace(\"</br> add user to new from_group thrown exception\");\n $upt->track('enrolments', get_string('addedtogroupnot', '', s($gname)), 'error');\n continue;\n }\n mtrace(\"</br> Out from_group not exist && to_group not exist\");\n }\n }\n \n if (empty($user->from_group)) {\n $upt->track(\"Group fields\", \"from_group field is empty\", 'error');\n }\n if (empty($user->to_group)) {\n $upt->track(\"Group fields\", \"to_group field is empty\", 'error');\n }\n }\n }\n $upt->close(); // Close table\n $cir->close();\n $cir->cleanup(true);\n}", "title": "" }, { "docid": "9f351a1b1d4f610d820de48615aeeb17", "score": "0.5313665", "text": "public function loadUserByID($userid) {\n\t\t$where = array();\n\t\t$where['user_ID'] = $userid;\n\t\t\n\t\t$db = new DB();\n\t\t$db->connect();\n\t\t$result = $db->select(\"users\", $where);\n\t\t$db->disconnect();\n\t\t\n\t\tforeach($result as $row) {\n\t\t\t$user = $this->setUser($row);\n\t\t\treturn $user;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "703e69b3a331c80eb6267608262063f9", "score": "0.5312585", "text": "public function run()\n {\n $fileName = __DIR__ . '/Data/Roles.csv';\n $csvData = file_get_contents($fileName);\n $lines = explode(PHP_EOL, $csvData);\n\n foreach ($lines as $line) {\n $array = str_getcsv($line);\n\n if (3 !== count($array)) {\n continue;\n }\n\n DB::table('roles')->insert([\n 'id' => $array[0],\n 'name' => $array[1],\n 'label' => $array[2],\n ]);\n }\n }", "title": "" }, { "docid": "cdf2e621735353af4c463eb46e3f456e", "score": "0.53100204", "text": "public function initfromfile()\n\t{\n\t\tif (($handle = fopen(\"/tmp/performancessection.csv\", \"r\")) !== FALSE) {\n\t\t\t$row=1;\n\t\t\t$titre=fgetcsv($handle, 1000, \",\");\n\t\t\t$i=0;\n\t\t\tforeach($titre as $t){\n\t\t\t\techo $t.',';\n\t\t\t\tif($t=='Qui?'){$this->idxUser=$i;}\n\t\t\t\tif($t=='Quoi?'){$this->idxEvt=$i;}\n\t\t\t\tif($t=='Date'){$this->idxDate=$i;}\n\t\t\t\tif($t=='Ou'){$this->idxLieu=$i;}\n\t\t\t\tif($t=='Course'){$this->idxCategorie=$i;}\n\t\t\t\tif($t=='Distance'){$this->idxDistance=$i;}\n\t\t\t\tif($t=='Denivele'){$this->idxDenivele=$i;}\n\t\t\t\tif($t=='Temps puce'){$this->idxTempsPuce=$i;}\n\t\t\t\tif($t=='Temps scratch'){$this->idxTempsOfficiel=$i;}\n\t\t\t\tif($t=='Prix'){$this->idxInscription=$i;}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\twhile (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n\t\t\t\t$num = count($data);\n\t\t\t\t//echo \"<p> $num fields in line $row: <br /></p>\\n\";\n\t\t\t\t$row++;\n\t\t\t\t//echo \"<p>evt=$data[$idxEvt]</p>\";\n\t\t\t\t/*\n\t\t\t\tfor ($c=0; $c < $num; $c++) {\n\t\t\t\t\techo $data[$c] . \"<br />\\n\";\n\t\t\t\t}4\n\t\t\t\t*/\n\t\t\t\t/*\n\t\t\t\t * Gestion de l'utilisateur\n\t\t\t\t */\n\t\t\t\t$user_id=$this->setUser($data);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Gestion de l'événement\n\t\t\t\t */\n\t\t\t\t$evt_id=$this->setEvenement($data);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Gestion du resultat\n\t\t\t\t */\n\t\t\t\t$res_id=$this->setResultat($data,$user_id,$evt_id);\n\t\t\t}\n\t\t\tfclose($handle);\n\t\t}\n\t}", "title": "" }, { "docid": "7ef9de033dc261d98f42e7a5c7cc3de2", "score": "0.53002894", "text": "public function fetchUsers() {\n\t\tglobal $ranks;\n\t\t$userdata = $this->request(\"infernoshout.php\", array(\"do\" => \"userlist\"));\n\t\t$userdata = substr($userdata, strpos($userdata, \"<div>\")+5);\n\t\t$userlist = explode(\", \", $userdata);\n\t\t$users = array();\n\t\tforeach($userlist as $user) {\n\t\t\t//(s= support for logged out, security codes :(\n\t\t\tpreg_match(\"/<a href=\\\"member.php\\?(s=.*?|)u=(\\d*)\\\">(.*)<\\/a>/im\", trim($user), $matches);\n\n\t\t\t$users[] = array(\"uid\" => intval($matches[2]), \"username\" => strip_tags(trim($matches[3])));\n\t\t}\n\t\treturn $users;\n\t}", "title": "" }, { "docid": "1f8ce0231d2251fcd7a189850dd40e4c", "score": "0.5299329", "text": "private function _storeMembers($filename)\n {\n $handle = fopen(self::DEFAULT_DIRECTORY . '/' . $filename, 'r');\n\n $row = 0;\n\n try {\n while ( ($data = fgetcsv(\n $handle,\n 1000,\n self::DEFAULT_SEPARATOR,\n self::DEFAULT_QUOTE\n )) !== false) {\n if ( $row > 0 ) {\n $col = 0;\n $values = array();\n foreach ( $data as $column ) {\n $values[$this->_fields[$col]] = $column;\n $col++;\n }\n //import member itself\n $member = new Adherent();\n //check for empty creation date\n if ( isset($values['date_crea_adh']) && trim($values['date_crea_adh']) === '' ) {\n unset($values['date_crea_adh']);\n }\n $valid = $member->check($values, $this->_required, null);\n if ( $valid === true ) {\n if ( $this->_dryrun === false ) {\n $store = $member->store();\n if ( $store !== true ) {\n $this->addError(\n str_replace(\n array('%row', '%name'),\n array($row, $member->sname),\n _T(\"An error occured storing member at row %row (%name):\")\n )\n );\n return false;\n }\n }\n } else {\n $this->addError(\n str_replace(\n array('%row', '%name'),\n array($row, $member->sname),\n _T(\"An error occured storing member at row %row (%name):\")\n )\n );\n if ( is_array($valid) ) {\n foreach ( $valid as $e ) {\n $this->addError($e);\n }\n }\n return false;\n }\n }\n $row++;\n }\n return true;\n } catch ( \\Exception $e ) {\n $this->addError($e->getMessage());\n }\n\n return false;\n }", "title": "" }, { "docid": "39bdb3d3f2a2377ff6260e416716c419", "score": "0.5289854", "text": "function LoadFile() {\n\t$contents = file_get_contents(\"../Data Files/022-Names.txt\");\n\t$names = explode(\",\", $contents);\n\treturn $names;\n}", "title": "" }, { "docid": "77548ecfe53cdc49ad8c6c1ae17fc39b", "score": "0.5281385", "text": "public function run()\n {\n $friendsFile = fopen(\"./database/data/friends.csv\", \"r\");\n\n while(! feof($friendsFile)) {\n $data = [];\n $friendsData = fgetcsv($friendsFile);\n\n foreach ($friendsData as $friend) {\n $item = str_getcsv($friend);\n $data[] = $item[0];\n }\n\n $fdata = [\n 'first_name' => $data[0],\n 'last_name' => $data[1],\n 'nick_name' => $data[2],\n 'birthdate' => $data[3],\n ];\n\n $friends = new Friend();\n $friends->fill($fdata);\n $friends->save();\n }\n fclose($friendsFile);\n }", "title": "" }, { "docid": "85772ae22c56c8e38a927656e1740d34", "score": "0.5268069", "text": "public function actionImportCityNames(){\n CityName::deleteAll();\n // that's for avoiding errors\n ini_set('max_execution_time', 0);\n ini_set('memory_limit', '-1');\n\n $lines = file(Yii::$app->basePath . Yii::$app->params['gapi_city_names_import_file_path'], FILE_IGNORE_NEW_LINES);\n $csv = [];\n foreach ($lines as $key => $value)\n {\n $csv[$key] = str_getcsv($value);\n $model = new CityName();\n $model->criteriaId = $csv[$key][0];\n $model->name = $csv[$key][1];\n $model->canonicalName = $csv[$key][2];\n $model->parentId = $csv[$key][3];\n $model->countryCode = $csv[$key][4];\n $model->targetType = $csv[$key][5];\n $model->status = $csv[$key][6];\n $model->save();\n }\n }", "title": "" }, { "docid": "7fc979b6662aff40f96bdf4c61018f0a", "score": "0.5267692", "text": "function import_users_save_user($mapping, $row, $roles) {\n $col = 0;\n $user = new stdClass;\n\n foreach($mapping as $conf) {\n if (empty($conf['init_field']) && empty($conf['role'])) {\n $col++;\n continue;\n }\n\n $value = $row[$col];\n\n if (!empty($conf['init_field'])) {\n if (!empty($conf['value_callback'])) {\n $value = call_user_func($conf['value_callback'], $value);\n }\n // Convert value to UTF-8.\n import_users_convert_2_utf8($value);\n $user->{$conf['init_field']} = $value;\n }\n \n if (!empty($conf['role']) && !empty($value)) {\n $roles += array((int)$conf['role'] => TRUE);\n }\n\n $col++;\n }\n\n $pass_clear = $user->pass;\n $account = import_users_save_user_init($user, $roles);\n $account->pass_clear = $pass_clear;\n return $account;\n}", "title": "" }, { "docid": "651c1a008a34e2c656028a2334870eae", "score": "0.5264638", "text": "public static function getUtenti(): array {\r\n\t\t// apro il file\r\n\t\t$file = fopen(\"./application/models/utenti.txt\", \"r\");\r\n\r\n\t\t// creo array per tutte le linee\r\n\t\t$csv = array();\r\n\r\n\t\t// aggiungo ogni riga del file all array csv\r\n\t\twhile (!feof($file)) {\r\n\t\t\t$line = fgetcsv($file, \",\");\r\n\t\t\tif ($line) {\r\n\t\t\t\tif (count($line) == 5) {\r\n\t\t\t\t\t$utente = new utente($line[0], $line[1], $line[2], $line[3], $line[4]);\r\n\t\t\t\t\tarray_push($csv, $utente);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// chiudo il file\r\n\t\tfclose($file);\r\n\r\n\t\t// ritorno la lista\r\n\t\treturn $csv;\r\n\t}", "title": "" }, { "docid": "b6d6c3f5f81082241acbeaaf3cc00c6a", "score": "0.5263819", "text": "public function parse_and_invite_one_user($source, $target)\n\t\t{\n\t\t\tdebug(\"Start parsing and inviting from group \".implode(',', $source). \" to \" . implode(',', $target) . \" one user\");\n\t\t\t$all_users = array();\n\t\t\t$file_name = \"group_{$source['name']}_invited_users.csv\";\n\t\t\tif(file_exists($file_name))\n\t\t\t{\n\t\t\t\t$all_users = $this->load_users($file_name);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e50daf0f3ad95973648a19d56a508ea5", "score": "0.5259035", "text": "public function uploadCsvAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $path = $this->get('kernel')->getRootDir() . '/../web/uploads/newsletter/xyz_em_list.csv';\n $row = $this->parse_csv_file($path, false);\n\n foreach ($row as $val) {\n $nameValueForm = isset($val[1]) ? $val[1] : '';\n $emailValueForm = $val[0];\n\n $isRegistredEmail = $em->getRepository('ShakyamouniUserBundle:NewsletterSubscriber')->findOneByEmail($emailValueForm);\n\n if (NULL == $isRegistredEmail) {\n $entity = new NewsletterSubscriber();\n\n if (!empty($nameValueForm)) {\n $entity->setName($nameValueForm);\n }\n\n $entity->setEmail($emailValueForm);\n $entity->setIsActive(false);\n $em->persist($entity);\n $em->flush();\n\n echo 'subscriber ' . $entity->getEmail() . ' inséré<br/>';\n }\n }\n\n return new Response();\n }", "title": "" }, { "docid": "b2fc7e257e40897b99263558d86ce635", "score": "0.5253851", "text": "public function returnUsers () {\n\n $users = array();\n $xml = new DOMDocument();\n $xml->load(self::path.\"users.xml\");\n\n $searchNode = $xml->getElementsByTagName( \"Data\" );\n\n foreach( $searchNode as $searchNode ){\n\n $xmlUser = $searchNode->getElementsByTagName( \"User\" );\n $valueUser = $xmlUser->item(0)->nodeValue;\n $xmlPassword = $searchNode->getElementsByTagName( \"Password\" );\n $valuePassword = $xmlPassword->item(0)->nodeValue;\n $xmlName = $searchNode->getElementsByTagName( \"Name\" );\n $valueName = $xmlName->item(0)->nodeValue;\n $xmlLastname = $searchNode->getElementsByTagName( \"Lastname\" );\n $valueLastname = $xmlLastname->item(0)->nodeValue;\n $xmlEmail = $searchNode->getElementsByTagName( \"Email\" );\n $valueEmail = $xmlEmail->item(0)->nodeValue;\n $xmlRole = $searchNode->getElementsByTagName( \"Role\" );\n $valueRole = $xmlRole->item(0)->nodeValue;\n $xmlKeyid = $searchNode->getElementsByTagName( \"Keyid\" );\n $valueKeyid = $xmlKeyid->item(0)->nodeValue;\n\n $users[] = array('user' => $valueUser,'password' => $valuePassword,'name' => $valueName,'lastname' => $valueLastname,'email' => $valueEmail, 'role' => $valueRole, 'keyid' => $valueKeyid);\n \n }\n\n return $users;\n\n }", "title": "" }, { "docid": "831b93854afa349572f46c4f1c51c350", "score": "0.5237246", "text": "public function save_users($file, $users)\n\t\t{\n\t\t\tdebug(\"Save users to {$file}\");\n\t\t\t$d = array();\n\t\t\tforeach($users as $key => $value)\n\t\t\t{\n\t\t\t\t$d[] = $value;\n\t\t\t}\n\t\t\t\n\t\t\twrite_csv($file, $d, array_keys($d[0]));\n\t\t}", "title": "" }, { "docid": "b39d05df6e9b78c13b2a6a43b731f87b", "score": "0.5230339", "text": "public function run()\n {\n $users = (new FastExcel)->import(__DIR__.'/data_excel/users.xlsx', function ($line) {\n return User::insert([\n 'name' => $line['name'],\n 'email' => $line['email'],\n 'email_verified_at' => now(),\n 'password' => bcrypt($line['password']),\n 'role_id' => $line['role_id'],\n 'created_at' => now()\n ]);\n });\n }", "title": "" }, { "docid": "44d434f2d5eb1e582f09ff9695ccc344", "score": "0.5219157", "text": "public function loadUserByLogin($login)\n {\n try {\n $user = $this->getUserByLogin($login);\n\n if (!$user || !count($user)) {\n throw new UsernameNotFoundException(\n sprintf('Username \"%s\" does not exist.', $login)\n );\n }\n\n $roles = $this->getUserRoles($user['id']);\n\n if (!$roles || !count($roles)) {\n throw new UsernameNotFoundException(\n sprintf('Username \"%s\" does not exist.', $login)\n );\n }\n\n return [\n 'login' => $user['login'],\n 'password' => $user['password'],\n 'roles' => $roles,\n ];\n } catch (DBALException $exception) {\n throw new UsernameNotFoundException(\n sprintf('Username \"%s\" does not exist.', $login)\n );\n } catch (UsernameNotFoundException $exception) {\n throw $exception;\n }\n }", "title": "" }, { "docid": "7d2e5248be460b1a2a5d1dbe93656e40", "score": "0.52165234", "text": "public function getUsersForImport() {\n $all_bc_users = $this->getUsers();\n if(is_foreachable($all_bc_users)) {\n foreach($all_bc_users as $bc_user) {\n $user = Users::findByEmail($bc_user->email_address, true);\n if(!$user instanceof User) {\n $temp[] = $user;\n } //if\n } //foreach\n } //if\n return $temp;\n }", "title": "" }, { "docid": "6de4a8f0c5d3fd928fcd4e0dd48e52d3", "score": "0.52120566", "text": "public function csv_import(){\n Excel::import(new CsvImport,request()->file('file' ));\n $students = tblscholars::all();\n \n return view('student.welcome',compact('students'));\n }", "title": "" }, { "docid": "c1d611f41af63e0dfc003eeb5b6c2a8e", "score": "0.52053905", "text": "function getUsers() {\r\n require $this->sRessourcesFile;\r\n if (in_array(\"users\", $this->aSelectedFields)) {\r\n $aParams['sSchemaFramework'] = array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name');\r\n $aParams['group_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getGroupUsers'], $aParams);\r\n $sListUserId = \"\";\r\n $aListUserLogin = array();\r\n while ($aLigne = $this->oConnection->oBd->ligneSuivante($oPDOresult)) {\r\n if ($sListUserId == \"\") {\r\n $sListUserId = $aLigne[\"user_id\"];\r\n } else {\r\n $sListUserId .= \"|\" . $aLigne[\"user_id\"];\r\n }\r\n $aListUserLogin[] = $aLigne[\"login\"];\r\n }\r\n $oPDOresult = $this->oConnection->oBd->fermeResultat();\r\n $this->aFields['users'] = $sListUserId;\r\n $this->aFields['users_label'] = implode(',', $aListUserLogin);\r\n }\r\n }", "title": "" }, { "docid": "d3c90ed7454eaba901b5f61d1b90a6fe", "score": "0.51872903", "text": "public function importUsers($item, &$context) {\n \\Drupal::database()->insert(\"myusers\")\n ->fields(['name' => $item])\n ->execute();\n }", "title": "" }, { "docid": "589b22ec2e3bf5fd566c909e37f3d09a", "score": "0.5187275", "text": "function fetchConnectedAccounts($uid, $vendor) {\n \n $csv = array_map('str_getcsv', file('connected_oauth_accounts.csv'));\n \n /*Search the connections looking for any arcgis account assocted with the user*/\n \n foreach($csv as $key => $record){\n \n if($record[0] == $uid && $record[1] == $vendor){\n \n /*Great an arcgis connection has been found for the logged in saas user.\n * Now, let's sign that user into arcgis so they don't have to recall\n * their ArcGIS username and password\n */\n \n break;\n \n }\n \n }\n \n return $record;\n}", "title": "" }, { "docid": "17eac0440607dcc9cefafb0157184fa5", "score": "0.5185218", "text": "public function loadUserData()\n {\n $this->player = Player::where('name', $this->constants->USER_LOGIN)->get()->first();\n }", "title": "" }, { "docid": "0a399f068b3c335b2814ec556d674126", "score": "0.5184226", "text": "public function import() {\n\n\t\tif ($this->request->is('post')) {\n\n\t\t\t$group = $this->request->data('User.group');\n\t\t\t$user = $this->request->data('User.user');\n\n\t\t\t$tempData = $this->_getLDAP($group, $user);\n\n\t\t\tif (isset($tempData) && ! empty($tempData)) {\n\n\t\t\t\t$usernames = $tempData['usernames'];\n\t\t\t\t$tempData = $tempData['data'];\n\n\t\t\t\t$this->User->recursive = -1;\n\t\t\t\t// Finding users already in database\n\t\t\t\t$currentData = $this->User->find('list', array(\n\t\t\t\t\t'conditions' => array ('User.username' => array_values($usernames)), \n\t\t\t\t\t'fields' => array('User.username', 'User.id')\n\t\t\t\t));\n\n\t\t\t\t$updated = 0;\n\t\t\t\t// Setting id for exiting users\n\t\t\t\tforeach ($usernames as $key => $value) {\n\t\t\t\t\tif (isset($currentData[$value])) {\n\t\t\t\t\t\t$tempData[$key][$this->modelClass]['id'] = $currentData[$value];\n\t\t\t\t\t\t$updated++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tempData[$key][$this->modelClass]['group_id'] = $this->Session->read('Options.defaultGroup');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Added users vs updated users\n\t\t\t\t$added = sizeof($tempData) - $updated;\n\n\t\t\t\t// Saving\n\t\t\t\tif ($this->User->saveMany($tempData, array('fields' => array_values($this->ldap_to_model)))) {\n\t\t\t\t\t$this->Session->setFlash(__('Import successful. %s users were added and %s users were updated.', $added, $updated), 'flash', array ('class' => 'success'));\n\t\t\t\t\treturn $this->redirect(array('action' => 'index'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash(__('Users could not be imported, check the group name and try again.'), 'flash', array ('class' => 'error'));\n\n\t\t\t\t} // No save \n\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('No users were found, check the group name and try again.'), 'flash', array ('class' => 'warning'));\n\t\t\t} // No users were found\n\t\t\t\n\t\t} // No post request\n\n\t\tif ($this->request->is('ajax'))\n\t\t{\n\t\t\t$group = $this->request->data('group');\n\t\t\t$user = $this->request->data('user');\n\t\t\t\n\t\t\t$output = $this->_getLDAP($group, $user);\n\n\t\t\t$output = isset($output['data']) ? $output['data'] : array();\n\n\t\t\t$this->layout = 'ajax';\n\n\t\t\t$this->RequestHandler->setContent('json', 'application/json' );\n\n\t\t\t$this->set('data', $output);\n\n\t\t\t$this->set(\"_serialize\", array('data'));\n\n\t\t\t/*$this->autoRender = false;\n\t\t\t$this->render('json');*/\n\t\t}\n\n\t}", "title": "" }, { "docid": "2aaa29f1e4fbb2303175deb23588a14c", "score": "0.5183218", "text": "function parsecsv($file){\n\t\tif (($handle = fopen($file, \"r\")) !== FALSE) {\n\t\t\t$row=0;\n\t\t\t$datas=array();\n \t\twhile (($data = fgetcsv($handle, 1000, \"\\t\")) !== FALSE) {\n \t\t\t$nb = count($data);\n\t \tif($nb>1 && (!isset($_POST['notfirst']) || $row>0)){\n\t \t\tforeach($data as $k=>$v){\n\t \t\t\t$data[$k]=self::parsestr($v);\n\t \t\t}\n \t\t\t\t$datas[]=$data;\n \t\t\t}\n\t\t\t\tif($nb>1 && $nb>=16){ // check number of columns\n\t \t\t?><div class=\"updated\"><p><strong><?php _e('Error while parsing file, bad number of columns at line', 'speakupimport' ) ?> <?=$row?></strong></p></div><?php\n\t\t\t\t\n\t \t\treturn false;\n\t \t}\n\t\t $row++;\n\t\t }\n\t\t fclose($handle);\n\t\t\treturn $datas;\n\t\t}\n\t\t?><div class=\"updated\"><p><strong><?php _e('Error while parsing file, cannot open document', 'speakupimport' ) ?></strong></p></div><?php\n\t\t\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0faded7721e19f66aca385c3ec1be930", "score": "0.51822627", "text": "public function loadUser($id)\n {\n if (empty($this->users))\n\t\t{\n\t\t\t$this->getAllUsers();\n\t\t}\n\t\treturn $this->users[$id];\n }", "title": "" }, { "docid": "6aecb737b49879c8db3d8c0c7fead460", "score": "0.51814663", "text": "function ImportUser( $params ) {\n\t\t$this->dbconn = $params['dbconn'];\n\t\t$this->tree = (int)$params['tree'];\n\t\tif (isset($params['pwd_force_change_policy'])) {\n\t\t\tswitch ( strtolower( $params['pwd_force_change_policy'] ) ) {\n\t\t\t\tcase 'true':\n\t\t\t\tcase 'false':\n\t\t\t\tcase 'by_setting':\n\t\t\t\tcase 'do_nothing': $this->pwd_force_change_policy = strtolower( $params['pwd_force_change_policy'] ); break;\n\t\t\t}\n\t\t}\n\t\t$this->send_alert = ($params['send_alert'] == '1');\n\t\t$this->insert_update = ($params['insert_update'] == '1');\n\t}", "title": "" }, { "docid": "132283ede93d073350700608945cb93d", "score": "0.5178267", "text": "public function downloaduserscsv()\n\t{\n\t\t$table = User::all();\n\t\t$filename = \"users.csv\";\n\t\t$handle = fopen($filename, 'w+');\n\t\tfputcsv($handle, array('id','name','email_address'));\n\n\t\tforeach($table as $row) {\n\t\t\tfputcsv($handle, array($row->id,$row->name, $row->email));\n\t\t}\n\n\t\tfclose($handle);\n\n\t\t$headers = array(\n\t\t\t'Content-Type' => 'text/csv',\n\t\t);\n\n\t\treturn Response::download($filename, 'users.csv', $headers);\n\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "d3046dfedc647b5f7c0c46993df29c5c", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n // 执行修改更新\n // dd($request->all());\n // ----------------阿里云 OSS 上传 start------------------- \n if ($request->hasFile('thumb')) { // 1.检测是否有文件上传\n $name = time(); // 文件名\n $file = $request->file('thumb'); // 文件上传信息\n $ext = $request->file('thumb')->getClientOriginalExtension(); // 获取文件后缀\n \n // 上传阿里云 OSS\n $newfile = $name.'.'.$ext; // 上传到阿里云存储的新文件名\n $filepath = $file->getRealPath(); // 文件上传的临时目录\n OSS::upload($newfile, $filepath); // 实例化 oss 类\n\n $img = env('ALIURL').$newfile;\n }else{\n $img = $request->input('img');\n }\n\n // 封装修改数据\n $data['title'] = $request->input('title');\n $data['editor']= $request->input('editor');\n $data['thumb'] = $img;\n $data['descr'] = $request->input('descr');\n // dd($data);\n $res = Article::where('id','=',$id)->update($data);\n if ($res) {\n // 添加数据到数据库的同时,添加到缓存服务器\n // ------------redis start-------------------------\n $listkey = 'List_article_list'; // 链表\n $hashkey = 'Hash_article'; // Hash表\n\n // 删除缓存服务器数据,否则缓存存在\n Redis::lrem($listkey,1,$id); // 删除链表里的 id\n Redis::del($hashkey.$id); // 删除哈希表里的数据\n\n Redis::lpush($listkey,$id); // id 存到链表\n $data['id'] = $id; // Hash表中需要有 id 字段\n Redis::hmset($hashkey.$id,$data); // 数据存到哈希表\n // ------------redis end---------------------------\n return redirect('/adminarticleredis')->with('success','修改成功!');\n }else{\n return back()->with('error','修改失败!');\n }\n }", "title": "" } ]
[ { "docid": "b253a586f54d8fcd444353d114e8da96", "score": "0.76002145", "text": "public function update(IResource $resource)\r\n {\r\n }", "title": "" }, { "docid": "1e58026b8952df10026ace5fc59fe274", "score": "0.7425105", "text": "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "title": "" }, { "docid": "08694713de71165eda639b86061c2dd3", "score": "0.70612276", "text": "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6624096", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "c36ab864eb8fe4e400b9bf654b24e104", "score": "0.6334678", "text": "public function updateStream($path, $resource, array $config = []);", "title": "" }, { "docid": "1833fc434e2b6d8845470c7071f16b05", "score": "0.62114537", "text": "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "713301f4bdde89af420365911069870f", "score": "0.6196851", "text": "public function update(ResourceTypeInterface $resourceType)\n\t{\n\t\t$this->setObjectToCache($resourceType);\n\t\t$this->setObjectToCache($resourceType, 'identifier');\n\t\t$this->objectManager->persist($resourceType);\n\t}", "title": "" }, { "docid": "0926078283b626a7cbcf1c37921b4293", "score": "0.6119944", "text": "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "title": "" }, { "docid": "78d3c773d3a549209d09486c7233c7b5", "score": "0.6087866", "text": "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "title": "" }, { "docid": "f6f8def0ac709abf6dd95f0dfa35d868", "score": "0.6052593", "text": "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "title": "" }, { "docid": "5334ba4a6880a32048930c6aab0c2e72", "score": "0.6018941", "text": "public function update($path);", "title": "" }, { "docid": "9ce64536e4f158c8d6da887e4483a653", "score": "0.5973672", "text": "public function updateResource($resource, $resource_id, $resource_data)\n {\n $this->addCallData('resource', $resource);\n $this->addCallData('URL', 'admin/' . $resource);\n $this->addCallData('METHOD', 'PUT');\n foreach ($resource_data as $property => $data) {\n $this->buildChildData($property, $data);\n }\n $this->commitChildData();\n return $this->updateRecord($resource_id);\n }", "title": "" }, { "docid": "9f880585b8f772551748224960e1114a", "score": "0.59715486", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "title": "" }, { "docid": "8bf08d6952a759b61a0c0f2a1c1e4e68", "score": "0.59400934", "text": "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "48a6e00b66b63cd7ac857215e12bb74f", "score": "0.58948725", "text": "public function update_($resource, ...$id) {\n\t\t$this->_checkResource ( $resource, function () use ($id) {\n\t\t\tif (! $this->hasErrors ()) {\n\t\t\t\tparent::_update ( ...$id );\n\t\t\t} else {\n\t\t\t\techo $this->displayErrors ();\n\t\t\t}\n\t\t} );\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ec460d4bbd98e23f7e38b492a7d650e", "score": "0.5860816", "text": "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "title": "" }, { "docid": "d7478480534fcc66d2484d02792ff42b", "score": "0.5832773", "text": "public function softwareUpdate(SoftwareRequest $request, $id)\n {\n $software=Software::find($id);\n /* dd($software); */\n $input= $request->all();\n $input['slug']=Str::slug($request->title);\n if($request->hasFile('image')) {\n if($request->image==$software->image){\n $input['image']=$software->image;\n }else{\n $fileName=$request->file('image')->store('photos','public');\n\n $input['image'] =$fileName;\n \n @unlink('storage/'.$software->image);\n }\n\n \n\n } else {\n\n $input['image']=$software->image;\n\n }\n $software->update([\n 'title'=>$request->title,\n 'content'=>$request->content,\n 'image'=>$input['image'],\n 'slug'=>$input['slug'],\n ]);\n /* dd($software); */\n\n return new SoftwareResource($software);\n }", "title": "" }, { "docid": "9c026a6af96c287558697ce10089af64", "score": "0.5830476", "text": "public function put($resourceId)\n {\n $resourceId = intval($resourceId);\n if (!array_key_exists(\n $resourceId,\n $this->repositoryIndex\n )) {\n header('Not Found', true, 404);\n exit();\n }\n\n $key = $this->repositoryIndex[$resourceId];\n $this->repository[$key] = $this->requestBody;\n\n echo json_encode($this->repository[$key]);\n }", "title": "" }, { "docid": "4bc6a6b46ecee85bd6f0b6a0548271b3", "score": "0.582811", "text": "public function update(Request $request, $resource, $id)\n {\n return $this->repository->update($id, $request->all());\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.5806887", "text": "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "title": "" }, { "docid": "95a0aa456b419b2ce1456ae7f9c023ec", "score": "0.57935816", "text": "public function updateRecord($id)\n {\n // Check if the record exists\n $resource = $this->shopifyData['resource'];\n $resource_singular = $this->shopifyData['SINGULAR_NAME'];\n $compare_property_value = $id;\n\n $tempShopifyData = $this->shopifyData;\n $tempShopifyData['METHOD'] = 'GET';\n switch ($this->shopifyData['resource']) {\n case 'collects':\n case 'variants':\n $compare_property_name = 'id';\n $tempShopifyData['URL'] = 'admin/' . $resource . '/' . $id . '.json';\n break;\n case 'metafields':\n // metafields requires a resource id and metafield id, therefore, we're setting the URL from where it's being called\n $tempShopifyData['URL'] = $tempShopifyData['URL'];\n break;\n case 'inventory_levels':\n $compare_property_name = 'inventory_item_ids';\n $tempShopifyData['URL'] .= '?' . $compare_property_name . '=' . urlencode($compare_property_value);\n break;\n default:\n $compare_property_name = 'ids';\n $tempShopifyData['URL'] .= '?' . $compare_property_name . '=' . urlencode($compare_property_value);\n }\n \n $result = $this->call($tempShopifyData);\n if ((isset($result->$resource) && count($result->$resource) == 1) || property_exists($result, $resource_singular)) {\n // update the record\n $resource = $this->shopifyData['resource'];\n $currentShopifyData = $this->shopifyData;\n $currentShopifyData['METHOD'] = 'PUT';\n\n switch ($resource) {\n case 'smart_collections':\n // if smart_collections, determine whether to use order.json or #id.json\n if (isset($currentShopifyData['DATA']) && array_has($currentShopifyData['DATA'], 'products')) {\n $currentShopifyData['URL'] = str_replace(\".json\", '/' . $id . '/order.json', $currentShopifyData['URL']);\n }\n break;\n case 'inventory_levels':\n $currentShopifyData['URL'] = str_replace(\".json\", '/set.json', $currentShopifyData['URL']);\n break;\n default:\n $currentShopifyData['URL'] = self::PREFIX . '/' . $resource . '/' . $id . '.json';\n }\n\n\n if (isset($currentShopifyData['DATA'])) {\n $result = $this->call($currentShopifyData, $currentShopifyData['DATA']);\n } else {\n $result = $this->call($currentShopifyData);\n }\n $this->resetData();\n return $result;\n }\n }", "title": "" }, { "docid": "9aebab206cbd3cb1ae7fc60ffdd5c17a", "score": "0.5754308", "text": "public function updateSingle($request, $response, $args){\n\t\t$response = $this->gateway($this->getNeededCap(__FUNCTION__), $response);\n\t\tif ( $response->getStatusCode() != 200 ){\n\t \t\treturn $response;\n\t \t}\n\t\t//TODO check data type & id against resource > via middleware, serve 409 error on mismatch\n\t \t$resource_model_class = $this->resource_model_class;\n\t \t$resource_slug = $resource_model_class::getResourceSlug();\n \t\t$resource = $args[$resource_slug];\n\t\t$input = $request->getParsedBody()['data'];\n \t\t$return = $this->validateAndSave($resource,$input);\n \t\treturn $response->withJsonAPI($return['to_json'],$return['code']);\n\t}", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "cd5df57c2c83d7637ab39eb4c24ca282", "score": "0.5718714", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $this->validate($request, [\n 'category_id' => 'required',\n 'unit_id' => 'required',\n 'name' => [\n 'required',\n Rule::unique('products')->ignore($product->id),\n ],\n 'purchase_price' => 'required',\n 'sell_price' => 'required',\n 'quantity' => 'required',\n ]);\n\n $product->category_id = $request->category_id;\n $product->unit_id = $request->unit_id;\n $product->name = $request->name;\n $product->sku = Helpers::getSKUProduct($request->name, $request->id);\n $product->barcode = Helpers::getBarcodeProduct($request->name);\n $product->description = $request->description;\n //TODO: update image in storage path\n $product->image = $request->image;\n $product->quantity = $request->quantity;\n $product->quantity_alert = $request->quantity_alert;\n $product->cost_price = Helpers::calculateCostPrice($product->purchase_price, $product->quantity, $request->purchase_price, $request->quantity);\n $product->purchase_price = $request->purchase_price;\n $product->sell_price = $request->sell_price;\n $product->status = $request->status;\n\n $product->update();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "cbf8435986892ace3d4dbcfbf62f6804", "score": "0.5714311", "text": "public function isUpdateResource();", "title": "" }, { "docid": "8759752add8b6db67fed4d69cb0208e8", "score": "0.5683185", "text": "public function update()\n\t{\n\t\tparent::update();\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "b867c63b8317ab70317f7b53e3441ded", "score": "0.56789744", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->update($request->all());\n return (new ProductResource($product->loadMissing('imageable')))-> response()->setStatusCode(200);\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "ea54f106887794c3110ad39c81f775dc", "score": "0.5674029", "text": "public function update($record, ResourceObjectInterface $resource, EncodingParametersInterface $params);", "title": "" }, { "docid": "8a46c9ac29aec2f0c66f61cd6abd3e2a", "score": "0.5669989", "text": "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "title": "" }, { "docid": "6aaf7100103df61dd639ff4267dc6860", "score": "0.565847", "text": "public function update ($resource = false, $key = false) {\n\t\t$resource = ($resource) ? $resource : $this->resource;\n\t\t$key = ($key) ? $key : $this->key;\n\n\t\tif (DB::execute (\n\t\t\t'update `#prefix#lock` set modified = ?, expires = ? where resource = ? and resource_id = ?',\n\t\t\tgmdate ('Y-m-d H:i:s'),\n\t\t\tgmdate ('Y-m-d H:i:s', time () + $this->timeout),\n\t\t\t$resource,\n\t\t\t$key\n\t\t)) {\n\t\t\treturn true;\n\t\t}\n\t\t$this->error = DB::error ();\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8061c9b36c6d17c20d2017115145496d", "score": "0.56398815", "text": "public function update(Request $request, $id)\n {\n try {\n DB::beginTransaction();\n\n $product = Product::find($id);\n\n $data = $request->except('img');\n\n if ($request->hasFile('img')) {\n if ($product->img && file_exists(storage_path('app/public/'.$product->img))) {\n Storage::delete('public/'.$product->img);\n }\n\n $img_path = $request->file('img')->store('products/img', 'public');\n $data['img'] = $img_path;\n $data['img_url'] = url('/storage/'.$img_path);\n }\n\n if (!$data['is_discount']) {\n $data['after_discount'] = null;\n }\n\n $product = $product->fill($data);\n $product->save();\n\n DB::commit();\n\n return redirect()->route('product.index')->with('success', 'Successfully updated product !');\n\n } catch (\\Exception $error) {\n DB::rollBack();\n return $error->getMessage();\n }\n }", "title": "" }, { "docid": "bbd99fadb318f4a784afaa2bfa18ce90", "score": "0.5628826", "text": "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "title": "" }, { "docid": "8eb8ff4a40a42fb82a98ac5091c3a8b4", "score": "0.56196684", "text": "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5604227", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "f646252110cf32a5b2f73f7d1462f12e", "score": "0.5601397", "text": "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "title": "" }, { "docid": "87604b965f2923e2345b489944eb16ab", "score": "0.5582592", "text": "public function update(IEntity $entity);", "title": "" }, { "docid": "b1223c0e87edc0874663308fb5757224", "score": "0.5575312", "text": "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "c596fddf408b359acc12fe17624de997", "score": "0.55624634", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "title": "" }, { "docid": "b3d8abec86ebbd8bf61bddeb5110ba38", "score": "0.55608666", "text": "abstract public function put($data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "910ec5bfd0a0132f45d218d96931bc8b", "score": "0.55576575", "text": "public function update(Request $request, $id)\n {\n\n $request->validate([\n 'resource_name' => 'required',\n 'about_content' => 'required',\n 'sort_order' => 'required|numeric'\n ]);\n\n $form_data = array(\n 'resource_name' => $request->resource_name,\n 'slug' => $this->slugify($request->resource_name),\n 'about_content' => $request->about_content,\n 'sort_order' => $request->sort_order\n );\n\n Resource::whereId($id)->update($form_data);\n\n return redirect('resource')->with('success', 'Data is successfully updated');\n }", "title": "" }, { "docid": "90cec2e0050ecd5971be612c49157c4a", "score": "0.55573726", "text": "public function testUpdateSupplierUsingPUT()\n {\n }", "title": "" }, { "docid": "9c243572303715ea37744cfc162e1a3c", "score": "0.5556878", "text": "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "title": "" }, { "docid": "45212faae39cc84fb7d386bd5ccbacd2", "score": "0.5554201", "text": "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "title": "" }, { "docid": "ffe74e555ccf4883e40a207b843213c6", "score": "0.5553755", "text": "public function update($id, EditResourceImageRequest $request)\n {\n $resourcecenterImage = ResourceCenterImage::findOrFail($id);\n $this->setUpdatedModelValues($request, $resourcecenterImage);\n // if file, we have additional requirements before saving\n if ($this->newFileIsUploaded()) {\n $this->deleteExistingImages($resourcecenterImage);\n $this->setNewFileExtension($request, $resourcecenterImage);\n }\n\n $resourcecenterImage->update([\n 'book_name' => $request->input('book_name'),\n 'category_name' => $request->input('category_name')\n ]); \n\n $resourcecenterImage->save();\n// check for file, if new file, overwrite existing file\n if ($this->newFileIsUploaded()){\n $file = $this->getUploadedFile();\n $this->saveImageFiles($file, $resourcecenterImage);\n }\n $thumbnailPath = $this->thumbnailPath;\n $imagePath = $this->imagePath;\n alert()->success('Congrats!', 'image edited!');\n return view('resourcecenter-image.view', compact('resourcecenterImage',\n 'thumbnailPath',\n 'imagePath'));\n }", "title": "" }, { "docid": "9bd927a2b7c7b6455cfb1d5512fcad31", "score": "0.55435944", "text": "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "title": "" }, { "docid": "efa4460a1f0a94dc49a588c86ce1c95e", "score": "0.55393505", "text": "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "49f2830a1f4c7d89a0738cee238723c4", "score": "0.5536732", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n if ($request->hasFile('photo')){\n if ($product->photo !== NULL){\n unlink(public_path($product->photo));\n }\n\n }\n $product->CategoryID = $request->CategoryID;\n $product->SKU = $request->SKU;\n $product->ProductName = $request->ProductName;\n $product->ProductDescription = $request->ProductDescription;\n $product->QTY = $request->QTY;\n $product->Price = $request->Price;\n $product->AvailSize = $request->AvailSize;\n $product->AvailColor = $request->AvailColor;\n $product->Size = $request->Size;\n $product->Color = $request->Color;\n $product->photo = $request->photo;\n\n $product['photo'] = '/upload/photo/'.time().'.'.$request->photo->getClientOriginalExtension();\n $request->photo->move(public_path('/upload/photo/'), $product['photo']);\n\n $product->save();\n\n return response()->json([\n 'success' => true,\n 'message' => 'Product Updated' ]);\n }", "title": "" }, { "docid": "c4d2a2fa9101020663f7a49d7cc6ddac", "score": "0.5535236", "text": "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "title": "" }, { "docid": "6e9e95959e33006f578a3965f633d7d6", "score": "0.5534954", "text": "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "title": "" }, { "docid": "6747a7ea594ba3a1e21cae4d1cb18d9f", "score": "0.5534193", "text": "public function update (Request $request, $id)\n {\n $request_data = $request->all();\n\n // only validate attributes provided (ignore missing)\n $validation_rules = array_keys($request_data['data']['attributes']);\n $request_data_validation = $this->validateRequestResourceObject($request_data['data'], $this->model, $id, true, $validation_rules);\n\n // respond with error\n if (!empty($request_data_validation['errors'])) {\n return Response::make([ 'errors' => $request_data_validation['errors'] ], $request_data_validation['error_code']);\n }\n\n // fetch resource\n $resource = $this->model->findOrFail($id);\n\n // ACL\n if (!is_null(config('jsonapi.acl.check_access')) && config('jsonapi.acl.check_access') !== false) {\n $errors = JsonApiAclUtils::accessCheck($request->route()->getName(), Auth::user(), $resource);\n if (!empty($errors)) {\n return Response::make([ 'errors' => $errors ], 403);\n }\n }\n\n // update resource\n $resource->fill($request_data['data']['attributes']);\n $resource->save();\n\n // return updated resource\n return Response::item($request, $resource->toArray(), $this->model, 200);\n }", "title": "" }, { "docid": "6c30ee958f97e8028b342b7519dfbdae", "score": "0.55296004", "text": "public function testUpdateInventoryStorageActivity()\n {\n }", "title": "" }, { "docid": "294674761e7a90c0f3c7b7cbb244ad5a", "score": "0.55237365", "text": "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "title": "" }, { "docid": "f83dd36256d02e1f966e7e748f03289a", "score": "0.5511168", "text": "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "title": "" }, { "docid": "0dc3227cc620ff2bfcf02b42a09128f6", "score": "0.5508345", "text": "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "98955a07074c5f9d7b65cb4edac55bd6", "score": "0.54995877", "text": "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "title": "" }, { "docid": "2a1018c32a03eb53bdc4e273d245eb4b", "score": "0.5497446", "text": "function updateProduct() {\n\n $params = [\n 'name' => $this->product\n ];\n \n $response = getResponse(getConfigVar(\"api_url\"), \"products\", $params, [],'body');\n \n $this->qty = $response[\"results\"][0][\"qty\"];\n $this->price = $response[\"results\"][0][\"price\"];\n \n $product = get_page_by_title( $this->product, OBJECT, 'product' );\n \n $productID = $product->ID;\n \n update_post_meta( $productID, \"_stock\", $this->qty );\n update_post_meta( $productID, \"_price\", $this->price );\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "9ecc82591ba06b6a36749ed98ac6605d", "score": "0.54946727", "text": "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "title": "" }, { "docid": "807c599f788606e6432d3e0633f87027", "score": "0.5494425", "text": "public function update(Request $request,$id)\n {\n $product = Product::find($id);\n if ($request->updateimage) {\n $position = strpos($request->updateimage, ';');\n $sub=substr($request->updateimage, 0 ,$position);\n $ext=explode('/', $sub)[1];\n $name=time().\".\".$ext;\n $img=Image::make($request->updateimage)->resize(240,200);\n $upload_path='product/';\n $image_url=$upload_path.$name;\n $img->save($image_url);\n $product->image = $image_url;\n }\n $product->title = $request->title;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n return response()->json($product);\n\n }", "title": "" }, { "docid": "48fef9aa4b1db49fbd41de594ae52cd6", "score": "0.5494196", "text": "public function put($path, $data = null);", "title": "" }, { "docid": "a3080528f24f5a6310506fe05f776170", "score": "0.54941916", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "title": "" }, { "docid": "7b02b905255b0a4884cf4da903ed88b2", "score": "0.5492901", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('id', $id);\n\n if ($request->file('image')) {\n File::delete(public_path('images/' . $product->first()->image));\n $file = $request->file('image');\n $file_name = uniqid() . $file->getClientOriginalName();\n $file->move(public_path('/images'), $file_name);\n } else {\n $file_name = $product->first()->image;\n }\n\n $product->update([\n 'category_id' => $request->category_id,\n 'title' => $request->title,\n 'image' => $file_name,\n 'total_quantity' => $request->total_quantity,\n 'price' => $request->price,\n 'description' => $request->description,\n ]);\n\n $product = Product::find($product->first()->id);\n $product->color()->sync($request->color_id);\n $product->size()->sync($request->size_id);\n return redirect()->back()->with('success', 'updated success');\n }", "title": "" }, { "docid": "04652c1da37c7a438475c8d281a1b9fb", "score": "0.54925025", "text": "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "title": "" }, { "docid": "d93eb8ea18e437ad56170f6f49f20674", "score": "0.5491807", "text": "public function update(Entity $entity);", "title": "" }, { "docid": "2e6523045766c061920aeea9222af1fe", "score": "0.54858494", "text": "public function edit(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "bc41011f4e9854a51487a136c85c2353", "score": "0.54841125", "text": "public function updateEntity($entity = null);", "title": "" }, { "docid": "2a7096bf2a727a86ecc99d0ede5d263f", "score": "0.5483321", "text": "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "title": "" }, { "docid": "73aed3f2cb201636304e3d5dda73a09e", "score": "0.54824626", "text": "public function markAsChanged(ResolvedResource $resource);", "title": "" }, { "docid": "61329b7ef8ead3531f1a05acebdc3cd5", "score": "0.5479606", "text": "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "title": "" }, { "docid": "d6605be9a7cd37fa11f95b43e9749bd9", "score": "0.54651225", "text": "public function update($path, $time = null);", "title": "" }, { "docid": "5b72ae8e940480dd3b49bab90e39b090", "score": "0.5458525", "text": "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }", "title": "" }, { "docid": "0464e78c66c09f2b7a0600a8792cb854", "score": "0.5452974", "text": "public function update(Request $request, $id)\n {\n $validation = $request->validate([\n 'name' => 'required',\n 'email' => 'required',\n 'phone' => 'required',\n 'address' => 'required',\n 'city' => 'required',\n 'state' => 'required',\n 'country' => 'required',\n 'shop_name' => 'required',\n 'photo' => 'required'\n ]);\n\n $supplier = Supplier::find($id);\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n $supplier->city = $request->city;\n $supplier->state = $request->state;\n $supplier->country = $request->country;\n $supplier->shop_name = $request->shop_name;\n $supplier->photo = $request->photo;\n $supplier->status = 1;\n\n $photo = $request->newphoto;\n $old_photo = $supplier->photo;\n if ($photo) {\n if ($old_photo) {\n unlink($old_photo);\n }\n $first_position = strpos($photo, ';');\n $second_position = substr($photo, 0, $first_position);\n $ext = explode('/', $second_position)[1];\n $photo_name = Str::random(20).time().'.'.$ext;\n Image::make($photo)->resize(500, 400)->save(public_path('uploads/suppliers/' . $photo_name));\n $supplier->photo = 'uploads/suppliers/'.$photo_name;\n }\n $supplier->save();\n }", "title": "" }, { "docid": "247e5b3a01495ebf8d4c534d42ea515f", "score": "0.5451602", "text": "public function update(Request $request,$id){\n\n //validation\n $validator = Validator::make($request->all(), [\n 'name'=>'required|max:120',\n 'price'=>'required|numeric',\n 'discount'=>'required|numeric',\n 'description'=>'required',\n 'photo'=>'image',\n ]);\n if ($validator->fails()) {\n return redirect()->back()\n ->withErrors($validator)\n ->withInput(); \n\n } \n\n $inputs=[\n 'name'=>$request->input('name'),\n 'price'=>$request->input('price'),\n 'discount'=>$request->input('discount'),\n 'description'=>$request->input('description'),\n\n ];\n\n $product=Product::find($id);\n $product->update($inputs);\n if(!empty($request->file('photo'))){\n if(file_exists('uploads/products/'.$product->photo)){\n unlink('uploads/products/'.$product->photo);\n\n }\n \n //rename picture name\n $newName='product_'.time().'.'.$request->file('photo')->getClientOriginalExtension();\n //submit picture\n $request->file('photo')->move('uploads/products',$newName);\n $product->update(['photo'=>$newName]);\n }\n return redirect()->route('admin.product');\n\n }", "title": "" }, { "docid": "db96875d174f9e13964b6e7754664378", "score": "0.5450616", "text": "public function update(Request $request, $id)\n {\n $slider = Slider::find($id);\n\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('assets/img/slider/' . $filename);\n Image::make($image)->resize(1920, 1080)->save($location);\n $oldFilename = $slider->image;\n $slider->image = $filename;\n Storage::delete($oldFilename);\n }\n $slider->save();\n Session::flash('success', 'The slider was successfully updated!');\n return redirect()->route('admin.slider');\n }", "title": "" }, { "docid": "7866059d59e3ac76fe1a71f510712109", "score": "0.54483366", "text": "public function putStream($path, $resource, array $config = []);", "title": "" }, { "docid": "26fc5abe042df3b46cf35fa63b5ce2f0", "score": "0.5447613", "text": "public function update(Request $request, $id)\n {\n // Update the resource with the addressed ID\n $subcategory = Subcategory::where('id', $request['subcategory_id'])->first();\n $subcategory_uuid = DB::table('product_subcategory')->where('product_id', $id)->value('uuid');\n $subcategory_id = DB::table('product_subcategory')->where('product_id', $id)->value('id');\n $unit = Unit::where('id', $request['unit_id'])->first();\n $unit_uuid = DB::table('product_unit')->where('product_id', $id)->value('uuid');\n $unit_id = DB::table('product_unit')->where('product_id', $id)->value('id');\n\n $product = Product::find($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->description = $request['description'];\n $product->updated_by = Config::get('apiuser');\n $product->subcategories()->sync($subcategory->id);\n $product->subcategories()->updateExistingPivot($subcategory->id, array('uuid' => $subcategory_uuid, 'id' => $subcategory_id));\n $product->units()->sync($unit->id);\n $product->units()->updateExistingPivot($unit->id, array('uuid' => $unit_uuid, 'id' => $unit_id));\n $product->save();\n return response()->json([\n 'action' => 'update',\n 'status' => 'OK',\n 'entity' => $product->uuid,\n 'type' => 'product',\n 'user' => Config::get('apiuser')\n ], 200);\n }", "title": "" }, { "docid": "b482822e086a7ebee09ff81c09e4225d", "score": "0.54449975", "text": "public function update(Request $request, $id)\n {\n \\Validator::make($request->all(), [\n 'nama_product' => 'required', 'string', 'max:255', 'min:2',\n 'deskripsi' => 'required', 'string', 'max:255', 'min:8',\n 'stok' => 'required', 'max:1000',\n 'images' => 'file|image|mimes:jpeg,png,jpg',\n 'price' => 'required', 'max:20',\n ])->validate();\n \n $edit_product = Product::findOrFail($id);\n $edit_product->nama_product = $request->get('nama_product');\n $edit_product->deskripsi = $request->get('deskripsi');\n $edit_product->stok = $request->get('stok');\n if($request->file('images')){\n if($edit_product->images && file_exists(storage_path('app/public/' . $edit_product->images))){\n Storage::delete('public/'.$edit_product->images);\n $file = $request->file('images')->store('product_images', 'public');\n $edit_product->images = $file;\n }else{\n if($request->file('images')){\n $file = $request->file('images')->store('product_images', 'public');\n $edit_product->images = $file;\n }\n }\n }\n $edit_product->price = $request->get('price');\n \n if($request->get('status')){\n $edit_product->status = $request->get('status');\n }else{\n $edit_product->status = \"publish\";\n }\n\n \\Auth::user()->productId()->save($edit_product);\n\n return redirect()->route('manage-product.index')->with('status', 'Update Product Success!!');\n }", "title": "" }, { "docid": "fb30184e0b309716563a37352db2582d", "score": "0.5437578", "text": "public function put($data)\n {\n }", "title": "" }, { "docid": "e46fca820619683596020187e9c6b3b8", "score": "0.542987", "text": "public function updateImg(Request $request,$id)\n {\n $image = $request->file('image');\n $old_image = $request->get('old_image');\n\n $img_name =\"p_\".time().'.'.$image->getClientOriginalExtension();\n $path = $request->image->storeAs('products',$img_name,'public');\n\n $product = Product::find($id);\n $product->image = $path;\n $product->save();\n\n // return $image->getClientOriginalName();\n $exists = Storage::disk('public')->exists($old_image);\n if ($exists) {\n Storage::disk('public')->delete($old_image);\n } \n return $path;\n \n }", "title": "" }, { "docid": "90bfecb108e2227ad224fef4f176d822", "score": "0.54288775", "text": "public function update(ProductRequest $r, $id)\n {\n $r->validate([\n 'picture' => ['mimes:jpg,png,jpeg'], \n ]);\n\n $oldProduct = Product::findOrFail($id);\n\n if($r->hasFile('picture')) {\n \\Storage::disk('public')->delete('images/products/' . $oldProduct->picture);\n $file = $r->file('picture');\n $extension = $file->extension();\n $imgName = \\Str::slug($r->product_name) . '-' . time() . '.' . $extension;\n $file->storeAs('/images/products/', $imgName, 'public');\n } else {\n $imgName = $oldProduct->picture;\n }\n\n $oldProduct->update([\n 'product_name' => $r->product_name,\n 'picture' => $imgName,\n 'price' => $r->price,\n 'description' => $r->description,\n 'status' => $r->status,\n ]);\n\n return redirect()->route('admin.products.index')->with('success', 'Product Updated Successfully.');\n }", "title": "" }, { "docid": "90e900559eee2b9d3f91997a4f2fc922", "score": "0.5424842", "text": "public function update(StoreUpdateProductRequest $request, $id)\n {\n if(!$product = Product::find($id))\n return redirect()->back();\n\n $data = $request->all();\n\n if ($request->hasFile('image') && $request->image->isValid()) {\n\n if ($product->image && Storage::exists($product->image)){\n Storage::delete($product->image);\n }\n\n $imagePath = $request->image->store('products');\n $data['image'] = $imagePath;\n }\n \n $product->update($data);\n \n return redirect()->route('products.index')->with( 'message', 'Produto Editado'); \n }", "title": "" }, { "docid": "2fa0754ebc118bc9b4b721eefefed641", "score": "0.542287", "text": "public function update(StoreEditPartenaire $request, $id)\n {\n $partenaire = Partenaire::find($id);\n $partenaire->name = $request->name;\n $partenaire->url = $request->url;\n if($request->image != null){\n $partenaire->image = $request->image->store('','imgPartenaire');\n }\n $partenaire->save();\n return redirect()->route('partenaires.index',['partenaire'=> $partenaire->id]);\n \n }", "title": "" }, { "docid": "4d95f134a6e85e43f3f6f5bbc5cc2d52", "score": "0.54208726", "text": "public function update(Request $request, $id)\n {\n $nombre = $request->input('nombre');\n $imagen = $request->file('imagen');\n $descripcion = $request->input('descripcion');\n\n $ruta = \"-\";\n if($imagen){\n $ruta = $imagen->store('public'); \n $ruta = str_replace('public','storage',$ruta);\n }\n\n $categoria = Categoria::findOrFail($id);\n\n if($ruta!==\"-\"){\n $img = str_replace(\"storage/\", \"public/\", $categoria->imagen);\n $img = \"storage/\".$img;\n Storage::delete(asset('/storage/9yBlOG6KxNwaRoIrAKNpbBRr16q5PQyohbflIDcp.png'));\n }else{\n $ruta = $categoria->imagen;\n }\n\n $categoria->nombre = $nombre;\n $categoria->descripcion = $descripcion;\n $categoria->imagen = $ruta;\n $categoria->update();\n\n return redirect()->route('categoria.index');\n }", "title": "" }, { "docid": "a28ba9c40e06592529f38d6d19b89b16", "score": "0.54146737", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "67efbd9de14b40fa42d329e7897936e4", "score": "0.5414418", "text": "public function updatePreview()\n\t{\n\t\t // delete all files stored in the cache with the id of $this->id.'*.*';\n\t\t$fileHelper = new CFileHelper();\n\t\t$ff = $fileHelper->findFiles(Yii::app()->imageCache->imagePath('thumb'));\n\t\t$len = strlen($this->id);\n\t\t$info = new FileInformation();\n\t\tforeach ($ff as $f) {\n\t\t\t$info->path = $f;\n\t\t\tif (substr($info->filename, 0, $len) == $this->id){\n\t\t\t\tunlink($f);\n\t\t\t}\t\n\t\t}\t\n\t\t// let resource space do the work\n\t\t\n\t\t$s = Yii::app()->config->resourceSpaceApi.'api_import?id='.$this->id;\n\t\tif (Yii::app()->config->useCurl) {\n\t\t\tYii::log('Resource Space update through curl('.$s.')', CLogger::LEVEL_WARNING, 'application.models.Art.updatePreview');\t\t\t\n\t\t\t$run = Yii::app()->curl->run($s);\n\t\t} else {\t\t\t\n\t\t\tYii::log('Resource Space update through file_get_content('.$s.')', CLogger::LEVEL_WARNING, 'application.models.Art.updatePreview');\t\t\t\n\t\t\t$run = file_get_contents($s);\n\t\t}\t\n\t\tif ((is_object($run) && $run->hasErrors()) || (substr($run, 0, 33) != 'File added / updated for resource') ) {\n\t\t\tYii::log('Resource Space update failed.', CLogger::LEVEL_WARNING, 'application.models.Art.updatePreview');\t\t\t\n\t\t\t$this->addError('file', 'The resource space definition could not be updated.');\n\t\t} else {\n\t\t\tYii::log('Resource Space updated.', CLogger::LEVEL_INFO, 'application.models.Art.updatePreview');\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "e77df2eef2b14f6f8a9a8237b99d6e65", "score": "0.5411387", "text": "public function update($id)\n\t{\n\t\t$v = Validator::make(Input::all(), array('file|image'));\n\n\t\tif($v->fails()) return Redirect::back()->withErrors($v)->withInput();\n\n\t\t$p = Product::find($id)->update(Input::all());\n\n\t\tif(Input::hasFile('file')){\n\n\t\t\tInput::file('file')->move('uploads', 'product_'.$id.'.jpg');\n\n\t\t}\n\n\t\treturn Redirect::route('products.index')->with('alert.success', Alert::text('supp'));\n\t\t\n\t}", "title": "" } ]
15dc8b512055d2c4bc697d974a93755c
Proxy the method call to the process supervisor.
[ { "docid": "40179c6f966e9c99edc683e4c7b87701", "score": "0.0", "text": "public function __call(string $name, array $arguments)\n {\n return $this->proxyAction(Instruction::TYPE_CALL, $name, $arguments);\n }", "title": "" } ]
[ { "docid": "0fdee3176ab6fbe13d9f1c4dc9b3426b", "score": "0.61099404", "text": "public function handleMethod($request) {\n parent::handleMethod($request);\n return 'doProcess';\n }", "title": "" }, { "docid": "68d1b7deb3cb7c4892a28568a7939cc5", "score": "0.57067174", "text": "public function process() {}", "title": "" }, { "docid": "68d1b7deb3cb7c4892a28568a7939cc5", "score": "0.5705704", "text": "public function process() {}", "title": "" }, { "docid": "68d1b7deb3cb7c4892a28568a7939cc5", "score": "0.5705704", "text": "public function process() {}", "title": "" }, { "docid": "3f50ec275f996d154b1599f505f1ec5f", "score": "0.5689153", "text": "public function process() {\n }", "title": "" }, { "docid": "3f50ec275f996d154b1599f505f1ec5f", "score": "0.5689153", "text": "public function process() {\n }", "title": "" }, { "docid": "3f50ec275f996d154b1599f505f1ec5f", "score": "0.5689153", "text": "public function process() {\n }", "title": "" }, { "docid": "7c9e86fc3080bc506917316f9d0bf8fc", "score": "0.5667056", "text": "public function process()\n {\n }", "title": "" }, { "docid": "7c9e86fc3080bc506917316f9d0bf8fc", "score": "0.5667056", "text": "public function process()\n {\n }", "title": "" }, { "docid": "e7ad378697a68001e6f5698f5024cffc", "score": "0.5654572", "text": "protected function process()\n {\n }", "title": "" }, { "docid": "b22131d6c644dda0f832236198f7eb2d", "score": "0.5643931", "text": "public function process() {\n\t}", "title": "" }, { "docid": "fd99f0d57f2b216f87bb8358d3558fef", "score": "0.55975854", "text": "public function callMethod()\n {\n if (!$this->executed) {\n $this->executed = true;\n\n //TODO: implement code for calling method\n }\n }", "title": "" }, { "docid": "8731dc4bb9e8f8de8d3a069709dc7409", "score": "0.5548311", "text": "public function __invoke() {}", "title": "" }, { "docid": "81854094003706b2849acfad42d4a484", "score": "0.55097145", "text": "public function invoke();", "title": "" }, { "docid": "22a103ff43e83b8e87aa00bee9c9e1c1", "score": "0.5502697", "text": "abstract public function __call($method, $args);", "title": "" }, { "docid": "729e37f7fcdcfa4fc0111b051ac12815", "score": "0.54903686", "text": "public function setProcessSupervisor(ProcessSupervisor $process): void;", "title": "" }, { "docid": "defd3794c267dc84acb78c5819ee67f4", "score": "0.54861885", "text": "public function invoke()\n {\n }", "title": "" }, { "docid": "4a7c00843ec61953ca53f436a64dfcd9", "score": "0.5469911", "text": "public function process() {\n\t\t\n\t}", "title": "" }, { "docid": "5360de71587a5228523dbd243139f3f4", "score": "0.5447196", "text": "function __call($method,$args)\n {\n\n }", "title": "" }, { "docid": "a94d4a7b9e6d39d03672f28ed5a32dac", "score": "0.54457724", "text": "public function call()\n {\n }", "title": "" }, { "docid": "a94d4a7b9e6d39d03672f28ed5a32dac", "score": "0.54457724", "text": "public function call()\n {\n }", "title": "" }, { "docid": "a94d4a7b9e6d39d03672f28ed5a32dac", "score": "0.54457724", "text": "public function call()\n {\n }", "title": "" }, { "docid": "28541dc28305846ff325587e214bccdd", "score": "0.54208434", "text": "public function __invoke()\n {\n\n // copied/modified from: http://drupal.org/node/353494 ... this is ugly.\n // hopefully the future will bring a more elegant solution.\n $stack = debug_backtrace();\n $args = array();\n $eval_args = array();\n \n // make sure our method name is specified. determine our method name.\n if(!isset($stack[0]['args']) || count($stack[0]['args'])<1) return;\n $method = $stack[0]['args'][0];\n\n // make sure method exists.\n if(!method_exists($this,$method)) return;\n\n // get our args by reference.\n if(count($stack[0]['args'])>1){\n for($i=1; $i < count($stack[0][\"args\"]); $i++){\n $args[] = &$stack[0][\"args\"][$i];\n $eval_args[] = '$args['.($i-1).']';\n }\n } \n\n $eval_args = implode(',',$eval_args);\n \n // call our 'init' callbacks.\n $retval = null;\n $cb_name = get_class($this).'.'.$method;\n $cb_return = $this->callback_handler->fire($cb_name,'init',$args);\n \n // a callback is forcing an early return.\n if(!empty($cb_return->r)) return $cb_return->v;\n\n // call our requested method\n eval('$retval = $this->$method('.$eval_args.');');\n $this->callback_handler->store_retval($cb_name,$cb_name,$retval);\n\n // call our 'return' callbacks;\n $cb_return = $this->callback_handler->fire($cb_name,'return',$args);\n \n // reset our return value list for this process chain\n $this->callback_handler->reset_retvals($cb_name);\n \n // a callback is forcing an early return (taking over return value)\n if(!empty($cb_return->r)) return $cb_return->v;\n\n return $retval;\n\n }", "title": "" }, { "docid": "6d426d8c183ca62dbe6625ca80b53d4f", "score": "0.54115313", "text": "public function call();", "title": "" }, { "docid": "6d426d8c183ca62dbe6625ca80b53d4f", "score": "0.54115313", "text": "public function call();", "title": "" }, { "docid": "7440b77c9a0e0345a1f3694a047d6712", "score": "0.53723717", "text": "public function setPostProcess(callable $method);", "title": "" }, { "docid": "30eca780ee5ec19055b91f1492004034", "score": "0.537016", "text": "public function __call($method, $args)\n {\n \n }", "title": "" }, { "docid": "97248059ce8bddff95df81e4edc74261", "score": "0.5362688", "text": "function __call($method,$params){\n\t\treturn $this->__hessian__proxy__->call($method,$params);\n\t}", "title": "" }, { "docid": "9cc919f085066af1f69b971fc07ee0d5", "score": "0.53464687", "text": "function __call($method,$params) {\n\t\t\tif($this->gateway) {\n\t\t\t\tif(method_exists($this->gateway,$method)) {\n\t\t\t\t\t// Call\n\t\t\t\t\treturn call_user_func_array(array($this->gateway,$method),$params);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bba6cce3a82a9980730fee346c22e7ac", "score": "0.53442985", "text": "public function process()\n{\n}", "title": "" }, { "docid": "bba3b6e2fcd279cfad670acf436588d8", "score": "0.531666", "text": "public abstract function invoke() : void;", "title": "" }, { "docid": "cbeb71b63fa8d8ff67ffcb23fe3c0422", "score": "0.5313817", "text": "public function run()\n {\n $this->call(lop::class);\n }", "title": "" }, { "docid": "d80680a73c17c163a1f82e104f47e98b", "score": "0.53051156", "text": "private function doingSomethingElse()\n {\n echo 'Not an intercepted method';\n }", "title": "" }, { "docid": "5589cc9a42e312f0bf903ba686c9e053", "score": "0.52992904", "text": "public function run() {\n call_user_func_array([$this->_class, $this->_method], $this->_params);\n }", "title": "" }, { "docid": "1d26eed0fdad88509ff774f2b5a90d11", "score": "0.5298561", "text": "public function handle()\n {\n Supervisor::generate($this);\n }", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.52975565", "text": "public function process();", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.52975565", "text": "public function process();", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.52975565", "text": "public function process();", "title": "" }, { "docid": "dc6d8efe9510d72d2206b8f539d4ae2c", "score": "0.52975565", "text": "public function process();", "title": "" }, { "docid": "dfae238b512959d14d5ca4fd59feba92", "score": "0.527967", "text": "public function __call($method, array $args = []);", "title": "" }, { "docid": "f173a4bd85344d0da40aaa89c9f1c9ef", "score": "0.527039", "text": "public function invoke(Object $proxy, Method $method, array $args = null);", "title": "" }, { "docid": "b9220305fa3ec4b9a1b64708f4c27293", "score": "0.5259967", "text": "public function process()\n {\n // nothing to process here\n }", "title": "" }, { "docid": "39ae1eec6ce7e82537edb9775c6df4bc", "score": "0.525494", "text": "public function __invoke() {\n\n }", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.52494264", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.52494264", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "a153fd1d5371b5f5e7c2f6b6723f4921", "score": "0.52494264", "text": "public function __call($method, $arguments);", "title": "" }, { "docid": "0cc555b8fb389c22db69de8093af39fe", "score": "0.52476716", "text": "public function exec()\n {\n }", "title": "" }, { "docid": "0cc555b8fb389c22db69de8093af39fe", "score": "0.52476716", "text": "public function exec()\n {\n }", "title": "" }, { "docid": "672cd36599c02aa061fefb366093f898", "score": "0.5241397", "text": "public function exec ()\n {\n }", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.5234361", "text": "public function __invoke();", "title": "" }, { "docid": "22ff0403333b6cb47d295bdff2b87dec", "score": "0.5234361", "text": "public function __invoke();", "title": "" }, { "docid": "ca466e3a870fc1feb1040d112c5b5634", "score": "0.5232012", "text": "public function __call($method, $arg){\n\t\treturn call_user_func_array(array($this->i, $method), $arg);\n\t}", "title": "" }, { "docid": "835651da07b53deccac5ab648d28a918", "score": "0.5227712", "text": "function __invoke()\n {\n }", "title": "" }, { "docid": "f5434f33be680afd668d6213a87c7638", "score": "0.52266026", "text": "public function __invoke()\n {\n echo \"This is invoke function\";\n }", "title": "" }, { "docid": "abb180ac6d82455aa22616c470993f15", "score": "0.52260107", "text": "public function call(string $method_name);", "title": "" }, { "docid": "320a0a24e1679221deb353918037de54", "score": "0.5223349", "text": "function onProcess () {\r\n }", "title": "" }, { "docid": "e4db6274f9f197634a1d436712abe49a", "score": "0.52225554", "text": "abstract public function __invoke();", "title": "" }, { "docid": "fec7192abb9333dfdebfde2408f5bc69", "score": "0.5212894", "text": "public function exec()\n {\n }", "title": "" }, { "docid": "d7216c3eb1a12230fb10ad05fa08c17d", "score": "0.5203808", "text": "public function __invoke(){\n }", "title": "" }, { "docid": "4589707dde9ad41e6bdcb19acfba8f26", "score": "0.5200374", "text": "public function handle()\n {\n $method = $this->argument('method');\n\n if (! method_exists($this, $method)) {\n $this->info(json_encode($this->electrum->sendRequest($method, $this->get_params())));\n } else {\n $this->$method();\n }\n }", "title": "" }, { "docid": "222bdd91a0cc08099f987c5242148235", "score": "0.51726156", "text": "public function handle()\n {\n $action = $this->getAction();\n\n $method = \"call\" . ucfirst($action);\n\n if (!method_exists($this, $method)) {\n $this->error(\"Method not found\");\n return;\n }\n $this->$method();\n }", "title": "" }, { "docid": "50bdbc6ff3d94f2482324b733acec171", "score": "0.5158764", "text": "public function process(Request $request)\n {\n print_r(__CLASS__.\": doing the base process\".\"\\n\");\n }", "title": "" }, { "docid": "c49fbbb1dd3069265a0502830b15be2a", "score": "0.5146425", "text": "private function _handleMethodCall()\n {\n if (!isset($this->__GET['call_object'])\n || !dp_strlen($call_object = $this->__GET['call_object'])) {\n if (!isset($this->__GET['param'])) {\n $this->mrEnvironment->{$this->__GET['method']}();\n } else {\n $this->mrEnvironment->\n {$this->__GET['method']}($this->__GET['param']);\n }\n }\n else {\n if (FALSE !== ($call_object =\n $this->mrDpUniverse->findDpObject($call_object))) {\n if (isset($this->__GET['method'])\n && dp_strlen($method = $this->__GET['method'])\n && $call_object->isValidClientCall($method)) {\n if (!isset($this->__GET['param'])) {\n $call_object->{$this->__GET['method']}();\n } else {\n $call_object->{$this->__GET['method']}\n ($this->__GET['param']);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "49374b285dc723df8a74a85d76357b18", "score": "0.5144096", "text": "abstract function __invoke();", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5142608", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5142608", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5142608", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "329a91f5cfd60f7fd4aa919e073d09a7", "score": "0.5142608", "text": "public function __invoke()\n {\n }", "title": "" }, { "docid": "fd2aaccda66ed0f246cf572c148317cf", "score": "0.5129069", "text": "protected function preInvoke()\n {\n // optionally implement in concrete service\n }", "title": "" }, { "docid": "63a509da8c11b8c60380faa6eafcc6cf", "score": "0.51203996", "text": "public function process($arg)\n {\n }", "title": "" }, { "docid": "73426b3266c665356e0b9ca4336ea915", "score": "0.5114923", "text": "public function call() {\n return $this->method->invokeArgs($this->instance, $this->arguments);\n }", "title": "" }, { "docid": "a26fadf5b76bbeddd38d5fbeefbf8d4c", "score": "0.5112936", "text": "public function handle()\n {\n $method_name = '_' . $this->argument('method');\n\n if ( ! method_exists($this, $method_name) ) {\n $this->warn('Метод не известен - ' . $this->argument('method'));\n return;\n }\n\n $this->$method_name();\n }", "title": "" }, { "docid": "f840bfec85f8c53ec214614b80e337a5", "score": "0.5109583", "text": "public function call_method() {\n $this->action_filter('before_filter');\n\n if (method_exists($this->controller, 'remap')) {\n $this->method = 'remap';\n }\n else {\n // is_callable() returns TRUE on some versions of PHP 5 for private and protected\n // methods, so we'll use this workaround for consistent behavior\n if ( ! in_array(strtolower($this->method), $this->class_methods)) {\n if (method_exists($this->controller, 'missing')) {\n $this->method = 'missing';\n }\n else {\n $this->reform_override_404();\n }\n }\n }\n\n call_user_func_array(array($this->controller, $this->method), array_slice($this->uri->rsegment_array(), 2));\n }", "title": "" }, { "docid": "c3fd29720b76b2763600f12526d4309e", "score": "0.5106844", "text": "public function call() {\n\t\t$env = $this->app->environment();\n\t\tif (isset($env['HTTP_X_HTTP_METHOD_OVERRIDE'])) {\n\t\t\t// Header commonly used by Backbone.js and others\n\t\t\t$env['lee.method_override.original_method'] = $env['REQUEST_METHOD'];\n\t\t\t$env['REQUEST_METHOD'] = strtoupper($env['HTTP_X_HTTP_METHOD_OVERRIDE']);\n\t\t} elseif (isset($env['REQUEST_METHOD']) && $env['REQUEST_METHOD'] === 'POST') {\n\t\t\t// HTML Form Override\n\t\t\t$req = new \\Lee\\Http\\Request($env);\n\t\t\t$method = $req->post($this->settings['key']);\n\t\t\tif ($method) {\n\t\t\t\t$env['lee.method_override.original_method'] = $env['REQUEST_METHOD'];\n\t\t\t\t$env['REQUEST_METHOD'] = strtoupper($method);\n\t\t\t}\n\t\t}\n\t\t$this->next->call();\n\t}", "title": "" }, { "docid": "52f6234191d380ccf2561e4558b29059", "score": "0.5097105", "text": "public function __invoke()\n {\n Helpers::step('<options=bold>Executing Build Commands</>');\n\n foreach (Manifest::buildCommands($this->environment) as $command) {\n Helpers::step('<comment>Running Command</comment>: '.$command);\n\n $process = Process::fromShellCommandline($command, $this->appPath, null, null, null);\n\n $process->mustRun(function ($type, $line) {\n Helpers::write($line);\n });\n }\n }", "title": "" }, { "docid": "a215fc6f9243a2d2f760ff20588edcb6", "score": "0.50963676", "text": "protected function process() {\n // If this is not an OO daemon, process will be a procedural function called\n // by DrushDaemon::process(), so just return the parent::process() function.\n if (isset($this->processCallback)) {\n return parent::process();\n }\n\n return $this->processItems();\n }", "title": "" }, { "docid": "a10fd90f8590ab737df60cc52aa96c0b", "score": "0.5095584", "text": "abstract public function invokeTarget(): mixed;", "title": "" }, { "docid": "39782f86e2929621fad7dca164bf9843", "score": "0.5087276", "text": "public function __call($method, array $arguments);", "title": "" }, { "docid": "1555669ba184f10f89605f0c1eac7c23", "score": "0.5075312", "text": "function __call($method, $params) {\n\t\t$this->warn(\"dont know how to do: $method\");\n\t}", "title": "" }, { "docid": "67bd2f9e2c075ec1c42582f5144f273a", "score": "0.50728357", "text": "protected abstract function process();", "title": "" }, { "docid": "d5465590c6f356a2f559c1ca19eb3188", "score": "0.50606483", "text": "public function __call($method, array $arguments = [])\n {\n if (!is_callable([$this->process, $method])) {\n throw new \\RuntimeException('Method ' . $method . ' not exists');\n }\n\n return call_user_func_array([$this->process, $method], $arguments);\n }", "title": "" }, { "docid": "7785054f9bc6a7e15493fe7cb8b72919", "score": "0.50564927", "text": "protected function callCommandMethod()\n {\n $preparedArguments = [];\n /** @var Argument $argument */\n foreach ($this->arguments as $argument) {\n $preparedArguments[] = $argument->getValue();\n }\n $commandResult = call_user_func_array([$this, $this->commandMethodName], $preparedArguments);\n if (is_string($commandResult) && $commandResult !== '') {\n $this->response->appendContent($commandResult);\n } elseif (is_object($commandResult) && method_exists($commandResult, '__toString')) {\n $this->response->appendContent((string)$commandResult);\n }\n }", "title": "" }, { "docid": "2c68d8c5a723459572d318a2d9bdd843", "score": "0.50546896", "text": "function __call($method, $args){\n\t\tif(!method_exists($this, $method))\n\t\t\treturn parent::__call($method, $args);\n\t}", "title": "" }, { "docid": "e9e89436c1d115f716d2e8c0127249a0", "score": "0.5037621", "text": "public function __call(string $method, array $args): mixed;", "title": "" }, { "docid": "cf703b5c5eacdbedfcdde1d0f4d4bb5d", "score": "0.50345606", "text": "function __invoke()\n {\n }", "title": "" }, { "docid": "cf703b5c5eacdbedfcdde1d0f4d4bb5d", "score": "0.50345606", "text": "function __invoke()\n {\n }", "title": "" }, { "docid": "cf703b5c5eacdbedfcdde1d0f4d4bb5d", "score": "0.50345606", "text": "function __invoke()\n {\n }", "title": "" }, { "docid": "a5b21a03d6ce41c4827cc8d97b5b6275", "score": "0.50116605", "text": "abstract public function call();", "title": "" }, { "docid": "c093676d79e1cff66dda6eba45ac705f", "score": "0.50064266", "text": "public function __call($name, $arg){\n\t}", "title": "" }, { "docid": "cba627bda5e8a0d2d5ceab46a929bf4e", "score": "0.5001059", "text": "public static function invoke();", "title": "" }, { "docid": "8e351ba2e97dd6faba3544c1e8e1198b", "score": "0.49943036", "text": "abstract protected function _process();", "title": "" }, { "docid": "e1ee0b63e40c9c5e152acbb712640271", "score": "0.4992288", "text": "public function getRealMethod()\n {\n return parent::getMethod();\n }", "title": "" }, { "docid": "c2bb6f959a0ef9035dac032d7343a657", "score": "0.49880037", "text": "public function __call(string $method, array $arguments);", "title": "" }, { "docid": "2e9308a988d0a49fe117fba6b6351a90", "score": "0.49795565", "text": "public function startProcess();", "title": "" }, { "docid": "501986923264b7f2413a064d6c8eacdb", "score": "0.49773088", "text": "public function __call($method, $parameters);", "title": "" }, { "docid": "501986923264b7f2413a064d6c8eacdb", "score": "0.49773088", "text": "public function __call($method, $parameters);", "title": "" }, { "docid": "e397c0d856e4598f4874551cd69bfa2b", "score": "0.497526", "text": "public function __call($method, $args){ // lambda boiler plate !!\n return call_user_func_array($this->$method,$args); // don't forget 'return'\n }", "title": "" }, { "docid": "16263b0d799acbc57606569a51e7405b", "score": "0.49710348", "text": "public function __invoke()\n {\n echo 'good job in single action controller using magic method invoke';\n }", "title": "" }, { "docid": "5b31d3026933874922a36a73fc0fabd2", "score": "0.4967423", "text": "public function __call( $method, $param) {\n\t$this->obj();\n\treturn call_user_func_array(array(&$this->instance, $method),$param);\n }", "title": "" }, { "docid": "01c320191d2b332bdfc999e7d3a1b860", "score": "0.4964089", "text": "public function run()\n {\n // overide..\n }", "title": "" }, { "docid": "8eff133a000fbad0b870503c24bb940f", "score": "0.49615854", "text": "private function beforeDoingSomething()\n {\n echo 'Not actually an intercepted method';\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "28c1c58c9ff4ab4d4298beab0a021d7c", "score": "0.0", "text": "public function index(Request $request)\n {\n $productTypes = ProductType::all();\n if ($request->has('filter')) {\n if ($request->has('filter_name')) {\n $productTypes = $productTypes->filter(function ($productType) use ($request) {\n return mb_strpos($productType->name, $request->filter_name) === true;\n });\n }\n }\n $option = [\n 'path' => url('inventory/product-type'),\n ];\n $paginator = new ServicePaginator($productTypes, 10, $request->page, $option);\n $productTypes = $paginator->paginate();\n\n return view('inventory::product-type.index', compact('productTypes'));\n }", "title": "" } ]
[ { "docid": "619215bb4339ad93d666260778b90bfe", "score": "0.7755139", "text": "public function index()\n {\n $fields = $this->parseFields();\n $filter = $this->parseFilters();\n $sort = $this->parseOrders();\n $paging = $this->parsePaging();\n $data = $this->listResources($fields, $filter, $sort, $paging);\n if ($this->title) {\n $data['title'] = $this->title;\n }\n return self::getResponse()->setResType('view')\n ->setHeader(DefaultController::$defaultViewHeaders)\n ->setView($this->viewList)\n ->setData($data)\n ->send();\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "6d81b7e1cab44c0c92f881f2877d4ed0", "score": "0.7306879", "text": "public function index()\n {\n $this->show_list();\n }", "title": "" }, { "docid": "e5aaa68b60a83d4042e360c0c15cd0b6", "score": "0.7268604", "text": "public function index()\n {\n try {\n $resources = $this->resourceRepository->all(['resourceable']);\n return $this->respondWithSuccess('Resources Loaded.', [\n 'resources' => ResourceResource::collection($resources)\n ]);\n } catch (Exception $e) {\n return $this->respondWithError($e->getMessage());\n }\n }", "title": "" }, { "docid": "ac3339bd1cec8bfe75390af276cfe9dc", "score": "0.7214969", "text": "public function index() {\n return view('acl::resource.index', [\n 'rows' => Resource::paginate(30)\n ]);\n }", "title": "" }, { "docid": "ec9fe93f7f0c8ef48fa8819d15129846", "score": "0.71625596", "text": "public function listAction()\r\n {\r\n $model = $this->getModel();\r\n $this->view->results = $model->fetchAll();\r\n }", "title": "" }, { "docid": "5d82cac8658bf58325423157f5868803", "score": "0.7101858", "text": "function index(){\n\t\t$this->listall();\n\t}", "title": "" }, { "docid": "6cb095287ba7893cf5db9fd09be1c994", "score": "0.7052246", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n //GET LISTING SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t$this->view->listings = Engine_Api::_()->getDbTable('listings', 'list')->userListing($list->owner_id, $list->listing_id);\n\n if (count($this->view->listings) <= 0) {\n return $this->setNoRender();\n } \n }", "title": "" }, { "docid": "0e0625aecfc34f0729e33ff2660b6438", "score": "0.7027799", "text": "public function listingAction()\r\n {\r\n }", "title": "" }, { "docid": "d080dc96edad97480f40b6836d57b19b", "score": "0.7016012", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = DaerahOperasi::query()->where('status',true);\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "6b46ad2035db8f7885c8fcffe29f4ea2", "score": "0.7012276", "text": "public function actionList()\n {\n $categories = Category::find()->where(['status' => Category::AVAILABLE_MENU])->all();\n $all = Object::findAll(['visible' => 1]);\n return $this->render('index', [\n 'categories' => $categories,\n 'all' => $all,\n ]);\n }", "title": "" }, { "docid": "685fedab8ec30d9717b92d6aaf1a949a", "score": "0.6993658", "text": "public function listAction()\n\t{ \n\n\t\t// Get Sorting Configuration \n\t\t$sorting = $this->configureSorting();\n\t\t$maxProducts = $this->settings['maxAdsPerPage'];\n\t\t// Pagination Cofiguration\n\t\tif ($maxProducts != '') {\n\t\t\t$paginateConfiguration = array('itemsPerPage' => $maxProducts, 'insertAbove' => 0, 'insertBelow' => 1);\n\t\t} else {\n\t\t\t$paginateConfiguration = array('insertAbove' => 0, 'insertBelow' => 0);\n\t\t}\n\t\t$this->view->assign('configure', $paginateConfiguration);\n\t\t// Detail Page Id\n\t\t$detailPage = $this->settings['detailPageId'];\n\t\t$this->view->assign('detailPageId', $detailPage);\n\t\t\n\t\t// Fetch Products\n\t\t$products = $this->productsRepository->findProducts($sorting);\n\t\t$this->view->assign('product', $products);\n\t}", "title": "" }, { "docid": "f3c82870023b104cf3d41500546f04fe", "score": "0.6969016", "text": "public function listAction() {\n\t\t$lookupSession = $this->_helper->osid->getCourseManager()->getCourseCatalogLookupSession();\n\t\t$this->view->catalogs = $lookupSession->getCourseCatalogs();\n\t\t\n\t\t$this->view->title = 'Available Catalogs';\n\t\t$this->view->headTitle($this->view->title);\n }", "title": "" }, { "docid": "352cbf4ef1ef88715709090483c4f5d1", "score": "0.69540364", "text": "public function index()\n {\n $cardsList = CardsList::paginate(15);\n return CardsListResource::collection($cardsList);\n }", "title": "" }, { "docid": "b2127e4d9c0a879ae387cb11b315a1ec", "score": "0.69433725", "text": "public function indexAction()\n {\n\t\t// Default page setup is all resources displayed\n\t\t$this->countOptions['rsrc_type_id'] = DatabaseObject_ResourceType::$event;\n\t\t$this->resourceOptions['rsrc_type_id'] = DatabaseObject_ResourceType::$event;\n\t\t$this->render();\n }", "title": "" }, { "docid": "20a3c49baee8b4f404331b580d175c47", "score": "0.69310373", "text": "public function list() {\n\n // Checking allowed method\n if ($this->http->method() != 'GET') {\n $this->json->sendBack([\n 'success' => false,\n 'code' => 403,\n 'message' => 'This API onlsy supports method GET'\n ]);\n return;\n }\n\n $get_data = $this->http->data('GET');\n\n // Allow to only query 100 articles at a time\n if (!isset($get_data['limit']) || $get_data['limit'] > 100 ) {\n $get_data['limit'] = 100;\n }\n\n $this->model->load('blog/blog');\n $response = $this->model->blog->listRecords($get_data);\n\n unset($response['success']);\n\n $this->json->sendBack([\n 'success' => true,\n 'code' => 200,\n 'data' => $response\n ]);\n return;\n }", "title": "" }, { "docid": "78618d51f1162dbfe57d94dc54a00564", "score": "0.6909516", "text": "public function index()\n {\n $resources = Resource::all();\n return view('admin.resources.index', compact('resources'));\n }", "title": "" }, { "docid": "e4f860b51b85fbc3664e6a210482162d", "score": "0.68783826", "text": "public function index()\n\t{\n\t\t$filter = array(\n\t\t\t'name' \t\t\t=> Input::get('name'),\n\t\t\t);\n\n\t\t$resources = Resource::where(function($query){\n\t\t\tif(Input::get('name', null))\n\t\t\t\t$query->where('name', 'LIKE', '%' . Input::get('name') . '%');\n\t\t})\n\t\t->orderBy('name', 'asc')\n\t\t->paginate();\n\n\t\t$index = $resources->getPerPage() * ($resources->getCurrentPage()-1) + 1;\n\t\treturn View::make('resource.index')\n\t\t\t->with('resources', $resources)\n\t\t\t->with('index', $index)\n\t\t\t->with('filter', $filter);\n\t}", "title": "" }, { "docid": "b04d987b6c4dbb93710d7a4d57ff157f", "score": "0.68567383", "text": "public function showList()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "1d7f4db88d30c402e0790637ffc7fd6c", "score": "0.68518335", "text": "public function index()\n {\n //\n return DishResource::collection(Dish::paginate());\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.6829548", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "adc6c1fac44768e67a938fe2c4fc3ca5", "score": "0.6827", "text": "public function index()\n {\n $resourceList = Snippet::all();\n\n $resourceList = $this->decorator->decorateList($resourceList->all());\n\n return $this->respond([\n 'data' => $resourceList\n ]);\n }", "title": "" }, { "docid": "db795c6fc7243bc4d68f7936f230581b", "score": "0.6824872", "text": "public function index()\n {\n $itemnames = itemname::paginate(9);\n\n return itemnameResource::collection($itemnames);\n }", "title": "" }, { "docid": "bed9bad3d9d68501c7cd402bf9cb5712", "score": "0.68052477", "text": "public function index()\n {\n $collections = Collection::filter()->paginate();\n\n return CollectionResource::collection($collections);\n }", "title": "" }, { "docid": "b2e04f7e31617a13cb7b2b7b2ba7b47c", "score": "0.6796558", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist($total, $roms) = Theme_Service_Rom::getList($page, $perpage);\n\t\t$this->assign('roms', $roms);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t}", "title": "" }, { "docid": "bef2afea068ad5239f1bf271014339d0", "score": "0.6778475", "text": "public function showList()\n {\n if (isset($this->post['page']) || isset($this->get['page'])) {\n if ($this->post) {\n $this->doListing($this->criteria, $this->orderBy);\n }\n if ($this->get) {\n $this->doPagination();\n }\n } else {\n //..destrói todas as sessões gravadas e cria uma view limpa.\n Session::destroySession('sqlData');\n Session::destroySession('criteria');\n Session::destroySession('orderBy');\n Session::destroySession('limit');\n Session::destroySession('lastPage');\n $this->viewList->show();\n }\n }", "title": "" }, { "docid": "8d6e2fdd2785fe46ed4465ad994a05e6", "score": "0.67741334", "text": "public function index()\n {\n return ItemResource::collection(Item::all(), Response::HTTP_OK);\n }", "title": "" }, { "docid": "832b0b1a8ad120ab04049782d56603d1", "score": "0.67585295", "text": "public function listAction()\n {\n $status = $this->getDoctrine()\n ->getRepository(Status::class)\n ->findAll();\n\n if (!$status) {\n throw $this->createNotFoundException(\n 'No status found'\n );\n }\n return $this->render(\n 'status/list.html.twig',\n array('status' => $status)\n );\n }", "title": "" }, { "docid": "801fd2ede943b983860e4f8b196c6a1d", "score": "0.67583203", "text": "public function listAction()\n {\n $this->view->projects = ProjectCatalog::getInstance()->getActives();\n $this->setTitle('List the Project');\n }", "title": "" }, { "docid": "4ee1d03a7835a54341989f25ecc11a12", "score": "0.67533183", "text": "public function ListView()\n {\n $this->Render();\n }", "title": "" }, { "docid": "26f513b71bf4203aa55a3b2ad88593a0", "score": "0.6751154", "text": "public function index ()\n {\n $model = $this->getModel();\n $data = $model::getWhere( $model )\n ->orderByRaw( $this->orderField )->paginate( $this->pageNum );\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "90225ecf05155b5ce68061d28310401f", "score": "0.6743644", "text": "public function index()\n {\n $lists = Lists::get();\n\n if ($lists->isEmpty()){\n return $this->_result('No lists on the database', 404);\n } else {\n return $this->_result($lists);\n }\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "295efb639c3bbf287a3495dfebecfc27", "score": "0.6735022", "text": "public function display_list(){\n\t\t\n\t\t$collection = new TestGroup_Collection();\n\t\t$variables = array(\n\t\t\t'collection' => $collection->getPaginated(),\n\t\t\t'pagination' => $collection->getPagination(),\n\t\t\t'sorters' => $collection->getSortableLinks(),\n\t\t);\n\t\t\n\t\tBackendLayout::get()\n\t\t\t->prependTitle('Список элементов')\n\t\t\t->setLinkTags($collection->getLinkTags())\n\t\t\t->setContentPhpFile(self::TPL_PATH.'admin_list.php', $variables)\n\t\t\t->render();\n\t}", "title": "" }, { "docid": "a91ed5b6fa568bb8f34f7f1cb4eca554", "score": "0.6725086", "text": "public function listAction ()\n {\n return $this->render('ListsCompanystructureBundle:' . $this->baseTemplate . ':list.html.twig');\n }", "title": "" }, { "docid": "d822a771e046d38bc3baff6e1aecd775", "score": "0.67234546", "text": "public function index()\n {\n $attractions = Attraction::paginate();\n return new ListCollection($attractions);\n // return response()->successWithKey(ListResource::collection($attractions)->response()->getData(), 'attractions');\n }", "title": "" }, { "docid": "8cbe6f8b1b6b1ca1028e0172087e902f", "score": "0.671974", "text": "public function index()\n {\n $this->authorize('list', Query::class);\n\n return $this->ok($this->repo->paginate($this->request->all()));\n }", "title": "" }, { "docid": "ddf22eae2eb3a9afa79f4e227fbe85eb", "score": "0.67160857", "text": "public function ListAction()\r\n {\r\n $this->loadLayout();\r\n\r\n //add breadcrumbs\r\n $breadcrumbs = $this->getLayout()->getBlock('breadcrumbs');\r\n $breadcrumbs->addCrumb(\r\n 'home', array(\r\n 'label' => Mage::helper('CrmTicket')->__('Home'),\r\n 'title' => Mage::helper('CrmTicket')->__('Go to Home Page'),\r\n 'link' => Mage::getBaseUrl()\r\n )\r\n );\r\n $breadcrumbs->addCrumb(\r\n 'CrmTicket', array(\r\n 'label' => Mage::helper('CrmTicket')->__('Knowledge database'),\r\n 'title' => Mage::helper('CrmTicket')->__('Knowledge database'),\r\n 'link' => Mage::getUrl('CrmTicket/Front_Kb')\r\n )\r\n );\r\n\r\n $productId = $this->getRequest()->getParam('product_id');\r\n $product = Mage::getModel('catalog/product')->load($productId);\r\n Mage::register('crm_product', $product);\r\n\r\n $breadcrumbs->addCrumb(\r\n 'Product', array(\r\n 'label' => $product->getName(),\r\n 'title' => $product->getName()\r\n )\r\n );\r\n\r\n $this->renderLayout();\r\n }", "title": "" }, { "docid": "34c6952fbec4a94d7dfcf17341a14155", "score": "0.6712584", "text": "public function list()\n {\n $query = $this->crud_m->read();\n $data = array(\n 'title' => 'Data Users',\n 'data' => $query\n );\n $this->load->view('crud_view', $data, FALSE);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "f83b91372935d0e79b8188b7c36e777b", "score": "0.67089826", "text": "public function index()\n {\n return VariantResource::collection(Variant::paginate(5));\n }", "title": "" }, { "docid": "8dc49bad81dcd62fc2bee50fa0f6cde0", "score": "0.67058814", "text": "public function actionList()\n\t{\n\t\t$this->getScriptRegistrar()->registerScript(new Script('dream/dream-list.js'));\n\t\treturn $this->render('dream-list', [\n\t\t\t'canFilter' => true,\n\t\t\t'formAction' => '/search/list'\n\t\t]);\n\t}", "title": "" }, { "docid": "839dcdf11f716846642699f3d920ee15", "score": "0.67012167", "text": "public function index()\n {\n // Get Products\n $products = Product::orderBy('created_at', 'desc')->paginate(100);\n\n // Return collection of Products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "2b1fabb72b908dfe49918e2514cc9637", "score": "0.67009133", "text": "public function index(){\n\n $resources = Resources::orderBy('id', 'desc')->get();\n\n return view('members.resources.overview', compact('resources'));\n }", "title": "" }, { "docid": "a52c0178145cd251c1e2992b130c6b5b", "score": "0.6690429", "text": "public function listing() \n\t{ \n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\n\t\t$link \t\t\t\t\t= breadcrumb();\n\t\t$data['breadcrumb'] \t= $link;\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tFetch pages list from database \n\t\t -------------------------------------------------------------*/\n\t\t$data['pages_list']\t\t=\t\t$this->mod_pages->get_all();\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t\t=\t\t$this->lang->line('label_static_pages_page_title');\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t\t= \t\t$this->load->view(\"pages/pages_lists\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t}", "title": "" }, { "docid": "aec4befd55531e0139482e045f820700", "score": "0.6682151", "text": "public function listingAction() {\n\t\t$category = Engine_Api::_()->getItem('experience_category', $this->_getParam('category'));\n\t\tif( $category ){\n\t\t\tEngine_Api::_()->core()->setSubject($category);\n\t\t}\n\t\t// Search Params\n\n\t\t// Do the show thingy\n\t\t\t// Get an array of friend ids\n\t\t\t// Get stuff\n\t\t\t// unset($values['show']);\n\n\t\t// Get experience paginator\n\n\t\t// Render\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\n\t}", "title": "" }, { "docid": "d8b31b9075f8d0e44e874177808829ae", "score": "0.6679244", "text": "public function index() {\n $this->display(\n 'post/list.html.twig',\n [\n 'posts' => Post::getInstance()->getAll(),\n ]\n );\n }", "title": "" }, { "docid": "0a8592943b60ef544a636ed3cf60401b", "score": "0.66778135", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $articles = $em->getRepository('VitrineBundle:Article')->findAll();\n\n return $this->render('VitrineBundle:Article:list.html.twig', array(\n 'articles' => $articles,\n ));\n }", "title": "" }, { "docid": "a334c5a280346b8ee428e51fa7cad7f5", "score": "0.6662709", "text": "public function index()\n {\n $people = People::latest()->paginate(10);\n return PeopleResource::collection($people);\n }", "title": "" }, { "docid": "4104b991af0a28a3c1c61639ca8bb994", "score": "0.666178", "text": "public function index()\n {\n $this->setDefaultData();\n $this->paginate = [\n 'contain' => ['RegisteredUsers', 'Listings'],\n 'conditions' => ['RegisteredUsers.username'\n => $this->Auth->user()['username']]\n ];\n $watchingLists = $this->paginate($this->WatchingLists);\n\n $this->set(compact('watchingLists'));\n $this->set('_serialize', ['watchingLists']);\n }", "title": "" }, { "docid": "315d8530da87836a0e7b0995b1cdbb0a", "score": "0.66505045", "text": "public function listAction() {\n\t\t// Preload info\n\t\t$category = Engine_Api::_()->getItem('experience_category', $this->_getParam('category'));\n\t\tif( $category ){\n\t\t\tEngine_Api::_()->core()->setSubject($category);\n\t\t}\n\n\t\t// Search Params\n\n\n\t\t// Get paginator\n\t\t// Render\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\n\t}", "title": "" }, { "docid": "03808d2d6d000fb1319fe742e01d9036", "score": "0.6646285", "text": "public function action_list()\n {\n $page = $this->request->param('page', 1);\n\n $m = new Model_Client();\n $client_list = $m->get_page($page);\n\n $body = View::factory('client/list');\n\n $body->set_global('title', \"Client Page {$page}\");\n $body->bind('client_list', $client_list);\n\n $this->body = $body;\n }", "title": "" }, { "docid": "02c8166c695e8bc3564f2f2bec85604e", "score": "0.6638152", "text": "public function index()\n {\n return ResponseHelper::findSuccess(\n 'Cms data',\n CmsResource::collection(Cms::all())\n );\n }", "title": "" }, { "docid": "85549542de9c758b6a3d4a16f168b2ce", "score": "0.66364837", "text": "public function index()\n {\n return BookResource::collection(Book::paginate(10));\n }", "title": "" }, { "docid": "ee7b30dd0dba246122a26d0716451cd3", "score": "0.6636415", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_building->get_all();\n\t\t$this->template->set('title', 'Building List');\n\t\t$this->template->load('template', 'contents', 'building/building_list', $data);\n\t}", "title": "" }, { "docid": "8515c32bb273c939079fe494608b7eaa", "score": "0.6633632", "text": "public function index()\n {\n $alunos = Aluno::paginate(10);\n return AlunoResource::collection($alunos);\n }", "title": "" }, { "docid": "7c63c6204952f65da01fd3b885ff05fb", "score": "0.66233116", "text": "public function list(){\n\t\t$data = $this->category_model->getAll();\n\n\t\tinclude_once 'views/category/list.php';\n\t}", "title": "" }, { "docid": "3be910f9eb3367f879662cbb48fa2a75", "score": "0.66174275", "text": "public function index()\n {\n $list_obj = Article::all();\n return view('admin.' . $this->obj_name . '.list')->with('list_obj', $list_obj);\n }", "title": "" }, { "docid": "54e0fa7125b81ab722716499fd5614cb", "score": "0.6610289", "text": "public function ListView()\n\t{\n\t\t$this->RequirePermission(ExampleUser::$PERMISSION_ADMIN, \n\t\t\t\t'SecureExample.LoginForm', \n\t\t\t\t'Login is required to access this page',\n\t\t\t\t'Admin permission is required to access this page');\n\t\t\n\t\t$this->Assign(\"currentUser\", $this->GetCurrentUser());\n\t\t\n\t\t$this->Assign('page','users');\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "db76ec3f068acc24a7c0805e126850ca", "score": "0.6606056", "text": "public function list()\n {\n\n $pageTitle = 'List';\n $pageDescription = 'Some description for the page';\n\n return view('components.list', compact('pageTitle', 'pageDescription'));\n }", "title": "" }, { "docid": "d73b7640ad41df7377bc45e90e4c9dbc", "score": "0.6605765", "text": "public function index()\n {\n //Listado de todo\n $todos = Todo::paginate(15);\n return TodoResource::collection($todos);\n\n }", "title": "" }, { "docid": "adb2b4c810e3d542d4d70e15a77dc1a4", "score": "0.6604502", "text": "public function listing()\n {\n // if($this->isAdmin() == TRUE)\n // if($this->isDataClerk() == FALSE || $this->isAccountant() == FALSE || $this->isAdmin() == FALSE)\n // {\n // $this->loadThis();\n // }\n // else\n // { \n $data['docs'] = $this->document_model->getDocs();\n // echo'<pre>HTTPS Clearing & Forwarding info Request: '; print_r($data['docs']); \n // die;\n \n $this->global['pageTitle'] = 'Trulance : Lodged Documents ';\n $this->loadViews(\"documents/index\", $this->global, $data, NULL);\n // }\n }", "title": "" }, { "docid": "47f1f9c4d1b025aae8305888135845b3", "score": "0.66041565", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Lista::find()->andWhere(['created_by' => Yii::$app->user->id]),\n /*\n 'pagination' => [\n 'pageSize' => 50\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'id' => SORT_DESC,\n ]\n ],\n */\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "334bac2742f908edac4d7c1babc36724", "score": "0.6603296", "text": "public function index()\n {\n $items = Item::all();\n\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "eb627f82e04a8ce7babdb6c08d8661a8", "score": "0.6594868", "text": "public function index() {\n $this->model->getList($this->submit);\n\n $this->smarty->assign('module', $this);\n\n $this->smarty->assign('liste', $this->model->list);\n $this->smarty->assign('barre_nav2', $this->model->barre_nav2);\n $this->smarty->assign('nbtotal', $this->model->nbtotal);\n $this->smarty->assign('recherche', $this->model->recherche);\n\n $this->render($this->pathTpl . 'list.tpl');\n }", "title": "" }, { "docid": "e531e5dcc8f7b8b9853cd8c54766f305", "score": "0.6593884", "text": "public function index()\n {\n // Get contacts\n $contacts = Contact::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of contacts as a resource\n return ContactResource::collection($contacts);\n }", "title": "" }, { "docid": "4cd5fe89bdc578ba54a4aa2e31cb87e1", "score": "0.6588902", "text": "public function index()\n {\n return successResponseWithData($this->repository->listAll());\n }", "title": "" }, { "docid": "7a70b9654c373e705dcab06ef07fabd3", "score": "0.6588745", "text": "public function index() {\n $listings = Search::allListings();\n return view('listing.index', [\n 'allitems' => $listings,\n ]);\n }", "title": "" }, { "docid": "2e11fc1536caf81ce9f7d87adf08936c", "score": "0.6583178", "text": "public function index()\n {\n $model = $this->model;\n $paginator = $model::orderBy('created_at', 'desc')->paginate();\n return $this->controller->respondWithPagination($paginator, new $this->transformer);\n }", "title": "" }, { "docid": "9217fd803e32aa1e6cac6f3b595cc791", "score": "0.6580564", "text": "public function getList()\n {\n\t\t$uid = intval($_GET['uid']);\n\t\t$data = $this->storyModel->getList($uid);\n\t\t$this->RestAPI->display($data);\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65740526", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "ec01971be4b0a73de78f8a0662695e97", "score": "0.657313", "text": "public function index()\n\t{\t\n\t\t\n\t\t$data['lists'] = $this->mdl_employee->get_all();\n\t\t$this->template->set('title', 'Employee List');\n\t\t$this->template->load('template', 'contents', 'list', $data);\n\t}", "title": "" }, { "docid": "93ceccdfcfd3d2e3e028c05f01aee311", "score": "0.6564594", "text": "public function index()\n {\n // Get list of items\n ${$this->getEntity()} = $this->createModel()->get();\n\n if (request()->expectsJson()) {\n return ${$this->getEntity()};\n }\n\n // Show index page\n return view($this->getViewPath('index'), compact(\"{$this->getEntity()}\"));\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563258", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "4d16a85114e205a309d60d279285baf8", "score": "0.6556644", "text": "public function actionList() {\n $this->renderVideos(Yii::app()->params['videoListPageSize'], 'list');\n }", "title": "" }, { "docid": "1a71da726be7d8e39434bf8006641a36", "score": "0.65561515", "text": "public function index()\n {\n return NovelResource::collection(Novel::paginate(25));\n }", "title": "" }, { "docid": "0d8f15014904fe5debac00edf07281d4", "score": "0.6553877", "text": "public function listeAction()\n\t{\n\t\t$liste = $this->getListeEntity();\n\t\treturn $this->renderListeEntity($liste);\n\t}", "title": "" }, { "docid": "58a230f5d27bebeb199da204e142de11", "score": "0.6551992", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->chapter ? $this->chapter->title . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "9244b40f6f21e992178f783de4251dd2", "score": "0.6550698", "text": "public function index()\n {\n $newsAge = new NewsAgeService();\n return response()->view('admin.resource.index', [\n 'resources' => Resource::all(),\n 'maximumNewsAge' => $newsAge->maximumAge,\n 'NewsAgeArray' => $newsAge->currentAgesArray\n ]);\n }", "title": "" }, { "docid": "3b73cbfdaf4da6b77e444f5087149b48", "score": "0.654366", "text": "public function listAction(){\n $this->_helper->layout->disableLayout();\n $search = $this->_request->getParam('search');\n $this->view->lists_search = $this->inst_list->getListsSearch($search);\n }", "title": "" }, { "docid": "5e6c89ae87e322e6cebabf8a709371ec", "score": "0.6532866", "text": "public function index()\n {\n $activitylists = ActivityList::getAllActivityList();\n return ActivityListResource::collection($activitylists);\n }", "title": "" }, { "docid": "fbff09efef269fb01080a8f477264a11", "score": "0.65298074", "text": "public function indexAction()\n {\n return $this->listAction();\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "8c17e54890fb7927d5665fd20840a59b", "score": "0.65280986", "text": "public function actionList() {}", "title": "" }, { "docid": "c5764d940efbfdf8d73db2746d19dc91", "score": "0.65280247", "text": "public function indexAction()\n {\n $ressources = $this->get('cba.service.ressource')->getAll();\n\n return $this->render('AppBundle:ressource:index.html.twig', array(\n 'ressources' => $ressources,\n ));\n }", "title": "" }, { "docid": "2ee8b8d707f017e5a8e409b7f12435d8", "score": "0.65266925", "text": "public function index()\n {\n return EntryResource::collection(Entry::all());\n }", "title": "" }, { "docid": "ec0f76ee79c606aa2baf2b2bcdb84b9c", "score": "0.6522105", "text": "public function index()\n {\n //get menus\n $menus = Menu::when(request()->q, function($menus) {\n $menus = $menus->where('name', 'like', '%'. request()->q . '%');\n })->latest()->paginate(10);\n \n //return with Api Resource\n return new MenuResource(true, 'List Data Menu', $menus);\n }", "title": "" }, { "docid": "5439447ac88f8cc98dc7832990b07305", "score": "0.65154237", "text": "public function indexAction()\n {\n $this->display();\n\n }", "title": "" }, { "docid": "dac10993b16b17127f0067b303d87b06", "score": "0.6514288", "text": "public function index()\n {\n //return Student::latest()->paginate(10);\n //return new StudentResource(Student::find(1));\n return new StudentCollection(Student::latest()->paginate(10));\n //return Student::all();\n }", "title": "" }, { "docid": "e9de3a5bbe6ce36d1c8d9b089e6812a0", "score": "0.6509821", "text": "public function index()\n {\n //Get Products\n $products = Products::orderBy('id', 'asc')\n ->join('categories', 'products.category_id', '=', 'categories.id')\n ->select('products.*', 'categories.name AS category')\n ->get();\n\n //Return Collection of Products\n return ProductsResource::collection($products);\n }", "title": "" }, { "docid": "57d86a0d21f4bd82a348ac1b9719ace2", "score": "0.65042144", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Food::find()\n ]);\n\n return $this->render('index', [\n 'listDataProvider' => $dataProvider\n ]);\n }", "title": "" }, { "docid": "2bccbfe61c567cbf0e28781cdbe73546", "score": "0.65021294", "text": "public function index()\n\t{\n\t\treturn (new PlayListCollection(PlayList::paginate()))->response()->setStatus(Response::HTTP_OK);\n\t}", "title": "" }, { "docid": "8645d213586ec548f9ce61cc0cf2e717", "score": "0.6501545", "text": "public function action_hospital_list() {\n $start = 0;\n if(isset($_GET[\"start\"])) {\n $start = $_GET[\"start\"];\n }\n $hospital_data = HospitalModel::get_hospitals($start, 20);\n $view = View::forge('hospitalviews/hospital_list');\n $view->contents = View::forge('hospitalviews/template');\n $view->title = 'Hospital List';\n $view->hospital_css = 'hospital.css';\n $view->hospital_data = $hospital_data;\n $view->start = $start;\n return Response::forge($view);\n }", "title": "" }, { "docid": "33f88f42b5cb9e92e9a26d82d3471d17", "score": "0.64990896", "text": "public function index()\n {\n $resource = $this->prepResource('index');\n if (request()->ajax()) {\n return $resource->jsonDatatables();\n }\n $this->showBreadcrumb($resource);\n\n return $this->view(compact('resource'));\n }", "title": "" }, { "docid": "3948769314da329754d55d43362bf87b", "score": "0.6489118", "text": "public function list()\n\t{\n\t\t$this->admin();\n\t\t$data['investors'] = $this->investor_model->getAllInvestor();\n\t\t$this->page_construct('investor/list',$data);\n\t}", "title": "" }, { "docid": "eac7a378742b29b2e677a3e136e5c663", "score": "0.6485999", "text": "public function index()\n {\n //TODO add showing of all records\n }", "title": "" }, { "docid": "e2c433ae62fdd0143166040b27f97b10", "score": "0.6484191", "text": "public function index()\n {\n $collection = UserResource::collection(\n User::all()\n );\n\n return $this->showAll($collection);\n }", "title": "" }, { "docid": "c857bd7504f0580a308861e50394e4b0", "score": "0.64808744", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\tif($page < 1) $page = 1;\n\t\t\n\t\t$status = intval($this->getInput('status'));\n\t\t$resolution = $this->getInput('resolution');\n\t\t$operators = $this->getInput('operators');\n\t\t$title = $this->getInput('title');\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($resolution) {\n\t\t\t$params['resolution'] = $resolution;\n\t\t\t$search['resolution'] = $resolution;\n\t\t}\n\t\t\n\t\tif($operators != 'a') {\n\t\t\t$params['operators'] = $operators;\n\t\t\t$search['operators'] = $operators;\n\t\t}\n\t\tif($status) {\n\t\t\t$params['status'] = $status - 1;\n\t\t\t$search['status'] = $status;\n\t\t}\n\t\t\n\t\tif($title) {\n\t\t\t$params['title'] = $title;\n\t\t\t$search['title'] = $title;\n\t\t}\n\t\t\n\t\tlist(, $resolutions) = Resource_Service_Attribute::getList(1, 100,array('at_type'=>4));\n\t\t$resolutions = Common::resetKey($resolutions, 'id');\n\t\tlist(, $operators) = Resource_Service_Attribute::getList(1, 100,array('at_type'=>6));\n\t\t$operators = Common::resetKey($operators, 'id');\n\t\t\n\t\tlist($total, $result) = Resource_Service_Type::getCanUseResourceTypes($page, $perpage,$params);\t\t\n\t\t$this->cookieParams();\n\t\t$this->assign('result', $result);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search).'&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $this->perpage, $url));\n\t\t$this->assign('search', $search);\n\t\t$this->assign('resolutions', $resolutions);\n\t\t$this->assign('operators', $operators);\n\t\t$this->assign(\"total\", $total);\n\t}", "title": "" }, { "docid": "220099abd3e945ba3a715a4f02042bf9", "score": "0.6478389", "text": "public static function list( )\n\t\t{\n\t\t\t//echo \"Listando as coisas\";\n\t\t\n\t\t\t$dao = new LivroDAO;\n\t\t\t$lista = $dao->listAll( );\n\n\t\t\tself::view( 'consulta' , $lista );\n\n\t\t}", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "d853b351ec514560d915a63492709983", "score": "0.6473065", "text": "public function index()\n {\n $allProducts = Product::all();\n return response(ProductResources::collection($allProducts));\n }", "title": "" } ]
09e290561745fa62f376f632f9f3cf51
END: version 2 process for the guide info form DEPRECATED PROCESS
[ { "docid": "f64107f52a4bf1004e136a9e2a7bba96", "score": "0.0", "text": "private function newProcessStepOneForm(Request $request)\r\n\t{\r\n\t\t$infoForm = $request->request->all();\r\n\t\t// echo \"<pre>\";\r\n\t\t// var_dump($infoForm);\r\n\t\t// exit;\r\n\r\n\t\t$localAuthor = $this->get('security.context')->getToken()->getUser();\r\n\t\t$duration \t = $this->getDoctrine()->getRepository('BugglMainBundle:Duration')->findOneById($infoForm['duration']);\r\n\t\t$country \t = $this->getDoctrine()->getRepository('BugglMainBundle:Country')->findOneById($infoForm['country']);\r\n\t\t$tripTheme \t = $this->getDoctrine()->getRepository('BugglMainBundle:TripTheme')->findOneById($infoForm['trip-theme']);\r\n\t\t$dateAdded \t = new \\DateTime(date('Y-m-d H:i:s'));\r\n\t\t$status \t = $this->get('buggl_main.constants')->get('draft_guide');\r\n\r\n\r\n\t\t$this->eguide->setLocalAuthor($localAuthor);\r\n\t\t$this->eguide->setCountry($country);\r\n\t\t$this->eguide->setTitle($infoForm['title']);\r\n\t\t$this->eguide->setExcerpts($infoForm['eguide-teaser']);\r\n\t\t$this->eguide->setDateCreated($dateAdded);\r\n\t\t$this->eguide->setBudget($infoForm['budget']);\r\n\t\t$this->eguide->setStatus($status);\r\n\t\t$this->eguide->setDuration($duration);\r\n\t\t$this->eguide->setTripTheme($tripTheme);\r\n\t\t$this->eguide->setCategory(null);\r\n\t\t// $this->eguide->setGoodFor(null);\r\n\t\t$this->eguide->setBestTimeToGo(implode(',', $infoForm['best-time-to-go']));\r\n\t\t$plainTitle = $this->getPlainTitle($infoForm['title']);\r\n\t\t$this->eguide->setPlainTitle($plainTitle);\r\n\r\n\t\t$em = $this->getDoctrine()->getEntityManager();\r\n\t\t$em->persist($this->eguide);\r\n\t\t$em->flush();\r\n\r\n\t\t// update slug\r\n\t\t$slug = $this->get('buggl_main.slugifier')->format($plainTitle)->getSlug().\"-\".$this->eguide->getId();\r\n\t\t$this->eguide->setSlug($slug);\r\n\t\t$em->persist($this->eguide);\r\n\t\t$em->flush();\r\n\r\n\t\t// save categories\r\n\t\t$this->saveEGuideCategories($infoForm['categories']);\r\n\r\n\t\t// save good for\r\n\t\t$this->saveEGuideGoodFor($infoForm['good_for']);\r\n\r\n\t\t// save cities\r\n\t\t$this->saveEGuideCities($infoForm['cities'], $infoForm['coords']);\r\n\t}", "title": "" } ]
[ { "docid": "eb7f55d19fc81503b7fea1c06484602f", "score": "0.5937231", "text": "function plugin_cbEnhancedInfo_upgrade () {\n\tcbEnhancedInfo_check_upgrade ();\n\treturn false;\n}", "title": "" }, { "docid": "3360a5fa7be0cc2bec035e8f92094d54", "score": "0.5781089", "text": "function help() {\n\t\t}", "title": "" }, { "docid": "6f69b3ef746b1416c15d583b5a795670", "score": "0.57280344", "text": "function phpgwapi_upgrade14_2()\n{\n\t$meta = $GLOBALS['egw_setup']->db->metadata('egw_accounts', true);\n\tif (!isset($meta['meta']['account_description']))\n\t{\n\t\t$GLOBALS['egw_setup']->oProc->AddColumn('egw_accounts','account_description',array(\n\t\t\t'type' => 'varchar',\n\t\t\t'precision' => '255',\n\t\t\t'comment' => 'group description'\n\t\t));\n\t}\n\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.2.001';\n}", "title": "" }, { "docid": "8eee4a888099117c2b59ff9376c4e314", "score": "0.5696952", "text": "public function getHelp()\n\t{\n\t}", "title": "" }, { "docid": "7f8afc06891fbdc4adefca6e440d47e2", "score": "0.56431234", "text": "protected function showHelp() : void\n {\n }", "title": "" }, { "docid": "d16bb006f731524133fe505445aa8f3b", "score": "0.55542964", "text": "function hook_paragraphs_extra_bundle_info_page_alter(&$output, $instance_id) {\n}", "title": "" }, { "docid": "11a819fff698b149a8cd5ed359783fa5", "score": "0.5489985", "text": "function cbEnhancedInfo_check_upgrade () {\n\t$files = array('cbEnhancedInfo_listInformation.php');\n\tif (isset($_SERVER['PHP_SELF']) && !in_array(basename($_SERVER['PHP_SELF']), $files))\n\t\treturn;\n\t\n\t$current = cbEnhancedInfo_version ();\n\t$current = $current['version'];\n\t$old = db_fetch_cell(\"SELECT version FROM plugin_config WHERE directory='cbEnhancedInfo'\");\n\tif ($current != $old) {\n\t\tcbEnhancedInfo_setup_table( $old );\n\t}\n}", "title": "" }, { "docid": "2a1e8fd997f5ec653734cda23c90109d", "score": "0.5483195", "text": "public static function usage()\n {\n }", "title": "" }, { "docid": "727b9b6d6c2b43aeefc9911c37e00f52", "score": "0.54769486", "text": "function plugin_cbEnhancedInfo_uninstall () {\n}", "title": "" }, { "docid": "735af7b2e5fb49f661b52c83541b470f", "score": "0.54728514", "text": "function phpgwapi_upgrade1_3_012()\n\t{\n\t\t$GLOBALS['egw_setup']->db->query(\"UPDATE egw_addressbook SET cat_id=NULL WHERE cat_id IN ('','0')\",__LINE__,__FILE__);\n\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.013';\n\t}", "title": "" }, { "docid": "94bfb3ad118b69e338ebe5f3093ab0e0", "score": "0.5421274", "text": "public function printHelp() {\n }", "title": "" }, { "docid": "b6ee52ba6c78548612ca2ec382ba738e", "score": "0.53982574", "text": "abstract public function help();", "title": "" }, { "docid": "ff64876db7924c0cb959bf22d2463838", "score": "0.5388596", "text": "function lesson_single_meta() {\n\n _deprecated_function('lesson_single_meta','1.9;0', 'WooThemes_Sensei_Lesson::the_lesson_meta' );\n sensei_the_single_lesson_meta();\n\n\t }", "title": "" }, { "docid": "dcb21b57c2e0f7a842d82d28229cfffa", "score": "0.53754467", "text": "function help()\n\t{\n\t\tcli_notice('notice', '');\n\t\tcli_notice('notice', 'Available sections:');\n\t\tcli_notice('notice', 'php index.php cli ...');\n\t\tcli_notice('notice', ' database [help] Display the database functions available');\n\t\tcli_notice('notice', ' boards [help] Display the functions related to the boards');\n\t\tcli_notice('notice', ' asagi [help] Display the functions related to the Asagi fetcher');\n\t\tcli_notice('notice', ' cron [help] Display the long-running functions available');\n\n\t\t$this->plugins->run_hook('fu_cli_controller_after_help', array(), 'simple');\n\n\t\tcli_notice('notice', ' ping Pong');\n\t}", "title": "" }, { "docid": "e1ca008f8e40f54f02f56efc085e18c1", "score": "0.53637683", "text": "function about()\n\t{\n\t\tdie('in progres..........');\n\t}", "title": "" }, { "docid": "1cd6bd7797d7f75432c55394b958f553", "score": "0.5362207", "text": "function deprecated($old_name,$new_name)\r\n\t{\r\n\t\t$this->fatal_error('Use of deprecated \"<strong>'.$old_name.'</strong>\" function. This method may not be supported in future versions of PunSAPI. Please update your scripts to use \"<strong>'.$new_name.'</strong>\" instead');\r\n\t}", "title": "" }, { "docid": "4673bd05ea3a994cd96bf0b9fd427073", "score": "0.53317535", "text": "function main()\t{\n\n // Check if the version of the kickstarter is the ood one\n if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sav_library']['errorKickstarterVersion']) {\n\t\t return $this->pObj->doc->section('',\n $GLOBALS['LANG']->getLL('fatal.incorrectKickstarterVersion') .\n '<span style=\"color:red;font-weight:bold;\">' .\n $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sav_library']['errorKickstarterVersion'] .\n '</span>',\n 0,\n 1\n );\n }\n\n // Check if extensions have to be updated\n $updateArray = t3lib_div::_POST('update');\n $xmlArray = t3lib_div::_POST('xml');\n $formArray = t3lib_div::_POST('form');\n\n if (is_array($updateArray)) {\n\t\t $kickstarter = t3lib_div::makeInstance('tx_kickstarter_wizard');\n\t\t $kickstarter->pObj = &$this->pObj;\n // Get the installed extensions\n\t\t $installedExtensions = $this->pObj->getInstalledExtensions();\n\n\t\t foreach($updateArray as $extKey => $value) {\n if (file_exists(t3lib_extMgm::extPath($extKey) . 'doc/wizard_form.dat')) {\n\n // Update the xml configuration and user_int flags\n $wizardFormFile = t3lib_div::getURL(t3lib_extMgm::extPath($extKey) . 'doc/wizard_form.dat');\n $wizardForm = unserialize($wizardFormFile);\n\n // Set the xml flag\n $wizardForm['savext'][1]['xmlConfiguration'] = ($xmlArray[$extKey] ? 1 : 0);\n\n // Set the form \"userPlugin\" flag\n if ($formArray[$extKey]) {\n foreach ($formArray[$extKey] as $keyForm => $valueForm) {\n foreach ($wizardForm['forms'] as $keyWizard => $valueWizard) {\n $searchKey = array_search($keyForm, $valueWizard);\n $wizardForm['forms'][$keyWizard]['userPlugin'] =\n (($searchKey == 'title') ? 1 : 0);\n }\n }\n } else {\n foreach ($wizardForm['forms'] as $keyWizard => $valueWizard) {\n $wizardForm['forms'][$keyWizard]['userPlugin'] = 0;\n }\n }\n\n t3lib_div::writeFile(t3lib_extMgm::extPath($extKey) . 'doc/wizard_form.dat', serialize($wizardForm));\n\n // reset the files\n unset($kickstarter->ext_localconf);\n unset($kickstarter->ext_tables);\n unset($kickstarter->ext_tca);\n unset($kickstarter->ext_tables_sql);\n unset($kickstarter->ext_locallang);\n unset($kickstarter->ext_locallang_db);\n\n // Update the extension\n $wizardFormFile = t3lib_div::getURL(t3lib_extMgm::extPath($extKey) . 'doc/wizard_form.dat');\n $kickstarter->modData['wizArray_ser'] = base64_encode($wizardFormFile);\n $kickstarter->modData['WRITE'] = 1;\n\t\t $kickstarter->EMmode = 1;\n $kickstarter->mgm_wizard();\n\n // Clear the content\n $this->pObj->content = '';\n\n // Get the DB updates\n $DBupdates .= $this->pObj->checkDBupdates($extKey, $installedExtensions[0][$extKey]);\n }\n }\n }\n\n // Get the extensions with depends on the SAV Library Extension Generator\n $paramSET = t3lib_div::_GET('SET');\n\n $content[] = '<form name=\"updateForm\" action=\"index.php?id=' . t3lib_div::_GET('id') . '&SET[function]=' . $paramSET['function'] . '\" method=\"post\" enctype=\"multipart/form-data\">';\n $content[] = ' <input name=\"updateButton\" type=\"submit\" class=\"submit\" value=\"Update the extensions\" />';\n $content[] = ' <ul class=\"updateTitle\">';\n $content[] = ' <li class=\"extNameTitle\">Extension name</li>';\n $content[] = ' <li class=\"xmlTitle\">XML Generation</li>';\n $content[] = ' <li class=\"formTitle\">Form as USER plugin</li>';\n $content[] = ' <li class=\"updateTitle\">Update</li>';\n $content[] = ' <li class=\"version\">SAV Library version</li>';\n $content[] = ' <li class=\"version\">Extension version</li>';\n $content[] = ' </ul>';\n\n foreach($GLOBALS['TYPO3_LOADED_EXT'] as $extKey => $extInfo) {\n if (file_exists(t3lib_extMgm::extPath($extKey) . 'doc/wizard_form.dat')) {\n unset($xmlArray[$extKey]);\n unset($formArray[$extKey]);\n $wizardFormFile = t3lib_div::getURL(t3lib_extMgm::extPath($extKey) . 'doc/wizard_form.dat');\n $wizardForm = unserialize($wizardFormFile);\n if ($wizardForm['savext'][1]['generateForm']) {\n $extArray[] = array(\n 'extKey' => $extKey,\n 'savlibraryVersion' => $wizardForm['savext'][1]['savlibraryVersion'],\n 'extensionVersion' => $wizardForm['emconf'][1]['version']\n );\n }\n // Get the xml flag\n $xmlArray[$extKey] = ($wizardForm['savext'][1]['xmlConfiguration'] ? 1 : 0);\n \n // Get the form \"userPlugin\" flag\n if ($wizardForm['forms']) {\n foreach ($wizardForm['forms'] as $form) {\n $formArray[$extKey][$form['title']] = ($form['userPlugin'] ? 1 : 0);\n }\n }\n }\n }\n\n // Sort the array and process it\n sort($extArray);\n\n foreach($extArray as $ext) {\n $extKey = $ext['extKey'];\n $content[] = ' <ul class=\"update\">';\n $content[] = ' <li class=\"extName\">' .\n\t\t\t\t'<a href=\"' . htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&SET[singleDetails]=tx_kickstarter_modfunc2'). '\">' .\n $ext['extKey'] . '</a></li>';\n $content[] = ' <li class=\"xml\">' . '<input type=\"checkbox\" name=\"xml[' . $extKey .']\" ' . ($xmlArray[$extKey] ? 'checked=\"checked\"' : '') . ' /></li>';\n $content[] = ' <li class=\"form\">';\n $content[] = ' <div class=\"formContainer\">';\n if ($formArray[$extKey]) {\n foreach($formArray[$extKey] as $keyForm => $valueForm) {\n $content[] = ' <span class=\"formName\">' . $keyForm . '</span>';\n $content[] = ' <input class=\"formCheck\" type=\"checkbox\" name=\"form[' . $extKey .']['.$keyForm.']\" ' . ($valueForm ? 'checked=\"checked\"' : '') . ' />';\n }\n }\n\n $content[] = ' </div>';\n $content[] = ' </li>';\n $content[] = ' <li class=\"update\">' . '<input type=\"checkbox\" name=\"update[' . $extKey . ']\" ' . ($updateArray[$extKey] == 'on' ? 'checked=\"checked\"' : '') . ' /></li>';\n $content[] = ' <li class=\"version' .\n ($ext['savlibraryVersion'] == $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sav_library']['version'] ? 'Ok' : 'NotOk') .\n '\">' . ($ext['savlibraryVersion'] ? $ext['savlibraryVersion'] : $GLOBALS['LANG']->getLL('unknown')) . '</li>';\n $content[] = ' <li class=\"versionNormal\">' .\n $ext['extensionVersion'] . '</li>';\n $content[] = ' </ul>';\n }\n\n $content[] = '<div class=\"extManager\">';\n $content[] = $DBupdates;\n $content[] = '</div>';\n $content[] = '</form>';\n \n // Add the css file\n $this->pObj->doc->styleSheetFile2 =\n t3lib_extMgm::extRelPath('sav_library'). 'modfunc1/savlibrary_modfunc1.css';\n \n\t\treturn $this->pObj->doc->section('Extension Manager', implode(chr(10), $content),0,1);\n\t}", "title": "" }, { "docid": "43c8a0b82bc3b7b1b03d545e3e92bb01", "score": "0.53280723", "text": "protected function displayUsage() {\n\t\t$message = <<< EOF\nConvert legacy OpenOffice documentation to reST.\n\nUsage:\n\tget-the-docs convert FILE [OPTIONS]\n\n\twhere \"FILE\" points to a manual.sxw\n\nOptions:\n\t-h, --help Display this help message\n\nEOF;\n\t\tConsole::output($message);\n\t\tdie();\n\t}", "title": "" }, { "docid": "5e1cf8c516afc0272ec93ade5f98e24c", "score": "0.5322744", "text": "public function help();", "title": "" }, { "docid": "5e1cf8c516afc0272ec93ade5f98e24c", "score": "0.5322744", "text": "public function help();", "title": "" }, { "docid": "38223ff329789c992bc8aeb346b99c6b", "score": "0.5312295", "text": "function usage()\n{\n\treturn '';\n}", "title": "" }, { "docid": "30531a8cb00cafc1531da185b0114a65", "score": "0.52762896", "text": "function hook_paragraphs_extra_bundle_info_page($instance_id) {\n}", "title": "" }, { "docid": "aa11e65b10b0cd7415bdd9709637b3f2", "score": "0.52748364", "text": "function vantage_upgrade_panels_upgrade_note(){\n\t?><p><?php printf( __('Additional styles are available in <a href=\"%s\" target=\"_blank\">Vantage Premium</a>.', 'vantage'), admin_url('themes.php?page=premium_upgrade') ) ?></p><?php\n}", "title": "" }, { "docid": "1bd3af0333ca41222e9853d1130700c9", "score": "0.5239913", "text": "function info()\n\t{\n\t\t$info=array();\n\t\t$info['supports_advanced_import']=false;\n\t\t$info['product']='Invision Board 1.3.x';\n\t\t$info['prefix']='ibf_';\n\t\t$info['import']=array(\n\t\t\t\t\t\t\t\t'ocf_groups',\n\t\t\t\t\t\t\t\t'ocf_members',\n\t\t\t\t\t\t\t\t'ocf_member_files',\n\t\t\t\t\t\t\t\t'ocf_custom_profile_fields',\n\t\t\t\t\t\t\t\t'ocf_categories',\n\t\t\t\t\t\t\t\t'ocf_forums',\n\t\t\t\t\t\t\t\t'ocf_topics',\n\t\t\t\t\t\t\t\t'ocf_posts',\n\t\t\t\t\t\t\t\t'ocf_post_files',\n\t\t\t\t\t\t\t\t'ocf_polls_and_votes',\n\t\t\t\t\t\t\t\t'ocf_multi_moderations',\n\t\t\t\t\t\t\t\t'notifications',\n\t\t\t\t\t\t\t\t'ocf_personal_topics',\n\t\t\t\t\t\t\t\t'ocf_warnings',\n\t\t\t\t\t\t\t\t'wordfilter',\n\t\t\t\t\t\t\t\t'config',\n\t\t\t\t\t\t\t\t'calendar',\n\t\t\t\t\t\t\t);\n\t\t$info['dependencies']=array( // This dependency tree is overdefined, but I wanted to make it clear what depends on what, rather than having a simplified version\n\t\t\t\t\t\t\t\t'ocf_members'=>array('ocf_groups'),\n\t\t\t\t\t\t\t\t'ocf_member_files'=>array('ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_forums'=>array('ocf_categories','ocf_members','ocf_groups'),\n\t\t\t\t\t\t\t\t'ocf_topics'=>array('ocf_forums','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_polls_and_votes'=>array('ocf_topics','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_posts'=>array('ocf_topics','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_post_files'=>array('ocf_posts'),\n\t\t\t\t\t\t\t\t'ocf_multi_moderations'=>array('ocf_forums'),\n\t\t\t\t\t\t\t\t'notifications'=>array('ocf_topics','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_personal_topics'=>array('ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_warnings'=>array('ocf_members'),\n\t\t\t\t\t\t\t\t'calendar'=>array('ocf_members'),\n\t\t\t\t\t\t\t);\n\t\t$_cleanup_url=build_url(array('page'=>'admin_cleanup'),get_module_zone('admin_cleanup'));\n\t\t$cleanup_url=$_cleanup_url->evaluate();\n\t\t$info['message']=(get_param('type','misc')!='import' && get_param('type','misc')!='hook')?new ocp_tempcode():do_lang_tempcode('FORUM_CACHE_CLEAR',escape_html($cleanup_url));\n\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "72723eb793208dd74783eb13715b249e", "score": "0.52355695", "text": "function phpgwapi_upgrade1_3_002()\n\t{\n\t\tif ($GLOBALS['DEBUG'])\n\t\t{\n\t\t\techo \"<br>\\n<b>initiating to create the default type 'contact' for addressbook\";\n\t\t}\n\t\t\n\t\t$newconf = array('n' => array(\n\t\t\t'name' => 'contact',\n\t\t\t'options' => array(\n\t\t\t\t'template' => 'addressbook.edit',\n\t\t\t\t'icon' => 'navbar.png'\n\t\t)));\n\t\t$GLOBALS['egw_setup']->oProc->query(\"INSERT INTO egw_config (config_app,config_name,config_value) VALUES ('addressbook','types','\". serialize($newconf). \"')\",__LINE__,__FILE__);\n\n\t\tif ($GLOBALS['DEBUG'])\n\t\t{\n\t\t\techo \" DONE!</b>\";\n\t\t}\n\t\t/*************************************************************************/\n\t\t\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.003';\n\t}", "title": "" }, { "docid": "f4ada916626bbecbfb543fd6b7e2f2db", "score": "0.5219325", "text": "function cl_cadvencdesc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cadvencdesc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f0da00598ddf4b31922708771da338b2", "score": "0.5216117", "text": "function ManageChargesOld() {\n\t\tself::deprecatedMenuItem('ManageChargesOld', self::OLD_FRAMEWORK.\"charges_approve.php\");\n\t\t/*$this->strContextMenuLabel = \"OLD - Approve and Decline Charges - OLD\";\n\t\t$this->strLabel = \"Manage Charges\";\n\t\treturn self :: OLD_FRAMEWORK . \"charges_approve.php\";*/\n\t}", "title": "" }, { "docid": "194fe7ce56ae7b44854489bc802e6eab", "score": "0.520986", "text": "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\n\t}", "title": "" }, { "docid": "194fe7ce56ae7b44854489bc802e6eab", "score": "0.520986", "text": "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\n\t}", "title": "" }, { "docid": "194fe7ce56ae7b44854489bc802e6eab", "score": "0.520986", "text": "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\n\t}", "title": "" }, { "docid": "826a65ba66c1cf318b4d1e27e0ba937a", "score": "0.52052826", "text": "function MBPPP_options_instruction() {\n}", "title": "" }, { "docid": "c243d47a10d81fb1417b76133bebc01c", "score": "0.51963484", "text": "function xn17_customize_comment_form(&$form) {\n\n // Hide guideliness\n\n $form['und'][0]['format']['guidelines']['#access'] = FALSE;\n\n // Hide Filter Tips\n\n $form['und'][0]['format']['help']['#access'] = FALSE;\n\n return $form;\n}", "title": "" }, { "docid": "59c50f1bfff3c016ac47fb29cc447ece", "score": "0.5195024", "text": "function addHelp() {\n echo '<p>' . __(\"Manage the options related to users on your site. Here, you can decide if users must register or if email confirmation is necessary, among other options.\") . '</p>';\n }", "title": "" }, { "docid": "2f045ff31893730dd07af464db9c3c41", "score": "0.51945484", "text": "function d3jspie_generateur_upgrade($nom_meta_base_version,$version_cible){\n\t\n\t$maj = array();\n\n\t$maj['create'] = array(\n\t\tarray('maj_tables', array('spip_d3jspie_generateur', 'spip_d3jspie_generateur_documents'))\n\t);\n\n\t$maj['0.0.2'] = array(\t\n\t\t// Ajout de champs dans spip_d3jspie_generateur\n\t \tarray('maj_tables', array('spip_d3jspie_generateur'))\n\t);\n\n\tinclude_spip('base/upgrade');\n\tmaj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "title": "" }, { "docid": "5df9c939e863b59e36a940b2f8ac6e2c", "score": "0.51863414", "text": "function dmcloud_upgrade($nom_meta_base_version,$version_cible){\n \n $maj = array();\n\n include_spip('base/upgrade');\n maj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "title": "" }, { "docid": "ab0b1e1df8a34c389eaa0e8dbf579f1d", "score": "0.51810426", "text": "public function need_help() {\n\t\tif ($this->registry->url_addition_vars)\n\t\t\t{\n\t\t\t\t$article_id = $this->registry->url_addition_vars[0];\n\t\t\t\t$getArticle = new getArticle();\n\t\t\t\t$this->registry->template->article_content = $getArticle->getArticle($article_id);\n\t\t\t\t\n\t\t\t\t$this->check_login();\n\t\t\t\t//show template\n\t\t\t\t$this->registry->template->show(\"article\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->registry->template->show(\"404\");\n\t\t\t}\t\n\t}", "title": "" }, { "docid": "1dfd585ee5a158a20bc7beabacc805cf", "score": "0.5178269", "text": "function debug_deprecated(){\r\n\tDebugUtils::get_instance()\r\n\t\t->set_title(__('Deprecated'))\r\n\t\t->debug_deprecated();\r\n}", "title": "" }, { "docid": "414e998d0bebf5321e5fbecb7fc401b1", "score": "0.5158787", "text": "function _initWizardInfo () {\n \n }", "title": "" }, { "docid": "2af19619c6ffca1342c03062ee344a00", "score": "0.51556915", "text": "function beans_child_home_add_description() {\n if ( true ) { \n \n\n \n\t}\n\n}", "title": "" }, { "docid": "6076ed998f37986161ac7c8456982096", "score": "0.5148562", "text": "function update_install_info() {\n parent::update_install_info();\n $this->deactivate_replaced_addons();\n }", "title": "" }, { "docid": "55f9babe292a521131657023e1a19b6a", "score": "0.514405", "text": "public function help()\n {\n // You could include a file and return it here.\n return \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\n }", "title": "" }, { "docid": "ae3a6b340f2fd44cbfe3fb9930999053", "score": "0.5142782", "text": "public function debug_deprecated(){\r\n\t\tadd_action('deprecated_function_run', array(&$this, 'dump_deprecated'), 10, 3);\r\n\t}", "title": "" }, { "docid": "bc442c4762547c91dc0ca71900065a74", "score": "0.51421386", "text": "public static function _setup_guide_intro() {\n?>\n<p class=\"about-text\"><?php printf( __( 'Creating a job listing website has never been easier with Jobify — the easiest to use job board theme available. Use the steps below to finish setting up your new website. If you have more questions please <a href=\"%s\">review the documentation</a>.', 'jobify' ), 'http://jobify.astoundify.com' ); ?></p>\n\n<div class=\"setup-guide-theme-badge\"><img src=\"<?php echo get_template_directory_uri(); ?>/inc/setup/assets/images/badge.png\" width=\"140\" alt=\"\" /></div>\n\n<p class=\"helpful-links\">\n\t<a href=\"http://jobify.astoundify.com\" class=\"button button-primary js-trigger-documentation\"><?php _e( 'Search Documentation', 'jobify' ); ?></a>&nbsp;\n\t<a href=\"https://astoundify.com/go/astoundify-support/\" class=\"button button-secondary\"><?php _e( 'Submit a Support Ticket', 'jobify' ); ?></a>&nbsp;\n</p>\n\n<script>\n\tjQuery(document).ready(function($) {\n\t\t$('.js-trigger-documentation').click(function(e) {\n\t\t\te.preventDefault();\n\t\t\tHS.beacon.open();\n\t\t});\n\t});\n</script>\n<script>!function(e,o,n){window.HSCW=o,window.HS=n,n.beacon=n.beacon||{};var t=n.beacon;t.userConfig={},t.readyQueue=[],t.config=function(e){this.userConfig=e},t.ready=function(e){this.readyQueue.push(e)},o.config={modal: true, docs:{enabled:!0,baseUrl:\"//astoundify-jobify.helpscoutdocs.com/\"},contact:{enabled:!1,formId:\"7f6e93b6-cb77-11e5-9e75-0a7d6919297d\"}};var r=e.getElementsByTagName(\"script\")[0],c=e.createElement(\"script\");c.type=\"text/javascript\",c.async=!0,c.src=\"https://djtflbt20bdde.cloudfront.net/\",r.parentNode.insertBefore(c,r)}(document,window.HSCW||{},window.HS||{});</script>\n<?php\n\t}", "title": "" }, { "docid": "0814515c2cccf6a6f72fd17350296c90", "score": "0.51372504", "text": "public function help()\n {\n return TRUE;\n }", "title": "" }, { "docid": "302441ac455080dabb8e9bcfc9221012", "score": "0.5135416", "text": "public function generate() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\\WP\\SEO\\Generators\\Schema\\FAQ::generate' );\n\n\t\treturn parent::generate();\n\t}", "title": "" }, { "docid": "d679bb90e54b769ef2355e9bf3108e7f", "score": "0.51229686", "text": "public function usageHelp()\n {\n return <<<USAGE\nUsage: php -f bonaparte_import.php -- [options]\n\n --type <type> attributes|categories|products|prices\n --remove_attributes_with_identical_attribute_code only for attributes\n\nUSAGE;\n }", "title": "" }, { "docid": "cb89c56ee570060b17f2e84513921f5f", "score": "0.5117636", "text": "function section_intro()\n\t{\n\t\t// echo \"<pre>\";\n\t\t// print_r(get_option('bd_paypal_settings'));\n\t\t// echo \"</pre>\";\n\t}", "title": "" }, { "docid": "2e18fe5bebd0db61c26bdfdf9f3c43a0", "score": "0.510585", "text": "public function is_needed() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 14.0', 'Yoast\\WP\\SEO\\Generators\\Schema\\FAQ::is_needed' );\n\n\t\treturn parent::is_needed();\n\t}", "title": "" }, { "docid": "ee1ce2ec11ce7705edaa77b8e6fd5d8e", "score": "0.51037043", "text": "function info()\n\t{\n\t\t$info=array();\n\t\t$info['supports_advanced_import']=false;\n\t\t$info['product']='WowBB 1.65';\n\t\t$info['prefix']='wowbb_';\n\t\t$info['import']=array(\n\t\t\t\t\t\t\t\t'ocf_groups',\n\t\t\t\t\t\t\t\t'ocf_members',\n\t\t\t\t\t\t\t\t'ocf_categories',\n\t\t\t\t\t\t\t\t'ocf_forums',\n\t\t\t\t\t\t\t\t'ocf_topics',\n\t\t\t\t\t\t\t\t'ocf_posts',\n\t\t\t\t\t\t\t\t'ocf_polls_and_votes',\n\t\t\t\t\t\t\t\t'notifications',\n\t\t\t\t\t\t\t\t'ocf_personal_topics',\n\t\t\t\t\t\t\t\t'ocf_post_files',\n\t\t\t\t\t\t\t\t'calendar',\n\t\t\t\t\t\t\t\t'wordfilter',\n\t\t\t\t\t\t\t\t'ip_bans',\n\t\t\t\t\t\t\t\t'config',\n\t\t\t\t\t\t\t);\n\t\t$info['dependencies']=array( // This dependency tree is overdefined, but I wanted to make it clear what depends on what, rather than having a simplified version\n\t\t\t\t\t\t\t\t'ocf_members'=>array('ocf_groups'),\n\t\t\t\t\t\t\t\t'ocf_forums'=>array('ocf_categories','ocf_members','ocf_groups'),\n\t\t\t\t\t\t\t\t'ocf_topics'=>array('ocf_forums','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_polls_and_votes'=>array('ocf_topics','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_posts'=>array('ocf_topics','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_post_files'=>array('ocf_posts','ocf_personal_topics'),\n\t\t\t\t\t\t\t\t'notifications'=>array('ocf_topics','ocf_members'),\n\t\t\t\t\t\t\t\t'ocf_personal_topics'=>array('ocf_members'),\n\t\t\t\t\t\t\t\t'calendar'=>array('ocf_members'),\n\t\t\t\t\t\t\t);\n\t\t$_cleanup_url=build_url(array('page'=>'admin_cleanup'),get_module_zone('admin_cleanup'));\n\t\t$cleanup_url=$_cleanup_url->evaluate();\n\t\t$info['message']=(get_param('type','misc')!='import' && get_param('type','misc')!='hook')?new ocp_tempcode():do_lang_tempcode('FORUM_CACHE_CLEAR',escape_html($cleanup_url));\n\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "1e12028e2ba8ba44005c60a5a88b1c25", "score": "0.5088116", "text": "function phpgwapi_upgrade14_2_025()\n{\n\t// cat_data contains arbitrary user input eg. in tracker canned responses\n\t$GLOBALS['egw_setup']->oProc->AlterColumn('egw_categories','cat_data',array(\n\t\t'type' => 'varchar',\n\t\t'precision' => '8192'\n\t));\n\t// note is utf-8\n\t$GLOBALS['egw_setup']->oProc->AlterColumn('egw_addressbook','contact_note',array(\n\t\t'type' => 'varchar',\n\t\t'precision' => '8192',\n\t\t'comment' => 'notes field'\n\t));\n\t// message_id is in english and in an index --> ascii\n\t$GLOBALS['egw_setup']->oProc->AlterColumn('egw_lang','message_id',array(\n\t\t'type' => 'ascii',\n\t\t'precision' => '128',\n\t\t'nullable' => False,\n\t\t'default' => ''\n\t));\n\n\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.2.026';\n}", "title": "" }, { "docid": "902eab5f4ca2570ca383bfa94f3c0bac", "score": "0.5087524", "text": "function sensei_course_archive_next_link( $type = 'newcourses' ) {\n\n _deprecated_function('sensei_course_archive_next_link', '1.9.0','This is no longer used or required in Sensei.');\n\n }", "title": "" }, { "docid": "897189dd9204934574ae552d4919a5c4", "score": "0.50842834", "text": "function phpgwapi_upgrade1_2_101()\n\t{\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004';\n\t}", "title": "" }, { "docid": "f20a3dc4b00ba5b78343de5647146512", "score": "0.5081941", "text": "function iextras_upgrade($nom_meta_base_version, $version_cible){\n\n\t$maj = array();\n\t$maj['create'] = array(\n\t\tarray('iextras_upgrade_to_saisies'),\n\t);\n\tinclude_spip('base/upgrade');\n\tmaj_plugin($nom_meta_base_version, $version_cible, $maj);\n}", "title": "" }, { "docid": "f3e1b93a628a006d8d263df362526a97", "score": "0.5081035", "text": "function hide_help() {\n\t echo '<style type=\"text/css\">\n\t #contextual-help-link-wrap { display: none !important; }\n\t </style>';\n\t}", "title": "" }, { "docid": "faefea7861b7b059a57eff172fa6d1d6", "score": "0.5078307", "text": "public function update_notice() {\n $info = __( 'ATTENTION! Please read the <a href=\"' . self::WIKI_LINK . '\" target=\"_blank\">DOCUMENTATION</a> properly before update.',\n self::TEXT_DOMAIN );\n\n echo '<span style=\"color: red; padding: 7px 0; display: block\">' . strip_tags( $info, '<a><b><i><span>' ) . '</span>'; // WPCS: XSS ok.\n }", "title": "" }, { "docid": "fe20fc89d23bd053427c8c760a018916", "score": "0.50658965", "text": "public function help_tab() {\r\n\r\n $screen = get_current_screen();\r\n\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'documentation',\r\n 'title' => __( 'Documentation', 'ml-slider' ),\r\n 'content' => \"<p><a href='http://www.metaslider.com/documentation/' target='blank'>Meta Slider Documentation</a></p>\",\r\n )\r\n );\r\n\r\n }", "title": "" }, { "docid": "77b04100cae06e8673ac736334422ec5", "score": "0.5063293", "text": "function marketing_concierge_mail_list_guideline_form_submit($form, &$form_state){\n\t$value = $form_state['values']['block']['guideline_url'];\n\t$name = t('mc_guideline_url');\n\tvariable_set($name, $value);\n\tdrupal_set_message(t('Default guideline URL saved successfully.'), 'status');\n}", "title": "" }, { "docid": "3f6fd50950524a57ba273041c38c5c71", "score": "0.5062677", "text": "protected function clean_option() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 7.0' );\n\t}", "title": "" }, { "docid": "8662b173a895dcf80a7c015aa8dc5b5b", "score": "0.50561965", "text": "function _thoughts_customize_comment_form(&$form) {\n// unset($form[LANGUAGE_NONE][0]['format']['guidelines']);\n $form[LANGUAGE_NONE][0]['format']['#access'] = FALSE;\n return $form;\n}", "title": "" }, { "docid": "cf5d76cc4b8a448fa868434d36f93ed4", "score": "0.50545377", "text": "public function usage()\n {\n return '';\n }", "title": "" }, { "docid": "b3807d5f168b6171124a2f64136bb041", "score": "0.50455064", "text": "function process_pdi($doc, $page, $optlist) {}", "title": "" }, { "docid": "d4aa81d4b843d97fe896b5e890e4e3c4", "score": "0.50452334", "text": "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"No documentation has been added for this module.\";\n\t}", "title": "" }, { "docid": "0db7810f22986c23d7e2d719080bb094", "score": "0.5042895", "text": "function mbtpro2_plugin_information() {\n\tif($_REQUEST['plugin'] == \"mybooktable-pro2\") {\n\t\twp_redirect('http://www.authormedia.com/mybooktable');\n\t\tdie();\n\t}\n}", "title": "" }, { "docid": "f87dd814a200ac1f82a9cff490ac7af2", "score": "0.504228", "text": "public function __construct() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 13.2', WPSEO_Ryte_Option::class );\n\t}", "title": "" }, { "docid": "1c75e24bfe975d8009f18ded3d61ebfc", "score": "0.5039499", "text": "protected function showOptionalAdditionalInfo()\n {\n $this->command->info('Press button <question>Add new App</question>.');\n }", "title": "" }, { "docid": "4b5c60e841a2616729ab9799f35039f5", "score": "0.5035668", "text": "public function help()\n\t{\n\t\t$this->output\n\t\t\t->addOverview(\n\t\t\t\t'Scaffolding for templates'\n\t\t\t);\n\t}", "title": "" }, { "docid": "1b3507c9d47cbac3f29fc5f02321b27a", "score": "0.50312626", "text": "protected function addAdminSupportMetabox()\n {\n }", "title": "" }, { "docid": "5d8ce76ef93f78a80903b16ae2d57e46", "score": "0.5030519", "text": "function phpgwapi_upgrade1_2_102()\n\t{\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004';\n\t}", "title": "" }, { "docid": "99ed808288af60bd28130832fb035db7", "score": "0.5029351", "text": "public function Upgrade157to16()\n {\n $this->_batch->addTask('Db_AddPatches', 51);\n\n $this->_batch->addTask('Echo', $this->_('Make sure to read the changelog as it contains important instructions'));\n\n return true;\n }", "title": "" }, { "docid": "2748cebbe738b1b47a93e24cfd1f34a5", "score": "0.50288844", "text": "private function processStepOneForm_v2(Request $request)\r\n\t{\r\n\t\t$infoForm \t = $request->request->all();\r\n\t\t//print_r($infoForm); die;\r\n\t\tif(!$this->validateStepOne($infoForm)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$localAuthor = $this->get('security.context')->getToken()->getUser();\r\n\t\t //$duration \t = $this->getDoctrine()->getRepository('BugglMainBundle:Duration')->findOneById($infoForm['duration']);\r\n\t\t$tripTheme \t = $this->getDoctrine()->getRepository('BugglMainBundle:TripTheme')->findOneById($infoForm['trip-theme']);\r\n\t\t$dateAdded \t = new \\DateTime(date('Y-m-d H:i:s'));\r\n\t\t$status \t = $this->get('buggl_main.constants')->get('draft_guide');\r\n\r\n\t\t$country \t = $this->verifyCountry($infoForm['country']);\r\n\t\t//echo $infoForm['requestUser']; die;\r\n\t\t$this->eguide->setLocalAuthor($localAuthor);\r\n\t\t$this->eguide->setCountry($country);\r\n\t\t$this->eguide->setTitle($infoForm['title']);\r\n\t\t$this->eguide->setExcerpts($infoForm['eguide-teaser']);\r\n\t\t$this->eguide->setBudget($infoForm['budget']);\r\n\t\t$this->eguide->setisRequestId($infoForm['requestUser']);\r\n\t\tif(!empty($infoForm['price'])){\r\n\t\t$this->eguide->setPrice($infoForm['price']);}\r\n\r\n\t\tif(is_null($this->eguide->getDateCreated())){\r\n\t\t\t$this->eguide->setDateCreated($dateAdded);\r\n\t\t}\r\n\t\t\r\n\t\t$this->eguide->setDateUpdated($dateAdded);\r\n\r\n\t\tif(is_null($this->eguide->getId()))\r\n\t\t\t$this->eguide->setStatus($status);\r\n\r\n\t\t// $this->eguide->setDuration(0);\r\n\t\t$this->eguide->setRealDuration(0); // no itinerary upon creation so real duration is 0\r\n\t\t$this->eguide->setTripTheme($tripTheme);\r\n\t\t$this->eguide->setCategory(null);\r\n\t\t// $this->eguide->setGoodFor(null);\r\n\t\t$this->eguide->setBestTimeToGo(implode(',', $infoForm['best-time-to-go']));\r\n\t\t$plainTitle = $this->getPlainTitle($infoForm['title']);\r\n\t\t$this->eguide->setPlainTitle( $plainTitle );\r\n\r\n\r\n\t\t// save guide\r\n\t\t$em = $this->getDoctrine()->getEntityManager();\r\n\t\t$em->persist($this->eguide);\r\n\t\t if($infoForm['requestUser'] !=0)\r\n\t\t\t \t{ //echo $infoForm['requestGuide']; die;\r\n\t\t\t \r\n\t\t\t \t\t$messagerequest = $this->getDoctrine()->getEntityManager()->getRepository('BugglMainBundle:EGuideRequest')->findOneById($infoForm['requestGuide']);\r\n\t\t\t \t\t$messagerequest->setStatus(1);\r\n\t\t\t \t\t\r\n\t\t\t \t\t$em->persist($messagerequest);\r\n\t\t\t \t}\t\r\n\t\t\t \t\r\n\t\t$em->flush();\r\n\r\n\t\t// save/update slug if no slug yet or if guide is still a draft\r\n\t\tif( is_null($this->eguide->getSlug()) || 0 == strlen( trim($this->eguide->getSlug()) ) || $this->eguide->getStatus() == $this->get('buggl_main.constants')->get('draft_guide') )\r\n\t\t{\r\n\t\t\t$slug = $this->get('buggl_main.slugifier')->format( $plainTitle )->getSlug().\"-\".$this->eguide->getId();\r\n\t\t\t$this->eguide->setSlug($slug);\r\n\t\t\t$em->persist($this->eguide);\r\n\t\t\t$em->flush();\r\n\t\t}\r\n\r\n\t\t$this->saveLocations($infoForm['locations']);\r\n\t\t$interests = (isset($infoForm['interests'])) ? $infoForm['interests'] : array();\r\n\t\t$this->saveInterests($interests);\r\n\t\t$this->saveGoodFor($infoForm['good_for']);\r\n\r\n\t\t/**\r\n\t\t * updates free search field\r\n\t\t *\r\n\t\t * @author Farly Taboada <farly.taboada@goabroad.com>\r\n\t\t */\r\n\t\t$event = new EguideEvent($this->eguide,0);\r\n \t$this->get('event_dispatcher')->dispatch('buggl.update_free_search',$event);\r\n\r\n\t\t// echo 'done'; exit;\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "ebd1cb494b6d87339e42349dba0657a6", "score": "0.5023141", "text": "function phpgwapi_upgrade1_2_103()\n\t{\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004';\n\t}", "title": "" }, { "docid": "50e0d0d6000aedc27cb58ad9d65f201f", "score": "0.5022323", "text": "public function help() {\n\t\tforeach (file(__FILE__) as $line) {\n\t\t\t$line = trim($line);\n\t\t\tif (substr($line, 0, 7) == '// DOC ') {\n\t\t\t\techo substr($line, 7).\"\\n\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "839a27f35124a1f26d59cbcbcf550dad", "score": "0.502118", "text": "function showHelpList()\r\n{\r\n // new plugin\r\n echo \"\\n\\r\";\r\n echo \"\\033[31m To create a new plugin run: \\033[0m\" . PHP_EOL;\r\n echo \"\\t-- php poodle init <type> <name> <'Exhibition name'>\\n\\r\";\r\n echo \"\\n\\r\";\r\n\r\n // locale files and folders\r\n echo \"\\033[31m To create locale files and folders run: \\033[0m\" . PHP_EOL;\r\n echo \"\\t-- php poodle lang add <language>\\n\\r\";\r\n echo \"\\n\\r\";\r\n\r\n // adding string to locale\r\n echo \"\\033[31m To add string keys to your locale run: \\033[0m\" . PHP_EOL;\r\n echo \"\\t-- php poodle str add <key> <value>\\n\\r\";\r\n echo \"\\n\\r\";\r\n\r\n // adding scheduled cron tasks\r\n echo \"\\033[31m To add scheduled cron tasks run: \\033[0m\" . PHP_EOL;\r\n echo \"\\t-- php poodle tasks add <task_name>\\n\\r\";\r\n echo \"\\n\\r\";\r\n\r\n}", "title": "" }, { "docid": "a1625c9b96cbbe702c871894df7abf1a", "score": "0.5018993", "text": "public static function setup_guide() {\n\t\tadd_action( 'astoundify_setup_guide_intro', array( __CLASS__, '_setup_guide_intro' ) );\n\n\t\tastoundify_setupguide( array(\n\t\t\t'steps' => include_once( dirname( __FILE__ ) . '/steps.php' ),\n\t\t\t'steps_dir' => get_template_directory() . '/inc/setup/steps',\n\t\t\t'strings' => array(\n\t\t\t\t'page-title' => __( 'Setup %s', 'jobify' ),\n\t\t\t\t'menu-title' => __( 'Getting Started', 'jobify' ),\n\t\t\t\t'sub-menu-title' => __( 'Setup Guide', 'jobify' ),\n\t\t\t\t'intro-title' => __( 'Welcome to %s', 'jobify' ),\n\t\t\t\t'step-complete' => __( 'Completed', 'jobify' ),\n\t\t\t\t'step-incomplete' => __( 'Not Complete', 'jobify' ),\n\t\t\t),\n\t\t\t'stylesheet_uri' => get_template_directory_uri() . '/vendor/astoundify/setup-guide/app/assets/css/style.css',\n\t\t) );\n\t}", "title": "" }, { "docid": "59637ac28ad04c3112f9e67e3946cdb0", "score": "0.5009813", "text": "function getInfo ()\n\t{\n\t\treturn array(\n\t\t\t'author' => 'Nikita Melnichenko',\n\t\t\t'date' => '2013-01-28',\n\t\t\t'name' => 'Diagram plugin, Main component',\n\t\t\t'desc' => 'Constructs diagrams',\n\t\t\t'url' => 'http://nikita.melnichenko.name/projects/dokuwiki-diagram/index.php'\n\t\t\t);\n\t}", "title": "" }, { "docid": "ae2d7b7a2e966d0d81a2e3e80e1b1fe3", "score": "0.5009125", "text": "function xmldb_block_ubtracking_upgrade($oldversion) {\n global $CFG, $DB, $OUTPUT;\n\n $dbman = $DB->get_manager(); // loads ddl manager and xmldb classes\n\n if ($oldversion < 2013060200) {\n // Define field completiondiscussions to be added to cafeteria\n $table = new xmldb_table('block_ubtracking_grpactiv');\n // <FIELD NAME=\"instanceid\" TYPE=\"int\" LENGTH=\"10\" NOTNULL=\"true\" UNSIGNED=\"true\" SEQUENCE=\"false\" COMMENT=\"id on typetable\" PREVIOUS=\"type\"/>\n\n $userid = new xmldb_field('userid');\n $userid->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'groupid');\n\n if (!$dbman->field_exists($table, $userid)) {\n $dbman->add_field($table, $userid);\n }\n\n }\n\n if ($oldversion < 2013060201) {\n // Define field completiondiscussions to be added to cafeteria\n $table = new xmldb_table('block_ubtracking_grpactiv');\n // <FIELD NAME=\"instanceid\" TYPE=\"int\" LENGTH=\"10\" NOTNULL=\"true\" UNSIGNED=\"true\" SEQUENCE=\"false\" COMMENT=\"id on typetable\" PREVIOUS=\"type\"/>\n\n $courseid = new xmldb_field('courseid');\n $courseid->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'id');\n\n if (!$dbman->field_exists($table, $courseid)) {\n $dbman->add_field($table, $courseid);\n }\n\n }\n\n return true;\n\n}", "title": "" }, { "docid": "3380310a8dca10290432772d92daf832", "score": "0.5006662", "text": "private function processDeprecatedSettings()\n {\n // 1.3.0 => 1.4.0\n // Field: \"renameGa\" => \"objectName\"\n $renameGa = trim($this->config->get('plugins.ganalytics.renameGa', ''));\n if (!empty($renameGa)) {\n $settings = $this->config->get('plugins.ganalytics', []);\n $settings['objectName'] = $renameGa;\n unset($settings['renameGa']);\n $this->config->set('plugins.ganalytics', $settings);\n Plugin::saveConfig('ganalytics');\n }\n }", "title": "" }, { "docid": "28b42a0cb8b5ea0faf17402e1e3995a3", "score": "0.49986097", "text": "function exposed_info() { }", "title": "" }, { "docid": "a2387f975c3da88cd656e9da226f4772", "score": "0.49885592", "text": "function pw_install_plugin_other_versions_information() {\r\n\tglobal $tab;\r\n\r\n\t$api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) ));\r\n\r\n\tif ( is_wp_error($api) )\r\n\t\twp_die($api);\r\n\r\n\t$plugins_allowedtags = array(\r\n\t\t'a' => array( 'href' => array(), 'title' => array(), 'target' => array() ),\r\n\t\t'abbr' => array( 'title' => array() ), 'acronym' => array( 'title' => array() ),\r\n\t\t'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(),\r\n\t\t'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(),\r\n\t\t'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(),\r\n\t\t'img' => array( 'src' => array(), 'class' => array(), 'alt' => array() )\r\n\t);\r\n\r\n\t$plugins_section_titles = array(\r\n\t\t'description' => _x('Description', 'Plugin installer section title'),\r\n\t\t'installation' => _x('Installation', 'Plugin installer section title'),\r\n\t\t'faq' => _x('FAQ', 'Plugin installer section title'),\r\n\t\t'screenshots' => _x('Screenshots', 'Plugin installer section title'),\r\n\t\t'changelog' => _x('Changelog', 'Plugin installer section title'),\r\n\t\t'other_notes' => _x('Other Notes', 'Plugin installer section title')\r\n\t);\r\n\r\n\t//Sanitize HTML\r\n\tforeach ( (array)$api->sections as $section_name => $content )\r\n\t\t$api->sections[$section_name] = wp_kses($content, $plugins_allowedtags);\r\n\tforeach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {\r\n\t\tif ( isset( $api->$key ) )\r\n\t\t\t$api->$key = wp_kses( $api->$key, $plugins_allowedtags );\r\n\t}\r\n\r\n\t$section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.\r\n\tif ( empty($section) || ! isset($api->sections[ $section ]) )\r\n\t\t$section = array_shift( $section_titles = array_keys((array)$api->sections) );\r\n\r\n\tiframe_header( __('Plugin Install') );\r\n\techo \"<div id='$tab-header'>\\n\";\r\n\techo \"<ul id='sidemenu'>\\n\";\r\n\tforeach ( (array)$api->sections as $section_name => $content ) {\r\n\r\n\t\tif ( isset( $plugins_section_titles[ $section_name ] ) )\r\n\t\t\t$title = $plugins_section_titles[ $section_name ];\r\n\t\telse\r\n\t\t\t$title = ucwords( str_replace( '_', ' ', $section_name ) );\r\n\r\n\t\t$class = ( $section_name == $section ) ? ' class=\"current\"' : '';\r\n\t\t$href = add_query_arg( array('tab' => $tab, 'section' => $section_name) );\r\n\t\t$href = esc_url($href);\r\n\t\t$san_section = esc_attr( $section_name );\r\n\t\techo \"\\t<li><a name='$san_section' href='$href' $class>$title</a></li>\\n\";\r\n\t}\r\n\techo \"</ul>\\n\";\r\n\techo \"</div>\\n\";\r\n\t?>\r\n\t<div class=\"alignright fyi\">\r\n\t\t<?php if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) : ?>\r\n\t\t<p class=\"action-button\">\r\n\t\t<?php\r\n\t\t$status = install_plugin_install_status($api);\r\n\t\tswitch ( $status['status'] ) {\r\n\t\t\tcase 'install':\r\n\t\t\t\tif ( $status['url'] )\r\n\t\t\t\t\techo '<a href=\"' . $status['url'] . '\" target=\"_parent\">' . __('Install Now') . '</a>';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'update_available':\r\n\t\t\t\tif ( $status['url'] )\r\n\t\t\t\t\techo '<a href=\"' . $status['url'] . '\" target=\"_parent\">' . __('Install Update Now') .'</a>';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'newer_installed':\r\n\t\t\t\techo '<a>' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>';\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'latest_installed':\r\n\t\t\t\techo '<a>' . __('Latest Version Installed') . '</a>';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t?>\r\n\t\t</p>\r\n\t\t<?php endif; ?>\r\n\t\t<h2 class=\"mainheader\"><?php /* translators: For Your Information */ _e('FYI') ?></h2>\r\n\t\t<ul>\r\n<?php if ( ! empty($api->version) ) : ?>\r\n\t\t\t<li><strong><?php _e('Version:') ?></strong> <?php echo $api->version ?></li>\r\n<?php endif; if ( ! empty($api->author) ) : ?>\r\n\t\t\t<li><strong><?php _e('Author:') ?></strong> <?php echo links_add_target($api->author, '_blank') ?></li>\r\n<?php endif; if ( ! empty($api->last_updated) ) : ?>\r\n\t\t\t<li><strong><?php _e('Last Updated:') ?></strong> <span title=\"<?php echo $api->last_updated ?>\"><?php\r\n\t\t\t\t\t\t\tprintf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) ?></span></li>\r\n<?php endif; if ( ! empty($api->requires) ) : ?>\r\n\t\t\t<li><strong><?php _e('Requires WordPress Version:') ?></strong> <?php printf(__('%s or higher'), $api->requires) ?></li>\r\n<?php endif; if ( ! empty($api->tested) ) : ?>\r\n\t\t\t<li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li>\r\n<?php endif; if ( ! empty($api->downloaded) ) : ?>\r\n\t\t\t<li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li>\r\n<?php endif; if ( ! empty($api->slug) && empty($api->external) ) : ?>\r\n\t\t\t<li><a target=\"_blank\" href=\"http://wordpress.org/extend/plugins/<?php echo $api->slug ?>/\"><?php _e('WordPress.org Plugin Page &#187;') ?></a></li>\r\n<?php endif; if ( ! empty($api->homepage) ) : ?>\r\n\t\t\t<li><a target=\"_blank\" href=\"<?php echo $api->homepage ?>\"><?php _e('Plugin Homepage &#187;') ?></a></li>\r\n<?php endif; ?>\r\n\t\t</ul>\r\n\t\t<?php if ( ! empty($api->rating) ) : ?>\r\n\t\t<h2><?php _e('Average Rating') ?></h2>\r\n\t\t<div class=\"star-holder\" title=\"<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>\">\r\n\t\t\t<div class=\"star star-rating\" style=\"width: <?php echo esc_attr( str_replace( ',', '.', $api->rating ) ); ?>px\"></div>\r\n\t\t</div>\r\n\t\t<small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>\r\n\t\t<?php endif; ?>\r\n\t</div>\r\n\t<div id=\"section-holder\" class=\"wrap\">\r\n\t<?php\r\n\t\tif ( !empty($api->tested) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>') )\r\n\t\t\techo '<div class=\"updated\"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>';\r\n\r\n\t\telse if ( !empty($api->requires) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<') )\r\n\t\t\techo '<div class=\"updated\"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>';\r\n\r\n\t\tforeach ( (array)$api->sections as $section_name => $content ) {\r\n\r\n\t\t\tif ( isset( $plugins_section_titles[ $section_name ] ) )\r\n\t\t\t\t$title = $plugins_section_titles[ $section_name ];\r\n\t\t\telse\r\n\t\t\t\t$title = ucwords( str_replace( '_', ' ', $section_name ) );\r\n\r\n\t\t\t$content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/');\r\n\t\t\t$content = links_add_target($content, '_blank');\r\n\r\n\t\t\t$san_section = esc_attr( $section_name );\r\n\r\n\t\t\t$display = ( $section_name == $section ) ? 'block' : 'none';\r\n\r\n\t\t\techo \"\\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\\n\";\r\n\t\t\techo \"\\t\\t<h2 class='long-header'>$title</h2>\";\r\n\t\t\techo $content;\r\n\t\t\techo \"\\t</div>\\n\";\r\n\t\t}\r\n\techo \"</div>\\n\";\r\n\r\n\tiframe_footer();\r\n\texit;\r\n}", "title": "" }, { "docid": "8c8886a3ad1d457466df561bee5b1c27", "score": "0.49862355", "text": "function phpgwapi_upgrade1_2_104()\n\t{\n\t\treturn $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004';\n\t}", "title": "" }, { "docid": "a1226ddd7f3567a6ae97177134403ea2", "score": "0.49862352", "text": "public static function getHelp() {\n if($_SERVER[\"REQUEST_METHOD\"] === \"GET\") {\n VInformazioni::getHelp(CUtente::getUtente());\n } else {\n CFrontController::methodNotAllowed();\n }\n }", "title": "" }, { "docid": "9bd978d43401cfdc39711de889a1c5fc", "score": "0.49817464", "text": "public function vendorNotes()\n\t{\n\t}", "title": "" }, { "docid": "c147b0843415a6774ec3218477f65180", "score": "0.49768195", "text": "function va_display_logo() {\r\n\t_deprecated_function( __FUNCTION__, '1.3.3' );\r\n\treturn false;\r\n}", "title": "" }, { "docid": "141ee970dda4beb024120bda804707ef", "score": "0.4972934", "text": "function input_admin_head()\n\t{\n\t\t// Note: This function can be removed if not used\n\t}", "title": "" }, { "docid": "0d3d7bcaff240c216d63cf6eefa4193a", "score": "0.4972634", "text": "public function help() { $this->run(); }", "title": "" }, { "docid": "71258c89589f47d0bad61cf17cd17e25", "score": "0.49653068", "text": "function wphave_admin_section_design() {\n\t\t\t/* Leave blank */\n\t\t}", "title": "" }, { "docid": "d8ce04105d9cc450eb4a2cfaf681897b", "score": "0.4960722", "text": "function remove_version_info() {\r\n return '';\r\n}", "title": "" }, { "docid": "76128f71be1a9075562476ffc16f0210", "score": "0.49557716", "text": "function openid_upgrade20_1_001()\n{\n\treturn $GLOBALS['setup_info']['openid']['currentver'] = '21.1';\n}", "title": "" }, { "docid": "539abc935075d10acfd86d0e66d0ed64", "score": "0.4953886", "text": "function Banners_upgrade($oldversion)\n{\n // Update successful\n return true;\n}", "title": "" }, { "docid": "e03af29fe12b7b9504d0da4fbcabe78b", "score": "0.49516153", "text": "public function Upgrade16to161()\n {\n $this->_batch->addTask('Db_AddPatches', 52);\n\n $this->_batch->addTask('Echo', $this->_('Make sure to read the changelog as it contains important instructions'));\n\n return true;\n }", "title": "" }, { "docid": "10c0cb8436450e670414810f5d2ec4db", "score": "0.49488512", "text": "function cuc7_page_alter($page) {\n // this was added in order to verify site for Google G-suite\n $meta_description = array(\n '#type' => 'html_tag',\n '#tag' => 'meta',\n '#attributes' => array(\n 'name' => 'google-site-verification',\n 'content' => \"DMf-krkiFqwMLMupwq5xcBYpuTWoY81OkRaQ5eHh1rw\",\n )\n );\n drupal_add_html_head( $meta_description, 'meta_description');\n }", "title": "" }, { "docid": "c5d016554fe04da4e7875913ceec3e83", "score": "0.4947203", "text": "protected function structure()\n {\n // Not required by manual tool\n }", "title": "" }, { "docid": "7ddf0c5e22802d4d93c8aea55e43de4a", "score": "0.49449065", "text": "function convergence_site_description() {\r\n\treturn hybrid_site_description();\t\r\n}", "title": "" }, { "docid": "c8a225e7b8c9868049f359f692df49f9", "score": "0.4942358", "text": "function show_help(){\n\n\t\techo \"How to use: \\n To create table use- 'php user_upload.php --create_table -u <MySQL-User Name > -p <MySQL Passowrd> -h <MySQL Host> ' \\n To dry_run use - 'php user_upload.php --file users.csv --dry_run' \\n To insert the data into database use- 'php user_upload.php --file users.csv -u -p -h ' \\n This Script will only insert the data into database if there are not any invalid emails. \\n If you want to insert the data into database if there are invalid email (This will only insert the correct records), Run the script- php user_upload.php --create_table -u <MySQL-User Name > -p <MySQL Passowrd> -h <MySQL Host> -f \\n For help use --help \\n \";\n\t}", "title": "" }, { "docid": "ee6b722022553a7d7fdeba621b0785c8", "score": "0.49404874", "text": "private function read_edit()\r\n {\r\n }", "title": "" }, { "docid": "d0f02a5826e2a881115a4f7295c5dfd6", "score": "0.4940466", "text": "public function usageHelp()\n {\n return <<<USAGE\nUsage: php -f dolist_export_segments.php -- [options]\n\n --ids segmentId1,segmentId2 exports the list of segments defined by their id (comma separated)\n help This help\n\nUSAGE;\n }", "title": "" }, { "docid": "87c6255157a6e28bad3c7a517d0f75ee", "score": "0.49402252", "text": "public function component_info();", "title": "" }, { "docid": "8a350fdf951ff57c0b7456897c6cebb3", "score": "0.49393123", "text": "function _Forms_install(){\n\t\t// if ($GLOBALS['spip_version_code']<1.9204){\n\t\t\t// include_spip('base/forms_upgrade');\n\t\t\t// Forms_upgrade();\n\t\t// }\n\t}", "title": "" }, { "docid": "ec4731bfca662629f3da7c9dedc8b750", "score": "0.49364856", "text": "public function getHelp() {\r\n\r\n $description = \"DESCRIPTION\\n\";\r\n $description .= ' ' . \"This command import song meta information from csv files.\\n\";\r\n $description .= \" convert convert song meta information from file\\n\";\r\n $description .= \" singer import singer information\\n\";\r\n $description .= \" category import song category information\\n\";\r\n $description .= \" song import song information\\n\";\r\n $description .= \" importall import all song meta information\\n\";\r\n return parent::getHelp() . $description;\r\n }", "title": "" }, { "docid": "66d47cf0b0b35097da087be0beb558c0", "score": "0.4935945", "text": "function view() {\r\n\t\tif( isset($this->docid) and $this->docid>0 and class_exists( 'DocumentorLiteAPI' ) ){\r\n\t\t\t$guide = new DocumentorLiteAPI( $this->docid );\r\n\t\t\t\r\n\t\t\t//Get the HTML of the guide\r\n\t\t\t$html = \"\";\r\n\t\t\t$html.= $guide->get_doc();\t\t\r\n\t\t\treturn $html;\r\n\t\t}//if DocumentorLiteAPI class exists\r\n\t}", "title": "" }, { "docid": "5ae1067708ff6be466b043fd410fafb2", "score": "0.49357685", "text": "private function _displayHelp()\n {\n $msg =\n \"\\tUsage: \\n\".\n \"\\t 1. Generate controller class \\n\".\n \"\\t generate controller #ControllerName #Views \\n\".\n \"\\t eg: \\n\".\n \"\\t ./script/generate controller Posts index show edit delete \\n\".\n \"\\t \\n\".\n \"\\t 2. Generate model class \\n\".\n \"\\t generate model #ModelName \\n\".\n \"\\t eg: \\n\".\n \"\\t ./script/generate model Post \\n\".\n \"\\t \\n\".\n \"\\t 3. This help. \\n\".\n \"\\t ./script/generate \\n\".\n \"\\n\";\n $this->_exit($msg);\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "f94053e48c6c32e748a16cac4600d55c", "score": "0.0", "text": "public function store(Request $request)\n {\n \t$request->validate([\n \t\t'name'\t\t\t\t=> [ 'required', 'min:2', 'unique:leagues' ],\n \t\t'series_id'\t\t\t=> [ 'required', 'exists:series,id' ],\n \t\t'generate_token'\t=> [ 'boolean' ],\n \t]);\n \t\n \tif( $league = League::create( $request->only('name', 'series_id') ) )\n \t{\n\t\t\tsession()->flash( 'status', __( \"The league :name has been added.\", [ 'name' => $league->name ] ) );\n\t\t\n\t\t\tif( $request->input('generate_token') )\n\t\t\t\t$league->access_token = str_random(10);\n\t\t\t\n\t\t\t$league->save();\n\t\t}\n \t\n \treturn redirect()->route( 'admin.leagues.index' );\n }", "title": "" } ]
[ { "docid": "79da2146a3794a65b80951c7ea2a2404", "score": "0.66211367", "text": "public function save()\n {\n $this->storage->save();\n }", "title": "" }, { "docid": "f934191a4b4b75a1fb96952dd934d298", "score": "0.6508264", "text": "public function store()\n {\n $this->validate(\n $this->request,\n $this->validationRules('create'),\n [],\n $this->getLabelFields('create')\n );\n\n if ($new = $this->model()->create($this->request->all())) {\n return $this->afterStored($new);\n }\n\n return\n back()\n ->withInput()\n ->with(\n 'error',\n __(\n 'Error when creating :resource_name.',\n ['resource_name' => static::$title]\n )\n );\n\n }", "title": "" }, { "docid": "29b26d3072dbf3730f945274190fe8af", "score": "0.6507538", "text": "public function store(StoreResourceRequest $request)\n {\n abort_if(\n $request->user()->cannot('create', Resource::class),\n 403\n );\n\n // course not found\n Course::where('program_id', auth()->user()->program_id)->findOrFail($request->course_id);\n\n try {\n $batchId = Str::uuid();\n foreach ($request->file as $file) {\n $temporaryFile = TemporaryUpload::firstWhere('folder_name', $file);\n\n if ($temporaryFile) {\n $r = Resource::create([\n 'course_id' => $request->course_id,\n 'user_id' => auth()->id(),\n 'batch_id' => $batchId,\n 'description' => $request->description\n ]);\n\n $r->users()->attach($r->user_id, ['batch_id' => $batchId]);\n\n $r->addMedia(storage_path('app/public/resource/tmp/' . $temporaryFile->folder_name . '/' . $temporaryFile->file_name))\n ->toMediaCollection();\n rmdir(storage_path('app/public/resource/tmp/' . $file));\n\n // event(new ResourceCreated($r));\n\n $temporaryFile->delete();\n }\n }\n\n if ($request->check_stay) {\n return redirect()\n ->route('resources.create')\n ->with('success', 'Resource was created successfully');\n }\n\n return redirect()\n ->route('resources.index')\n ->with('success', 'Resource was created successfully');\n } catch (\\Throwable $th) {\n throw $th;\n }\n }", "title": "" }, { "docid": "195678750c701128998da1a792face59", "score": "0.6485103", "text": "public function store()\n\t{\n\t\t$input = Input::only('link', 'description', 'level', 'title', 'categorie_id');\n\t\t$rules = [\n\t\t\t'title' => 'required',\n\t\t\t'link' => 'required|url',\n\t\t\t'description' => 'required',\n\t\t\t'level' => 'required|integer',\n\t\t\t'categorie_id' => 'required|integer'\n\t\t];\n\t\t\n\t\t$validator = Validator::make($input, $rules);\n\n\t\tif($validator->passes())\n\t\t{\n\t\t\t$resource = new Resource($input);\n\t\t\t$user = Auth::user();\n\t\t\t$user->resources()->save($resource);\n\t\t\t$user->save();\n\t\t\treturn Redirect::route('resources.show', ['id' => $resource->id])->withFlashMessage('Your resource was successfully created!');\n\t\t}\n\t\t\n\t\treturn Redirect::back()->withInput()->withErrors($validator);\n\t}", "title": "" }, { "docid": "20369ffaffacb701b25ed702ed26d8a3", "score": "0.64411986", "text": "public function save(): void\n {\n $this->handler->write($this->getId(), $this->prepareForStorage(\n serialize($this->attributes)\n ));\n\n $this->started = false;\n }", "title": "" }, { "docid": "3d9eb044ff6d55a39b2aa1f967b0a444", "score": "0.6406276", "text": "public function store()\n {\n $this->beginAction('store');\n $this->applyHooks(AuthorizeAction::class);\n $this->gatherInput();\n $this->validateInput();\n $this->createResource();\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "ca58ec6302f4412d3ed2c815a424ff00", "score": "0.640073", "text": "public function store()\n\t{\n\t\t// not yet required!\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
b30f19ff0307cede306076f757c43a11
Gets the unit decorator.
[ { "docid": "b5eafa65b61892f0da89ea0ea34760ed", "score": "0.8663806", "text": "public function getUnitDecorator(): UnitDecorator\n {\n return $this->unitDecorator;\n }", "title": "" } ]
[ { "docid": "fd7985e9dc6e1c2b558c1ccd2df0eae0", "score": "0.7109482", "text": "public function getUnit()\n {\n return $this->unit;\n }", "title": "" }, { "docid": "fd7985e9dc6e1c2b558c1ccd2df0eae0", "score": "0.7109482", "text": "public function getUnit()\n {\n return $this->unit;\n }", "title": "" }, { "docid": "fd7985e9dc6e1c2b558c1ccd2df0eae0", "score": "0.7109482", "text": "public function getUnit()\n {\n return $this->unit;\n }", "title": "" }, { "docid": "fd7985e9dc6e1c2b558c1ccd2df0eae0", "score": "0.7109482", "text": "public function getUnit()\n {\n return $this->unit;\n }", "title": "" }, { "docid": "fd7985e9dc6e1c2b558c1ccd2df0eae0", "score": "0.7109482", "text": "public function getUnit()\n {\n return $this->unit;\n }", "title": "" }, { "docid": "5d0e1d173d460de144cff490a68f1189", "score": "0.65486133", "text": "public function getUnit()\n {\n return $this->user['unit_system'];\n }", "title": "" }, { "docid": "f6aba62378d11c073a48de1fcb776077", "score": "0.6496631", "text": "public function get_unit()\n {\n if ($this->_cacheExpiration == 0) {\n if ($this->load(YAPI::$defaultCacheValidity) != YAPI_SUCCESS) {\n return Y_UNIT_INVALID;\n }\n }\n return $this->_unit;\n }", "title": "" }, { "docid": "1328f7ecd712da0607558bdf3b1a0454", "score": "0.62941414", "text": "public function getOrderableUnit()\n {\n return $this->orderableUnit;\n }", "title": "" }, { "docid": "2fce05c4428ee71e24ebc84edc98569c", "score": "0.62766373", "text": "public function getMeasurementUnit()\n {\n return $this->measurementUnit;\n }", "title": "" }, { "docid": "0e994a719ca03d80302abab478782dcb", "score": "0.62565637", "text": "public function setUnitDecorator(UnitDecorator $decorator): self\n {\n $this->unitDecorator = $decorator;\n\n return $this;\n }", "title": "" }, { "docid": "5515f5d52c53e6bf7261603ae66be10d", "score": "0.6254998", "text": "public function getUnitNumber()\n {\n return $this->unitNumber;\n }", "title": "" }, { "docid": "a871ea6eb1f5bbdb7a57bd9159f5797b", "score": "0.6203787", "text": "public function getCurrentUnit()\n {\n return $this->currentUnit;\n\n }", "title": "" }, { "docid": "606562c0bc32489ee500ed742d02eab4", "score": "0.61637074", "text": "public function get_unit()\n { $json_val = $this->_getFixedAttr(\"unit\");\n return (is_null($json_val) ? Y_UNIT_INVALID : $json_val);\n }", "title": "" }, { "docid": "5d2c54feece570a7c5d601ef643a45bc", "score": "0.6061328", "text": "public function getBaseUnit()\n {\n return $this->baseUnit;\n }", "title": "" }, { "docid": "6de1091d27697891f4da5dd0d11aa3f2", "score": "0.6058177", "text": "public function getUnit()\n {\n return view('statistics.unit');\n }", "title": "" }, { "docid": "c502d6375ff3650e1d9c132c16d4b76e", "score": "0.60452986", "text": "public function getUnit()\n {\n return (string)$this->_xml->attributes()->unit;\n }", "title": "" }, { "docid": "1bc3a9cef583651a5b8e6f664a67901d", "score": "0.60157263", "text": "public function getActualUnit(){\n //return $this->anonymServiceHelper->getUnit($_SESSION[IDUNIT]);\n return new Unit($this->unitHelper->getUnitDetailResult($_SESSION[IDUNIT]));\n }", "title": "" }, { "docid": "1c60d844033f5ea1e986cbdc59f7d65b", "score": "0.6014902", "text": "public function get_unit_name() { \n return $this->item('unit_name');\n\n }", "title": "" }, { "docid": "e5277fb86533535385a68b2746ff779b", "score": "0.59565896", "text": "public function getSalesunit()\n\t{\n\n\t\treturn $this->salesunit;\n\t}", "title": "" }, { "docid": "91858e8f8ecf0e607f3169511e67aaec", "score": "0.5936665", "text": "public function getMeasurementUnit()\n {\n $measurementUnits = $this->collectData();\n \n return $measurementUnits['Uni.'];\n }", "title": "" }, { "docid": "2b11c32e3b3f64ba988049b41c1a0aab", "score": "0.58340734", "text": "public function getUnitid()\n\t{\n\n\t\treturn $this->unitid;\n\t}", "title": "" }, { "docid": "af800368debd172ea8828976d1316efb", "score": "0.5782558", "text": "public function getMeasurementUnit(): string\n {\n return 'celsius';\n }", "title": "" }, { "docid": "fb1d935e76f00e09696158ea6fb61ede", "score": "0.57588583", "text": "public static function baseUnit()\n\t{\n\t\treturn self::hertz();\n\t}", "title": "" }, { "docid": "47f3f93aecfdeb421ee27621bc21cb1d", "score": "0.57465327", "text": "public function getUnitPricingUnit();", "title": "" }, { "docid": "cf9e933801db1294db3d4fafc664774e", "score": "0.5732799", "text": "public function getMeasureunitid()\n\t{\n\n\t\treturn $this->measureunitid;\n\t}", "title": "" }, { "docid": "f507ae783a9aa8b5a03d38e9355c2a1e", "score": "0.56599283", "text": "public static function getUnit($unit)\n {\n // If this class hasn't been initialized yet, do so now\n if (!is_array(static::$unitDefinitions)) {\n static::$unitDefinitions = [];\n static::initialize();\n }\n\n $key = static::buildUnitCacheKey($unit);\n if (isset(self::$unitCache[$key])) {\n return self::$unitCache[$key];\n }\n\n foreach (static::$unitDefinitions as $unitOfMeasure) {\n if ($unit === $unitOfMeasure->getName() || $unitOfMeasure->isAliasOf($unit)) {\n return self::$unitCache[$key] = $unitOfMeasure;\n }\n }\n\n throw new Exception\\UnknownUnitOfMeasure([':unit' => $unit]);\n }", "title": "" }, { "docid": "64d51e8066e712896ac331e782798da1", "score": "0.56566733", "text": "public function getDistanceUnit()\n {\n return $this->distanceUnit;\n }", "title": "" }, { "docid": "8742dac2e1b8b913e9acabf59d4f4e62", "score": "0.56516", "text": "public function get() {\n\n return $this->httpGet('/api/v3/Unit');\n }", "title": "" }, { "docid": "1a04f9bd5b223195e410deae652281da", "score": "0.5624112", "text": "public function getWindUnit()\n {\n return $this->user['unit_wind'];\n }", "title": "" }, { "docid": "43fa2058dc25d8c32bf1889b97c87250", "score": "0.562072", "text": "public function getUnits();", "title": "" }, { "docid": "fa1f6cc0104f0020a4b3b997bccbd359", "score": "0.55574584", "text": "public function get_serie1Unit(): string\n {\n return $this->_var1unit;\n }", "title": "" }, { "docid": "dfde10dfd9865256fec6d12a820cd65d", "score": "0.552311", "text": "public function getColumnDecorator()\n {\n return $this->columnDecorator;\n }", "title": "" }, { "docid": "a29331f220104220b1130d52967e7fd3", "score": "0.55144113", "text": "public function getUnitOfMeasure(){\n\t\treturn $this->_mUM;\n\t}", "title": "" }, { "docid": "e7113abff37037cf22127105eafea9ff", "score": "0.5510433", "text": "public function getSubunit()\n {\n return $this->subunit;\n }", "title": "" }, { "docid": "e7113abff37037cf22127105eafea9ff", "score": "0.5510433", "text": "public function getSubunit()\n {\n return $this->subunit;\n }", "title": "" }, { "docid": "60cde6ea82c51e53eb8d99b84306af22", "score": "0.5510395", "text": "public function getUnit()\n {\n return $this->hasOne(Unit::className(), ['unit_id' => 'unit_id']);\n }", "title": "" }, { "docid": "8d0530e0413e0469e824fa7c150eea06", "score": "0.5479404", "text": "public function getUnitOfMeasurement(): ?string\n {\n return $this->unitOfMeasurement;\n }", "title": "" }, { "docid": "94e3608048e5269163dee5c5cd9b5cda", "score": "0.5473648", "text": "public function getUnits()\n {\n return $this->units;\n }", "title": "" }, { "docid": "2fe8340838b3ac675dacb437fb456845", "score": "0.544239", "text": "public function getUnitOfMeasure() {\n \n return $this->unitOfMeasure;\n }", "title": "" }, { "docid": "114b124c633c4314856255567dea90e4", "score": "0.54273427", "text": "public function get_units()\n\t\t{\n\t\t\treturn $this->units;\n\t\t}", "title": "" }, { "docid": "ef2a8be16a097f9878b27312d57221b1", "score": "0.5417657", "text": "public function getBusinessUnit();", "title": "" }, { "docid": "5345ac47b221af25b2913ead2c780359", "score": "0.5407112", "text": "public static function baseUnit()\n\t{\n\t\treturn static::becquerel();\n\t}", "title": "" }, { "docid": "52f472254aef5e78e3592ca432d1cb92", "score": "0.5401872", "text": "public function getRequestUnit()\n {\n return $this->requestUnit;\n\n }", "title": "" }, { "docid": "73ff9f03b35eb4c0ec8e88fe58135408", "score": "0.53703874", "text": "public function getUnitPrice()\n {\n return $this->unit_price;\n }", "title": "" }, { "docid": "73ff9f03b35eb4c0ec8e88fe58135408", "score": "0.53703874", "text": "public function getUnitPrice()\n {\n return $this->unit_price;\n }", "title": "" }, { "docid": "39bb54185c2f4556fffb78bb265250b9", "score": "0.5313389", "text": "public function getWeightUnit()\n {\n $weightUnit =\n $this->_scopeConfig->getValue(\n \\Magento\\Directory\\Helper\\Data::XML_PATH_WEIGHT_UNIT,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE,\n $this->_storeManager->getStore()->getId()\n );\n\n return $this->_unitMap($weightUnit);\n }", "title": "" }, { "docid": "90cfec625bbc56e5b87ea20ffaedd4b9", "score": "0.53042597", "text": "public function getUnitPrice()\n {\n return $this->unitPrice;\n }", "title": "" }, { "docid": "90cfec625bbc56e5b87ea20ffaedd4b9", "score": "0.53042597", "text": "public function getUnitPrice()\n {\n return $this->unitPrice;\n }", "title": "" }, { "docid": "a44967474dad2474d7c290e9ae3ea0d6", "score": "0.5276529", "text": "public function get_default_unit()\n {\n $query = $this->db->get_where($this->_table_name, array('default' => 1), 1);\n return $query->row()->unit;\n }", "title": "" }, { "docid": "f14d9e4ac05aa65067d77b02b1c32db4", "score": "0.5269854", "text": "private function getUnitType($unit)\n {\n $unit = str_replace('**', '', $unit);\n\n if (isset($this->unitsInfo[$unit])) {\n return $this->unitsInfo[$unit];\n }\n\n return false;\n }", "title": "" }, { "docid": "176ac749aef171fd687ea212445e2515", "score": "0.5260884", "text": "public function getBusinessUnit()\n {\n return $this->businessUnit instanceof BusinessUnitBuilder ? $this->businessUnit->build() : $this->businessUnit;\n }", "title": "" }, { "docid": "20f3d2031859baa85ed1dcf70b64f76d", "score": "0.5257771", "text": "public function getUnitGroup()\r\n {\r\n return self::$unit_groups[$this->unit];\r\n }", "title": "" }, { "docid": "e311cc3a5d5eb19e3cb2d186d610199b", "score": "0.5256297", "text": "public function getLengthUnitAttribute()\n {\n return new Length($this->length, $this->dimensions_unit);\n }", "title": "" }, { "docid": "c92514e4a7da326d9896e1b6c8644d2c", "score": "0.52522105", "text": "public function getTimeUnit()\n {\n return $this->timeUnit;\n }", "title": "" }, { "docid": "1b3e2b5a61bc9c4e3439d781c70bb659", "score": "0.5251375", "text": "public function unitStr()\n {\n if ($this->unitless()) {\n return '';\n }\n\n return self::getUnitString($this->numeratorUnits, $this->denominatorUnits);\n }", "title": "" }, { "docid": "7bb42106b49ae6d118a0fbcb23b117fb", "score": "0.52490324", "text": "public function getUnitPrice() {\n return $this->unitPrice;\n }", "title": "" }, { "docid": "cfae5618ab66d00f2b895cdf7888c00c", "score": "0.5207305", "text": "public function getUnitAmountAttribute() {\n return (double) $this->quantity * ($this->unit_rate ?? 1);\n }", "title": "" }, { "docid": "135add088b440ec0f10644a6bf711781", "score": "0.52026886", "text": "public function getUnitTotal()\n {\n return $this->unitTotal;\n }", "title": "" }, { "docid": "e6224cff3a74fbd34336c732772b1589", "score": "0.51880205", "text": "public function getGuarantorDecorator()\n {\n return $this->guarantorDecoratorSubscriber;\n }", "title": "" }, { "docid": "fad869ddd7763ad0f42b2a49d1b179c6", "score": "0.5176184", "text": "public function getUnitPrice()\n\t{\n\t\treturn $this->_unitPrice;\n\t}", "title": "" }, { "docid": "5409a5986bf6175233d1a24a6505fc2a", "score": "0.51754105", "text": "public function getUnitValue(): Money\n\t{\n\t\treturn $this->unitValue;\n\t}", "title": "" }, { "docid": "74afa8b1bd32b566c9f7f82eabff1865", "score": "0.5170431", "text": "public function getBusinessUnit()\n {\n return $this->businessUnit instanceof BusinessUnitResourceIdentifierBuilder ? $this->businessUnit->build() : $this->businessUnit;\n }", "title": "" }, { "docid": "ffadf52bb08e499c3c891c243bf5065a", "score": "0.5169645", "text": "public function getUnitPrice();", "title": "" }, { "docid": "5995407759ecaedf5084bcedfa6bdfc9", "score": "0.51695997", "text": "public function unit()\n {\n return $this->morphedByMany(Unit::class, 'organization', 'organization', 'profile_id');\n }", "title": "" }, { "docid": "55c204dab19a5a2f6c755f0f81a51737", "score": "0.515395", "text": "public function getWeightUnit()\n {\n return $this->weightUnit;\n }", "title": "" }, { "docid": "df22bfffb9cb654bc292d8c7b489577f", "score": "0.5117911", "text": "public function getMeasureUnit($con = null)\n\t{\n\t\t// include the related Peer class\n\t\tinclude_once 'anmaga/om/BaseMeasureUnitPeer.php';\n\n\t\tif ($this->aMeasureUnit === null && ($this->measureunitid !== null)) {\n\n\t\t\t$this->aMeasureUnit = MeasureUnitPeer::retrieveByPK($this->measureunitid, $con);\n\n\t\t\t/* The following can be used instead of the line above to\n\t\t\t guarantee the related object contains a reference\n\t\t\t to this object, but this level of coupling\n\t\t\t may be undesirable in many circumstances.\n\t\t\t As it can lead to a db query with many results that may\n\t\t\t never be used.\n\t\t\t $obj = MeasureUnitPeer::retrieveByPK($this->measureunitid, $con);\n\t\t\t $obj->addMeasureUnits($this);\n\t\t\t */\n\t\t}\n\t\treturn $this->aMeasureUnit;\n\t}", "title": "" }, { "docid": "b24ecf68c4f8c25f188a397562f3275e", "score": "0.50924945", "text": "private function _getImportantDecorator($element)\n {\n $class = get_class($element);\n\n if (strpos($class, 'JQuery')) {\n $dec = $element->getDecorator('UiWidgetElement');\n }\n if (strpos($class, 'File')) {\n $dec = $element->getDecorator('File');\n }\n\n if (!isset($dec) || $dec == false) {\n $dec = $element->getDecorator('ViewHelper');\n }\n\n return $dec;\n }", "title": "" }, { "docid": "120387012cb9ae9008dc3ba36d399153", "score": "0.50703084", "text": "public function getUnit(): ?FHIRCodeableConcept\n\t{\n\t\treturn $this->unit;\n\t}", "title": "" }, { "docid": "07c26513d0912944d9bfef9cb7303583", "score": "0.5060853", "text": "public function getTan()\n {\n return $this->tan;\n }", "title": "" }, { "docid": "379ef023cb14c0ffc024504bb74745b6", "score": "0.5043779", "text": "protected function getOrganisationUnit()\n\t{\n\t\treturn isset($this->organisationUnit) ? $this->organisationUnit :\n\t\t\t$this->defaultOrganisationUnit;\n\t}", "title": "" }, { "docid": "2e57761bc0b41c8532d6d177199e02b6", "score": "0.50378996", "text": "public function getUnitPrice() {\n return $this->_itemData[self::ITEM_UNIT_PRICE];\n }", "title": "" }, { "docid": "658b022380922d10bd35e7fc57128775", "score": "0.50352186", "text": "public function get_signalUnit()\n {\n if ($this->_cacheExpiration == 0) {\n if ($this->load(YAPI::$defaultCacheValidity) != YAPI_SUCCESS) {\n return Y_SIGNALUNIT_INVALID;\n }\n }\n return $this->_signalUnit;\n }", "title": "" }, { "docid": "3b588a068dbeef73850e12678ff0dd15", "score": "0.5020608", "text": "public function get_serie2Unit(): string\n {\n if (!($this->_nVars >= 2)) return $this->_throw( YAPI::INVALID_ARGUMENT, 'There is no serie 2 in $this capture data','');\n return $this->_var2unit;\n }", "title": "" }, { "docid": "d3dbea3629443f71e09d33dee8f66186", "score": "0.5017314", "text": "public function getDoubler()\n {\n return $this->doubler;\n }", "title": "" }, { "docid": "25598230b75b96790e3d8ebee2fbdb68", "score": "0.5017263", "text": "public function __construct(UnitDecorator $unitDecorator = null)\n {\n $this\n ->setUnitDecorator($unitDecorator ?: new SymbolDecorator)\n ->setFormat('%v %u')\n ;\n }", "title": "" }, { "docid": "fbd2fa91b787aab3644fd5ed91fea05b", "score": "0.49922535", "text": "public function getUnit($con = null)\n\t{\n\t\t// include the related Peer class\n\t\tinclude_once 'anmaga/om/BaseUnitPeer.php';\n\n\t\tif ($this->aUnit === null && ($this->unitid !== null)) {\n\n\t\t\t$this->aUnit = UnitPeer::retrieveByPK($this->unitid, $con);\n\n\t\t\t/* The following can be used instead of the line above to\n\t\t\t guarantee the related object contains a reference\n\t\t\t to this object, but this level of coupling\n\t\t\t may be undesirable in many circumstances.\n\t\t\t As it can lead to a db query with many results that may\n\t\t\t never be used.\n\t\t\t $obj = UnitPeer::retrieveByPK($this->unitid, $con);\n\t\t\t $obj->addUnits($this);\n\t\t\t */\n\t\t}\n\t\treturn $this->aUnit;\n\t}", "title": "" }, { "docid": "6d184bcb324f3e740e1d8ef3f0dcffb2", "score": "0.49749357", "text": "public function getHeightWithUnit()\n {\n return $this->getHeight() . ' µm';\n }", "title": "" }, { "docid": "ba049709910832e72f203e969efad3c4", "score": "0.49415746", "text": "public function getMetric()\n {\n return $this->metric;\n }", "title": "" }, { "docid": "a236fbe336a2560c8b343b7409374381", "score": "0.49389723", "text": "public function getSpeedUnwrapped()\n {\n return $this->readWrapperValue(\"speed\");\n }", "title": "" }, { "docid": "5540ade27103baff69f4879f316fb6cf", "score": "0.49376386", "text": "public function getHelper()\n {\n return $this->helper;\n }", "title": "" }, { "docid": "e8d938b04ba533b0c206a955673ce98e", "score": "0.49263266", "text": "public function getTimer()\n {\n return $this->_timer;\n }", "title": "" }, { "docid": "0ed08c7f5073ab2cb721245b598dc3fe", "score": "0.49262765", "text": "public function unit(Request $request)\n {\n return Unit::find($request['id']);\n }", "title": "" }, { "docid": "1251caff6cf23a0f1cc172bd89e5ed48", "score": "0.49095166", "text": "public function getDmt()\r\n\t{\r\n\t\treturn($this->dmt);\r\n\t}", "title": "" }, { "docid": "1179d469b512e8e41a67b0b5aa753cbc", "score": "0.48964188", "text": "function getUnitPrice();", "title": "" }, { "docid": "9b66020b67fa22fb99c2ab6a5380fd68", "score": "0.48916003", "text": "public function getUnits()\n {\n $this->db->where('delete_status',0);\n $query=$this->db->get('unit');\n return $query->result();\n }", "title": "" }, { "docid": "77e974b7f640b9e0b61728e0184e13e3", "score": "0.48914725", "text": "public function getUnitReadable()\n {\n switch ($this->getUnit())\n {\n case self::UNIT_METRIC:\n return 'metric';\n case self::UNIT_IMPERIAL:\n return 'imperial';\n default:\n return 'Unknown';\n }\n }", "title": "" }, { "docid": "16b6212ecdae3aa8437c6fda3294d1e8", "score": "0.48869568", "text": "public function getWidthUnitAttribute()\n {\n return new Length($this->width, $this->dimensions_unit);\n }", "title": "" }, { "docid": "8d24834b58fa6c12092301ce7104d9cf", "score": "0.48843446", "text": "public function get_units()\n\t{\n\t\t$ol = new object_list(array(\n\t\t\t\"class_id\" => CL_UNIT,\n\t\t\t\"status\" => object::STAT_ACTIVE,\n\t\t));\n\t\treturn $ol;\n\t}", "title": "" }, { "docid": "916f75d8ad69e90fb590704e640768b4", "score": "0.48663867", "text": "public function get_serie3Unit(): string\n {\n if (!($this->_nVars >= 3)) return $this->_throw( YAPI::INVALID_ARGUMENT, 'There is no serie 3 in $this capture data','');\n return $this->_var3unit;\n }", "title": "" }, { "docid": "e032aab82cc9735c36b66884de1ceebe", "score": "0.4857553", "text": "public function getMontantUnitaireTaxe() {\n return $this->montantUnitaireTaxe;\n }", "title": "" }, { "docid": "0d8bf0e19dd30bce7768ea54fa332810", "score": "0.48556283", "text": "public function getUnitPrice()\n {\n return $this->_getElementText('PRECIOUNITARIO');\n }", "title": "" }, { "docid": "aed79f3d1d87f111762cfb47fb7c8862", "score": "0.4853883", "text": "public function helper()\n {\n return $this->helper;\n }", "title": "" }, { "docid": "26e960850c70b5d830c8c2183ecb8105", "score": "0.4853737", "text": "public function getMock()\n {\n return $this->_mock;\n }", "title": "" }, { "docid": "a67e34e7d519d445f0c96b661619073d", "score": "0.48316556", "text": "public function getUnitSize() {\n\t\treturn $this->unitSize;\n\t}", "title": "" }, { "docid": "74515f351e42c5d0badfc8d758ad0796", "score": "0.48291233", "text": "public function getUnitPrice() : float\n {\n return $this->get('unit_price', 'orders');\n }", "title": "" }, { "docid": "99adde629bc795d4ac9d844efe704d12", "score": "0.48282272", "text": "public function getHelper()\n {\n if (null === $this->_helper) {\n require_once 'Zend/Form/Decorator/Exception.php';\n throw new Zend_Form_Decorator_Exception('No view helper specified fo DijitContainer decorator');\n }\n return $this->_helper;\n }", "title": "" }, { "docid": "5e88b31bdf625779bb7418914f77089e", "score": "0.48278958", "text": "public function getLeagueLevelUnitName()\n\t{\n\t\tif(!isset($this->leagueLevelUnitName) || $this->leagueLevelUnitName === null)\n\t\t{\n\t\t\t$this->leagueLevelUnitName = $this->getXml()->getElementsByTagName('LeagueLevelUnitName')->item(0)->nodeValue;\n\t\t}\n\t\treturn $this->leagueLevelUnitName;\n\t}", "title": "" }, { "docid": "0298bc2b2cece0d832141c77bb99b354", "score": "0.48235264", "text": "public function unit()\n {\n return $this->belongsTo('App\\ERP\\SUnit', 'unit_id');\n }", "title": "" }, { "docid": "ee96664742759b6189116dcf6c6b5335", "score": "0.48202777", "text": "public function getLeagueLevelUnitName()\n\t{\n\t\tif(!isset($this->leagueLevelUnitId) || $this->leagueLevelUnitId === null)\n\t\t{\n\t\t\t$this->leagueLevelUnitId = $this->getXml()->getElementsByTagName('LeagueLevelUnitName')->item(0)->nodeValue;\n\t\t}\n\t\treturn $this->leagueLevelUnitId;\n\t}", "title": "" }, { "docid": "b78c796c62d18305b7d080c294a1deec", "score": "0.48179027", "text": "public function setUnit(string $unit)\n {\n $this->unit = $unit;\n return $this;\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "d7a708e26aa5014b5b414174dfa1dbbc", "score": "0.0", "text": "public function index(){\n $vendors = Vendor::orderBy(\"name\", \"asc\")->paginate(10);\n return view(\"vendors.index\")->with(\"vendors\", $vendors);\n }", "title": "" } ]
[ { "docid": "a2c82e645f33199ca3af4df01daa0da0", "score": "0.73454344", "text": "public function listAction()\n {\n $this->view->headTitle('Book Listing ','PREPEND');\n $this->view->books = $this->bookService->listService();\n }", "title": "" }, { "docid": "2ecb35785c4b9e881de2de7a961178df", "score": "0.7216204", "text": "public function action_list(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "dad0a13a73bcf8293bb4d9e710796f56", "score": "0.7157767", "text": "public function listAction()\n {\n $this->processList();\n }", "title": "" }, { "docid": "e5d3acc1f5204195de85b93044bfcb61", "score": "0.71494645", "text": "function listAction()\n {\n $pageTitle = 'Golf listings';\n $listLinkStyle = 'current_page';\n $isLoggedIn = $this->isLoggedInFromSession();\n $username = $this->usernameFromSession();\n\n $golfRepository = new GolfRepository();\n $golfs = $golfRepository->getAll();\n\n require_once __DIR__ . '/../templates/list.php';\n }", "title": "" }, { "docid": "bd3a7b4e07a2548dae8d575849df412a", "score": "0.7130363", "text": "public function index() {\n return view('admin.resources.index', [\n 'resources' => Resource::paginate(10)\n ]);\n }", "title": "" }, { "docid": "174c016a6d20963698d0780d8861782d", "score": "0.710266", "text": "function showListPage() {\n\t\t$this->setCacheLevelNone();\n\n\t\t$this->render($this->getTpl('list'));\n\t}", "title": "" }, { "docid": "598d9caa73e88220c1d2180531a736f9", "score": "0.70930976", "text": "public function index()\n {\n $className = $this->modelClass;\n $model = $className::orderby('created_at', 'desc')->paginate(10);\n \n return view('admin.listing')\n ->with('pageTitle', $this->pageTitle)\n ->with('secondTitle', $this->secondTitle)\n ->with('columns', $this->columns)\n ->with('urlName', $this->urlName)\n ->with('model', $model);\n }", "title": "" }, { "docid": "3e6e80d5cb774ecfe48382a53469b26e", "score": "0.70829386", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getContents();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tGlobals::doPaging($result, $page, $this->view); \n\t\t\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "4033d77018807de6b615c3ca97da7bef", "score": "0.70523685", "text": "public function index()\n {\n return TodoListResource::collection($this->listRepository->list());\n }", "title": "" }, { "docid": "fbd940db6024ed547d75a84196b6efcc", "score": "0.7010042", "text": "public function index()\n {\n //get shows\n $shows = ShowsModel::paginate(10);\n\n return ShowsResource::collection($shows);\n }", "title": "" }, { "docid": "22e061b6e387c7871a6d54e088305a74", "score": "0.69801855", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::all());\n }", "title": "" }, { "docid": "937d8c67ef1e241cc6f04440a03a35d5", "score": "0.6966139", "text": "public function listing(){\n return view('interface/listing');\n }", "title": "" }, { "docid": "43a3797d462201f8486a324b4e596f68", "score": "0.6948928", "text": "public function list()\n {\n $flash = '';\n\n if(!empty($_SESSION['flash'])){\n $flash = $_SESSION['flash'];\n $_SESSION['flash'] = '';\n }\n\n # it will be populated\n $data = [];\n\n $bookInstance = new Book();\n $books = $bookInstance->select()->get();\n\n # fill data\n $data['flash'] = $flash;\n $data['books'] = $books;\n $data['loggedUser'] = $this->loggedUser;\n $data['url'] = Request::getUrl();\n\n $this->render('library', $data);\n }", "title": "" }, { "docid": "a74b64d14d05fcd4b8d8543c548d39b6", "score": "0.69425523", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStageArtist:list.html.twig');\n }", "title": "" }, { "docid": "161606f4dde01f5513c0d576501b3cb7", "score": "0.6905698", "text": "public function _index()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "836499ad8af32deefc4b356617470307", "score": "0.6899619", "text": "public function index()\n {\n return view('laramanager::entries.index.index')\n ->with('resource', $this->resource)\n ->with('entries', $this->entriesRepository->getList($this->resource));\n }", "title": "" }, { "docid": "378b941376864b0adca2a47f6d9cbc14", "score": "0.6898765", "text": "public function action_index(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "a657a499da3c1e94405a12a48a398286", "score": "0.6889014", "text": "public function action_list()\n\t{\n\t\t$recordings = Model_Recording::factory()\n\t\t\t->with('Quotes')\n\t\t\t->find_all();\n\n\t\t// Generate and output the view\n\t\t$content = View::factory('recording/list')\n\t\t\t\t ->set('recordings', $recordings);\n\t\t$template = View::factory('templates/default')\n\t\t\t\t\t->set('title', 'All recordings')\n\t\t\t\t\t->set('content', $content->render());\n\n\t\t$this->response->body($template->render());\n\t}", "title": "" }, { "docid": "b41517724d4cdbc80c63a80b966a7b01", "score": "0.68746614", "text": "public function listAction() {\n\n\t\t}", "title": "" }, { "docid": "e908ab42fc450a9a0594cc9564f4eeb9", "score": "0.68608236", "text": "public function listAction() {\n $this->model->updateStatus();\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagecontrol.phtml');\n\n $where = '1 = 1';\n\n $filter = $this->_request->getParam('search');\n $this->view->filter = $filter;\n\n if ($filter == 'active') {\n $where = 'status = 0';\n } else if ($filter == 'disabled') {\n $where = 'status = 2';\n } else if ($filter == 'expired') {\n $where = 'status = 1';\n }\n\n $sort = $this->_request->getParam('sort');\n if (!$sort) {\n $sort = 'description';\n }\n\n if (!isset($this->session_sorting->sort)) {\n $this->session_sorting->sort = 0;\n }\n\n if ($this->session_sorting->sort == 0) {\n $this->session_sorting->sort = 1;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' desc'));\n } else {\n $this->session_sorting->sort = 0;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' asc'));\n }\n\n $paginator = Zend_Paginator::factory($data);\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n $paginator->setItemCountPerPage(10);\n\n $this->view->page = $this->_getParam('page');\n $this->view->discounts = $paginator;\n }", "title": "" }, { "docid": "8ef49cf3a3eb21ff0a74662ea3579be6", "score": "0.68547213", "text": "public function index()\n {\n // Get cards\n $cards = Card::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of cards as a resource\n return CardResource::collection($cards);\n }", "title": "" }, { "docid": "6e9ab9b623d3bae20d9be7b36335891d", "score": "0.68502206", "text": "public function listAction()\n {\n $this->forward('index');\n }", "title": "" }, { "docid": "d6111f19a7aca7d26ffbe0986ebf3edd", "score": "0.68407434", "text": "public function indexAction()\n {\n $this->listAction();\n }", "title": "" }, { "docid": "88277ff9376f997f91e6b5491575d7bb", "score": "0.6833471", "text": "public function index()\n {\n return ShoppingListResource::collection(ShoppingList::paginate(15));\n }", "title": "" }, { "docid": "546b231c03944da42a8e98b848f51fa9", "score": "0.68256605", "text": "public function list()\n {\n $shelves = Bookshelf::visible();\n\n return $this->apiListingResponse($shelves, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "755da2e01052312a756038c9d166d9cb", "score": "0.6794544", "text": "public function listAction() {\n $this->view->headTitle($this->view->translate('List of templates'), 'PREPEND');\n $templateModel = new Unisender_Model_UnisenderTemplate();\n $this->view->template_list = $templateModel->getAll();\n }", "title": "" }, { "docid": "d05cc4d736f09bef3c6bdf24844ac8c6", "score": "0.67895305", "text": "public function index()\n\t{\n\t\t$artists = Artist::paginate(100);\n\n\t\treturn $this->respond([\n\t\t\t'data' => $this->artistTransformer->transformCollection($artists->all())\n\t\t]);\n\t}", "title": "" }, { "docid": "89d40e37a12f5ea687a94247a2fdb4da", "score": "0.6786343", "text": "public function actionIndex()\n {\n $this->layout = '@backend/views/layouts/list';\n return $this->render('index', [\n 'dataProvider' => $this->getDataProvider(),\n 'model' => $this->getModelSearch(),\n 'currentView' => $this->getCurrentView(),\n 'availableViews' => $this->getAvailableViews()\n ]);\n }", "title": "" }, { "docid": "1647b90a06fcd39c33c32b33bf9fa133", "score": "0.67860115", "text": "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'itemscanner',\n 'datatable' => new ItemScannerDatatable(),\n 'title' => mtrans('itemscanner', 'itemscanner_list'),\n ]);\n }", "title": "" }, { "docid": "487c93a93f48c83d96a649e03fdb104d", "score": "0.6774347", "text": "public function index()\n {\n //\n return DishResource::collection(Dish::orderBy('id', 'asc')->paginate());\n }", "title": "" }, { "docid": "6265f2e35f1c819b84733e2d894fc9f3", "score": "0.6763496", "text": "public function __list()\r\n {\r\n $current = SamsonLocale::current();\r\n\r\n $default = 'ru';\r\n\r\n if (defined('DEFAULT_LOCALE')){\r\n $default = DEFAULT_LOCALE;\r\n }\r\n\r\n // Render all available locales\r\n $html = '';\r\n foreach (SamsonLocale::get() as $locale) {\r\n if ($current != $default) {\r\n $urlText = substr(url()->text,strlen($current)+1);\r\n } else {\r\n $urlText = url()->text;\r\n }\r\n if ($locale == $default) {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$urlText;\r\n } else {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$locale.'/'.$urlText;\r\n }\r\n\t $localeName = '';\r\n\t if ($this->isLocaleLinkText) {\r\n\t\t $localeName = $this->translate($locale, $current);\r\n\t }\r\n $html .= $this->view('list/item')\r\n ->css(self::CSS_PREFIX)\r\n ->locale($locale == SamsonLocale::DEF && SamsonLocale::DEF == ''? 'def' : $locale)\r\n ->active($locale == $current ? self::CSS_PREFIX.'active':'')\r\n ->url($url)\r\n\t ->name($localeName)\r\n ->output();\r\n }\r\n\r\n // Set locale list view\r\n $this->view('list/index')->locale($current)->css(self::CSS_PREFIX)->items($html);\r\n }", "title": "" }, { "docid": "9574508ae15a68d9552788d66f6069d4", "score": "0.67439693", "text": "public function all()\n\t{\n\t\t$recipes = Recipe::findRecipe(array('recipe_images.is_cover'=>'yes'));\t\n\t\t\n\t\t$this->template->recipes = $recipes;\n\t\t$this->template->display('list.html.php');\n\t}", "title": "" }, { "docid": "e1224469d7f8380d5b96958c49bfc327", "score": "0.67368996", "text": "public function index()\n {\n $offers = Offer::filter()->paginate();\n\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "e89b2c9176e1e2ba1660cebc077dc45d", "score": "0.6728091", "text": "public function index()\n {\n $user = $this->userContract->findWith(request()->user()->id, ['profile']);\n $resources = $this->resourceContract->getResourcesOrdered();\n $trashed = $this->resourceContract->getTrashedResourcesOrdered();\n\n return view('backend.resources.index', compact('user', 'resources', 'trashed'));\n }", "title": "" }, { "docid": "2422a439354b2d9d0c8e13222d75b791", "score": "0.67135084", "text": "public function indexAction()\r\n {\r\n \t$this->openApi->getItems();\r\n $this->view->data = $this->openApi->getDataResponse();\r\n }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6695974", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "c28bf83f5ff7f88cca0b895b2e8d3ae8", "score": "0.669245", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Reviews list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the reviews.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/reviews/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Reviews::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "a90256f37c65707c557ad75ce4efde1a", "score": "0.66915387", "text": "public function index()\n {\n return $this->service->getList();\n }", "title": "" }, { "docid": "4cc7c30861d929f90a57a50b59a5a1f5", "score": "0.66879165", "text": "public function listAction(){\n\t\t//Passes values from the Todo Mysql table into the $todos value\n\t\t$todos = $this->getDoctrine()\n\t\t\t\t\t ->getRepository('AppBundle:Todo')\n\t\t\t\t\t ->findAll();\n\t\t//Loading the todo view in here...\n return $this->render('todo/index.html.twig', array(\n\t\t\t'todos' => $todos\n\t\t));\n }", "title": "" }, { "docid": "1a9cb6255c77fe1bff8fb9d77615f930", "score": "0.66870624", "text": "public function list(): Response\n {\n return $this->renderList(\n [],\n ['artist' => 'ASC', 'title' => 'ASC']\n );\n }", "title": "" }, { "docid": "a8ee22092f12cd9a55fa2d36291251f4", "score": "0.6683523", "text": "public function action_list() {\n if (Input::method() != 'GET') { $this->response($this->no_access); return; }\n\n $params = Input::get();\n $user = $this->user_login->user;\n\n try {\n $resp = $this->listStuff($params, $user);\n } catch (Exception $exc) {\n return $this->_error_response($exc->getMessage());\n }\n \n // Set the output\n $data = array('data' => array('offers' => $resp[\"all_offers\"]), 'meta' => $resp[\"meta\"]);\n $this->response($data);\n\t}", "title": "" }, { "docid": "5a18d2c52cb259d958c945d4d6a9ea33", "score": "0.6676733", "text": "public function listAction()\n {\n $task = new Task($this->config);\n $tasks = $task->getAll();\n $amountOfTasks = $task->getAmountTasks();\n \n // load views.\n $this->view('task/list', [\n 'tasks' => $tasks,\n 'amountOfTasks' => $amountOfTasks\n ]);\n }", "title": "" }, { "docid": "fb257c74bec9eb0cfbe648823975e645", "score": "0.6653098", "text": "public function index()\n {\n $requests = ModelsRequests::paginate();\n\n return ResourcesRequests::collection($requests);\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "097ff24f05f0eef21fe921e55bd3b80d", "score": "0.66470236", "text": "public function listAction()\n {\n try {\n $cd = $this->currentFolder();\n return new ViewModel(array(\n 'currentFolder' => $cd,\n 'seperator' => $this->seperator,\n 'entries' => $this->directoryContent($this->getEntity(), $cd)\n ));\n } catch (\\Exception $e) {\n echo Json::encode(array(\n 'error' => $e->getCode()\n ));\n exit();\n }\n }", "title": "" }, { "docid": "59475f9f5ef859f09d1ee48e7e27d0ea", "score": "0.66406596", "text": "public function index()\n {\n return $this->showAll(SpeciesResource::collection(Species::get()));\n }", "title": "" }, { "docid": "3e9e7ace6967f2049a9e3a5287aa7bc1", "score": "0.6639121", "text": "public function index()\n {\n if ($ref = \\Request::get('getRef')) {\n return $this->getRef($ref);\n }\n\n $per_page = \\Request::get('perPage');\n $data = $this->repository->paginate($per_page);\n\n return $this->sendSuccess($data, __('api.success_list', ['name' => $this->name]));\n }", "title": "" }, { "docid": "aa0d5690d16cbfb9dc97e701071da2f2", "score": "0.6637484", "text": "public function listAction() {\n $imageService = $this->container->get(\"dft_foapi.image\");\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $imageService->fetchAll(\n $this->getAuthenticatedUserIdAndSubAccountIds()\n )\n )\n );\n }", "title": "" }, { "docid": "479fb582c4dbcbc65e4bb28c2bb3a697", "score": "0.66345435", "text": "public function list()\n {\n // and this sorting and paging logics must be in separate components\n // but for our case ... ))\n $sortTypes = ['author', 'email', 'done', 'author DESC', 'email DESC', 'done DESC'];\n $sort = input('sort', null);\n if ($sort && in_array($sort, $sortTypes)) {\n $sortSql = \" ORDER BY {$sort} \";\n } else {\n $sortSql = '';\n }\n $offset = (int) input('offset', 0);\n $offsetSql = \" LIMIT {$offset}, \" . static::PER_PAGE;\n $sql = '1 ' . $sortSql . $offsetSql;\n $todos = R::findAll('todo', $sql);\n $total = R::count('todo');\n\n //paging\n $next = false;\n $prev = false;\n\n if ($total > $offset + static::PER_PAGE) {\n $next = $offset + static::PER_PAGE;\n }\n\n if ($offset !== 0) {\n $prev = $offset - static::PER_PAGE;\n }\n\n //sorting\n $sortings = [];\n foreach (['author', 'email', 'done'] as $sortAttribute) {\n if (strpos($sort, $sortAttribute) !== false && $sort === $sortAttribute) {\n $sortings[$sortAttribute] = \"{$sortAttribute} DESC\";\n } else {\n $sortings[$sortAttribute] = $sortAttribute;\n }\n }\n\n return $this->render('list', compact('todos', 'next', 'prev', 'sortings', 'total'));\n }", "title": "" }, { "docid": "317c606a7e54f34736590f60393be790", "score": "0.662934", "text": "function index()\n\t{\n\t\t$this->items();\n\t}", "title": "" }, { "docid": "0ef8e5b1a7ba68c743bcff23cd0cf130", "score": "0.6628069", "text": "public function index()\n {\n return Resource::all();\n }", "title": "" }, { "docid": "fda26526263c4f32a26eb1c3721263e4", "score": "0.6623293", "text": "public function index()\n {\n $listings = $this->listing->latest()->paginate(50);\n\n return view('admin.listings.index', compact('listings'));\n }", "title": "" }, { "docid": "7c0e8a5f42c42d1c4f18968bb494ad0e", "score": "0.6621373", "text": "public function paginatedListAction() {\n return $this->getList();\n }", "title": "" }, { "docid": "0e1a46d9ea752b3e205c54aab701c4fd", "score": "0.6619698", "text": "public function listings() {\r\n $data = $this->model->getData();\r\n $this->template->data = $data;\r\n $this->set('general/list');\r\n }", "title": "" }, { "docid": "3e2ce9e0dce5419c500b0a60774b7605", "score": "0.6616485", "text": "public function index()\n {\n return $this->service->lists();\n }", "title": "" }, { "docid": "bca6e37ce935bd0d2b77093989d408cd", "score": "0.6612557", "text": "public function actionIndex()\n {\n $searchModel = new ListingSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "67562fbc2bb858bc588d4a91237cb673", "score": "0.6603778", "text": "function index() {\r\n\t\t// Getting the whole list\r\n\t\t$itemList = $this->model->find('all');\r\n\r\n\t\t$this->set('itemList', $itemList);\r\n\t}", "title": "" }, { "docid": "8ec8da14e071283716d59393a382ab24", "score": "0.65982807", "text": "public function listAction()\n {\n\t\t$identity = Zend_Auth::getInstance()->getIdentity();\n\t\n\t\t// if identity and user aren't the same identity, add an entry to the identityBoard (menu )\n\t\tif( $identity->id != $this->_user->id ){\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/documents/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'userDocumentList' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin entry-selected'\n\t\t\t));\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/gexf/entities/user/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'gexf' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin'\n\t\t\t));\n\n\t\t}\n\t\t$this->view->dock = new Application_Model_Ui_Docks_Dock();\n\t\t\n\t\t$this->view->dock->addCraft( new Application_Model_Ui_Crafts_Cargo( 'documents', I18n_Json::get( 'documentsList' ).\": \".$this->_user->username ) );\n\t\t\n\t\t$totalDocuments = Application_Model_DocumentsMapper::getNumberOfDocuments( $this->_user ); \n\t\t\n\t\t// no documents? send directly to upload, with a link, and stop this script\n\t\tif( $totalDocuments == 0 ){\n\t\t\t\n\t\t\t// draw nice upload link \"start uploading file!\" and welcome message as well\n\t\t\t$this->view->dock->documents->setHeader( new Ui_Crafts_Headers_Welcome( $this->_user ) );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// remove menu items\n\t\t\tUi_Board::getInstance( \"Documents\", array( 'user' => $this->_user ) )->removeItem(\n\t\t\t\t\"documents.import-tags\", \n\t\t\t\t\"documents.export-tags\",\n\t\t\t\t\"api.reset\"\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->render( 'index');\n\t\t}\n\t\t\n\t\t// start listening to request filter, or default vars here\n\t\t// values and their validators\n\t\tDnst_Filter::start( array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"limit\" => 100,\n\t\t\t\t\"order\" => array( \"mimetype DESC\" ),\n\t\t\t\t\"tags\"\t => array(),\n\t\t\t\t\"query\" => \"\",\n\t\t\t\t\"date_start\"=>\"\",\n\t\t\t\t\"date_end\" =>\"\"\n\t\t\t), array (\n\t\t\t\t\"order\" => new Dnst_Filter_Validator_Array( array(\n\t\t\t\t\t\"id_document DESC\", \"id_document ASC\",\n\t\t\t\t\t\"title ASC\", \"title DESC\", \"date ASC\", \"date DESC\",\"`ignore` DESC\", \"`ignore` ASC\",\n\t\t\t\t\t\"status ASC\", \"status DESC\",\n\t\t\t\t\t\"language ASC\", \"language DESC\", \"mimetype ASC\", \"mimetype DESC\",\n\t\t\t\t)),\n\t\t\t\t\"offset\" => new Dnst_Filter_Validator_Range( 0, 10000000 ),\n\t\t\t\t\"limit\" => new Dnst_Filter_Validator_Range( 1, 500 ),\n\t\t\t\t\"query\" => new Dnst_Filter_Validator_Pattern( 0, 100 )\n\t\t\t)\n\t\t);\n\t\t\n\t\tif( !Dnst_Filter::isValid() ){\n\t\t\t// if you set the filters properly, then these variables MUST be in place\n\t\t\tAnta_Core::setError(\"uhm..not valid string..\".Dnst_Filter::getErrors() );\n\t\t\treturn $this->render( 'index' );\n\t\t}\n\t\t// print_r( Dnst_Filter::read() );\n\t\t// get all the documents\n\t\t$documents = Application_Model_DocumentsMapper::select(\n\t\t\t$this->_user,\n\t\t\tDnst_Filter::read()\n\t\t);\n\t\t// send some variables to the view\n\t\t$this->view->totalItems = $documents->totalItems;\n\t\t$this->view->loadedItems = count( $documents->results );\n\t\t\n\t\t// query to group documents by month according to number of groups\n\t\t$stmt = Anta_Core::mysqli()->query(\"\n\t\t\tSELECT COUNT(*) as countable, DATE_FORMAT(date,'%d.%m.%Y') as simple_date FROM anta_{$this->_user->username}.`documents` GROUP BY (`simple_date`)\"\n\t\t);\n\t\t$timestamps = array();\n\t\twhile ( $row = $stmt->fetchObject() ){\n\t\t\t$timestamps[] =\tnew Ui_D3_Timeline_Point( \n\t\t\t\t$row->simple_date, \n\t\t\t\tarray( \n\t\t\t\t\t\"y\" => $row->countable,\n\t\t\t\t\t\"title\" => $row->simple_date .\" (\".$row->countable.\")\",\n\t\t\t\t\t\"href\" => $_SERVER['REFERRER_URI'].'?'.Dnst_Filter::setProperty( 'date_start', $row->simple_date )\n\t\t\t\t) \n\t\t\t);\t\n\t\t}\n\t\t\n\t\t// prepare headers\n\t\t$header = new Anta_Ui_Header_Documents();\n\t\t$header->user = $this->_user;\n\t\t$header->loadedItems = count( $documents->results );\n\t\t$header->totalItems = $documents->totalItems;\n\t\t$header->offset = Dnst_Filter::getProperty( \"offset\" );\n\t\t$header->limit = Dnst_Filter::getProperty( \"limit\" );\n\t\t$header->searchQuery = Dnst_Filter::getProperty( \"query\" );\n\t\t$header->setTimeline( new Ui_D3_Timeline( \n\t\t\t$timestamps, \"dd.mm.yy\", \n\t\t\tarray( \"width\"=>832, \"height\"=>40)\n\t\t));\n\t\t\n\t\t$this->view->dock->documents->setHeader( \n\t\t\t$header\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\tforeach (array_keys( $documents->results ) as $k ){\n\t\t\t$this->view->dock->documents->addItem( new Anta_Ui_Item_Document( $documents->results[ $k ] ) );\n\t\t}\n\t\t\n\t\t$this->render( 'index' );\n\t\t\n }", "title": "" }, { "docid": "51ab41ffa64c6b6b7fbb813516203da1", "score": "0.6593938", "text": "public function index()\n {\n return PharmacyResource::collection($this->pharmacyRepoInstance->paginate(self::PER_PAGE, ['id', 'name', 'address']));\n }", "title": "" }, { "docid": "be3ed76ca60da4c3caa2d8528ae5c319", "score": "0.659177", "text": "public function actionIndex()\n {\n if(Yii::$app->user->can('admin')){\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find()->where(['size'=>0]),\n ]);\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n else{\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find(),\n ]);\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "ccecdc5f92158721af216deee02beaf2", "score": "0.65850216", "text": "public function action_index() \n\t{\n\t\t$this->rest_output(array(\n\t\t\t'GET example!', \n\t\t));\n\t}", "title": "" }, { "docid": "c971fcbed7a0406b3764b8ecdb481920", "score": "0.6572927", "text": "protected function listAction()\r\n {\r\n $contentUid = $this->configurationManager->getContentObject()->data['uid'];\r\n $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\r\n if (!isset($configuration['view']['pluginNamespace'])) {\r\n $configuration['view']['pluginNamespace'] = 'tx_ameosfilemanager_fe_filemanager';\r\n }\r\n\r\n $this->settings['columnsTable'] = explode(',', $this->settings['columnsTable']);\r\n $this->settings['actionDetail'] = explode(',', $this->settings['actionDetail']);\r\n $this->view->assign('settings', $this->settings);\r\n\r\n $args = $this->request->getArguments();\r\n $t = $this->fileRepository->findBySearchCriterias($args, $this->settings['startFolder'], $configuration['view']['pluginNamespace'], $this->settings['recursion']);\r\n $this->view->assign('files', $t);\r\n $this->view->assign('value', $args); \r\n $this->view->assign('content_uid', $contentUid);\r\n\r\n if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'\r\n && $contentUid == GeneralUtility::_POST('ameos_filemanager_content')) {\r\n header('Content-Type: text/json; charset=utf8;');\r\n echo json_encode(['html' => $this->view->render()]);\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "ef4fec830260d9dfb3f1e7e325eac9e0", "score": "0.6572855", "text": "public function actionList()\n {\n $products = new ActiveDataProvider([\n 'query' => Product::find(),\n 'pagination' => [\n 'pageSize' => 10\n ]\n ]);\n return $this->render('list', ['products' => $products]);\n }", "title": "" }, { "docid": "9500e1733deedb51878d2d909f31751a", "score": "0.65667915", "text": "public function actionList()\r\n {\r\n $objectClassId = $this->_input->filterSingle('object_class_id', XenForo_Input::STRING);\r\n $class = $this->_getClassOrError($objectClassId);\r\n\r\n $objectModel = $this->_getObjectModel();\r\n\r\n $objects = $objectModel->getObjects(array(\r\n 'object_class_id' => $objectClassId\r\n ));\r\n\r\n $viewParams = array(\r\n 'class' => $class,\r\n 'objects' => $objects\r\n );\r\n\r\n return $this->responseView('ThemeHouse_Objects_ViewAdmin_Object_List', 'object_list', $viewParams);\r\n }", "title": "" }, { "docid": "6b6ca26ff623891fbb04a6646a0e894c", "score": "0.6566177", "text": "public function index(Request $request)\n {\n $this->checkRole();\n\n //\tGet all records of the model and set default ordering\n $builder = $this->model('orderBy', $request->orderby ?: ((property_exists($this, 'list_order_by')) ? $this->list_order_by : 'name'), $request->order ?: ((property_exists($this, 'list_order')) ? $this->list_order : 'desc'));\n\n //\tRetrieve the fields which will be used in records table\n $fields = new RenderList($this->getFieldsForList());\n\n // Handle list search\n if ($request->has('s')) {\n $builder->where($this->list_search_on, 'LIKE', '%' . $request->s . '%');\n }\n\n // Handle list filtering\n if ($request->has('filter') && $request->has('set')) {\n $builder->where($request->filter, $request->set);\n }\n\n // Move $builder to $records with default paging of 40 p/p\n $records = $builder->paginate(40);\n\n //\tLoad the view\n return view('crud::templates.index', $this->parseViewData(compact('records', 'fields')));\n }", "title": "" }, { "docid": "22313e01879ad9cf6aefe5b6cf7eaac2", "score": "0.65648544", "text": "public function listeAction()\n {\n // des éléments de contrôle de la pagination pour plus d'informations\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('controls.phtml');\n\n $mapper = new Application_Model_FilmMapper();\n $film = new Application_Model_Film();\n $film = $mapper->obtenirAllFilms();\n\n // Créons un paginateur pour cette requête\n $paginator = Zend_Paginator::factory($film);\n\n // Nous lisons le numéro de page depuis la requête. Si le paramètre n'est pas précisé\n // la valeur 1 sera utilisée par défaut\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Assignons enfin l'objet Paginator à notre vue\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "ea842597a9d8fad1df58d74c6b12ab97", "score": "0.6560148", "text": "public function index()\n {\n $statuses = Status::all();\n $statuses->transformer = StatusCollection::class;\n return $this->showAll($statuses);\n }", "title": "" }, { "docid": "9854a8a0b5996147689b1cfb93901fba", "score": "0.65570813", "text": "public function index()\n {\n $entities = Entity::all();\n\n return view('actions.entity.read', compact('entities'));\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65397066", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "b1c6918b8a647032258b39902afb3198", "score": "0.6532946", "text": "public function index()\n {\n $this->initialiseRequest();\n $items = $this->queryRepository->all();\n if (!$items) {\n return $this->apiManager->respondNotFound('Items do not exist.');\n }\n $itemsResource = new Collection($items, $this->transformer);\n $processedItems = $this->fractalManager->createData($itemsResource)->toArray();\n return $this->apiManager->respond($processedItems);\n }", "title": "" }, { "docid": "47bc2129e22deb7b10f9cd1b3ca97140", "score": "0.65329", "text": "public function index()\n {\n\n if ($this->model->count() <> 0) {\n return $this->resource::collection($this->model);\n }\n return Response::json([\n 'error' => 'Record not found'\n ], 404);\n\n }", "title": "" }, { "docid": "b09ff22d2468ad0a34a73b6be1c564e7", "score": "0.6529856", "text": "public function index()\n {\n $questions = Question::pimp()->paginate();\n\n QuestionResource::collection($questions);\n\n return $this->sendResponse(compact('questions'));\n }", "title": "" }, { "docid": "289c02bb55888cea68db6bb293329f8b", "score": "0.65295684", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n /** @var \\Symfony\\Component\\HttpFoundation\\Request $request */\n $request = $this->container->get('request_stack')->getCurrentRequest();\n\n /** @var \\Sonata\\MediaBundle\\Provider\\Pool $mediaPool */\n $mediaPool = $this->container->get('sonata.media.pool');\n\n $contexts = $mediaPool->getContexts();\n\n reset($contexts);\n $contextName = key($contexts);\n $datagrid = $this->admin->getDatagrid($request->get('context', $contextName));\n $datagrid->setValue('context', null, $this->admin->getPersistentParameter('context'));\n\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n return $this->render(\n $this->admin->getTemplate('list'),\n array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n )\n );\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.652877", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.652877", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "cc3607ce8a88164b64b1133094816f12", "score": "0.6522748", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->chapter ? $this->chapter->name . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "cdc6c11bca5c8d643c1f6a1a0d80d23d", "score": "0.65212315", "text": "public function indexAction()\r\n {\r\n $this->parseRequestForPager();\r\n\r\n $pager = $this->getPager();\r\n $form = $this->getFilterForm()->createView();\r\n\r\n $result = array(\r\n 'list' => $this->getList($pager),\r\n 'pager' => $this->getPagination($pager),\r\n 'filters' => $this->get('pizone_form')->formDataToArray($form)\r\n );\r\n\r\n $view = new View($result);\r\n return $this->handleView($view);\r\n }", "title": "" }, { "docid": "d06d606c40c9d56f52b80f958f43b5ce", "score": "0.65188295", "text": "public function index()\n\t{\n\t\t// will show list of Data\n\t}", "title": "" }, { "docid": "3f1eb8293a667a2878f4d80d96280084", "score": "0.6518673", "text": "public function index()\n {\n return BookResource::collection(Book::paginate(25));\n }", "title": "" }, { "docid": "d44d85e06d4eeb7940282586d59ecb10", "score": "0.65124106", "text": "public function index()\n {\n return UnitResource::collection(Unit::paginate(5));\n }", "title": "" }, { "docid": "81a94e8c32b6134de5e7342f4235e4ec", "score": "0.6507357", "text": "public function index()\n {\n\n // Get articles\n $chairs = Chair::paginate(15);\n\n // Return collection of articles as a resource\n return ChairResource::collection($chairs);\n\n }", "title": "" }, { "docid": "22fb95b3636c2f407abebe88d13d8888", "score": "0.6505021", "text": "public function index()\n {\n $authors = Author::all();\n return AuthorResource::collection($authors);\n }", "title": "" }, { "docid": "1071b7d841a42ebb958087fb23ea72c9", "score": "0.64993095", "text": "public function index()\n {\n //return $this->repository->all();\n return $this->service->showAll();\n }", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6497837", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "1a823c7469d426833399140a05c28243", "score": "0.64936584", "text": "public function listAction()\n\t{\n\t\t$asResponse = array();\n\t\t$client = new Zend_Http_Client($this->ssUri.'/list');\n\t\t$client->setParameterGet(array('bIsRest' => true));\n\t\t$client->setConfig(array('timeout' => 30));\n\t\t$ssResponse = $client->request('GET');\n\t\t\n\t\tif($ssResponse->isSuccessful())\n\t\t{\n\t\t\t$ssResponseBody = $ssResponse->getBody();\n\t\t\t$asResponse = Zend_Json_Decoder::decode($ssResponseBody,Zend_Json::TYPE_ARRAY);\n\t\t}\n\t\t$this->view->users = $asResponse;\n\t}", "title": "" }, { "docid": "516498e2faf9e3833f4a0c0889c0d1a6", "score": "0.64926285", "text": "public function index()\n {\n $this->authorize('index', Category::class);\n\n return CategoryResource::collection(Category::paginate(15));\n }", "title": "" }, { "docid": "baeb75c01b41d5a02e946acdd0870ae9", "score": "0.6491589", "text": "public function showBooksAction()\n {\n $result = $this->model->getBooks();\n // Get params of books and pagination\n $data = $result[0];\n $pagination_params = $result[1];\n\n $this->view->render('List of books', $data, $pagination_params);\n }", "title": "" }, { "docid": "7029a5ba2d86ddb638223bf9a830e61a", "score": "0.648616", "text": "public function actionIndex()\r\n {\r\n $dataProvider = $this->getIndex('api/books', 'app\\models\\Book');\r\n\r\n return $this->render('index', [\r\n 'dataProvider' => $dataProvider\r\n ]);\r\n }", "title": "" }, { "docid": "ad2789681d764a50f799c66b64e9e3f5", "score": "0.64843917", "text": "public function index()\n {\n $data = GuestResource::collection(\n $this->guest->paginate(request()->per_page)\n );\n\n if (! $data) {\n return response()->json([\n 'message' => 'Failed to retrieve resource'\n ], 400);\n }\n\n return $data;\n }", "title": "" }, { "docid": "64c5cb71d29bff854bd1d4c026363eb2", "score": "0.6484192", "text": "public function index()\n {\n $cust = Customers::paginate(20);\n return CustomersResource::collection($cust);\n }", "title": "" }, { "docid": "fc608464ab00efa2883cbaa1ca108cd1", "score": "0.6481522", "text": "public function index()\n {\n return $this->collection($this->repository->all());\n }", "title": "" }, { "docid": "c22119f1d6e05e764e700b1cf1e15c3a", "score": "0.648076", "text": "public function index()\n {\n // Get articles\n $trackings = Tracking::paginate(10);\n\n // Return\n return BackendResource::collection($trackings);\n }", "title": "" }, { "docid": "90f607a4b7e80fdd2bcd6f3ce3d9959e", "score": "0.6477766", "text": "public function index()\n {\n $perPage = request('perPage', 10);\n $products = Product::paginate($perPage);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "59002099eafa8643a05ba19fcbd9fedd", "score": "0.6477562", "text": "public function index()\n {\n //\n $items = Item::orderBy('id')->paginate(10);\n \n return view('manage.item.items_list', compact('items'));\n \n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c1799a28a7e3f24be756df7e3d5ed18d", "score": "0.6474707", "text": "public function index()\n {\n $people = QueryBuilder::for(Person::class)\n ->defaultSort('created_at')\n ->allowedSorts([\n 'created_at'\n ])\n ->paginate(10)\n ->appends(request()->query());\n\n return PersonResource::collection($people);\n }", "title": "" }, { "docid": "974e723cf42c91c850116aa22b80f587", "score": "0.6472995", "text": "public function index()\n {\n //\n $parent_details = \\App\\ParentDetail::orderBy('id', 'desc')->paginate(10);\n return ParentDetailResource::collection($parent_details);\n }", "title": "" }, { "docid": "b6d79dbbd4bd8f24a2ee993dec416fde", "score": "0.64697886", "text": "public function index() {\n\t\t\t$datas=DAO::getAll($this->model);\n\t\t\techo $this->_getResponseFormatter()->get($datas);\n\t}", "title": "" }, { "docid": "85336711eddcf6c317cce3da86408817", "score": "0.6469765", "text": "public function actionList()\n {\n $users = User::find()\n ->orderBy('id')\n ->all();\n if (count($users)) {\n $separator = sprintf(self::LIST_FORMAT_SEP.PHP_EOL, str_repeat('-', 10), str_repeat('-', 22), str_repeat('-', 9), str_repeat('-', 32), str_repeat('-', 42));\n echo $separator;\n printf(self::LIST_FORMAT_HEADER.PHP_EOL, 'id', 'username', 'status', 'fullname', 'email');\n echo $separator;\n foreach ($users as $user) {\n printf(self::LIST_FORMAT_LINE.PHP_EOL, $user->id, $user->username, $this->statusMap[$user->status], $user->fullname, $user->email);\n }\n echo $separator;\n }\n return Controller::EXIT_CODE_NORMAL;\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64684117", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" }, { "docid": "b9a94eb6086245c9e4f089dc9aede055", "score": "0.64675385", "text": "public function index(Request $request)\n {\n $this->authorize('listing', [$this->authorizedModel]);\n\n return response(\n $this->obj->getAll(\n ($request->has('limit') ? $request->input('limit') : 0),\n ($request->has('sort') ? $request->input('sort') : 'id'),\n ($request->has('order') ? $request->input('order') : 'desc'),\n ($request->has('offset') ? $request->input('offset') : 0)\n )\n );\n }", "title": "" } ]
d9239f66423cc9278dd5d4ba05721f1c
Lists all Dmpaper models.
[ { "docid": "26865a3ddfd31374fd1abc8789cf02ef", "score": "0.5996055", "text": "public function actionIndex()\n\t{\n\t\t$searchModel = new DmpaperSearch;\n\t\t$dataProvider = $searchModel->search($_GET);\n\n\t\treturn $this->render('index', [\n\t\t\t'dataProvider' => $dataProvider,\n\t\t\t'searchModel' => $searchModel,\n\t\t]);\n\t}", "title": "" } ]
[ { "docid": "2c6c1101ff3f8d3ecdc9baedf810caf2", "score": "0.6846517", "text": "public function getModelsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "5c5084da01a3d18e3878dff9220c3a43", "score": "0.6794154", "text": "public function getModels();", "title": "" }, { "docid": "52a9eb420ca6a1b067349ee3537be805", "score": "0.65750784", "text": "public function fetchModels()\n {\n $column = 'model';\n\n $db = $this->db->select($column, true)\n ->from(self::getTableName())\n ->orderBy($this->getPk())\n ->desc();\n\n return $db->queryAll($column);\n }", "title": "" }, { "docid": "ab33b7f2f8fd78c672c72409499d4cb2", "score": "0.6534409", "text": "public function getModelsList()\n {\n $query = $this->createQueryBuilder('m')\n ->orderBy('m.name', 'DESC')\n ->getQuery();\n\n return $query->execute();\n }", "title": "" }, { "docid": "9d50e308c537180db080497210065255", "score": "0.6524596", "text": "public function getListOfModels() {\n $requestBody = null;\n $inputArray = [];\n $ret = $this->fetch('GET', 'repository/models', $requestBody, $inputArray, array (\n ), array (\n ), array (\n 200 => 'Indicates request was successful and the models are returned',\n 400 => 'Indicates a parameter was passed in the wrong format. The status-message contains additional information.',\n ));\n return $ret;\n }", "title": "" }, { "docid": "523abecce4995096b880afc5b1de7051", "score": "0.64442617", "text": "public function getAllModels()\n {\n if (!isset($this->model)) {\n $this->model = $this->modelRepo->findBy([], ['name' => 'asc']);\n }\n\n return $this->model;\n }", "title": "" }, { "docid": "18be17ef8678843ecf6d65f5aa5a9ee8", "score": "0.64276326", "text": "public function actionList() {\r\n\t\t// ToDo: Add security, Add pagination\r\n\t\t\r\n\t\t// Get a list of all the required resources\r\n\t\t$models = \\parallel\\yii\\ActiveRecord::model($this->_model)->findAll();\r\n\t\t\r\n\t\t// Return the list to the client\r\n\t\t$this->sendResponse($models);\r\n\t}", "title": "" }, { "docid": "af1f2f546544fa13d7391e4cfafa0bd2", "score": "0.62281734", "text": "public function all()\n {\n return $this->modelClassName->all();\n }", "title": "" }, { "docid": "14c87a55a0ec451415d0538d00b3a1af", "score": "0.62067133", "text": "public function models() { return $this->models; }", "title": "" }, { "docid": "494ed28d0542aeefb8c405fbd491663e", "score": "0.6196913", "text": "public function all()\r\n {\r\n return $this->model->get();\r\n }", "title": "" }, { "docid": "7cb180ef820b820a1b4386daeedeeed4", "score": "0.61886287", "text": "public function models() {\n\t\t$models = $this->getModelNames();\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "b19bd1da18e810170dff1cc1d2503fd9", "score": "0.61583745", "text": "public function getModelsList(){\r\n\t\t$this->db->select(\"id, nome\");\r\n\t\t$this->db->from(\"modelos\");\r\n\t\treturn $this->db->get()->result();\r\n\t}", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.61382544", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.61382544", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.61382544", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.61382544", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.61382544", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.61382544", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.61382544", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "8f43ffbccbb2f7152daeb53b9f3a2329", "score": "0.6128912", "text": "protected function getModelsToProcess()\n {\n return $this->modelProvider->setMainModel($this->model)->getModels();\n }", "title": "" }, { "docid": "9777075d5734728c57769451927a836d", "score": "0.6115214", "text": "public function getAll()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "87c7a20c7d8066c137bd9b25ee942676", "score": "0.6112765", "text": "public function getModels()\n {\n return $this->models;\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.60820264", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.60820264", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "83c54b171f902f3cbe0143963a14a96d", "score": "0.6075946", "text": "public function getModels()\n {\n return $this->_models;\n }", "title": "" }, { "docid": "d7cfa3fa5990ee648c1f7c9042daeb31", "score": "0.6072638", "text": "public function index()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "d7cfa3fa5990ee648c1f7c9042daeb31", "score": "0.6072638", "text": "public function index()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "3b9e2449a339cdeff8c17e229f0efbfb", "score": "0.6056335", "text": "public function getAllModels()\n\t{\n //realizamos la consulta de todos los segmentos\n $consulta = $this->db->prepare(\"\n SELECT \n a.COD_MODEL\n , a.COD_MODEL_SUFFIX\n , a.COD_GBU\n , a.COD_SEGMENT\n , a.COD_SUB_SEGMENT\n , a.COD_MICRO_SEGMENT\n , a.COD_BRAND\n , a.COD_ESTADO\n FROM t_product a\");\n\n $consulta->execute();\n\n //devolvemos la coleccion para que la vista la presente.\n return $consulta;\n\t}", "title": "" }, { "docid": "835ab062a22a01b61a808a38172a580e", "score": "0.60502315", "text": "function getModels()\n\t{\n\t\treturn $this->models;\n\t}", "title": "" }, { "docid": "a412e82eaeb15fd1f8c9a0ab91630d81", "score": "0.6019283", "text": "public function index(){\n\n return $this->model->all();\n }", "title": "" }, { "docid": "fd10f6eda4b6bc288af4386bb02bd006", "score": "0.599847", "text": "public function getModels(): array\n {\n return $this->models;\n }", "title": "" }, { "docid": "abf7fcd2a542d21b68556ef7d125ea7d", "score": "0.59795237", "text": "public function getAll()\n {\n return $this->_model::all();\n }", "title": "" }, { "docid": "ff6369deb5f67db749b5e94d9ee16c9a", "score": "0.59398913", "text": "public function listsAll()\n {\n $products = new Product();\n return $products->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "de0c2404b783a33659a3a3c282e9a9a1", "score": "0.59395003", "text": "public function all()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "5d45009b76e84bd88f3c1f83349348fd", "score": "0.59342295", "text": "public function all() {\n return $this->model->all();\n }", "title": "" }, { "docid": "1c2ef38c3b24dabfb97d037b25ba077a", "score": "0.5929315", "text": "public function getAll()\n {\n return $this->model->newQuery()->orderBy('name')->get();\n }", "title": "" }, { "docid": "52492ce16148b3c7b3fe4c694c773ebc", "score": "0.59208536", "text": "public function all(){\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "c92dfed9c6b1a4ac51bf0fb7614258f9", "score": "0.5910544", "text": "public function listAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "21e80d66fc1d4a6029336aa8afc04bdc", "score": "0.59009486", "text": "public function getModels($option = self::ALL_USERS)\n {\n return $this->getQuery($option)->get();\n }", "title": "" }, { "docid": "64f124af78a9d1c5e8ba31910ec582e1", "score": "0.587761", "text": "public static function getAll(){\n return Model::factory(__CLASS__)\n ->find_many();\n }", "title": "" }, { "docid": "c6cf4ee1a8d9ab19ce1afb3e0a897567", "score": "0.5877002", "text": "public function index()\n {\n return ModelsProduct::all();\n }", "title": "" }, { "docid": "eda0248c339ad0904801a6fb4e9638ea", "score": "0.58683836", "text": "public function all()\n {\n return SurlModel::orderBy('id', 'DESC')->paginate( config('surl.items_per_page') );\n }", "title": "" }, { "docid": "009982ccc5a695802faff1a80368902b", "score": "0.58563787", "text": "public function getAll() {\n return $this->getModel()->all();\n }", "title": "" }, { "docid": "6102d59d44f2dadc3968945753f6e5d4", "score": "0.5834315", "text": "public function list_export_model()\n {\n // phpcs:enable\n\t\tglobal $conf, $langs;\n\n\t\t$sql = \"SELECT em.rowid, em.field, em.label, em.type, em.filter\";\n\t\t$sql.= \" FROM \".MAIN_DB_PREFIX.\"export_model as em\";\n\t\t$sql.= \" ORDER BY rowid\";\n\n\t\t$result = $this->db->query($sql);\n\t\tif ($result)\n\t\t{\n\t\t\t$num = $this->db->num_rows($result);\n\t\t\t$i = 0;\n\t\t\twhile ($i < $num)\n\t\t\t{\n\t\t\t\t$obj = $this->db->fetch_object($result);\n\t\t\t\t$keyModel = array_search($obj->type, $this->array_export_code);\n\t\t\t\tprint \"<tr>\";\n\t\t\t\tprint '<td><a href=export.php?step=2&action=select_model&exportmodelid='.$obj->rowid.'&datatoexport='.$obj->type.'>'.$obj->label.'</a></td>';\n\t\t\t\tprint '<td>';\n\t\t\t\tprint img_object($this->array_export_module[$keyModel]->getName(), $this->array_export_icon[$keyModel]).' ';\n\t\t\t\tprint $this->array_export_module[$keyModel]->getName().' - ';\n\t\t\t\t// recuperation du nom de l'export\n\n\t\t\t\t$string=$langs->trans($this->array_export_label[$keyModel]);\n\t\t\t\tprint ($string!=$this->array_export_label[$keyModel]?$string:$this->array_export_label[$keyModel]);\n\t\t\t\tprint '</td>';\n\t\t\t\t//print '<td>'.$obj->type.$keyModel.'</td>';\n\t\t\t\tprint '<td>'.str_replace(',', ' , ', $obj->field).'</td>';\n\t\t\t\tif (! empty($obj->filter)) {\n\t\t\t\t\t$filter = json_decode($obj->filter, true);\n\t\t\t\t\tprint '<td>'.str_replace(',', ' , ', $filter['field']).'</td>';\n\t\t\t\t\tprint '<td>'.str_replace(',', ' , ', $filter['value']).'</td>';\n\t\t\t\t}\n\t\t\t\t// suppression de l'export\n\t\t\t\tprint '<td class=\"right\">';\n\t\t\t\tprint '<a href=\"'.$_SERVER[\"PHP_SELF\"].'?action=deleteprof&id='.$obj->rowid.'\">';\n\t\t\t\tprint img_delete();\n\t\t\t\tprint '</a>';\n\t\t\t\tprint \"</tr>\";\n\n\t\t\t\t$i++;\n\t\t\t}\n } else {\n dol_print_error($this->db);\n }\n }", "title": "" }, { "docid": "ca052e2b2cab6b23111e266e8e0ce20e", "score": "0.58325934", "text": "public function queryAllModels(): array\n {\n $rows = $this->queryAllRows();\n $models = [];\n\n foreach ($rows as $row) {\n $models[] = new $this->modelName($row);\n }\n\n return $models;\n }", "title": "" }, { "docid": "a387f5dde6835975eecd1c85f33e4d5b", "score": "0.5831261", "text": "public function actionList()\n {\n $query = CarManagement::find()->where([\n 'uid' => Yii::$app->user->getId(),\n 'status' => CarManagement::STATUS_SHOW\n ]);\n\n $data = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $pagination = new Pagination(['totalCount' => $query->count()]);\n\n return $this->_return([\n 'list' => $data->getModels(),\n 'pages' => [\n 'totalCount' => intval($pagination->totalCount),\n 'pageCount' => $pagination->getPageCount(),\n 'currentPage' => $pagination->getPage() + 1,\n 'perPage' => $pagination->getPageSize(),\n ]\n ]);\n }", "title": "" }, { "docid": "5bbcc6fded71c7ded5461659ce50f701", "score": "0.58294016", "text": "public function all()\n {\n return $this->getModel()->all();\n }", "title": "" }, { "docid": "5bbcc6fded71c7ded5461659ce50f701", "score": "0.58294016", "text": "public function all()\n {\n return $this->getModel()->all();\n }", "title": "" }, { "docid": "173d5e20b6fe9c989fd8da19dc4756c3", "score": "0.5825466", "text": "public function findAll()\n {\n try {\n $models = PoTenderItem::all();\n return $models;\n } catch (Exception $e) {\n Log::error($this->logName . '::findAll error : ' . $e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "c3576dec9c0cb9804ab0f990a1ee058a", "score": "0.58117294", "text": "public static function all($model){\n $req = self::getInstance()->getPDO()->query('SELECT * FROM '.$model.'s');\n $datas = $req->fetchAll(\\PDO::FETCH_CLASS,'Models\\\\'.ucfirst(strtolower($model)));\n return $datas;\n }", "title": "" }, { "docid": "64ac082905665286e6316661337d2b7f", "score": "0.5809435", "text": "public function get_all() {\r\n try {\r\n\r\n $db = $this->app->getDbo();\r\n\r\n $pds = $this->pd_model->get_all($this->data);\r\n\r\n $ret = array (\r\n 'pds' => $pds,\r\n );\r\n\r\n $this->renderJson($ret);\r\n\r\n } catch (Exception $ex) {\r\n $this->app->write_log('pd_get_all_exception - ' . $ex->getMessage());\r\n \r\n $ret = $this->message(1, 'pd_get_all_exception', $ex->getMessage());\r\n $this->renderJson($ret);\r\n }\r\n }", "title": "" }, { "docid": "ee2f19e3c5b12debebcf3f807c1904e7", "score": "0.58072644", "text": "public function getModelAll(){\n $sql = \" SELECT model_fashions. * , category_models.name as category_name\n FROM model_fashions\n INNER JOIN category_models ON model_fashions.category_id = category_models.id\";\n\n $statement = $this->con->prepare($sql);\n $statement->execute();\n $result = $statement->fetchAll();\n return $result;\n }", "title": "" }, { "docid": "ba644fc109a39f3dc26207fc600b585f", "score": "0.58054346", "text": "function get_models() {\n\tglobal $db;\n\t$query = $db->prepare(\"SELECT name FROM tiremodel\");\n\t$query->execute();\n\t$tiremodels = $query->fetchAll();\n\n\tif(isset($tiremodels)) {\n\t\techo \"<ul id='tiremodels'>\";\n\t\tforeach ($tiremodels as $model){\n\t\t\techo \"<li>\";\n\t\t\techo $model['name'];\n\t\t\techo \"</li>\";\n\t\t}echo \"</ul>\";\n\t} \n}", "title": "" }, { "docid": "8937d82e40a89faf1a88475de820ced9", "score": "0.5799341", "text": "public function getList()\n {\n return $this->model\n ->orderBy('id', 'desc')\n ->get();\n }", "title": "" }, { "docid": "f12664b5c0aad7ab6cef5b1bac4792e5", "score": "0.5798907", "text": "public function index() {\r\r\n\r\r\n $model = $this->db->get($this->dbName)->result_array();\r\r\n\r\r\n $this->render('list', array(\r\r\n 'model' => $model,\r\r\n ));\r\r\n }", "title": "" }, { "docid": "d92ce07568892bbdbac73cfad06a3cff", "score": "0.5787915", "text": "public function index() {\n $rows = Module::paginate(10);\n return View::make(\"CoreCms::module.listing\")->with(\"models\", $rows);\n }", "title": "" }, { "docid": "790a30f7d774b412c87aeeac60a3c392", "score": "0.5787375", "text": "public function getlistModels()\r\n\t{\r\n\t\tif (!isset($this->tables))\r\n\t\t{\r\n\t\t\t$this->tables = array();\r\n\t\t}\r\n\r\n\t\tforeach ($this->listids as $id)\r\n\t\t{\r\n\t\t\tif (!array_key_exists($id, $this->tables))\r\n\t\t\t{\r\n\t\t\t\t$listModel = JModelLegacy::getInstance('List', 'FabrikFEModel');\r\n\t\t\t\t$listModel->setId($id);\r\n\t\t\t\t$listModel->getTable();\r\n\t\t\t\t$this->tables[$id] = $listModel;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $this->tables;\r\n\t}", "title": "" }, { "docid": "2da6e717f6a515954f13063f870f7d06", "score": "0.57682645", "text": "public function listar() {\n $dados = $this->model->listar();\n echo $this->toJson($dados);\n }", "title": "" }, { "docid": "9e9370104076be10f6d265af478b45b3", "score": "0.5749697", "text": "public function index()\n {\n $models = $this->modelRepository->getAll();\n return $this->respondOk([\n 'models' => $this->modelTransformer->transformCollection($models)\n ]);\n }", "title": "" }, { "docid": "b5b4b1b61ecb6b658eeeb1bb650f2d1b", "score": "0.57442504", "text": "public function index()\n {\n $oCarModels = CarModel::paginate(15);\n return view('admin.fleet_management.models.index', compact('oCarModels'));\n }", "title": "" }, { "docid": "e671e7a9d64c5e7d0082113ed1a4dea1", "score": "0.5738078", "text": "public function exportModels()\n {\n $result = [];\n $modelClass = $this->modelClass;\n foreach($this->cursor as $key => $item) {\n $result[$key] = $modelClass::fromArray($item);\n }\n\n return $result;\n }", "title": "" }, { "docid": "a67675970c985d1f245f7c430a41c97a", "score": "0.5731278", "text": "public function index()\n {\n $models = Modell::with('brand') ;\n $models = Modell::with('car') //WITH RELATION عشان يعمل Eggar load\n ->latest() // حسب الاسم برتب من الاخر\n ->orderBy('name', 'ASC') // برتب حسب الاسم \n ->paginate(5); //للتقسيم \n\n return view('admin.models.index', [\n 'models' => $models,\n 'cars' => Car::all(),\n 'brands' => Brand::all(),\n ]);\n }", "title": "" }, { "docid": "80ca86ff58c5f2600c6e22ed5512a7d3", "score": "0.5725141", "text": "private function ls() {\n\t\t$products = $this->Product->find('all');\n\t\tforeach($products as $product) {\n\t\t\t$this->out(\"ID: {$product['Product']['id']}\\t\\\"{$product['Product']['title']}\\\"\\t{$product['Product']['price']}\");\n\t\t}\n\t}", "title": "" }, { "docid": "897d1c2e223fabb60e7cc1523e833f56", "score": "0.5722529", "text": "public function index() {\n $models = $this->model->paginate(10);\n $title = 'Models';\n\n return View::make('admin.models.index', compact('models','title'));\n }", "title": "" }, { "docid": "a2fdf4b12c58e8e7820da019c8fcb56b", "score": "0.57146347", "text": "public function & getModels() {\n\t\treturn $this->mvcServiceManager()->getModels();\n\t}", "title": "" }, { "docid": "2b3849ce959ef1189b5c66f5496e8536", "score": "0.56890047", "text": "public function get_all_objects() {//done\n //$this->instantiate_model();\n $this->model = $this->model->get_all_objects(); //ensures that an stdClass object is returned\n return $this->model;\n }", "title": "" }, { "docid": "7cbeafe094c0fb9b358a4e0c1832c5ed", "score": "0.5683311", "text": "public function getAll()\n {\n if (!$this->modelAdmin->hasSoftDeleting()) {\n return $this->missingMethod();\n }\n\n return view('flare::admin.modeladmin.all', [\n 'modelItems' => $this->modelAdmin->allItems(),\n 'totals' => $this->modelAdmin->totals(),\n ]\n );\n }", "title": "" }, { "docid": "e5b7d470b6769c2d64f130d8970fcdfd", "score": "0.56640047", "text": "public function index()\n {\n return Mobil::all();\n }", "title": "" }, { "docid": "e5b7d470b6769c2d64f130d8970fcdfd", "score": "0.56640047", "text": "public function index()\n {\n return Mobil::all();\n }", "title": "" }, { "docid": "05a32ada435b406e2ae9164d9a2359d4", "score": "0.56591046", "text": "public function listar()\n {\n return Produtos::All();\n }", "title": "" }, { "docid": "f5c129db8f7ffa86d3fae620b6defa93", "score": "0.5659102", "text": "public function all() {\n\t\t// return $rs;\n \treturn TMasterProduk::all();\n\t}", "title": "" }, { "docid": "b02df5009467dba626cc07f5f75146d2", "score": "0.56578255", "text": "public function actionIndex()\n {\n return new ArrayDataProvider([\n 'allModels' => Professor::find()->asArray()->all()\n ]);\n }", "title": "" }, { "docid": "d1442e5097ec78930d3125dea00e7c01", "score": "0.56549346", "text": "public function actionList()\n {\n switch($_GET['model'])\n {\n case 'getcategories':\n $criteria = new CDbCriteria();\n $criteria -> addCondition(\"parent_id=0\");\n $models = Category::model()->findAll($criteria);\n break;\n \n\n case 'sendnotification':\n\n // API access key from Google API's Console\n $message = \"test\";\n $subject = \"title\";\n $models = $this->sendPushnotification($message,$subject);\n break; \n\n\n case 'privacyPolicy':\n $models = Privacy::model()->findAll();\n break;\n\n default:\n // Model not implemented error\n $this->_sendResponse(501, sprintf(\n 'Error: Mode <b>list</b> is not implemented for model <b>%s</b>',\n $_GET['model']) );\n Yii::app()->end();\n }\n // Did we get some results?\n if(empty($models)) {\n // No\n $this->_sendResponse(200, \n sprintf('No items where found for model <b>%s</b>', $_GET['model']) );\n } else {\n // Prepare response\n $rows = array();\n foreach($models as $model)\n $rows[] = $model->attributes;\n // Send the response\n $this->_sendResponse(200, CJSON::encode($rows));\n }\n }", "title": "" }, { "docid": "d3dd406c0349752621530bb87f1b2ee2", "score": "0.5647166", "text": "public function getModels(){\n return $this->transformers->keys();\n }", "title": "" }, { "docid": "f0f2897ce4725d95601e6122fcdb95c0", "score": "0.5643921", "text": "public function lists()\n {\n return $this->model->orderBy('descripcion', 'ASC')->lists('descripcion', 'id_fondo');\n }", "title": "" }, { "docid": "48e172cc25a66a56801c752968a7a756", "score": "0.5634119", "text": "public static function getModels()\n {\n $files = \\File::glob(app_path() .'/models/*.php');\n $models = [];\n foreach ($files as $file) {\n preg_match('~/([^/]*).php~', $file, $match);\n $models[] = $match[1];\n }\n return $models;\n }", "title": "" }, { "docid": "cb0817cb544fa0ac2bfcccb8ebb3634a", "score": "0.5632545", "text": "public function getAllList(){\n $results = $this->all(\"WHERE id_p = 0\");\n return $results;\n }", "title": "" }, { "docid": "b1c49d0f522da9b0f4e4e0e6f5221853", "score": "0.5627456", "text": "public function listModels($id) {\n $content = $this->rp->find($id);\n $structure = $this->rp->setModel(new Structure())->find($content->structure_id);\n return json_encode($structure->models()->where('type_id',1)->pluck('name','id')->toArray());\n }", "title": "" }, { "docid": "ee229897552765623507e1df52e7e9e3", "score": "0.56193495", "text": "public static function all() {\n\t\t$modelTable = static::$table;\n\n\t\t$sql = \"SELECT * FROM {$modelTable}\";\n\t\t$query = self::query($sql);\n\n\t\t$data = [];\n\t\twhile ($row = mysqli_fetch_assoc($query)) {\n\t\t\t$model = new static;\n\t\t\t$model->attributes = $row;\n\n\t\t\t$data[] = $model;\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "d286f755da420821e8f66aff21e2b7d0", "score": "0.55961615", "text": "public function index()\n {\n $models=Motormodels::all();\n return view('Models.index')->with('models', $models);\n }", "title": "" }, { "docid": "f18e70612d075dd2875afb3f6b19c56b", "score": "0.5596039", "text": "public function models() {\n\t\t$this->set('plugins', Admin::getModels());\n\t}", "title": "" }, { "docid": "e981b71b815e019813d7327c0726d777", "score": "0.5588312", "text": "public function listAll()\n\t{\n\t\treturn $this->createQuery('pc')\n\t\t\t\t\t->orderBy('pc.denominacion ASC')\n\t\t\t\t\t->execute();\n\t}", "title": "" }, { "docid": "a5b7b489da6ddc94ea26d3f7216e6f44", "score": "0.5578223", "text": "public function index()\n {\n return Brand::with('models')->get();\n }", "title": "" }, { "docid": "8754bfd0cb0b7508e30b6106b68fb255", "score": "0.55704296", "text": "function &models()\n {\n $args = func_get_args();\n\n if (count($args)) {\n return o2system()->__get('models')->get($args[ 0 ]);\n }\n\n return o2system()->__get('models');\n }", "title": "" }, { "docid": "eebbb96ebdba5084bdab59764a111b62", "score": "0.55666256", "text": "public function fetchAllAction()\n {\n $posts = $this->service->fetchAll();\n return new JsonModel($posts);\n }", "title": "" }, { "docid": "44be309185f9dc60648af83e468e870a", "score": "0.55654734", "text": "public function index()\n {\n return Mensal::all();\n }", "title": "" }, { "docid": "cf1543ce933b22a088f5b1f49f183319", "score": "0.55600643", "text": "public function index($id, Request $request, listGenerates $list) {\n $structure = $this->rp->setModel(Structure::class)->find($id);\n $list->setPagination($this->rp->paginateArray($structure->models->toArray(),10,$request->page_a,'page_a'));\n return view('content.listModels')->with(compact('list','structure'));\n }", "title": "" }, { "docid": "9b1261a81a31817f726aaab64d05e1dc", "score": "0.55580485", "text": "public function models()\n {\n return $this->hasMany(YoloModel::class)\n ->orderBy('created_at', 'DESC');\n }", "title": "" }, { "docid": "5a9bf49770078d99c55754810b21d1ab", "score": "0.5557699", "text": "public function getAll()\n {\n return Product::all();\n }", "title": "" }, { "docid": "9fe402c61d9d21d4184f23e6980344cd", "score": "0.555691", "text": "public function all()\n {\n return Produto::all();\n }", "title": "" }, { "docid": "e19d05160efff2517b8788574399fafe", "score": "0.55558175", "text": "public function getModelsOfProducerList($id_fab){\r\n\t\t$this->db->select(\"fab.id, fab.nome, group_concat(md.id) as modelos_id, group_concat(md.nome) as modelo\");\r\n\t\t$this->db->from(\"modelos md\");\r\n\t\t$this->db->join(\"fabricantes fab\", \"fab.id = md.fabricante_id\");\r\n\t\t$this->db->group_by('fab.id');\r\n\t\t$this->db->where(\"fab.id\", $id_fab);\r\n\t\treturn $this->db->get()->result();\r\n\t}", "title": "" } ]
12c4361e5a4806a3e8103510de8273c2
Update new order data fields.
[ { "docid": "4a77e3e5880a95f1334fd4a635b15c98", "score": "0.0", "text": "public function setDataFields($websiteId, $typeId, $storeName)\n {\n $orderModel = $this->orderFactory->create()\n ->loadByIncrementId($typeId);\n\n $this->setDefaultDataFields(\n $orderModel->getCustomerEmail(),\n $websiteId,\n $storeName\n );\n\n /** @var Website $website */\n $website = $this->getWebsite($websiteId);\n\n if ($lastOrderId = $website->getConfig(\n Config::XML_PATH_CONNECTOR_CUSTOMER_LAST_ORDER_ID\n )\n ) {\n $this->data[] = [\n 'Key' => $lastOrderId,\n 'Value' => $orderModel->getId(),\n ];\n }\n if ($orderIncrementId = $website->getConfig(\n Config::XML_PATH_CONNECTOR_CUSTOMER_LAST_ORDER_INCREMENT_ID\n )\n ) {\n $this->data[] = [\n 'Key' => $orderIncrementId,\n 'Value' => $orderModel->getIncrementId(),\n ];\n }\n if ($lastOrderDate = $website->getConfig(\n Config::XML_PATH_CONNECTOR_CUSTOMER_LAST_ORDER_DATE\n )) {\n $this->data[] = [\n 'Key' => $lastOrderDate,\n 'Value' => $orderModel->getCreatedAt(),\n ];\n }\n if (($customerId = $website->getConfig(Config::XML_PATH_CONNECTOR_CUSTOMER_ID))\n && $orderModel->getCustomerId()\n ) {\n $this->data[] = [\n 'Key' => $customerId,\n 'Value' => $orderModel->getCustomerId(),\n ];\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "d2544c4bd8b06948168bcd83a08933ba", "score": "0.7667398", "text": "public function updateOrders();", "title": "" }, { "docid": "bfee52eda45b90fbda062ce0086a5417", "score": "0.7425365", "text": "public function testUpdateAnOrder()\n {\n }", "title": "" }, { "docid": "3f4b660f48521fb587cab39e0d872739", "score": "0.73146945", "text": "public function update(&$order)\n {\n }", "title": "" }, { "docid": "3f4b660f48521fb587cab39e0d872739", "score": "0.7313919", "text": "public function update(&$order)\n {\n }", "title": "" }, { "docid": "0d47d38f487d8d4c6e15cc27b843d82a", "score": "0.73011476", "text": "public function testUpdateOrder()\n {\n }", "title": "" }, { "docid": "6bb57503332d623158ea1298a5014e23", "score": "0.72839826", "text": "public static function update($order)\n {\n }", "title": "" }, { "docid": "ebe7963c488249d6b286f28a8e4d9f78", "score": "0.7201241", "text": "public function set_order_data($oid, $order_data) {\n $update_fields = array(\n 'data' => serialize($order_data),\n 'changed' => time()\n );\n \n return db_update('demorati_order')\n ->fields($update_fields)\n ->condition('oid', $oid)\n ->execute();\n }", "title": "" }, { "docid": "5c1e278c9f6b53ac0786eac8f957fed6", "score": "0.7148963", "text": "public function update(Order $order);", "title": "" }, { "docid": "024259968149c16cd35f4813d5a5b8c6", "score": "0.71237063", "text": "public function testUpdateOrderSourceCustomFields()\n {\n }", "title": "" }, { "docid": "dcefef68312e2449460288102f7d0c25", "score": "0.70787567", "text": "public function update_vendor_order()\n\t{\n\t\t$order['date'] = $this->input->post(\"date\");\n\t\t$order['order_id'] = $this->input->post(\"order_id\");\n\t\tif ($this->vendor->add_fulfilled($order)) \n\t\t{\n\t\t\t$this->orders();\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'Something went wrong updating order';\n\t\t}\n\t}", "title": "" }, { "docid": "5f2aed5a5925a2156c46eb72c2245334", "score": "0.70360094", "text": "public function updated(Order $order)\n {\n //\n }", "title": "" }, { "docid": "5f2aed5a5925a2156c46eb72c2245334", "score": "0.70360094", "text": "public function updated(Order $order)\n {\n //\n }", "title": "" }, { "docid": "9d077bacdec3732944795cf34ec6d2c7", "score": "0.7000546", "text": "public function updated(Order $order)\n {\n // Toda vez que receber uma nova ordem, executa o método que criamos adjusTotal\n $order->adjustTotal();\n // Atualiza o saldo devedor, pois pode ser que tenha sido adicionado um pagamento.\n $order->adjustBalance();\n }", "title": "" }, { "docid": "3f29c1a6c14a8b0c793dc0162fdbb793", "score": "0.6864331", "text": "public function testUpdateOrderSource()\n {\n }", "title": "" }, { "docid": "26e3df81c1008a5147c0cba4b3358cd8", "score": "0.6854689", "text": "public function it_updates_a_order()\n {\n Http::fake();\n\n (new Shopify('shop', 'token'))->orders(123)->put($order = [\n 'key1' => 'value1'\n ]);\n\n $order['id'] = 123;\n\n Http::assertSent(function (Request $request) use ($order) {\n return $request->url() == 'https://shop.myshopify.com/admin/orders/123.json'\n && $request->method() == 'PUT'\n && $request->data() == compact('order');\n });\n }", "title": "" }, { "docid": "f09b07ef826cd8caa274d37ad50a8c63", "score": "0.67937016", "text": "public function update_order_from_object($order)\n {\n }", "title": "" }, { "docid": "e57e87d01daeaa0c6cf5a3712c7099e4", "score": "0.678535", "text": "public function testUpdateOrderPost()\n {\n }", "title": "" }, { "docid": "b0a5aaf49b163814bf795b53e0e2095e", "score": "0.6699789", "text": "public function updateOrder() {\r\n\t\t$orderModel = ClassRegistry::init('Order');\r\n\t\ttry {\r\n\t\t\t$update = $orderModel->updateCurrent($this->controller->Session->read('Order')); // calculate totals and validate \r\n\t\t\t$this->controller->Session->write('Order', $update); // update session\r\n\t\t\tif ($this->Auth->loggedIn()){\r\n\t\t\t\t$this->controller->Session->write('Order.Order.user_id', $this->Auth->user('id'));\r\n\t\t\t}\r\n\t\t} catch (ValidationException $e) {\r\n\r\n\t\t\t// Error message in order side bar\r\n\t\t\t$this->controller->Session->setFlash($e->getMessage());\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f3b2f95409e2ced6a6c910d70f59679c", "score": "0.6625751", "text": "public function updateShipmentInfoToOrder($order_id=\"\",$data=array()){\n \t\t$this->db->where('order_id',$order_id);\n \t\t$this->db->update('orders',$data);\n \t}", "title": "" }, { "docid": "cd1d02e3aa5808b56501ebe2217c755e", "score": "0.6603205", "text": "public function updateOrderAction() {\n //CHECK POST\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n $values = $_POST;\n try {\n foreach ($values['order'] as $key => $value) {\n $tab = Engine_Api::_()->getItem('seaocore_tab', (int) $value);\n if (!empty($tab)) {\n $tab->order = $key + 1;\n $tab->save();\n }\n }\n $db->commit();\n $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "d39cf3984028aa0738ed010c90cf0695", "score": "0.65891165", "text": "public function updateOrders()\n {\n ee()->dbforge->drop_table('store_carts');\n\n // upgrade orders\n if (ee()->db->field_exists('order_id', 'store_orders')) {\n ee()->dbforge->modify_column('store_orders', array(\n 'order_id' => array('name' => 'id', 'type' => 'int', 'constraint' => 10, 'unsigned' => true, 'auto_increment' => true),\n 'order_status' => array('name' => 'order_status_name', 'type' => 'varchar', 'constraint' => 20),\n 'order_status_member' => array('name' => 'order_status_member_id', 'type' => 'int', 'constraint' => 10),\n 'shipping_method' => array('name' => 'shipping_method_name', 'type' => 'varchar', 'constraint' => 255),\n 'billing_name' => array('name' => 'billing_name_old', 'type' => 'varchar', 'constraint' => 255),\n 'billing_address3' => array('name' => 'billing_city', 'type' => 'varchar', 'constraint' => 255),\n 'billing_region' => array('name' => 'billing_state', 'type' => 'varchar', 'constraint' => 255),\n 'shipping_name' => array('name' => 'shipping_name_old', 'type' => 'varchar', 'constraint' => 255),\n 'shipping_address3' => array('name' => 'shipping_city', 'type' => 'varchar', 'constraint' => 255),\n 'shipping_region' => array('name' => 'shipping_state', 'type' => 'varchar', 'constraint' => 255),\n 'promo_code_id' => array('name' => 'discount_id', 'type' => 'int', 'constraint' => 10, 'unsigned' => true),\n 'promo_code' => array('name' => 'promo_code', 'type' => 'varchar', 'constraint' => 255),\n 'order_qty' => array('name' => 'order_qty', 'type' => 'int', 'constraint' => 4, 'unsigned' => true, 'null' => false, 'default' => 0),\n 'order_subtotal' => array('name' => 'order_subtotal', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_subtotal_tax' => array('name' => 'order_subtotal_tax', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_discount' => array('name' => 'order_discount', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_discount_tax' => array('name' => 'order_discount_tax', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_shipping' => array('name' => 'order_shipping', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_shipping_tax' => array('name' => 'order_shipping_tax', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_handling' => array('name' => 'order_handling', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_handling_tax' => array('name' => 'order_handling_tax', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_tax' => array('name' => 'order_tax', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_total' => array('name' => 'order_total', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'order_paid' => array('name' => 'order_paid', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'tax_rate' => array('name' => 'tax_rate', 'type' => 'decimal', 'constraint' => '8,5', 'null' => false, 'default' => 0),\n 'order_length' => array('name' => 'order_length', 'type' => 'double', 'null' => false, 'default' => 0),\n 'order_width' => array('name' => 'order_width', 'type' => 'double', 'null' => false, 'default' => 0),\n 'order_height' => array('name' => 'order_height', 'type' => 'double', 'null' => false, 'default' => 0),\n 'dimension_units' => array('name' => 'dimension_units', 'type' => 'varchar', 'constraint' => 5, 'null' => false, 'default' => ''),\n 'order_weight' => array('name' => 'order_weight', 'type' => 'double', 'null' => false, 'default' => 0),\n 'weight_units' => array('name' => 'weight_units', 'type' => 'varchar', 'constraint' => 5, 'null' => false, 'default' => ''),\n ));\n ee()->dbforge->add_column('store_orders', array(\n 'order_status_message' => array('type' => 'text'),\n ), 'order_status_member_id');\n\n ee()->dbforge->add_column('store_orders', array(\n 'billing_last_name' => array('type' => 'varchar', 'constraint' => 255),\n 'billing_first_name' => array('type' => 'varchar', 'constraint' => 255),\n ), 'billing_name_old');\n\n ee()->dbforge->add_column('store_orders', array(\n 'shipping_last_name' => array('type' => 'varchar', 'constraint' => 255),\n 'shipping_first_name' => array('type' => 'varchar', 'constraint' => 255),\n ), 'shipping_name_old');\n\n ee()->dbforge->add_column('store_orders', array(\n 'ip_country' => array('type' => 'char', 'constraint' => 2),\n 'member_data_loaded' => array('type' => 'tinyint', 'constraint' => 1, 'null' => false, 'default' => 0),\n 'tax_shipping' => array('type' => 'tinyint', 'constraint' => 1, 'null' => false, 'default' => 0),\n 'accept_terms' => array('type' => 'tinyint', 'constraint' => 1, 'null' => false, 'default' => 0),\n 'register_member' => array('type' => 'tinyint', 'constraint' => 1, 'null' => false, 'default' => 0),\n 'username' => array('type' => 'varchar', 'constraint' => 255),\n 'screen_name' => array('type' => 'varchar', 'constraint' => 255),\n 'password_hash' => array('type' => 'varchar', 'constraint' => 255),\n 'password_salt' => array('type' => 'varchar', 'constraint' => 255),\n ));\n\n // split names\n ee()->db->query(\"UPDATE `exp_store_orders`\n SET `billing_first_name` = IF(LOCATE(' ', `billing_name_old`) > 0, SUBSTRING(`billing_name_old`, 1, LOCATE(' ', `billing_name_old`) - 1), `billing_name_old`),\n `billing_last_name` = IF(LOCATE(' ', `billing_name_old`) > 0, SUBSTRING(`billing_name_old`, LOCATE(' ', `billing_name_old`) + 1), NULL),\n `shipping_first_name` = IF(LOCATE(' ', `shipping_name_old`) > 0, SUBSTRING(`shipping_name_old`, 1, LOCATE(' ', `shipping_name_old`) - 1), `shipping_name_old`),\n `shipping_last_name` = IF(LOCATE(' ', `shipping_name_old`) > 0, SUBSTRING(`shipping_name_old`, LOCATE(' ', `shipping_name_old`) + 1), NULL)\"\n );\n\n ee()->dbforge->drop_column('store_orders', 'billing_name_old');\n ee()->dbforge->drop_column('store_orders', 'shipping_name_old');\n }\n\n ee()->db->set('billing_country', 'UPPER(billing_country)', false)\n ->set('shipping_country', 'UPPER(shipping_country)', false)\n ->update('store_orders');\n\n ee()->db->set('billing_country', 'GB')\n ->where('billing_country', 'UK')->update('store_orders');\n ee()->db->set('shipping_country', 'GB')\n ->where('shipping_country', 'UK')->update('store_orders');\n\n $this->fixBooleanColumn('store_orders', 'billing_same_as_shipping');\n $this->fixBooleanColumn('store_orders', 'shipping_same_as_billing');\n\n // upgrade order items\n if ( ! ee()->db->field_exists('id', 'store_order_items')) {\n $this->fixBooleanColumn('store_order_items', 'on_sale');\n $this->fixBooleanColumn('store_order_items', 'free_shipping');\n $this->fixBooleanColumn('store_order_items', 'tax_exempt');\n\n ee()->dbforge->modify_column('store_order_items', array(\n 'order_item_id' => array('name' => 'id', 'type' => 'int', 'constraint' => 10, 'unsigned' => true, 'auto_increment' => true),\n 'price' => array('name' => 'price', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'price_inc_tax' => array('name' => 'price_inc_tax_old', 'type' => 'decimal', 'constraint' => '19,4', 'null' => true),\n 'regular_price' => array('name' => 'regular_price', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'regular_price_inc_tax' => array('name' => 'regular_price_inc_tax_old', 'type' => 'decimal', 'constraint' => '19,4', 'null' => true),\n 'handling' => array('name' => 'handling', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'handling_tax' => array('name' => 'handling_tax', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'item_qty' => array('name' => 'item_qty', 'type' => 'int', 'constraint' => 4, 'unsigned' => true, 'null' => false, 'default' => 0),\n 'item_subtotal' => array('name' => 'item_subtotal', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'item_tax' => array('name' => 'item_tax', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'item_total' => array('name' => 'item_total', 'type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'sku' => array('name' => 'sku', 'type' => 'varchar', 'constraint' => 255, 'null' => true),\n ));\n\n // cache URL title, channel ID, and category IDs\n ee()->dbforge->add_column('store_order_items', array(\n 'category_ids' => array('type' => 'varchar', 'constraint' => 255),\n 'channel_id' => array('type' => 'int', 'constraint' => 10, 'null' => false, 'default' => 0),\n 'url_title' => array('type' => 'varchar', 'constraint' => 255, 'null' => false, 'default' => ''),\n ), 'title');\n ee()->db->query('UPDATE `exp_store_order_items` item, `exp_channel_titles` entry SET item.url_title = entry.url_title, item.channel_id = entry.channel_id WHERE item.entry_id = entry.entry_id');\n\n // add site_id\n ee()->dbforge->add_column('store_order_items', array(\n 'site_id' => array('type' => 'int', 'constraint' => 5, 'null' => false, 'default' => 0),\n ), 'id');\n ee()->db->query('UPDATE `exp_store_order_items` i, `exp_store_orders` o SET i.site_id = o.site_id WHERE i.order_id = o.id');\n\n // add stock_id\n ee()->dbforge->add_column('store_order_items', array(\n 'stock_id' => array('type' => 'int', 'constraint' => 10, 'null' => false, 'default' => 0),\n ), 'entry_id');\n }\n\n // add order adjustments\n if ( ! ee()->db->table_exists('store_order_adjustments')) {\n ee()->dbforge->add_field(array(\n 'id' => array('type' => 'int', 'constraint' => 10, 'unsigned' => true, 'auto_increment' => true),\n 'site_id' => array('type' => 'int', 'constraint' => 5, 'null' => false, 'default' => 0),\n 'order_id' => array('type' => 'int', 'constraint' => 10, 'unsigned' => true, 'null' => false, 'default' => 0),\n 'name' => array('type' => 'varchar', 'constraint' => 255, 'null' => false, 'default' => ''),\n 'type' => array('type' => 'varchar', 'constraint' => 32, 'null' => false, 'default' => ''),\n 'rate' => array('type' => 'decimal', 'constraint' => '8,5', 'null' => false, 'default' => 0),\n 'amount' => array('type' => 'decimal', 'constraint' => '19,4', 'null' => false, 'default' => 0),\n 'taxable' => array('type' => 'tinyint', 'constraint' => 1, 'null' => false, 'default' => 0),\n 'included' => array('type' => 'tinyint', 'constraint' => 1, 'null' => false, 'default' => 0),\n 'sort' => array('type' => 'int', 'constraint' => 4, 'unsigned' => true, 'null' => false, 'default' => 0)));\n ee()->dbforge->add_key('id', true);\n ee()->dbforge->add_key('order_id');\n ee()->dbforge->create_table('store_order_adjustments');\n }\n\n // upgrade order history\n if (!ee()->db->field_exists('id', 'store_order_history')) {\n ee()->dbforge->modify_column('store_order_history', array(\n 'order_history_id' => array('name' => 'id', 'type' => 'int', 'constraint' => 10, 'unsigned' => true, 'auto_increment' => true),\n 'order_status' => array('name' => 'order_status_name', 'type' => 'varchar', 'constraint' => 20, 'null' => false, 'default' => ''),\n 'order_status_member' => array('name' => 'order_status_member_id', 'type' => 'int', 'constraint' => 10, 'null' => false, 'default' => 0),\n 'message' => array('name' => 'order_status_message', 'type' => 'text'),\n ));\n }\n }", "title": "" }, { "docid": "6210f4ae5f49eb5f0f8f660ef4cbff03", "score": "0.6489469", "text": "public static function woocommerce_checkout_update_order_meta($order_id) {\n $fields = [\n 'billing_subscriber_id',\n 'billing_salutation',\n 'billing_company_contact',\n 'billing_house_number',\n 'billing_phone_prefix',\n 'shipping_salutation',\n 'shipping_company_contact',\n 'shipping_house_number',\n 'payment_interval',\n ];\n foreach ($fields as $field) {\n if (!empty($_POST[$field])) {\n update_post_meta($order_id, $field, sanitize_text_field($_POST[$field]));\n }\n }\n }", "title": "" }, { "docid": "b06af4add5a55a764c770d19d4b9ccf1", "score": "0.64843637", "text": "public function update(UpdateOrder $request, Order $order)\n {\n DB::beginTransaction();\n\n if (!is_numeric($request->customer_id)) {\n $customer = Customer::create(['company' => $request->customer_id]);\n\n $request->request->set('customer_id', $customer->id);\n }\n\n $order->update($request->validated());\n\n $totalCost = 0;\n\n foreach ($request->orderItems as $orderItem) {\n\n $item = null;\n\n /*\n * number means exist item\n * not number means not exist item\n */\n if (is_numeric($orderItem['item_id'])) {\n\n // search for item in items\n $item = $order->items()->find($orderItem['item_id']);\n\n if (!$item) {\n $item = Item::find($orderItem['item_id']);\n }\n\n } else {\n\n // create new item\n $item = Item::create(['name' => $orderItem['item_id']]);\n }\n\n $unit = null;\n /*\n * number means exist unit\n * not number means not exist unit\n */\n if (is_numeric($orderItem['unit_id'])) {\n // search for unit in item's units\n $unit = $item->units()->find($orderItem['unit_id']);\n } else {\n\n // attach new unit to item\n $unit = $item->units()->create(['name' => $orderItem['unit_id'], 'capacity' => $orderItem['capacity'], 'price' => $orderItem['cost'], 'item_id', $item->id]);\n\n }\n\n $oldOrderItem = $order->orderItems()->where('item_id', $item->id)->first();\n\n if ($oldOrderItem) {\n $oldOrderItem->update(['count' => $orderItem['count'], 'cost' => $orderItem['cost'], 'unit_id' => $unit->id]);\n } else {\n $order->items()->attach($item, ['cost' => $orderItem['cost'], 'count' => $orderItem['count'], 'unit_id' => $unit->id]);\n }\n\n $totalCost += $orderItem['capacity'] * $orderItem['count'] * $orderItem['cost'];\n }\n\n // calculate order cost and save\n $order->cost = $totalCost;\n $order->save();\n\n $order->customer->updateBalance();\n\n foreach ($order->items as $item) {\n $item->updateAmount();\n }\n\n DB::commit();\n\n return redirect()->route('dashboard.orders.index');\n }", "title": "" }, { "docid": "2b803034da1c23d302a62cb3fdda7e74", "score": "0.64739937", "text": "function updateOrderMeta($order_id) {\n\t\tProductSync::remove_actions();\n\n\t\t( $_POST['dob_month'] ) ? update_post_meta($order_id, 'dob_month', esc_attr($_POST['dob_month'])) : 0;\n\t\t( $_POST['dob_year'] ) ? update_post_meta($order_id, 'dob_year', esc_attr($_POST['dob_year'])) : 0;\n\t\t( $_POST['dob_day'] ) ? update_post_meta($order_id, 'dob_day', esc_attr($_POST['dob_day'])) : 0;\n\t}", "title": "" }, { "docid": "e7327a6700a4f0187554f9af88efcb3a", "score": "0.6470282", "text": "public function updateOrderById($id, $order);", "title": "" }, { "docid": "d2da511a9f7bbc539a49a50f4ee20189", "score": "0.645438", "text": "private function sendOrderUpdate($order) {\n if (!$order || !$order->getId()) return;\n\n $data = array(\n 'refund_status' => 'not_refunded',\n 'total_refunded' => 0,\n 'ip_address' => Mage::helper('core/http')->getRemoteAddr(),\n 'user_agent' => $_SERVER['HTTP_USER_AGENT']\n );\n\n if ($order->getBaseTotalDue() == $order->getBaseGrandTotal()) {\n $data['payment_status'] = 'not_paid';\n $data['total_paid'] = 0;\n } else if ($order->getBaseTotalDue() == 0) {\n $data['payment_status'] = 'paid';\n $data['total_paid'] = $order->getBaseGrandTotal();\n } else {\n $data['payment_status'] = 'partially_paid';\n $data['total_paid'] = $order->getBaseTotalPaid();\n }\n\n $data['cancellation_status'] = $order->getState() == 'canceled' ? 'cancelled' : 'not_cancelled';\n\n $total_refunded = $order->getBaseTotalRefunded();\n\n if ($total_refunded > 0) {\n if ($total_refunded < $order->getBaseGrandTotal()) {\n $data['refund_status'] = 'partially_refunded';\n $data['total_refunded'] = $total_refunded;\n } else {\n // assume full refund. this should be fine as magento appears to only allow refunding up to\n // the amount paid\n $data['refund_status'] = 'refunded';\n $data['total_refunded'] = $order->getBaseGrandTotal();\n }\n }\n\n $data['$magento_payload'] = $order->toArray();\n $data['$magento_payload']['order_items'] = $this->getItems($order->getId());\n $data['$magento_payload']['order_comments'] = $this->getComments($order->getId());\n $data['$magento_payload']['addresses'] = $this->getAddresses($order->getId());\n $data = array_merge($data, $this->getVersionInfo());\n\n $client = $this->getClient();\n $response = $client->orders->update($order->getId(), $data);\n\n if ($response->success) {\n Mage::log('[LoyaltyLion] Updated order OK');\n } else if ($response->status != 404) {\n // sometimes this will get fired before the order has been created, so we'll get a 404 back - no reason to\n // error, because this is expected behaviour\n Mage::log('[LoyaltyLion] Failed to update order - status: ' . $response->status . ', error: ' . $response->error,\n Zend_Log::ERR);\n }\n }", "title": "" }, { "docid": "8f22a2b659ece74cc00d2319b773c12c", "score": "0.6428313", "text": "private function update_order_meta_from_object($order)\n {\n }", "title": "" }, { "docid": "937b10d7082ce4a050207fd4523c2557", "score": "0.6406824", "text": "public function requestUpdate(OrderInterface $order);", "title": "" }, { "docid": "69ba3a04af6afb8f9990ee32277f9bda", "score": "0.64036417", "text": "public function updateOrder(OrderInterface $order, $save_order = FALSE);", "title": "" }, { "docid": "6b695303b914e2f74b88dd90dee9f0b7", "score": "0.63578564", "text": "public function notifyOrderUpdated() {}", "title": "" }, { "docid": "f2038dd03dee5a5b91725964c7768f32", "score": "0.6336116", "text": "public function update_order($data,$order_id){\n $w = $this->ProductprocessURL('orders/'.$order_id, http_build_query($data),'POST');\n return $w;\n }", "title": "" }, { "docid": "3690a8f0d185bec4ca041bf08305b1c2", "score": "0.632739", "text": "public function updateorders()\n {\n return Komfortkasse::updateorders();\n\n }", "title": "" }, { "docid": "094ec1d3ce97f63916796001d165f21e", "score": "0.63044965", "text": "protected function update_post_meta( &$order ) {\n\t\tglobal $wpdb;\n\n\t\t$edit_data = array(\n\t\t\t'order_key' => $order->get_order_key( 'edit' ),\n\t\t\t'customer_id' => $order->get_customer_id( 'edit' ),\n\t\t\t'payment_method' => $order->get_payment_method( 'edit' ),\n\t\t\t'payment_method_title' => $order->get_payment_method_title( 'edit' ),\n\t\t\t'transaction_id' => $order->get_transaction_id( 'edit' ),\n\t\t\t'customer_ip_address' => $order->get_customer_ip_address( 'edit' ),\n\t\t\t'customer_user_agent' => $order->get_customer_user_agent( 'edit' ),\n\t\t\t'created_via' => $order->get_created_via( 'edit' ),\n\t\t\t'date_completed' => $order->get_date_completed( 'edit' ),\n\t\t\t'date_paid' => $order->get_date_paid( 'edit' ),\n\t\t\t'cart_hash' => $order->get_cart_hash( 'edit' ),\n\t\t\t'billing_first_name' => $order->get_billing_first_name( 'edit' ),\n\t\t\t'billing_last_name' => $order->get_billing_last_name( 'edit' ),\n\t\t\t'billing_company' => $order->get_billing_company( 'edit' ),\n\t\t\t'billing_address_1' => $order->get_billing_address_1( 'edit' ),\n\t\t\t'billing_address_2' => $order->get_billing_address_2( 'edit' ),\n\t\t\t'billing_city' => $order->get_billing_city( 'edit' ),\n\t\t\t'billing_state' => $order->get_billing_state( 'edit' ),\n\t\t\t'billing_postcode' => $order->get_billing_postcode( 'edit' ),\n\t\t\t'billing_country' => $order->get_billing_country( 'edit' ),\n\t\t\t'billing_email' => $order->get_billing_email( 'edit' ),\n\t\t\t'billing_phone' => $order->get_billing_phone( 'edit' ),\n\t\t);\n\n\t\tif ( $this->creating ) {\n\t\t\t$wpdb->insert(\n\t\t\t\t\"{$wpdb->prefix}woocommerce_orders\",\n\t\t\t\t$edit_data,\n\t\t\t\tarray(\n\t\t\t\t\t'order_id' => $order->get_id(),\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$wpdb->update(\n\t\t\t\t\"{$wpdb->prefix}woocommerce_orders\",\n\t\t\t\tarray_intersect_key( $edit_data, $order->get_changes() ),\n\t\t\t\tarray(\n\t\t\t\t\t'order_id' => $order->get_id(),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$updated_props = array_keys( $order->get_changes() );\n\n\t\t// If customer changed, update any downloadable permissions.\n\t\tif ( in_array( 'customer_user', $updated_props ) || in_array( 'billing_email', $updated_props ) ) {\n\t\t\t$data_store = WC_Data_Store::load( 'customer-download' );\n\t\t\t$data_store->update_user_by_order_id( $id, $order->get_customer_id(), $order->get_billing_email() );\n\t\t}\n\n\t\tdo_action( 'woocommerce_order_object_updated_props', $order, $updated_props );\n\t}", "title": "" }, { "docid": "6fb78859728782f7ea437c73ff7b818d", "score": "0.6303901", "text": "public function fieldsOrder($order)\n {\n $this->fieldsOrder = $order;\n }", "title": "" }, { "docid": "cace2e05fc2f4b5c31a8411f76ad69e0", "score": "0.62945735", "text": "protected function update_order_from_request( \\WC_Order $order, \\WP_REST_Request $request ) {\n\t\t$schema = $this->get_item_schema();\n\n\t\tif ( isset( $request['billing_address'] ) ) {\n\t\t\t$allowed_billing_values = array_intersect_key( $request['billing_address'], $schema['properties']['billing_address']['properties'] );\n\t\t\tforeach ( $allowed_billing_values as $key => $value ) {\n\t\t\t\t$order->{\"set_billing_$key\"}( $value );\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $request['shipping_address'] ) ) {\n\t\t\t$allowed_shipping_values = array_intersect_key( $request['shipping_address'], $schema['properties']['shipping_address']['properties'] );\n\t\t\tforeach ( $allowed_shipping_values as $key => $value ) {\n\t\t\t\t$order->{\"set_shipping_$key\"}( $value );\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $request['customer_note'] ) ) {\n\t\t\t$order->set_customer_note( $request['customer_note'] );\n\t\t}\n\n\t\tif ( isset( $request['payment_method'] ) ) {\n\t\t\t$order->set_payment_method( $this->get_request_payment_method( $request ) );\n\t\t}\n\n\t\t$order->save();\n\t}", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "3a99327948c32124e75d533ea6d34b48", "score": "0.6280465", "text": "public function update(Request $request, Order $order)\n {\n //\n }", "title": "" }, { "docid": "28b53f300eb76f62bf2ef842db2b2de5", "score": "0.6274196", "text": "public function adminUpdateOrder($data){\n\t\tif(!isset($data['type']{0})) return 'The type is missing';\n\t\tif(!isset($data['description']{0})) return 'Please add a description';\n\t\t//2. connect to the database\n\t\trequire_once('mySQLDataBase.php');\n\t\t$pdo=MySQLDB::connect();\n\t\t//3. insert the record\n\t\t$query=$pdo->prepare('UPDATE maintenance_requests SET Type=?, Description=? WHERE Request_Id = ?');\n\t\t$query->execute([$data['type'], $data['description'], $_GET['id']]);\n\t\t//4. disconnect from the db\n\t\t$pdo = \"null\";\n\t}", "title": "" }, { "docid": "10b20c01a485036257ef37f4694430be", "score": "0.6264309", "text": "public function notifyOrderUpdated()\n {\n $this->_orderUpdated = true;\n }", "title": "" }, { "docid": "f7317af6e08f76810885e178ade9d16c", "score": "0.6211916", "text": "function updateorderinfo($orderid, $orderinfo) {\n\t\t$orderinfo = (array)$orderinfo;\n\t\t\n\t\t//get previous order notes\n\t\t$sql = \"SELECT ec_order.order_notes FROM ec_order WHERE ec_order.order_id = %d\";\n\t\t$results = $this->db->get_results( $this->db->prepare( $sql, $orderid ) );\n\t\t\n\t\t$old_order_notes = (string)$results[0]->order_notes;\n\t\t$new_order_notes = $old_order_notes . PHP_EOL . PHP_EOL . \"***** Order Information Updated: \" . date(\"M d, Y\") . \" *****\". PHP_EOL;\n\t\t\t \n\t\t//first, edit the data\n\t\t$editedsql = \"UPDATE ec_order SET ec_order.order_weight = %s, ec_order.promo_code = %s, ec_order.giftcard_id = %s, ec_order.grand_total = %s, ec_order.tax_total = %s, ec_order.shipping_total = %s, ec_order.discount_total = %s, ec_order.vat_total = %s, ec_order.duty_total = %s, ec_order.order_notes = %s WHERE ec_order.order_id = %d\";\n\t\t\n\t\t$this->db->query( $this->db->prepare( $editedsql, $orderinfo['orderweight'], $orderinfo['couponcode'], $orderinfo['giftcard'], $orderinfo['ordertotal'], $orderinfo['tax'], $orderinfo['shipping'], $orderinfo['discounts'], $orderinfo['vat'], $orderinfo['duty'], $new_order_notes, $orderid ) ); \n\t\t\n\n\t\t//then, just get the new order information and return\n\t\t$sql = \"SELECT ec_orderdetail.*, ec_order.*, ec_orderstatus.order_status, UNIX_TIMESTAMP(ec_order.order_date) AS order_date, ec_download.date_created, ec_download.download_count FROM (((ec_order LEFT JOIN ec_orderdetail ON ec_orderdetail.order_id = ec_order.order_id) LEFT JOIN ec_download ON ec_orderdetail.download_key = ec_download.download_id) LEFT JOIN ec_orderstatus ON ec_order.orderstatus_id = ec_orderstatus.status_id) WHERE ec_order.order_id = %d ORDER BY ec_orderdetail.product_id\";\n\t\t \n\t\t$results = $this->db->get_results( $this->db->prepare( $sql, $orderid ) );\n\t\t\n\t\tif( count( $results ) > 0 ){\n\t\t\t return($results);\n\t\t}else{\n\t\t\treturn array( \"error\" );\n\t\t}\n\t}", "title": "" }, { "docid": "cf26a0f52f90f10630db9d9bf020ecd8", "score": "0.6208137", "text": "public function update_order($values)\r\n\t{\r\n\t\r\n\t\t$expected = array('product_id', 'image', 'x_offset', 'y_offset', 'width', 'height', 'note', 'date', 'GUID');\r\n\t\r\n\t\t$this->values($values, $expected);\r\n\t\t$this->check();\r\n\t\t$this->save();\r\n\t}", "title": "" }, { "docid": "01164d7bc5cbf188153ab3408cf91410", "score": "0.61918205", "text": "public function setAdditionalOrderData($order)\n {\n\n $quoteId = $order->getQuoteId();\n $additinalInfo = $this->additionalFields->findByField($quoteId, 'quote_id');\n $this->orderAdditionalData = $additinalInfo->getData();\n }", "title": "" }, { "docid": "b1da7258b18b1580e46b1f1f7d31461b", "score": "0.61833024", "text": "public function updateOrderSuccess(Request $request, Orders $order);", "title": "" }, { "docid": "9d3d5c5e39721da94282931d7dd50901", "score": "0.616523", "text": "public function updateOrder($order_id, Request $request)\n {\n $order = $request->input('order');\n $orderLines = $request->input('orderlines');\n $currentlines = $request->input('currentlines');\n\n // Modify entry\n if( !empty($order['vendor_id']) && !empty($order['tax_id']) ) {\n \n // Initalise items_received and is_paid if not set\n if(!isset($order['items_received'])) $order['items_received'] = 'n';\n if(!isset($order['is_paid'])) $order['is_paid'] = 'n';\n\n // Set items_received to y if set\n if(1 == $order['items_received']) {\n $order['items_received'] = 'y';\n }\n\n // Set is_paid to y if set\n if(1 == $order['is_paid']) {\n $order['is_paid'] = 'y';\n }\n\n if( $order['items_received'] == 'y' && (count($currentlines) == 0 && count($orderLines) == 0) ) {\n return array(\n 'status' => 'fail',\n 'message' => 'Order line empty, how could we receive the goods?'\n );\n }\n\n // Update stock order\n StockOrder::where('stock_order_id', $order_id)\n ->update([\n 'vendor_id' => $order['vendor_id'], \n 'tax_id' => $order['tax_id'],\n 'items_received' => $order['items_received'],\n 'is_paid' => $order['is_paid']\n ]);\n\n } else {\n $return = array(\n 'status' => 'fail',\n 'message' => 'Vendor or Tax value not set'\n );\n } \n\n // Save OrderLines\n if($orderLines) {\n foreach($orderLines as $orderLine) {\n $stockOrderLine = new StockOrderLine(\n array(\n 'product_id' => $orderLine['product_id'],\n 'stock_order_id' => $order_id,\n 'quantity' => $orderLine['quantity_on_hand']\n )\n );\n\n // Save new stock order line\n $stockOrderLine->save();\n\n // Amend product with new quantity on hand\n if(isset($order['items_received'])) {\n if($order['items_received']) {\n // Find product to update\n $product = Product::find($orderLine['product_id']);\n\n if(empty($product->quantity_on_hand)) {\n $product->quantity_on_hand = 0;\n }\n\n $product->quantity_on_hand += $orderLine['quantity_on_hand'];\n \n $product->save();\n }\n }\n\n }\n }\n\n $return = array(\n 'status' => 'succcess'\n );\n }", "title": "" }, { "docid": "028766bfeb0084aac7a45b9ddd15a010", "score": "0.6147101", "text": "function update_order($fid, $fdata)\n {\n $this->db->where('buyer_product_id', $fid);\n $this->db->update('buyer_products', $fdata);\n }", "title": "" }, { "docid": "b01a324e4b96363db7f73f005ce195b1", "score": "0.61414665", "text": "public function update(Request $request, Order $Order)\n {\n //\n }", "title": "" }, { "docid": "4914c28c65cb2a5a9a17dd175795cd1e", "score": "0.6129176", "text": "public function update($data)\n {\n // proceed order cancellation\n if ($data['is_canceled']) {\n // TODO: cancel request\n }\n\n // proceed parcels\n foreach ($data['parcels'] as $parcel) {\n $this->request($this->orderParcelCreateResource, $parcel['data']);\n\n $this->setParcelAsSentToWalkTheChat($parcel['entity']);\n }\n\n // proceed refunds\n foreach ($data['refunds'] as $refund) {\n $this->request($this->orderRefundResource, $refund['data']);\n\n $this->setRefundAsSentToWalkTheChat($refund['entity']);\n }\n }", "title": "" }, { "docid": "65be75f7ecbabbe5f0bbf408df08223c", "score": "0.61008114", "text": "public function update(Request $request, Order $order)\n {\n $this->canAccess('edit', Order::class);\n $request->validate([\n 'type' => 'required',\n 'branch_id' => 'required|exists:branches,id',\n 'serial' => 'required',\n 'subscription_id' => 'required_if:type,اشتراك'\n ]);\n // is paid\n $request['is_paid'] = $request['is_paid'] ? 1 : 0;\n $request['is_fast'] = $request['is_fast'] ? 1 : 0;\n\n // branch\n $branch = Branch::find($request['branch_id']);\n\n $client = Client::find($request['client_id']);\n $driver = User::find($request['driver_id']);\n\n // saving the subscription pivot for specific subscription, this is not the subscription id its the pivot id\n $subscription = $client->subscriptions()->wherePivot('id', $request['subscription_id'])->first();\n $request['pivot_id'] = $request['subscription_id'];\n $request['subscription_id'] = $subscription ? $subscription->id : null;\n\n\n // is Paid\n $request['is_paid'] = $request['is_paid'] ? 1 : 0;\n $total = 0;\n if (!$request['total']) {\n foreach ((array)$request['ids'] as $index => $id) {\n $piece = PriceList::find($id);\n $total += $request['counts'][$index] * $piece[$request['types'][$index]];\n }\n foreach ((array)$request['newNames'] as $index => $name) {\n $total += $request['newCounts'][$index] * $request['newPrices'][$index];\n }\n $request['total'] = $total;\n }\n if (!$request['number_of_Pieces']) {\n $request['number_of_Pieces'] = count((array)$request['ids']) + count((array)$request['newNames']);\n }\n\n if ($request['type'] == 'اشتراك') {\n if ($subscription) {\n if ($subscription->type == 'قطعة') {\n $subscription->pivot->remaining_pieces -= $request['number_of_Pieces'];\n } elseif ($subscription->type == 'مبلغ') {\n $subscription->pivot->credit -= $request['total'];\n } else {\n if (now() > $subscription->pivot->start_date && now() < $subscription->pivot->end_date) {\n if ($subscription->pieces != 0) {\n $subscription->pivot->remaining_pieces -= $request['number_of_Pieces'];\n }\n } else {\n $this->actionFailed('الاشتراك منتهي');\n return redirect()->back();\n }\n }\n $subscription->pivot->save();\n } else {\n $this->actionFailed('لا يوجد اشتراك صالح');\n return redirect()->back();\n }\n }\n $request['total'] -= $request['discount'];\n $order->update($request->except(['ids', 'counts', 'types', 'newNames', 'newTypes', 'newCounts', 'newPrices']));\n\n $client->decrement('credit', $order['total']);\n\n foreach ((array)$request['ids'] as $index => $id) {\n $piece = PriceList::find($id);\n $order->pieces()->attach($id, [\n 'price' => $piece[$request['types'][$index]] * $request['counts'][$index],\n 'count' => $request['counts'][$index],\n 'type' => $request['types'][$index],\n 'name' => $piece['item'],\n ]);\n }\n foreach ((array)$request['newNames'] as $index => $name) {\n OrderPieces::create([\n 'order_id' => $order->id,\n 'name' => $name,\n 'price' => $request['newPrices'][$index],\n 'count' => $request['newCounts'][$index],\n 'type' => $request['newTypes'][$index],\n ]);\n }\n\n $this->actionSuccess();\n return redirect()->route('admin.orders.index');\n }", "title": "" }, { "docid": "12999386b492e92105fa3640197f99dc", "score": "0.6100736", "text": "public function update(Request $request)\n {\n //\n $this->validate($request,[\n 'ord_date'=>'required',\n 'weight'=>'required',\n 'price'=>'required',\n 'paid'=>'required',\n 'status'=>'required',\n 'client_id'=>'required'\n ]);\n\n $order = Orders::find($request->input('id'));\n $order->code = $request->input('code');\n if ($order->code == null){\n $order->code = Auth()->id();\n $latestOrder = Orders::orderBy('created_at','DESC')->first();\n $order->code = 'INV-'.str_pad($latestOrder->id + 1, 8, \"0\", STR_PAD_LEFT);\n }\n $date = date('Y-m-d H:i:s', strtotime($request->input('ord_date')));\n $order->ord_date = $date;\n $order->weight = $request->input('weight');\n $order->discount = $request->input('discount');\n $order->price = $request->input('price');\n $order->total = $request->input('total');\n $order->paid = $request->input('paid');\n $order->status = $request->input('status');\n $order->client_id = $request->input('client_id');\n $order->update();\n\n return redirect(route('order'))->with('success','Created successfully!');\n }", "title": "" }, { "docid": "bc0aaac846b730cedb2e09c846110aae", "score": "0.6098747", "text": "function create_new_listing_commerce_order_update($order) {\r\n\r\n if ($order->status == \"pending\" && isset($order->uid)) {\r\n\r\n $licenses = commerce_license_get_order_licenses($order);\r\n\r\n foreach ($licenses as $license) {\r\n\r\n // If license_limit is not set\r\n if ($license->commerce_license_limit == array()) {\r\n\r\n // Find quota limit from commerce_product\r\n foreach ($order->commerce_line_items['und'] as $line) {\r\n $line_item = commerce_line_item_load($line['line_item_id']);\r\n $product_id = $line_item->commerce_product['und'];\r\n }\r\n $quota_limit = (commerce_product_load($product_id[0]['product_id'])->cl_node_quota['und'][0]['value']);\r\n\r\n // Save license with the quota limit as default limit value\r\n $license->wrapper->commerce_license_limit->set($quota_limit);\r\n $license->wrapper->save();\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "8c4e66db3866ad3bcb312dc4cd84c733", "score": "0.60968196", "text": "public function update(OrderRequest $request, Order $order)\n {\n $orders = Order::findOrFail($order->id);\n $orders->name= $request->name;\n $orders->surname= $request->surname;\n $orders->phone_number= $request->phoneNumber;\n $orders->address= $request->address;\n $orders->cities_id= $request->city;\n $orders->product_code= $request->productCode;\n $orders->price= $request->price;\n $orders->statuses_id= $request->status;\n $orders->note= $request->note;\n $orders->payment_methods_id= $request->paymentMethod;\n $orders->control_allowed= $request->has('controlAllowed');\n $orders->payment_on_door= $request->has('paymentOnDoor');\n $orders->save();\n return redirect()->route('orders.index')->with('success', \" Başarılı bir şekilde sipariş güncellendi.\");\n }", "title": "" }, { "docid": "7bed0f7347c22919957cb2f5a3cd9424", "score": "0.60875785", "text": "public function updatePurchaseOrder($data)\n {\n\n $this->updatePurchase($data['purchase_id'], $data);\n $commandeLine = $this->getPurchase($data[\"purchase_id\"])[0]['order_line'];\n for ($i = 0; $i < count($commandeLine); $i++) {\n $this->odoo->delete('purchase.order.line', $commandeLine[$i]);\n\n }\n\n if (isset($data['article'])) {\n $this->addCommandeLine($data, $data['purchase_id']);\n }\n }", "title": "" }, { "docid": "9ac669cc3fddaf443d6728c32ee75dc0", "score": "0.60767126", "text": "protected function _update($order, $status) {\n\n\t}", "title": "" }, { "docid": "a4d584ed82c9976a05800d4ed5777167", "score": "0.60756856", "text": "protected function save_order_meta_fields($order, $request)\n\t{\n\t\tparent::save_order_meta_fields($order, $request);\n\n\t\tupdate_post_meta($order->id, '_payment_due_date', $request->payment->due_date);\n\t\tupdate_post_meta($order->id, '_boleto_url', $request->payment->boleto_url);\n\t\tupdate_post_meta($order->id, '_boleto_barcode', $request->payment->boleto_barcode);\n\t}", "title": "" }, { "docid": "9b9a6f0ebf55e017012285b3446671d8", "score": "0.6033849", "text": "public static function update_order_review()\n {\n }", "title": "" }, { "docid": "76015137f2312fbf0f4c0fe18bcac39a", "score": "0.60315275", "text": "public function saveChanges() {\n $this->pdo->queryUpdate(\"rrshop_orders\",\n [\"state\" => $this->state,\n \"items\" => $this->items,\n \"payment\" => $this->payment,\n \"shipping\" => $this->shipping,\n \"note\" => $this->note,\n \"totalPrice\" => $this->totalPrice,\n \"shipID\" => $this->shipID],\n \"orderID = :oid\",\n [\"oid\" => $this->orderID]\n );\n }", "title": "" }, { "docid": "9bf4a19afc25bb3ae085e5f740adab77", "score": "0.6023223", "text": "protected function updateOrderDataCompletion($new_orderdata, $old_status, $old_orderdata) {\n }", "title": "" }, { "docid": "3644a6a26b56915672285b2d1456f609", "score": "0.6014359", "text": "public function setOrders(?array $orders): void\n {\n $this->orders['value'] = $orders;\n }", "title": "" }, { "docid": "eaffd42ef79071c7c4b25bc22baa1a12", "score": "0.6008676", "text": "protected function update_post_meta(&$order)\n {\n }", "title": "" }, { "docid": "335d344f303a332f6046e940b58fddf3", "score": "0.6006785", "text": "public function updateOrder() {\n $this->autoRender = false;\n if (isset($_GET) && !empty($_GET)) {\n foreach ($_GET as $key => $val) {\n $this->Item->updateAll(array('position' => $val), array('id' => $this->Encryption->decode($key)));\n }\n }\n }", "title": "" }, { "docid": "eaffd42ef79071c7c4b25bc22baa1a12", "score": "0.60061234", "text": "protected function update_post_meta(&$order)\n {\n }", "title": "" }, { "docid": "5208bcc7b178adc82be7d67adda1a5a7", "score": "0.6001229", "text": "public function updateData()\n {\n }", "title": "" }, { "docid": "aae07715370ca2bb3a287f24a43c00e8", "score": "0.5997827", "text": "public function update(Request $request, Order $order)\n {\n $fields = $request->all();\n foreach ($fields as $field => $value) {\n if (isset($task[$field])) { \n $order[$field] = $value;\n } else {\n $message[$field] = 'do not exist';\n }\n }\n $order->save();\n if (!isset($message)) {\n // return response()->json([\n // $order,\n // ], 200);\n return self::index();\n } else {\n return response()->json(['error'=>true, 'message'=>$message], 401);\n }\n }", "title": "" }, { "docid": "49ed21b836581dd024ba7c92c16d3801", "score": "0.59845674", "text": "public function orderUpdate()\n {\n\n /**\n * @var Amazon_MCF_Helper_Data $helper\n */\n $helper = Mage::helper('amazon_mcf');\n\n $stores = Mage::app()->getStores(true);\n /**\n *\n *\n * @var Amazon_MCF_Model_Service_Outbound $service\n */\n $service = Mage::getSingleton('amazon_mcf/service_outbound');\n\n\n foreach ($stores as $store) {\n if (!$helper->isEnabled($store)) {\n continue;\n }\n\n /**\n * @var \\Mage_Sales_Model_Resource_Order_Collection $ordersToProcess\n */\n $ordersToProcess = Mage::getResourceModel(\n 'sales/order_collection'\n );\n $ordersToProcess\n ->addFieldToFilter('store_id', $store->getId())\n ->addFieldToFilter(\n 'state', array(\n 'in' => array(\n Mage_Sales_Model_Order::STATE_NEW,\n Mage_Sales_Model_Order::STATE_PROCESSING,\n ),\n )\n )\n ->addFieldToFilter('fulfilled_by_amazon', true)\n ->addFieldToFilter(\n 'amazon_order_status', array(\n 'in' => array(\n Amazon_MCF_Helper_Data::ORDER_STATUS_RECEIVED,\n Amazon_MCF_Helper_Data::ORDER_STATUS_PLANNING,\n Amazon_MCF_Helper_Data::ORDER_STATUS_PROCESSING,\n ),\n )\n );\n\n if ($ordersToProcess->count()) {\n $helper->logOrder(\n 'Beginning Order Update for '\n . $ordersToProcess->count() . ' orders.'\n );\n }\n\n foreach ($ordersToProcess as $order) {\n\n $helper->logOrder(\n 'Updating order #' . $order->getIncrementId()\n );\n /**\n * @var \\FBAOutboundServiceMWS_Model_GetFulfillmentOrderResponse $result\n */\n $result = $service->getFulfillmentOrder($order);\n\n if (!empty($result)) {\n $fulfillmentOrderResult = $result\n ->getGetFulfillmentOrderResult();\n\n // Amazon Statuses: RECEIVED / INVALID / PLANNING / PROCESSING\n // / CANCELLED / COMPLETE / COMPLETE_PARTIALLED / UNFULFILLABLE\n $amazonStatus = $fulfillmentOrderResult->getFulfillmentOrder()\n ->getFulfillmentOrderStatus();\n\n $helper->logOrder(\n 'Status of order #'\n . $order->getIncrementId() . ': ' . $amazonStatus\n );\n\n if (in_array(\n $amazonStatus, array(\n 'COMPLETE',\n 'COMPLETE_PARTIALLED',\n )\n )\n ) {\n $this->magentoOrderUpdate($order, $fulfillmentOrderResult);\n } elseif (in_array(\n $amazonStatus, array(\n 'CANCELLED',\n 'UNFULFILLABLE',\n 'INVALID',\n )\n )\n ) {\n $this->cancelFBAShipment(\n $order, $fulfillmentOrderResult, strtolower($amazonStatus)\n );\n\n break;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "db471ff52dfbb8abcb844d8c749a7b8a", "score": "0.5984112", "text": "public function update(Request $request, Order $order)\n {\n try {\n\n $dataOrders = $request->all();\n\n foreach($dataOrders as $orderItem){\n $flight = Order::find($orderItem['id']);\n $flight->status = 2;\n $flight->save();\n }\n\n return true;\n\n } catch (Throwable $e) {\n report($e);\n\n return false;\n }\n }", "title": "" }, { "docid": "a87261db00119ecf90b163f57b9f3028", "score": "0.5969219", "text": "public function update(Request $request, Order $order)\n {\n // return $order;\n }", "title": "" }, { "docid": "f50a26ae03c626c6e4fd9c0854860d9b", "score": "0.59623986", "text": "protected function setFields($order, $fields, $prefix)\n {\n $attributes = [];\n foreach ($fields as $field => $value) {\n $column = $prefix.'_'.$field;\n if (! $order->getAttribute($column)) {\n $attributes[$column] = $value;\n }\n }\n $order->fill($attributes);\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "10e5b920b787eefa7c07465d7ff538b8", "score": "0.0", "text": "public function run()\n {\n //\n DB::table('d_estados')->insert([\n 'c_estado' => '04',\n 'd_estado' => 'Campeche',\n ]);\n DB::table('d_estados')->insert([\n 'c_estado' => '05',\n 'd_estado' => 'Coahuila de Zaragoza',\n ]);\n }", "title": "" } ]
[ { "docid": "963776365fb19044e27fa4db733ae2fd", "score": "0.80741113", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // factory(App\\User::class, 1001)->create()->each(function ($user) {\n // $user->roles()->attach([4]);\n // });\n\n // factory(App\\Model\\Listing\\Listing::class, 1000)->create()->each(function ($listing) {\n // for ($i=1; $i < rand(1, 10); $i++) { \n // $listing->categories()->attach([rand(1, 1719)]);\n // } \n // });\n\n //factory(App\\Model\\Category\\Category::class, 1720)->create();\n\n //factory(App\\Model\\Listing\\Ratings::class, 1000)->create();\n factory(App\\Model\\Listing\\Reviews::class, 7500)->create();\n }", "title": "" }, { "docid": "0106cc017f1041544cb660c0b7b15aa4", "score": "0.80632365", "text": "public function run()\n {\n\n // $this->call(UsersTableSeeder::class);\n factory(App\\Party::class, 50)->create();\n factory(App\\Parcel::class, 100)->create();\n factory(App\\Transfer::class, 200)->create();\n\n DB::table('document_type')->insert([\n 'name' => 'Quick Claim Deed'\n ]);\n DB::table('document_type')->insert([\n 'name' => 'Warranty Deed'\n ]);\n DB::table('document_type')->insert([\n 'name' => 'Other Deed'\n ]);\n\n }", "title": "" }, { "docid": "e58d26f8aeda30b8582ea97455c145f1", "score": "0.79885", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('categories')->truncate();\n DB::table('tags')->truncate();\n\n factory(App\\User::class,10)->create();\n $users = App\\User::all();\n factory(App\\Post::class,20)->make()->each(function($post)use($users){\n // dd($users->random()->id);\n $post->user_id = $users->random()->id;\n $post->save();\n });\n factory(App\\Tag::class,10)->create();\n $tags = App\\Tag::all();\n App\\Post::all()->each(function($post)use($tags){\n $post->tags()->sync($tags->random(rand(1,3))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "e2ab26233d4e02ab726b5051b8407cc4", "score": "0.7971806", "text": "public function run() {\n\t\t\n\t\t$this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\t\t\n\t\t//factory(User::class,10)->create();\n\t\t$tags = factory('App\\Tag',8)->create();\n\t\t$categories = factory('App\\Category',5)->create();\n\t\t\n\t\tfactory('App\\Post',15)->create()->each(function($post) use ($tags) {\n\t\t\t$post->comments()->save(factory('App\\Comment')->make());\n\t\t\t$post->categories()->attach(mt_rand(1,5));\n\t\t\t$post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n\t\t\t});\n\t\t\n\t\t}", "title": "" }, { "docid": "f9793248863f4c34dbb3819cb4517afd", "score": "0.79601896", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $ath = Athlete::create([\n 'name' => 'Carlos',\n 'surname' => 'Cebrecos',\n 'genre' => Genre::M,\n 'role' => 'Velocista',\n 'habilities' => '100 mll - 200 mll',\n 'license' => 'CT-19433',\n 'date_birth' => '1993-08-23',\n 'active' => True\n ]);\n\n Velocity::create([\n 'athlete_id' => $ath->id,\n 'category' => Category::PR,\n 'track' => '200mll',\n 'result' => '00:00:21.970',\n 'place' => 'San Sebastián',\n 'date' => '2013-02-11',\n 'field' => 'PC'\n ]);\n \n factory(App\\Athlete::class, 12)->create()->each(function ($u){\n $u->velocities()->save(factory(App\\Velocity::class)->make());\n $u->competitions()->save(factory(App\\Competition::class)->make());\n });\n }", "title": "" }, { "docid": "5b7510aab66d08421776839e939b8736", "score": "0.7947554", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n DB::table('users')->insert([\n 'name' =>\"locphan\",\n 'email' => 'locphan.edu.@gmail.com',\n 'password' => Hash::make('12344321'),\n ]);\n\n DB::table('tags')->insert([\n 'name' =>\"HL\"\n ]);\n DB::table('tags')->insert([\n 'name' =>\"AI\"\n ]);\n\n DB::table('categories')->insert([\n 'name' =>\"Technology\"\n ]);\n DB::table('categories')->insert([\n 'name' =>\"Science\"\n ]);\n }", "title": "" }, { "docid": "71b82164ac0d4793056f9cd6e930fd2b", "score": "0.7930282", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\n $tags = factory('App\\Tag', 8)->create();\n $categories = factory('App\\Category', 5)->create();\n\n factory('App\\Post', 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory('App\\Comment')->make());\n $post->categories()->attach(mt_rand(1,5));\n $post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "9172ae0257f26680f6efc009f6e63b7c", "score": "0.7916804", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph \n ]);\n\t}\n \n\n }", "title": "" }, { "docid": "5bfaf90476324edc67c90adf206a9eca", "score": "0.789088", "text": "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(ContactsTableSeeder::class);\n\n\n DB::table('users')->insert([\n 'name' => Str::random(10),\n 'email' => Str::random(10).'@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n\n DB::table('posts')->insert([\n 'post_id' => 1,\n 'post_content' => Str::random(10),\n 'post_title' => Str::random(10),\n 'post_status'=> Str::random(10),\n 'post_name'=> Str::random(10),\n 'post_type'=> Str::random(10),\n 'post_category'=> Str::random(10),\n 'post_date'=> '2020-03-13 12:00', \n \n ]);\n }", "title": "" }, { "docid": "9ca436f3408c7ae5cd47415014ebf341", "score": "0.78865266", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Book::truncate();\n \n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n $quantity= $faker->randomDigit;\n Book::create([\n 'title' => $faker->sentence,\n 'author' => $faker->firstName . \" \" . $faker->lastName,\n 'editor' => $faker->company,\n 'price' => $faker->randomFloat(2,5,50),\n 'quantity' => $quantity,\n 'available' => $quantity != 0\n ]);\n }\n }", "title": "" }, { "docid": "c466d72cc0a5ffc2ce690349590795f2", "score": "0.7884055", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n $programas = Programa::factory(10)->create();\n $canales = Canal::factory(10)->create();\n\n foreach($programas as $programa){\n $programa->canales()->attach([\n rand(1,4),\n rand(5,8)\n ]);\n }\n\n Plan::factory(10)->create();\n\n foreach($canales as $canal){\n $canal->plans()->attach([\n rand(1,4),\n rand(5,8)\n ]);\n }\n\n Cable::factory(10)->create();\n Internet::factory(10)->create(); \n Telefonia::factory(10)->create(); \n Paquete::factory(10)->create();\n Factura::factory(10)->create();\n\n \n }", "title": "" }, { "docid": "6b480d5190ccba10aa7f084898878fda", "score": "0.7878605", "text": "public function run()\n {\n // reset the contents table\n DB::table('contents')->truncate();\n\n // generate 10 dummy contents data\n $contents = [];\n $faker = Factory::create();\n\n for ($i = 1; $i <= 10; $i++)\n {\n $contents[] = [\n 'user_id' => rand(1, 3),\n 'cancertype_id' => rand(1, 4),\n 'treatment_stage_id' => rand(1, 5),\n 'category_id' => rand(1, 4),\n 'title' => $faker->sentence(rand(5, 10)),\n 'body' => $faker->paragraphs(rand(10, 15), true),\n ];\n }\n\n DB::table('contents')->insert($contents);\n }", "title": "" }, { "docid": "b574cee3e999997b96242d9e48e9e538", "score": "0.7860588", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n App\\User::create([\n 'name' => 'Administrador',\n 'email' => 'official.dduran@gmail.com',\n 'password' => Hash::make('abc123')\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 1',\n 'descripcion' => 'Lorem ipsum dolor sit amet 1',\n 'imagen' => '1.png',\n 'orden' => 1\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 2',\n 'descripcion' => 'Lorem ipsum dolor sit amet 2',\n 'imagen' => '2.png',\n 'orden' => 2\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 3',\n 'descripcion' => 'Lorem ipsum dolor sit amet 3',\n 'imagen' => '3.png',\n 'orden' => 3\n ]);\n }", "title": "" }, { "docid": "82184a634a30971b8da09162488cf43d", "score": "0.7855701", "text": "public function run()\n {\n // Truncate Employee table truncate before seeding\n Employee::truncate();\n \n $faker = Factory::create();\n \n foreach (range(1,50) as $index) {\n Employee::create([\n 'first_name' => $faker->firstname,\n 'last_name' => $faker->lastname,\n 'email' => $faker->unique()->safeEmail,\n 'company_id' => $faker->numberBetween($min = 1, $max = 10),\n 'phone' => $faker->numerify('##########'),\n 'created_at' => $faker->dateTime($max = 'now', $timezone = null),\n 'updated_at' => $faker->dateTime($max = 'now', $timezone = null)\n ]);\n }\n }", "title": "" }, { "docid": "58dde04e1aff533900aaa1de2e3c771b", "score": "0.78546256", "text": "public function run()\n {\n // $this->call(ProfileSeeder::class);\n // $this->call(UserSeeder::class);\n \\DB::table('profiles')->insert(\n ['name' => 'admisnitrador']);\n\n\n \\DB::table('users')->insert(\n ['username' =>\t'Administrador',\n 'email'\t\t =>\t'Administrador@hotmail.com',\n 'password' =>\tbcrypt('1234'),\n 'act' \t\t =>\t'1',\n 'perfil_id' => '1']);\n\n \\DB::table('locations')->insert(\n ['name' =>\t'Avellaneda']);\n\n \\DB::table('streets')->insert(\n ['name' =>\t'Calle Falsa',\n 'num_from' =>\t'0',\n 'num_to' =>\t'2000',\n 'state' =>\t'Buenos Aires',\n 'locations_id' =>\t'1']);\n\n \\DB::table('ranks')->insert(\n ['name' =>\t'Bombero']);\n\n }", "title": "" }, { "docid": "a4fd61f33599e71641de766104f5ee0f", "score": "0.7852041", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n $data = [];\n\n $users = App\\User::pluck('id')->toArray();\n \n for($i = 1; $i <= 100 ; $i++) {\n $title = $faker->sentence(rand(6,10));\n array_push($data, [\n 'title' => $title,\n 'sub_title' => $faker->sentence(rand(10, 15)),\n 'slug' => Str::slug($title),\n 'body' => $faker->realText(4000),\n 'published_at' => $faker->dateTime(),\n 'user_id' => $faker->randomElement($users),\n ]);\n }\n \n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "039707eb1db799d2a572e0887a732e6f", "score": "0.7851623", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Country::truncate();\n State::truncate();\n City::truncate();\n $countries = [\n \t['name'=>'India'],\n \t['name'=>'US']\n ];\n $states =[\n \t['country_id'=>1,'name'=>'Gujrat'],\n \t['country_id'=>1,'name'=>'Maharashtra'],\n \t['country_id'=>2,'name'=>'New York'],\n ];\n $cities=[\n \t['state_id'=>1,'name'=>'Rajkot'],\n \t['state_id'=>1,'name'=>'Ahmedabad'],\n \t['state_id'=>2,'name'=>'Mumbai'],\n \t['state_id'=>3,'name'=>'New York'],\n ];\n\n Country::insert($countries);\n State::insert($states);\n City::insert($cities);\n\n }", "title": "" }, { "docid": "9c1ad9c9a665a5e45b19a020f38bf940", "score": "0.78444725", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n DB::table('posts')->insert(['title' => 'First post','Slug' => 'First_post','user_id' => 1,'text' =>$faker->text]);\n DB::table('posts')->insert(['title' => 'Second post','Slug' => 'Second_post','user_id' => 1,'text' =>$faker->text]);\n DB::table('posts')->insert(['title' => 'Thirth post','Slug' => 'Thirth_post','user_id' => 1,'text' =>$faker->text]);\n }", "title": "" }, { "docid": "8033d2ffe9933ed1497d756039c9da85", "score": "0.78415996", "text": "public function run()\n {\n $this->call(ArticlesTableSeeder::class);\n $this->call(RecommendsTableSeeder::class);\n $this->call(HotsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CommentsSeeder::class);\n DB::table('categories')->insert([\n 'name' => \"读书\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"article\",\n ]);\n DB::table('categories')->insert([\n 'name' => \"编程\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"article\",\n ]);\n DB::table('categories')->insert([\n 'name' => \"javascript\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"wiki\",\n ]);\n }", "title": "" }, { "docid": "ed2ed28b5f19c08009fb043458a6ea1d", "score": "0.78394836", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('MST_SALES')->delete();\n foreach (range(1, 100) as $value) {\n DB::table('MST_SALES')->insert([\n 'id' => $value,\n 'sum_price' => rand(2000,40000),\n 'name' => $faker->name(),\n 'sex' => rand(1, 2),\n 'post_num' => $faker->postcode(),\n 'address' => $faker->address(),\n 'email' => $faker->email(),\n 'created_at' => $faker->dateTime(),\n 'user_id' => NULL\n ]);\n }\n }", "title": "" }, { "docid": "6b5f92492d382fd188a9ad7effd7e348", "score": "0.7829292", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\n 'id' => 1,\n 'name' => 'Administrator',\n 'description' => 'Full access to create, edit, and update',\n ]);\n Role::create([\n 'id' => 2,\n 'name' => 'Customer',\n 'description' => 'A standard user that can have a licence assigned to them. No administrative features.',\n ]);\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@admin.com',\n 'password' => bcrypt('admin'),\n 'role_id' => 1,\n ]);\n User::create([\n 'name' => 'User',\n 'email' => 'user@user.com',\n 'password' => bcrypt('user'),\n 'role_id' => 2,\n ]);\n }", "title": "" }, { "docid": "7fce381c2d283331a49697d2b2a44912", "score": "0.78287804", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n Photo::create(['route_photo' => 'usuarioAnonimo.jpg']);\n Miniature::create(['route_miniature' => 'maxresdefault.jpg']);\n Video::create(['route_video' => 'https://www.youtube.com/embed/ZCsS1GGPrWU']);\n Post::factory(100)->create();\n Commentary::factory(200)->create();\n }", "title": "" }, { "docid": "f40e64bcdfa16f568b70a3375936cf0c", "score": "0.78266394", "text": "public function run()\n {\n $this->seeds([\n KategoriKualifikasi::class => ['kepegawaian/kategori.csv', 13],\n Jabatan::class => ['kepegawaian/jabatans.csv', 9],\n Kualifikasi::class => ['kepegawaian/kualifikasis.csv', 167],\n Pegawai::class => ['kepegawaian/pegawais.csv', 301],\n ]);\n }", "title": "" }, { "docid": "a23bab42fc12cca6d1a9a36e50f365f4", "score": "0.78245854", "text": "public function run()\n {\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('ratings')->truncate();\n \n // Rating::create([\n // 'id' => 1,\n // 'givenBy' => 2,\n // 'givenTo' => 3,\n // 'ratingValue' => 5\n // ]);\n\n Rating::create([\n 'id' => 2,\n 'givenBy' => 2,\n 'givenTo' => 4,\n 'ratingValue' => 3\n ]);\n\n Rating::create([\n 'id' => 3,\n 'givenBy' => 2,\n 'givenTo' => 5,\n 'ratingValue' => 4\n ]);\n\n Rating::create([\n 'id' => 4,\n 'givenBy' => 6,\n 'givenTo' => 5,\n 'ratingValue' => 3\n ]);\n \n Rating::create([\n 'id' => 1,\n 'givenBy' => 6,\n 'givenTo' => 3,\n 'ratingValue' => 5\n ]);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "739c29c39e152a09634953cafca33ad9", "score": "0.7820099", "text": "public function run()\n\t{\n\t\t// DB::table('models')->delete();\n\n\t\t$models = array(\n\t\t\tarray('name' =>'Pamela' ,'age' => '20', 'description' =>'El video fue dirigido por Stephen Schuster. Comienza con un avión aterrizando y chicas en bikini, bronceándose y nadando en la playa.' ),\n\t\t\tarray('name' =>'Tania' ,'age' => '24', 'description' =>'l sencillo debutó el 6 de agosto de 2009, en el número ocho en la lista Swedish Singles Chart.' ),\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('models')->insert($models);\n\t}", "title": "" }, { "docid": "717334b3d328066c91d6d64c0cb10819", "score": "0.78193015", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class,3)->create();\n// $carteiras = factory(App\\Carteira::class,6)->create();\n $ativos = factory(App\\Ativo::class,1)->create();\n// $trades = factory(App\\Trade::class,5)->create();\n// $tradeEntradas = factory(App\\TradeEntrada::class,20)->create();\n// $tradeSaidas = factory(App\\TradeSaida::class,20)->create();\n }", "title": "" }, { "docid": "e987cd48edea67e81cb2403a2e69c023", "score": "0.7818417", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n $this->call(EmployeeTableSeeder::class);\n // $this->call(PartnerTableSeeder::class);\n $this->call(OtherTableSeeder::class);\n $this->call(TrafficSignSeeder::class);\n App::truncate();\n App::create([\n 'name' => 'FASKES PROV',\n 'logo' => 'logo.png'\n ]);\n }", "title": "" }, { "docid": "496536ac82829ff2c3488b1bc428a7f1", "score": "0.7813514", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // factory('App\\StudentUser', 100)->create();\n // factory('App\\Music', 1000)->create();\n // factory('App\\RobotOrder', 100)->create();\n // factory('App\\UserAction', 1000)->create();\n // factory('App\\Practice', 20)->create();\n }", "title": "" }, { "docid": "42081848f882af09bfd4cf0f8efe8eb5", "score": "0.7813085", "text": "public function run()\n {\n // $faker = Faker::create();\n\n // $dataClass = DB::table('users')->pluck('id')->toArray();\n // $dataClass = DB::table('movies')->pluck('id')->toArray();\n\n // foreach(range(1, 100) as $index) {\n // DB::table('movie_user')->insert([\n // 'user_id' => $faker->randomElement($dataClass),\n // 'movie_id' => $faker->randomElement($dataClass)\n // ]);\n // }\n }", "title": "" }, { "docid": "630b1e277c10f7d8cf32cba237b4da38", "score": "0.78113014", "text": "public function run()\n {\n \\DB::table('users')->delete();\n \\DB::table('answers')->delete();\n \\DB::table('questions')->delete();\n\n $user = new \\App\\User();\n $user->name = 'John Doe';\n $user->email = 'john@doe.com';\n $user->password = Hash::make('password');\n $user->save();\n\n // $this->call(UserSeeder::class);\n factory(App\\User::class, 3)->create()\n ->each(function($u) {\n $u->questions()\n ->saveMany(\n factory(App\\Question::class, rand(1, 5))->make()\n )\n ->each(function($q) {\n $q->answers()\n ->saveMany(\n factory(App\\Answer::class, rand(1, 5))->make()\n );\n });\n });\n }", "title": "" }, { "docid": "e5e2525215ec8bf3881f1c6e341aec83", "score": "0.78056204", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Brand::truncate();\n Product::truncate();\n Address::truncate();\n PaymentMethod::truncate();\n Order::truncate();\n\n $users = 1000;\n $categories = 20;\n $brands = 15;\n $products = 1000;\n $address = 3000;\n $paymentMethod = 100;\n $order = 100;\n $orderDetail = 500;\n\n factory(User::class, $users)->create();\n factory(Category::class, $categories)->create();\n factory(Brand::class, $brands)->create();\n factory(Address::class, $address)->create();\n factory(Product::class, $products)->create();\n factory(PaymentMethod::class,$paymentMethod)->create();\n factory(Order::class,$order)->create();\n factory(OrderDetails::class,$orderDetail)->create();\n }", "title": "" }, { "docid": "33db14990dd20205cbf0ed23ac91d8a5", "score": "0.77961797", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Models\\Blog\\Category::class,10)->create();\n factory(\\App\\Models\\Blog\\Post::class,100)->create();\n $this->call(PostsCategoriesTableSeeder::class);\n }", "title": "" }, { "docid": "7d4a8acce261539d99f3a600a7fded39", "score": "0.779529", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Stocks\n $stocks = factory(Stock::class, 5)->create();\n\n $categories = factory(Category::class, 10)->create();\n\n $products = factory(Product::class, 500)->create();\n\n $products->each(function (Product $product) use ($categories, $stocks) {\n $randomCategories = $categories->random(3);\n $randomStocks = $stocks->random(rand(1, 3));\n\n $product->categories()->attach($randomCategories->pluck('id'));\n\n // associate with stocks\n foreach ($randomStocks as $stock) {\n $product->stocks()->attach($stock->id, [\n 'products_count' => rand(10, 100)\n ]);\n }\n });\n\n // Empty categories\n factory(Category::class, 5)->create();\n }", "title": "" }, { "docid": "8a2ce50a7068a74d62b9970c1f9302e3", "score": "0.77908266", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $value) {\n \\App\\Models\\posts::create([\n 'title' => $faker->text('20'),\n 'content' => $faker->text('500'),\n 'user_id'=> \\App\\Models\\Users::inRandomOrder()->first()->id,\n 'cate_id'=> \\App\\Models\\Catogery::inRandomOrder()->first()->id\n ]);\n\n }\n }", "title": "" }, { "docid": "6e3d9c728792a048ad7cb291d3db22d9", "score": "0.7788644", "text": "public function run()\n {\n /**\n * This is a dummy data seeder. All the information is here for demonstration purposes.\n */\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n DB::statement('TRUNCATE TABLE assignments');\n \n $data = [\n ['id' => 1, 'name' => 'Biología', 'created_at' => now()],\n ['id' => 2, 'name' => 'Geografía', 'created_at' => now()],\n ['id' => 3, 'name' => 'Historia', 'created_at' => now()],\n ['id' => 4, 'name' => 'Lengua y Literatura', 'created_at' => now()],\n ['id' => 5, 'name' => 'Matemáticas', 'created_at' => now()],\n ['id' => 6, 'name' => 'Educación Física', 'created_at' => now()],\n ['id' => 7, 'name' => 'Música', 'created_at' => now()],\n ['id' => 8, 'name' => 'Educación Plástica', 'created_at' => now()],\n ['id' => 9, 'name' => 'Computación', 'created_at' => now()],\n ['id' => 10, 'name' => 'Idioma', 'created_at' => now()]\n ];\n\n DB::table('assignments')->insert($data);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "4c9d16245dfaaf355245ed6f6be2592c", "score": "0.7787577", "text": "public function run()\n {\n\n $this->call(RolSeeder::class);\n\n \\App\\Models\\User::factory(10)->create();\n\n User::create([\n 'name' => 'gabriel',\n 'email' => 'g@hotmail.com',\n 'password' => bcrypt('12345678')\n ])->assignRole('Administrador');\n\n Categoria::factory(4)->create();\n Almacen::factory(3)->create();\n Kit::factory(5)->create();\n Proveedor::factory(4)->create();\n Producto::factory(40)->create();\n Empleado::factory(5)->create();\n Proyecto::factory(5)->create();\n $this->call(PrestamoSeeder::class);\n\n\n\n // Proveedor::factory(4)->create();\n // $this->call(ProductoSeeder::class);\n }", "title": "" }, { "docid": "88446e1bf24041ad962665525b97b12d", "score": "0.77866447", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = [\n [\n 'name' => 'nur',\n 'email' => 'nur@gmail.com'\n ],\n [\n 'name' => 'monjur',\n 'email' => 'monjur@gmail.com'\n ],\n [\n 'name' => 'farhana',\n 'email' => 'farhana@gmail.com'\n ],\n [\n 'name' => 'towhid',\n 'email' => 'towhid@gmail.com'\n ],\n [\n 'name' => 'majedul',\n 'email' => 'majedul@gmail.com'\n ],\n [\n 'name' => 'mobarok',\n 'email' => 'mobarok@gmail.com'\n ],\n [\n 'name' => 'jahed',\n 'email' => 'jahed@gmail.com'\n ],\n [\n 'name' => 'jb',\n 'email' => 'jb@gmail.com'\n ],\n ];\n foreach ($users as $user) {\n factory(User::class)->create([\n 'name' => $user['name'],\n 'email' => $user['email']\n ]);\n }\n factory(Note::class, 30)->create();\n }", "title": "" }, { "docid": "4b87096935422c5247afb2aaa8f23776", "score": "0.7780967", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $cats = factory(App\\ProductCategory::class, 3)->create()->each(function ($cat) {\n factory(App\\ProductCategory::class, 5)->create([\n 'parent_id' => $cat->id,\n ]);\n });\n factory(App\\User::class, 50)->create()->each(function ($user) use($cats) {\n factory(App\\Product::class, 2)->create([\n 'user_id' => $user->id,\n 'category_id' => $cats->random()->id,\n ]);\n });\n\n }", "title": "" }, { "docid": "3d653e15cd03e74996be098cff42dfca", "score": "0.7780808", "text": "public function run()\n {\n \\App\\Models\\Admin::factory(10)->create();\n \\App\\Models\\User::factory(10)->create();\n\n Book::create(\n [\n \"title\" => \"Self Discipline\",\n \"author\" => \"Shawn Norman\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 50,\n ]\n );\n\n Book::create(\n [\n \"title\" => \"Atomic Habits\",\n \"author\" => \"James Clear\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 20,\n ]);\n\n Book::create(\n [\n \"title\" => \"The Last Thing He Told Me\",\n \"author\" => \"Laura Dave\",\n \"publisher\" => \"Google\",\n \"year\" => 2021,\n \"stock\" => 10,\n ]\n );\n }", "title": "" }, { "docid": "f436dada1953139b05cfe23060658c72", "score": "0.7780624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(0,0) as $index) {\n \t DB::table('users')->insert([\n \t 'name' => 'Vinay Paramanand',\n \t 'email' => 'vinayparamanand@gmail.com',\n 'password' => bcrypt('vinaytest'),\n 'main_image_path'=>'/img/img.jpg',\n 'active'=>1\n ]);\n }\n\n foreach (range(0,0) as $index) {\n\t DB::table('socials')->insert([\n\t 'linkedin_url' => $faker->url,\n 'contact_email' => $faker->url,\n 'rss_feed' => $faker->text,\n\t 'quora_url' => $faker->url,\n 'contact_email' => $faker->url\n ]);\n }\n\n\n\n }", "title": "" }, { "docid": "8a56b49c8ccacd412dc12ad6eb4f1c17", "score": "0.77718633", "text": "public function run()\n {\n User::factory(10)->create();\n Category::factory(4)->create();\n SubCategory::factory(4)->create();\n Color::factory(4)->create();\n Size::factory(4)->create();\n Product::factory(4)->create();\n ProductQuantity::factory(4)->create();\n Banner::factory(4)->create();\n Favourite::factory(4)->create();\n Gallery::factory(4)->create();\n City::factory(4)->create();\n Region::factory(4)->create();\n District::factory(4)->create();\n Address::factory(4)->create();\n RateComment::factory(4)->create();\n\n $this->call(PermissionsTableSeeder::class);\n $this->call(UpdatePermissionsTableSeeder::class);\n $this->call(SettingTableSeeder::class);\n $this->call(AddTaxToSettingTableSeeder::class);\n\n }", "title": "" }, { "docid": "defbf35392fe9a4d769e6b94f0fcd99b", "score": "0.77679706", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\tPost::truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\t\tforeach(range(1, 30) as $index)\n\t\t{\n\t\t\t// MYSQL\n\t\t\t$userId = User::orderBy(DB::raw('RAND()'))->first()->id;\n\n\t\t\t// SQLITE\n\t\t\t// $userId = User::orderBy(DB::raw('random()'))->first()->id;\n\n\t\t\tPost::create([\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'title' => $faker->name($gender = null|'male'|'female'),\n\t\t\t\t'body' => $faker->catchPhrase\n\t\t\t]);\n\t\t}\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "88876dd02f4a05f504ca51338370b797", "score": "0.7764862", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\User::class, 2)->create();\n factory(App\\Type::class, 8)->create();\n factory(App\\Room::class, 6)->create();\n \n\n // foreach($rooms as $room){\n // $room->owners()->attach(\n // $owners->random(random_int(1,3))\n // );\n // }\n \n }", "title": "" }, { "docid": "373927e90cd67705d12a2a2602b9c28a", "score": "0.77618325", "text": "public function run()\n {\n $faker = Factory::create();\n\n Product::truncate();\n Category::truncate();\n\n foreach (range(1, 10) as $key => $value) {\n Category::create([\n 'name' => $faker->word\n ]);\n }\n\n foreach (range(1,10) as $key => $value) {\n Product::create([\n 'name' => $faker->word,\n 'stock' => $faker->randomDigit(3),\n 'description' => $faker->paragraph(1),\n 'category_id' => $faker->randomDigit(2),\n 'user_id' =>$faker->randomDigit(2)\n ]);\n }\n }", "title": "" }, { "docid": "b11c80e4171d8992cf52a3d8c6ff07f3", "score": "0.77615196", "text": "public function run()\n {\n Eloquent::unguard();\n $faker = Faker::create();\n\n foreach(range(1, 3) as $index) {\n\n $title = $faker->sentence(2);\n\n Category::create(array(\n 'title' => $title,\n 'slug' => $this->generateSlug($title),\n 'description' => $faker->paragraph(2)\n ));\n }\n }", "title": "" }, { "docid": "c3a07070351bd000cfaf6a6bb53c9e90", "score": "0.7760023", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n User::truncate();\n Products::truncate();\n \n // $this->call(UserSeeder::class);\n factory(User::class,10)->create();\n factory(Products::class,10)->create();\n \n }", "title": "" }, { "docid": "7fd6f0c247e33899edabe04b649cd22c", "score": "0.77555686", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n Model::unguard();\n $this->call(RoleTableSeeder::class);\n $this->call(TagTableSeeder::class);\n // DB::table('users')->delete();\n\n $users = [\n ['name' => 'root', 'email' => 'root@email.com',\n 'password' => Hash::make('qwerty')],\n ['name' => 'test', 'email' => 'test@email.com',\n 'password' => Hash::make('qwerty')],\n ['name' => 'vova', 'email' => 'vova@email.com',\n 'password' => Hash::make('qwerty')],\n ['name' => 'bob', 'email' => 'bob@email.com',\n 'password' => Hash::make('qwerty')],\n\n ];\n // Loop through each user above and create the record for them in the database\n foreach ($users as $user) {\n $newUser = User::create($user);\n if ($user['name'] == 'root') {\n $newUser->roles()->attach(1);\n } else {\n $newUser->roles()->attach(2);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "05f5b66919509425a7194863454ee9d7", "score": "0.7749931", "text": "public function run()\n {\n\n $this->seedStudies();\n $this->seedCourses();\n\n }", "title": "" }, { "docid": "6ac18121221894258f25afa3e3a09f99", "score": "0.7747252", "text": "public function run()\n {\n Costumer::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Costumer::create([\n 'name' => $faker->name,\n 'phone' => $faker->sentence,\n 'Type' => $faker->sentence,\n 'city' => $faker->sentence,\n 'adress' => $faker->sentence,\n 'contact' => $faker->sentence,\n 'contact_phone' => $faker->sentence,\n 'created_by' => 1,\n ]);\n }\n }", "title": "" }, { "docid": "14aa0fd99ba18e6fb7278892a18441fc", "score": "0.77446836", "text": "public function run()\n {\n //delete all records from role table\n Role::truncate();\n\n $faker = Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n Role::create([\n 'name' => $faker->name\n ]);\n }\n }", "title": "" }, { "docid": "f5bfd65a0ab76fe80a146147ec5ed014", "score": "0.7744639", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n\n Model::reguard();\n\n # =========================================================================\n # CATEGORIES SEEDS\n # =========================================================================\n\n DB::table('categories')->delete();\n\n $categories = [\n [ 'name' => 'Wildlife',\n 'created_at' =>\\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString()\n ],\n [ 'name' => 'Pollution',\n 'created_at' =>\\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString()\n ]\n ];\n\n foreach ($categories as $category) {\n Category::create($category);\n }\n }", "title": "" }, { "docid": "ecb482ed5a02df8c19bf99957a103522", "score": "0.7743581", "text": "public function run()\n {\n Model::unguard();\n $faker = Faker::create();\n\n // DB::table('users')->delete();\n\n // $users = array(\n // ['name' => 'Tyler Torola', 'email' => 'tyler@tjt.codes', 'password' => Hash::make('password')],\n // ['name' => 'Bobby Anderson', 'email' => 'bobby@pangolin4x4.com', 'password' => Hash::make(\"***REMOVED***\")],\n // ['name' => 'Ike Goss', 'email' => 'pangolin4x4@aol.com', 'password' => Hash::make('***REMOVED***')],\n // );\n \n // // Loop through each user above and create the record for them in the database\n // foreach ($users as $user)\n // {\n // User::create($user);\n // }\n\n // foreach (range(1,10) as $index) {\n // $invoice = [\n // 'first_name' => $faker->firstName,\n // 'last_name' => $faker->lastName,\n\n // ]\n // }\n\n foreach (range(1,10) as $index) {\n \n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "115c012dd8846c3cb80cbb9f7a8327c6", "score": "0.77422917", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $categories = factory(Category::class)->times(10)->create();\n\n $users = factory(User::class)->times(20)->create();\n\n $products = factory(Product::class)->times(40)->create();\n\n $transactions = factory(Transaction::class)->times(10)->create();\n\n\n }", "title": "" }, { "docid": "0136ec9783e5809a5fe2c594d8780c7e", "score": "0.7739727", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Eloquent::unguard();\n\n $faker = Faker\\Factory::create();\n factory(App\\Answer::class, 100)->create();\n factory(App\\Kerja::class, 100)->create();\n factory(App\\Lulus::class, 100)->create();\n factory(App\\Nikah::class, 100)->create();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "d253031e250b9050d7af431c4c10f0bf", "score": "0.7735802", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->disableForeignKeyCheck();\n User::truncate();\n Tag::truncate();\n Post::truncate();\n\n factory(User::class, 50)->create();\n factory(Tag::class, 20)->create();\n factory(Post::class, 100)->create()->each(function ($post) {\n $tags = Tag::all()->random(mt_rand(1, 5))->pluck('id');\n $post->tags()->attach($tags);\n });\n }", "title": "" }, { "docid": "42daa4f7485840fe27f640e7e7069e40", "score": "0.7735444", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([UsuarioSeed::class]);\n $this->call([CategoriasSeed::class]);\n $this->call([ExperienciaSeeder::class]);\n }", "title": "" }, { "docid": "31bba37eb86cd9ac68eaf41572a295dc", "score": "0.77354217", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('roles')->insert([\n [ \n 'name' => 'voter'\n ],\n [ \n 'name' => 'admin'\n ],\n ]);\n\n DB::table('organizers')->insert([\n [\n 'name' => 'BEM UI'\n ],\n [\n 'name' => 'BEM FT UI'\n ]\n ]);\n\n DB::table('elections')->insert([\n [\n 'name' => 'Pemira UI',\n 'unique_code' => 'UI012021',\n 'election_date' => '2021-04-26',\n 'end_date' => '2021-05-28'\n ],\n [\n 'name' => 'Pemira FT UI',\n 'unique_code' => 'FT3012021',\n 'election_date' => '2021-05-03',\n 'end_date' => '2021-05-28'\n ]\n ]);\n\n $this->call([\n CandidateSeeder::class,\n UserSeeder::class,\n VoteSeeder::class\n ]);\n\n }", "title": "" }, { "docid": "f70d3c8ab2d963dc7360a2749f67f6b7", "score": "0.77348447", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n Course::factory(3)->create();\n assignament::factory(9)->create();\n exercise::factory(6)->create();\n }", "title": "" }, { "docid": "0ae073ea04e3e51b9a5a234a6645d3a1", "score": "0.7730094", "text": "public function run()\n {\n $this->truncateTables([\n //'products',\n //'services',\n //'categories',\n //'subcategories',\n 'products_users',\n //'users',\n 'avatars',\n ]);\n\n // Ejecutar los seeders:\n //$products = factory(Product::class)->times(4)->create();\n //$categories = factory(Category::class)->times(2)->create();\n //$subcategories = factory(SubCategory::class)->times(5)->create();\n //factory(Service::class)->times(4)->create();\n //factory(User::class)->times(10)->create();\n $avatars = factory(Avatar::class)->times(15)->create();\n\n /*foreach ($products as $oneProduct) {\n $oneProduct->category()->associate($categories->random(1)->first()->id);\n $oneProduct->subcategory()->associate($subcategories->random(1)->first()->id);\n $oneProduct->save();\n };*/\n\n // foreach ($products as $oneProduct) {\n // $oneProduct->category()->associate($categories->random(1)->first()->id);\n // $oneProduct->subcategory()->associate($subcategories->random(1)->first()->id);\n // $oneProduct->save();\n // };c9b1c36c8caeabda8347106e58f70033dd0265ca\n }", "title": "" }, { "docid": "de1da3761353d82d818811e2158ffcc6", "score": "0.7728878", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n $types = ['t-shirt', 'mug', 'boots', 'phone-case'];\n $colors = ['whitesilver','grey','black','navy','blue','cerulean','sky blue','turquoise','blue-green','azure','teal','cyan','green','lime','chartreuse','live','yellow','gold','amber','orange','brown','orange-red','red','maroon','rose','red-violet','pink','magenta','purple','blue-violet','indigo','violet','peach','apricot','ochre','plum'];\n $sizes = ['xs','s','m','l','xl'];\n\n // And now, let's create a few prods in our database:\n for ($i = 0; $i < 50; $i++) {\n\n $prod = Product::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'price' => rand(0, 1000)/10,\n 'productType' => $types[array_rand($types)],\n 'color' => $colors[array_rand($colors)],\n 'size' => $sizes[array_rand($sizes)],\n ]);\n }\n Schema::enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "a8c4b0faab2536f6924d6a6f05f50027", "score": "0.7727856", "text": "public function run()\n {\n $faker = Factory::create('fr_FR');\n $categories = ['Animaux', 'Nature', 'People', 'Sport', 'Technologie', 'Ville'];\n foreach ($categories as $category) {\n DB::table('categories')->insert([\n 'name' => $category,\n 'created_at' => $faker->date('Y-m-d H:i'),\n 'updated_at' => $faker->date('Y-m-d H:i'),\n ]);\n }\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "e424e7ea028abae43ad7eb31b541b451", "score": "0.7715176", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // $this->call(ProductsTableSeeder::class);\n // $this->call(ProductImageSeeder::class);\n // $this->call(VariationSeeder::class);\n \\App\\Models\\Product::factory()->count(5)->create();\n \\App\\Models\\ProductImage::factory()->count(10)->create();\n //\\App\\Models\\Variation::factory()->create();\n }", "title": "" }, { "docid": "3d5934c5d799d5a3b3747a0bbd0e3d71", "score": "0.7714304", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::table('tasks')->delete();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Task::create([\n 'idCustomer' => $faker->numberBetween($min = 1, $max = 10),\n 'title' => $faker->sentence,\n 'description' => $faker->sentence,\n 'price' => $faker->numberBetween($min = 10, $max = 1000),\n 'deadline' => $faker->dateTimeBetween($startDate = 'now', $endDate = '+2 years', $timezone = 'Asia/Bishkek'),\n ]);\n }\n }", "title": "" }, { "docid": "70fbcb2aeac3103c8556e273a1ea07ef", "score": "0.77122855", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'nome' => \"Felipe Gustavo Braiani Santos\",\n 'siape' => 2310754,\n 'password' => bcrypt('2310754'),\n 'perfil' => '3'\n ]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Mecânica\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Informática\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Eletrotécnica\"]);\n }", "title": "" }, { "docid": "f204d23341cb7fd2b48bb27ffde1b8f2", "score": "0.7711454", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n factory(App\\User::class, 4)->create();\n factory(App\\Group::class, 2)->create()->each(function($u) { $u->users()->save(App\\User::find(1)); });\n factory(App\\Item::class, 10)->create();\n }", "title": "" }, { "docid": "72deab4b4ba460677188b9e5ddc3d631", "score": "0.770984", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Article::truncate();\n Store::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Store::create([\n 'name' => $faker->name,\n 'address' => $faker->address,\n ]);\n }\n }", "title": "" }, { "docid": "9877b188f4441322b489cf690def43a1", "score": "0.77040386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Category::class,10)->create();\n factory(\\App\\User::class,10)->create();\n\n $fake = \\Faker\\Factory::create();\n\n $users = \\App\\User::all();\n\n foreach ($users as $user){\n for ($i=0 ; $i<10 ; $i++){\n \\App\\Post::create([\n 'user_id' => $user->id,\n 'title' => $fake->name,\n 'description' => $fake->paragraph(5),\n ]);\n }\n }\n }", "title": "" }, { "docid": "acf364571e79e5cefded12cff1dc405e", "score": "0.7701138", "text": "public function run()\n\t{\n\t\t$faker = Faker::create();\n\t\tforeach (range(1, 50) as $key) {\n\t\t\tDB::table('books')->insert([\n\t\t\t'title' => $faker->sentence(),\n\t\t\t'description' => $faker->paragraph(),\n\t\t\t'author' => $faker->name(),\n\t\t\t'created_at' => Carbon::now(),\n\t\t\t'updated_at' => Carbon::now(),\n\t\t\t]);\n\t\t}\n}", "title": "" }, { "docid": "3b2cd726bae9a08c2dfd89fc525f4d5f", "score": "0.77008545", "text": "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(CuentaTableSeeder::class);\n $this->call(MovimientoTableSeeder::class);\n // factory ('App\\Vehiculo',6)->create();\n // factory ('App\\Estacionamiento',6)->create();\n $this->call(VehiculoTableSeeder::class);\n $this->call(OrigenTableSeeder::class);\n $this->call(TarifasTableSeeder::class);\n $this->call(ZonasTableSeeder::class);\n $this->call(EstaciomamientoTableSeeder::class);\n factory ('App\\Inspector',10)->create();\n }", "title": "" }, { "docid": "b2a9f176c7df114ff184aa138ee5c05e", "score": "0.7700401", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Players::class, 10000)->create();\n \n factory(App\\GamePlay::class, 3835)->create(); \n\n $this->call(GamesTableSeeder::class);\n \n }", "title": "" }, { "docid": "443e869bc448f240356820ce99b73eba", "score": "0.7698328", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(SettingSeeder::class);\n\n factory(Category::class, 7)->create();\n\n factory(Product::class,150)->create();\n\n $categories = App\\Category::all();\n\n Product::all()->each(function ($product) use ($categories)\n {\n $product->categories()->attach(\n // $categories->random(rand(3,6))->pluck('id')->toArray()\n $categories->random(rand(1,6))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "8fe4489137a56b956b08ecc256a24aa7", "score": "0.76982605", "text": "public function run()\n {\n //\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n\n\n $cost=$faker->randomFloat(2,0,1000);\n\n Product::create([\n 'category_id' => random_int(1,5),\n 'cost' => $cost,\n 'stock' => random_int(1,20),\n 'priceTotal' => $cost+10,\n 'tax' => random_int(1,10),\n 'description' => 'Descripcion'. $i,\n 'reference' => 'Referencia'. $i,\n 'user_id'=> random_int(1,User::count())\n ]);\n }\n }", "title": "" }, { "docid": "a3ead8af61223146f6e3fdec15b00904", "score": "0.769607", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([QuizSeeder::class]);\n $this->call([AnswererSeeder::class]);\n $this->call([SectionSeeder::class]);\n $this->call([QuestionSeeder::class]);\n $this->call([AnswerSeeder::class]);\n $this->call([OptionSeeder::class]);\n $this->call([OptionColSeeder::class]);\n }", "title": "" }, { "docid": "02a3de1d1d158c365800c7a0830fe308", "score": "0.7693738", "text": "public function run()\n {\n //\n // DB::table('articles')->delete();\n\n\t // for ($i=0; $i < 10; $i++) {\n\t // \\App\\Article::create([\n\t // 'title' => 'Title '.$i,\n\t // 'body' => 'Body '.$i,\n\t // 'user_id' => 1,\n\t // 'like' => 0,\n\t // 'draft' => true\n\t // ]);\n\t // }\n\n\n\t // DB::table('articles')->insert([\n // 'title' => 'Title '.str_random(10),\n // 'body' => 'Body '.str_random(10),\n // 'user_id' => 1,\n // 'like' => 0,\n // 'draft' => true\n // ]);\n\n \t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t // $u->posts()->save(factory(App\\Article::class)->make());\n\t // });\n\t factory(App\\Article::class, 50)->create();\n\n }", "title": "" }, { "docid": "1c370e9bc1f2d1d56de7442838321847", "score": "0.7688782", "text": "public function run()\n {\n $this->call(CompanySeeder::class);\n $this->call(JobsSeeder::class);\n $this->call(UserSeeder::class);\n\n $categories=[\n 'Government','NGO','Banking','software','Networking','2nd optionb'\n ];\n foreach ($categories as $category){\n \\App\\Models\\Category::create(['name'=>$category]);\n }\n }", "title": "" }, { "docid": "29695a5ff1fa3c45993913799e105323", "score": "0.7686136", "text": "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\t$dateset = new Seed(self::TABLE_NAME);\n\n\t\tforeach ($dateset as $rows) {\n\t\t\t$records = [];\n\t\t\tforeach ($rows as $row)\n\t\t\t\t$records[] = [\n\t\t\t\t\t'id'\t\t\t=> $row->id,\n\t\t\t\t\t'created_at'\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t\t'updated_at'\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t\t'sport_id'\t\t=> $row->sport_id,\n\t\t\t\t\t'country_id'\t=> $row->country_id,\n\t\t\t\t\t'gender_id'\t\t=> $row->gender_id,\n\n\t\t\t\t\t'name'\t\t\t=> $row->name,\n\t\t\t\t\t'external_id'\t=> $row->external_id ?? null,\n\t\t\t\t\t'logo'\t\t\t=> $row->logo ?? null,\n\t\t\t\t];\n\n\t\t\tinsert(self::TABLE_NAME, $records);\n\t\t}\n\t}", "title": "" }, { "docid": "d821e4330d8dabc502854ce12d329af5", "score": "0.76855403", "text": "public function run()\n {\n $this->call(ColorsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(SexesTableSeeder::class);\n $this->call(SizesTableSeeder::class);\n\n $this->call(User_StatusesTableSeeder::class);\n\n $this->call(SubcategoriesTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n\n $this->call(ProductsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n // factory(\\App\\Product::class, 62)->create();\n factory(\\App\\User::class, 25)->create();\n factory(\\App\\Cart::class, 99)->create();\n }", "title": "" }, { "docid": "3114668392a1c46e1e1ae8969bf609b6", "score": "0.76827496", "text": "public function run()\n {\n $faker = Faker::create();\n\n // seeder for authorised member\n User::create([\n 'role' => \"auth_member\",\n 'name' => \"Mr.Django\",\n 'email' => \"fake@email.com\",\n 'password' => Hash::make('1234')\n ]);\n User::create([\n 'role' => \"auth_member\",\n 'name' => \"Mr.Prism\",\n 'email' => \"git.pyprism@gmail.com\",\n 'password' => Hash::make('1234')\n ]);\n\n // seeder for 3 second markers\n foreach(range(1, 3) as $index) {\n User::create([\n 'role' => 'second_marker',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n\n // seeder for 4 supervisors\n foreach(range(1, 4) as $index) {\n User::create([\n 'role' => 'supervisor',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n\n // seeder for 30 students\n foreach(range(1, 30) as $index) {\n User::create([\n 'role' => 'student',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n }", "title": "" }, { "docid": "8b162d964f15bb87bea6b64c3def25df", "score": "0.76801217", "text": "public function run()\n {\n //TODO Seeder create X Users\n factory(\\App\\User::class, 10)->create();\n //TODO Seeder create X Authors\n factory(\\App\\Author::class, 10)->create();\n //TODO Seeder create X Libraries and looping Libraries\n factory(\\App\\Library::class, 10)->create()->each(function($library){\n //TODO Seeder create X Books and looping Books\n factory(\\App\\Book::class, 10)->make()->each(function($book) use($library){\n //TODO Seeder asign Books to Libraries (relationship)\n $library->books()->save($book);\n });\n });\n }", "title": "" }, { "docid": "01775d6adda6df1ce8c05497acdfcd54", "score": "0.7676848", "text": "public function run()\n {\n\n News::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['business', 'popular', 'hotnews', 'lifestyle', 'world', 'world', 'sports'];\n for ($i = 0; $i < count($categories); $i++) {\n for ($j = 0; $j < 5; $j++) {\n News::create([\n 'title' => $categories[$i] . ' title ' . $j,\n 'content' => $faker->paragraph(),\n 'category' => $categories[$i],\n 'image' => $faker->image('public/uploads/news/', 640, 480, null, false),\n ]);\n }\n }\n }", "title": "" }, { "docid": "bdd67eaf9bb5c705971ec25aad3d2bf9", "score": "0.76764244", "text": "public function run()\n {\n $faker = Faker\\Factory::create('es_ES');\n\n DB::table('empresas')->delete();\n for ($cantidadEmpresas = 0; $cantidadEmpresas != 6; $cantidadEmpresas++) {\n DB::table('empresas')->insert(array(\n 'nombre' => $faker->company,\n 'direccion' => $faker->address,\n 'email' => $faker->companyEmail,\n 'url' => $faker->url,\n 'telefono' => $faker->numberBetween(600000000,699999999),\n 'created_at' => date('Y-m-d H:m:s'),\n 'updated_at' => date('Y-m-d H:m:s'),\n ));\n }\n }", "title": "" }, { "docid": "ae0478774917d2a61935b3bb56a50045", "score": "0.76751894", "text": "public function run()\n {\n State::create(['id' => 1, 'name' => 'not state']);\n State::create(['id' => 2, 'name' => 'to do']);\n State::create(['id' => 3, 'name' => 'doing']);\n State::create(['id' => 4,'name' => 'done']);\n\n Role::create(['name' => 'Scrum Master']);\n Role::create(['name' => 'Product Owner']);\n Role::create(['name' => 'Developer']);\n\n Tag::factory(5)->create();\n Category::factory(5)->create();\n\n User::create([\n // 'id' => 1,\n 'name' => 'Joel',\n 'email' => 'joel@test.com',\n 'email_verified_at' => now(),\n 'password' => bcrypt('1234567')\n ]);\n\n User::factory(10)->create()->each(function ($user) {\n $number_tasks = rand(1, 11);\n\n for ($i=0; $i < $number_tasks; $i++) {\n $user->tasks()->save(Task::factory()->make());\n }\n });\n\n Team::factory(5)->create()->each(function ($team) {\n $number_tasks = rand(1, 11);\n\n for ($i=0; $i < $number_tasks; $i++) {\n $team->tasks()->save(Task::factory()->make());\n }\n\n $team->users()->attach($this->array(rand(2, 11)));\n });\n }", "title": "" }, { "docid": "b186d6546035ec76f8db21fdbd2a0e44", "score": "0.76747864", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('products')->insert([\n 'id' => $index,\n 'name' => $faker->name,\n 'image' => $faker->imageUrl(600,400),\n 'price' => $faker->numberBetween(0,1000)\n ]);\n }\n $this->call(ProductSeeder::class);\n }", "title": "" }, { "docid": "8ba9e1eb60aa2ce75e4f67b85523a3b3", "score": "0.76742154", "text": "public function run()\n {\n //\n\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n // $name = $faker->unique()->word;\n // $quantity = $faker->numberBetween(1, 50);\n // $price = $faker->randomFloat(2,10,200);\n // $value = $price * $quantity;\n User::create([\n 'name' => $faker->unique()->word,\n 'email' => $faker->unique()->word.'@gmail.com',\n 'password' => bcrypt('123456'),\n 'email_verified_at' => Carbon::now(),\n 'remember_token' => Carbon::now(),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "0a6360cbcc87c10411cfdb8218573c6a", "score": "0.7671554", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n foreach (range(1, 100) as $index) {\n DB::table('products')->insert([\n 'code' => $faker->unique()->randomNumber,\n 'name' => $faker->sentence(4),\n 'stock' => $faker->randomNumber,\n 'varian' => $faker->sentence(1),\n 'description' => $faker->text,\n 'image' => $faker->imageUrl(\n $width = 640,\n $height = 480\n ),\n 'category_id' => rand(1, 5)\n ]);\n }\n }", "title": "" }, { "docid": "e7c35bf1a78291d3c85c164ebd658980", "score": "0.7670502", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //seeding the furnitures\n $this->call(FurnituresTableSeeder::class);\n\n // seeding the tags\n $this->call(TagsTableSeeder::class);\n\n // seeding the users, houses, and rooms table by creating room for each\n // house for each user\n factory(App\\User::class, 3)->create()->each(function ($user) {\n $user->houses()->saveMany(factory(App\\House::class, 2)->create()->each(function ($house) {\n $house->rooms()->saveMany(factory(App\\Room::class, 3)->create());\n }));\n });\n }", "title": "" }, { "docid": "c4192461f63978082f8fcbfb0f3a4b92", "score": "0.76687217", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // User::create([\n\t\t// 'username' => 'admin',\n\t\t// 'password' => Hash::make('admin'),\n\t\t// 'real_password' => 'admin'\n\t\t// ]);\n\n //check and count inventory records\n $inventory = inventory::all();\n if(count($inventory)){\n $item_id = 'inv_'.$this->randomString().'_'.(count($inventory)+1);\n }else{\n $item_id = 'inv_'.$this->randomString().'_'.'1';\n }\n \n inventory::create([\n 'item_id' => $item_id,\n 'username' => 'admin',\n 'item_name' => 'Medicine 3',\n 'item_description' => 'If you take this you will eventually die',\n 'item_quantity' => 20\n ]);\n }", "title": "" }, { "docid": "7b59b344bf9bf9580742222e5ba42ec2", "score": "0.7665289", "text": "public function run()\n {\n \t // DB::table('users')->insert([\n \n // 'username' => \"quy\",\n // 'email' => \"khaquy09112@gmail.com\",\n // 'sex' => 0,\n // 'phone_number' => 0,\n // 'password' => Hash::make('123456'),\n // ]);\n $faker = Faker\\Factory::create();\n for($i = 0; $i < 20; $i++) {\n App\\news::create([\n 'tittle' => $faker->text(40),\n 'intro' => $faker->text($minNbChars = 60),\n 'content' => $faker->text($minNbChars = 400),\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n 'user_id' => 6\n ]);\n }\n\n }", "title": "" }, { "docid": "8c8e23570f05312b54416c1cbcb81e7b", "score": "0.76618624", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n // $this->call([\n // UserSeeder::class,\n // PostSeeder::class,\n // CommentSeeder::class,\n // ]);\n\n // User Table Seeding\n User::factory()\n ->count(5)\n ->create();\n\n // Category Table Seeding\n ProductCategory::factory()\n ->count(5)\n ->create();\n\n // Product Table Seeding\n Product::factory()\n ->count(10)\n ->create();\n }", "title": "" }, { "docid": "d4833208ba9ca3bb97bd734168301979", "score": "0.7658588", "text": "public function run()\n {\n $this->call(ReligionsTableSeeder::class);\n $this->call(SubjectsTableSeeder::class);\n $this->call(BuildingsTableSeeder::class);\n $this->call(ScholarshipsTableSeeder::class);\n $this->call(GradesTableSeeder::class);\n $this->call(CollegesTableSeeder::class);\n $this->call(DepartmentsTableSeeder::class);\n factory('App\\Faculty', 500)->create();\n // factory('App\\Student', 1000)->create();\n factory('App\\Room', 140)->create();\n $this->call(CurriculaTableSeeder::class);\n $this->call(CurriculumSubjectsTableSeeder::class);\n $this->call(StudentsTableSeeder::class); \n }", "title": "" }, { "docid": "6fdeeeb37f42681366483a8c2c186b05", "score": "0.7657614", "text": "public function run()\n {\n Model::unguard();\n $userId = DB::table('users')->pluck('id')->toArray();\n $bookId = DB::table('books')->pluck('id')->toArray();\n $faker = Faker::create();\n for ($i = 0; $i <= 15; $i++) {\n factory(App\\Model\\Post::class, 1)->create([\n 'user_id' => $faker->randomElement($userId),\n 'book_id' => $faker->randomElement($bookId)\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "ade397526ae1d55557124d57dafcccd2", "score": "0.76543623", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\empresa::class,10)->create();\n factory(\\App\\tut_lab::class,20)->create();\n factory(\\App\\tut_doc::class,20)->create();\n factory(\\App\\ciclo::class,20)->create();\n factory(\\App\\fecha::class,20)->create();\n factory(\\App\\alumno::class,20)->create();\n \n\n }", "title": "" }, { "docid": "43a50dd07282ff905667d4ed0c2f4a4b", "score": "0.7653879", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create(\n [\n 'email' => 'leszekstubinski@gmail.com',\n 'name' => 'Leszek'\n ]\n );\n\n factory(User::class)->create(\n [\n 'email' => 'b.project@wp.pl',\n 'name' => 'Gosia'\n ]\n );\n\n factory(User::class)->create(\n [\n 'email' => 'cafomat@cafomat.pl',\n 'name' => 'Agnieszka'\n ]\n );\n }", "title": "" }, { "docid": "f39736a1dd58b24415fb18f580a15480", "score": "0.76538557", "text": "public function run()\n {\n //$faker = Factory::create('uk_UA');\n $faker = Factory::create('ru_RU');\n\n foreach (range(1, 10) as $i) {\n Staff::create([\n 'first_name' => (($i % 2) == 0) ? $faker->firstNameMale : $faker->firstNameFemale,\n 'last_name' => $faker->lastName,\n 'middle_name' => (($i % 2) == 0) ? $faker->middleNameMale() : $faker->middleNameFemale(),\n 'sex' => (($i % 2) == 0) ? 'мужской' : 'женский',\n 'salary' => 600,\n ]);\n }\n\n foreach (Staff::all() as $people) {\n $positions = Position::inRandomOrder()->take(rand(1,3))->pluck('id');\n $people->positions()->attach($positions);\n }\n }", "title": "" }, { "docid": "0aa9e71a7d39d8e1c143c2676348855e", "score": "0.7650151", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // call our class and run our seeds\n\n DB::table('armari_a')->insert([\n\n 'id' => '2',\n 'nom_armari' => 'armari A',\n 'nom_producte' => 'Bosses puntes pipetes',\n 'stock_inicial' => '4',\n 'stock_actual' => '5',\n 'proveedor' => 'PIDISCAT',\n 'referencia_proveedor'=> '11971',\n 'marca_equip' => 'null',\n 'num_lot' => '0',\n\n ]);\n DB::table('armari_a')->insert([\n\n 'id' => '3',\n 'nom_armari' => 'armari A',\n 'nom_producte' => 'Puntes micropipeta',\n 'stock_inicial' => '17',\n 'stock_actual' => '17',\n 'proveedor' => 'PIDISCAT',\n 'referencia_proveedor'=> '0',\n 'marca_equip' => 'null',\n 'num_lot' => '0',\n\n\n ]);\n\n\n }", "title": "" }, { "docid": "727a6eb0cfb135db37a834cd42286ad5", "score": "0.76493746", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n //factory(Post::class, 48)->create();\n }", "title": "" }, { "docid": "3a36602f580a4a0d79e184724854eff2", "score": "0.76463586", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::truncate();\n Admin::truncate();\n factory(User::class, 2)->create();\n factory(Admin::class, 1)->create();\n //factory(Link::class, 10)->create();\n //factory(Category::class, 2)->create();\n }", "title": "" }, { "docid": "8a18fcb1937bb7f261796040e1fcfa6d", "score": "0.7644867", "text": "public function run()\n {\n //$this->call(StudentSeeder::class);\n $this->call(ClassroomSeeder::class);\n $this->call(FacultyMemberSeeder::class);\n $this->call(LectureSeeder::class);\n $this->call(LectureRegisterSeeder::class);\n\n DB::table('users')->insert([\n 'role' => '1',\n 'name' => 'Öğrenci işleri',\n 'email' => 'uzman@mail.com',\n 'password' => Hash::make( '123123' )\n ]);\n DB::table('users')->insert([\n 'role' => '2',\n 'name' => 'İlk',\n 'surname' => 'Öğrenci',\n 'code' => '1231231231',\n 'email' => 'ogr1@mail.com',\n 'password' => Hash::make( '123123' )\n ]);\n DB::table('users')->insert([\n 'role' => '2',\n 'name' => 'İkinci',\n 'surname' => 'Öğrenci',\n 'code' => '1231231232',\n 'email' => 'ogr2@mail.com',\n 'password' => Hash::make( '123123' )\n ]);\n }", "title": "" }, { "docid": "41157008c4eff9687b3dcc670f9e4f1e", "score": "0.76441705", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n User::create([\n 'username' => $faker->word,\n 'fullname' => $faker->word,\n 'state' => 0,\n 'tel' => $faker->word,\n 'whatsapp' => $faker->word,\n 'token' => $faker->sentence,\n 'address' => $faker->word,\n 'email' => $faker->email,\n 'password' => $faker->word\n ]);\n }\n }", "title": "" }, { "docid": "ff8c114b8a9cbdea161e3691f1604a3a", "score": "0.7643376", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create(); // creating instance of faker libraray to create fake data\n\n DB::table(\"students\")->insert([\n \"name\" => $faker->name(),\n \"email\" => $faker->safeEmail,\n \"mobile\" => $faker->phoneNumber,\n // \"age\" => $faker->numberBetween(25, 45),\n // \"gender\" => $faker->randomElement([\n // \"male\",\n // \"female\",\n // \"others\"\n // ]),\n // \"address_info\" => $faker->address,\n // \"password\" => Hash::make(\"123455\"), // helps to create hash password\n ]);\n }", "title": "" }, { "docid": "bcb79b7af39bcb53c4feae04acbb1a67", "score": "0.7642944", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Attribute::create(['title' => 'Expertise and Competence']);\n Attribute::create(['title' => 'Responsiveness']);\n Attribute::create(['title' => 'Communication and Reporting']);\n Attribute::create(['title' => 'Trustworthiness (Confidentiality)']);\n Attribute::create(['title' => 'Quality of Service']);\n }", "title": "" } ]
be1a3558e81a79752f4d270bbf7499b0
function for inserting the children at given path
[ { "docid": "af2385d702952b5dbc10969d4fc82445", "score": "0.597984", "text": "public function insert_into(&$array, array $keys, $value) {\n foreach ($keys as $key) {\n $array = &$array[$key];\n }\n $array['children'] = $value;\n}", "title": "" } ]
[ { "docid": "6ae3dc6c45b38fa659c52f4d25d476e0", "score": "0.6164592", "text": "function _fillPath() {\n\t\t$db = &$this->_getDb();\n\t\t$parentTaskId = $this->headTask->id;\n\t\twhile ($parentTaskId != NULL && count($this->path) <= 3) {\n\t\t\t$rs = $db->query(\"\n\t\t\t\tSELECT id, name, parent\n\t\t\t\tFROM task\n\t\t\t\tWHERE id = $parentTaskId\n\t\t\t\");\n\n\t\t\t$task = new Task($db->fetch($rs));\n\t\t\t$this->path[] = $task;\n\t\t\t$parentTaskId = $task->parentTaskId;\n\t\t}\n\t\t$this->path = array_reverse($this->path);\n\t}", "title": "" }, { "docid": "c94045de8f0f2a4b1bfdfbec27f7454c", "score": "0.60324955", "text": "public function getChildObjectsAtPath($path);", "title": "" }, { "docid": "f77ee27746bacb62ef19d8ccd6b29a4e", "score": "0.6013088", "text": "public function addChildObjectAtPath($path, $object);", "title": "" }, { "docid": "0ffe73ea8062487dbf3f97e9285b96a7", "score": "0.59942245", "text": "public function appendChilds(DOMNode $node, $path) {\n // initialize the element itself\n $element = $this->generateElement($node);\n // try to load the child elements\n if ($node->getElementsByTagName('children')->length > 0) {\n $childs = $node->getElementsByTagName('element');\n \tforeach ($childs as $key => $child) {\n \t // if a child element was found, add it\n \t if ($childElement = $this->appendChilds($child, $path)) {\n \t $element->addChild($childElement);\n \t }\n \t}\n }\n \t// set the navigation element active if necessary\n \t$element->setActive(\n \t\tnew TechDivision_Lang_String($path)\n \t);\n // check if the system user has the rights to access the element\n $isAllowed = $this->isAllowed($element->getPath(), '__default');\n // if not, return\n if ($isAllowed === false) {\n return;\n }\n // else, return the initialized element with its childs\n \treturn $element;\n }", "title": "" }, { "docid": "b7c5e54ed22d2a0953ac4562f1290c26", "score": "0.5941294", "text": "protected function createChildren()\n\t{\n\t\t// ...\n\t}", "title": "" }, { "docid": "a407a5f4092024b9232d7e8483f0f8f7", "score": "0.5869407", "text": "public function testUpdateAndAddChildren() {\n for ($i = 1; $i < 6; $i++) {\n $this->__testSaveRoot(true, 1, true);\n }\n }", "title": "" }, { "docid": "5bed8e0d7172004cfc81a8bc78e403fb", "score": "0.5771507", "text": "public function getChildObjectsAtPathRecursive($path);", "title": "" }, { "docid": "5dc1a5189668e842810686bdc449020f", "score": "0.5741577", "text": "public function add()\n {\n try {\n $this->pdo->beginTransaction();\n\n $this->normalized = strtoupper(Urlify::normalize_name($this->name, false));\n $this->path = (is_null($this->path)) ? $this->pathToFolder($this->parent_id) . $this->normalized . \"/\" : $this->path;\n\n $stmt = $this->pdo->prepare(\"INSERT INTO folders \n\t\t\t\t\t\t\t\t (name, normalized, parent_id, path, lastmodified_on, created_on) VALUES \n\t\t\t\t\t\t\t\t (:name, :normalized, :parent_id, :path, :lastmodified_on, :created_on)\");\n $stmt->bindValue(\":parent_id\", $this->parent_id, PDO::PARAM_INT);\n $stmt->bindValue(\":name\", $this->name, PDO::PARAM_STR);\n $stmt->bindValue(\":normalized\", $this->normalized, PDO::PARAM_STR);\n $stmt->bindValue(\":path\", $this->path, PDO::PARAM_STR);\n $stmt->bindValue(\":lastmodified_on\", $this->lastmodified_on, PDO::PARAM_INT);\n $stmt->bindValue(\":created_on\", $this->created_on, PDO::PARAM_INT);\n $stmt->execute();\n $this->id = (int) $this->pdo->lastInsertId();\n $this->_node_add($this->id, $this->parent_id);\n \n $this->pdo->commit();\n } catch (PDOException $e) {\n $this->pdo->rollback();\n $this->valid = false;\n $this->_errors[] = $e->getMessage();\n }\n \n return $this;\n }", "title": "" }, { "docid": "6110d55ff11aa3838e2cf92fb6333687", "score": "0.5686205", "text": "protected function loadChildren(): void\n {\n $children = glob(\n $this->directory.DIRECTORY_SEPARATOR.'*'.DIRECTORY_SEPARATOR.'{collection,component}.json',\n GLOB_BRACE | GLOB_NOSORT\n );\n\n // Run through all child nodes\n foreach ($children as $child) {\n parent::attach(FilesystemNodeFactory::createFromDescriptor($child));\n }\n\n $this->loaded |= LazyLoadingInterface::LOADED_CHILDREN;\n }", "title": "" }, { "docid": "610dc824693d681cafa1ce9b78bae42c", "score": "0.567881", "text": "public function insertCatPath($parent_id, $cat_id)\n\t{\n\t\t$level = 0;\n\t\t$rs = $this->getRowset(\"cat_id = ?\",array($parent_id),\"`level` ASC\"); \n\t\n\t\tforeach ($rs as $result) \n\t\t{\n\t\t\t$data['cat_id'] = $cat_id;\n\t\t\t$data['path_id'] = $result['path_id'];\n\t\t\t$data['level'] = $level;\n\t\t\t$this->insert($data);\n\t\t\t$level++;\n\t\t}\n\t\n\t\t$data['cat_id'] = $cat_id;\n\t\t$data['path_id'] = $cat_id;\n\t\t$data['level'] = $level;\n\t\t$this->insert($data);\n\t}", "title": "" }, { "docid": "f731c434ca9067790697cc7015b78691", "score": "0.56331056", "text": "function save_children($id)\n {\n $GLOBALS['nesting']++;\n\n $children = Categories::all()->where('parent_id', $id);\n foreach ($children as $current){\n $data = [\n 'id' => $current->id,\n 'name' => $current->name,\n 'nesting'=> $GLOBALS['nesting'],\n ];\n array_push($GLOBALS['categories'], $data);\n if($current->has_children()){\n save_children($current->id);\n }\n }\n\n $GLOBALS['nesting']--;\n }", "title": "" }, { "docid": "3aab0ef7759844c2f248c6c5dc323d0b", "score": "0.56275", "text": "function append_child_pages($content) \r\n{\r\n\tif (is_page()) \r\n\t{\r\n\t\tglobal $post;\r\n\t\t//print_r($post);\r\n\t\t$children = '<ul>'.wp_list_pages('title_li=&child_of='.$post->ID).'</ul>';\r\n\t}\r\n\treturn $content.$children;\r\n}", "title": "" }, { "docid": "9fb5912951dd591cfb414d9e50cbd3c4", "score": "0.5569489", "text": "private function updateHeiarchPath()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\tif ($this->def->parentField)\r\n\t\t{\r\n\t\t\t$path = $this->getHeiarchyPath();\r\n\r\n\t\t\t$result = $dbh->Query(\"select id from \".$this->object_table.\" where \".$this->def->parentField.\"='\".$this->id.\"'\");\r\n\t\t\t$num = $dbh->GetNumberRows($result);\r\n\t\t\tfor ($i = 0; $i < $num; $i++)\r\n\t\t\t{\r\n\t\t\t\t$oid = $dbh->GetValue($result, $i, \"id\");\r\n\t\t\t\t$obj = new CAntObject($dbh, $this->object_type, $oid);\r\n\t\t\t\t$obj->setValue(\"path\", $path);\r\n\t\t\t\t$obj->save(false);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d37ed7d434a43e61f14c49c0ecc1978b", "score": "0.55260783", "text": "function get_path($node) {\r\n $database = new Database();\r\n $sql = '';\r\n $sql = \"SELECT parent FROM \" . TABLE_NAME . \" WHERE title ='\" . $node . \"';\"; \r\n $database->query($sql); \r\n $row = $database->single(); \r\n $path = array();\r\n if($row['parent'] != '') {\r\n $path[] = $row['parent']; \r\n $path = array_merge(get_path($row['parent']), $path); // more\r\n } \r\n return $path; \r\n}", "title": "" }, { "docid": "cd7f36447dad6d18a09db5dfabdaac86", "score": "0.5522619", "text": "public function testUpdateAndAddChildrenArray() {\n for ($i = 1; $i < 6; $i++) {\n $this->__testSaveRoot(false, 1, true);\n }\n }", "title": "" }, { "docid": "8d42fd392402696eb5830675156f0a55", "score": "0.5449134", "text": "public function addChild($parent, $child);", "title": "" }, { "docid": "faf5d211fa9f3d3e023a515cf3ad0a98", "score": "0.5414741", "text": "function vikinger_menu_add_children($menu_item_child, &$menu_items) {\r\n for ($i = 0; $i < count($menu_items); $i++) {\r\n if ($menu_items[$i]['id'] === $menu_item_child['parent_id']) {\r\n $menu_items[$i]['children'][] = $menu_item_child;\r\n return;\r\n }\r\n\r\n // iterate over children if they exist\r\n if (count($menu_items[$i]['children']) > 0) {\r\n vikinger_menu_add_children($menu_item_child, $menu_items[$i]['children']);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "75ad410cb075392eabebd93ef2742111", "score": "0.5398672", "text": "function respawn_tree(&$tree, &$rtree, $path, $values = 0){\n\t\tif(!$tree) return;\n\n\t\t$pathhasmore = count($path);\n\t\t$key = array_shift($path);\n\t\t$valuesRow = $values;\n\n\n\t\tif(is_array($values) && is_array(current($values)) ){\n\t\t\t\t$valuesRow = current($values);\n\t\t}\n\n\t\tif(is_array($values)) reset($values);\n\t\tdo{\n\t\t\t// is first instance of the branch?\n\t\t\tif(!isset($rtree['_result'])){\n\t\t\t\t$rtree = array();\n\t\t\t\t$rtree['_text'] = & $tree['_text'];\n\t\t\t\t$rtree['_keys'] = & $tree['_keys'];\n\t\t\t\t$rtree['_result'] = array();\n\t\t\t\tarray_push($rtree['_result'], ($pathhasmore) ? array('_data' => 0) : array('_data' => $valuesRow));\n\t\t\t}else if(!$pathhasmore){\n\t\t\t\tarray_push($rtree['_result'], array('_data' => $valuesRow));\n\t\t\t}\n\n\t\t\tif(in_array($key,$tree['_keys'])){\n\t\t\t\t$iterscount = count($rtree['_result']) - 1;\n\t\t\t\trespawn_tree($tree[$key], $rtree['_result'][$iterscount][$key], $path, $valuesRow);\n\t\t\t}\n\n\t\t}while(is_array($values) && is_array($valuesRow=next($values)));\n\t}", "title": "" }, { "docid": "6b5d194af936c24a6d0588657ee32529", "score": "0.53871083", "text": "private function add_children() {\n\t\tif ( ! $this->get_children() ) {\n\t\t\t$block = $this->create_block( 'TextBlock', [\n\t\t\t\t'parent' => $this,\n\t\t\t\t'content' => $this->get_content(),\n\t\t\t] );\n\t\t\t$this->add_child( $block );\n\t\t}\n\t}", "title": "" }, { "docid": "c386f728092fd4dc409aa04ca3db7150", "score": "0.5378753", "text": "function loadItems($path, $parentID = 0, $level = 0, $parentIDX = 0)\n{\n global $app;\n $retVal = 0;\n $sql = \"select CatConID, ParentID, Tag, Label, TextBrief, TextChunk, TextFooter, TextList from catcon where ModName = '\" . $this->modName . \"' and ParentID = $parentID order by Level\";\n $result = mysql_query($sql, $this->db);\n if ($result && mysql_num_rows($result)) {\n $retVal = mysql_num_rows($result);\n //$parent[\"childcount\"] = $retVal;\n $tmpRay = array();\n while($curRow = mysql_fetch_array($result)) {\n array_push($tmpRay, $curRow);\n }\n foreach($tmpRay as $curRow) {\n $curRow[\"path\"] = substr($path . \"/\" . $curRow[\"Tag\"], strlen($this->modName) + 1);\n $curRow[\"level\"] = $level;\n $tmpNum = array_push($this->items, $curRow);\n $childCount = $this->loadItems($path . \"/\" . $curRow[\"Tag\"], $curRow[\"CatConID\"], $level + 1, $tmpNum-1);\n $this->items[$tmpNum-1][\"childcount\"] = $childCount;\n }\n }\n return $retVal;\n}", "title": "" }, { "docid": "25d09227f82fcbe5a4cd24055a0b86b9", "score": "0.5375067", "text": "public function insert(){\n\t\t// rename($this->path, $this->path.\"sdfsd\");\n\t}", "title": "" }, { "docid": "d7f41e5101e8f333b8acba90ae2729da", "score": "0.53614366", "text": "public function insertMediaTreeNode($parentId, $name, $languageId);", "title": "" }, { "docid": "f5d4fd2f8fe704d44b6ae8f4f1c46b74", "score": "0.53596586", "text": "public function saveItems($obj) {\n DB::table('career_path_hierarchies')->insert($obj);\n }", "title": "" }, { "docid": "8860f6f0d4df7c6ceb8973a31f1431d0", "score": "0.5288472", "text": "private function addChildren($parent,$int){\n $i = 1;\n while($i < $int){\n $child = array();\n $child[\"child_\".$i] = array();\n array_push($parent,$child);\n $i++;\n }\n\n foreach($parent as $key => $value){\n $temp = $parent[$key];\n $parent[\"key_\".$key] = $temp;\n unset($parent[$key]);\n }\n\n return $parent;\n }", "title": "" }, { "docid": "f4f62028e808981e30cda6e5badec6c7", "score": "0.52691746", "text": "public function populate()\n {\n $paths = $this->getChildren();\n\n foreach ($paths as $path) {\n $path = str_replace($this->contentDir . DIRECTORY_SEPARATOR, '', $path);\n\n $basename = basename($path);\n\n if (substr($basename, 0, 1) == '_') {\n // skip items that start with underscore, they are hidden\n continue;\n }\n\n $item = new Item($basename, $path . '/', $this->baseUrl);\n $this->items[] = $item;\n }\n\n // If we are at the actual site root, we need to add an item to Home\n if ($this->includeHome && empty($this->rootItem) && !empty($this->items)) {\n $home = new Item('Home', '/', $this->baseUrl);\n array_unshift($this->items, $home);\n }\n }", "title": "" }, { "docid": "0cc136f0ae670aa3fe5524a5d41bab09", "score": "0.5261679", "text": "private function add_path(&$parent, $path, $func) {\n\t\t$path_seg = array_shift($path);\n\t\tif($path_seg == NULL) {\n\t\t\t$parent->set_action($func);\n\t\t} else {\n\t\t\tif($path_seg == '@') {\n\t\t\t\tif(!($child = $parent->get_var_child())) {\n\t\t\t\t\t$child = $parent->add_var_child();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!($child = $parent->get_child($path_seg))) {\n\t\t\t\t\t$child = $parent->add_child($path_seg);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->add_path($child, $path, $func);\n\t\t}\n\t}", "title": "" }, { "docid": "6f9c655b69b07c13786bf28de6c8aadb", "score": "0.5253986", "text": "function inject_hierarchy_entry( $existing = array(), $new = array(), $post_type = null )\n {\n // note that $existing is already in order (but not multi-dimensional) and we\n // want to inject $new in the proper place on the proper level\n\n $order = intval( $new['order'] );\n $last_index = 0;\n $target_index = -1;\n\n // loop through and find out where we need to insert\n for( $i = 0; $i < count( $existing ); $i++ )\n {\n if( isset( $existing[$i]['parent'] ) && $existing[$i]['parent'] == $new['parent'] )\n {\n if( $existing[$i]['post_type'] == 'page' ) // otherwise we might inject within CTP entries\n {\n // we only want to proceed when we're working with the first level\n $last_index = $i;\n if( $order < intval( $existing[$i]['order'] ) )\n {\n // we've hit a ceiling\n $target_index = $last_index;\n break;\n }\n }\n }\n }\n\n // we might be dealing with the last entry\n if( $target_index === -1 )\n $target_index = count( $existing );\n\n // we'll insert our new entry in the appropriate place\n array_splice( $existing, $target_index, 0, array( $new ) );\n\n return $existing;\n\n }", "title": "" }, { "docid": "a482d5bde4a698762391237538084fbc", "score": "0.52502036", "text": "public function insertMenuChild($bind)\n {\n \n $menuChildSorted = $this->findSortMenuChild();\n \n $this->create(\"tbl_menu_child\", [\n 'menu_child_label' => $bind['menu_child_label'],\n 'menu_child_link' => $bind['menu_child_link'],\n 'menu_id' => $bind['menu_id'],\n 'menu_sub_child' => $bind['menu_sub_child'],\n 'menu_child_sort' => $menuChildSorted\n ]);\n \n $sql = \"SELECT ID, menu_child_link FROM tbl_menu_child WHERE ID = ?\";\n \n $this->setSQL($sql);\n \n $getChildLink = $this->findColumn([$this->lastId()]);\n \n $data_child = array(\"menu_child_link\" => ['#']);\n\n $menuChildLink = (!empty($getChildLink['menu_child_link'])) ?: $this->modify(\"tbl_menu_child\", $data_child, \"ID = \".(int)$getChildLink['ID']);\n \n }", "title": "" }, { "docid": "ad5b8f02e8ef76516501fe28d4b2e592", "score": "0.5241973", "text": "function createTree ($path) {\n $dirNames = explode(DIRECTORY_SEPARATOR,$path);\n for($i=0;$i<count($dirNames);$i++) {\n if($dirNames[$i] == \"\") {\n continue;\n }\n $dirFullPaths[$i] = \"\";\n for ($j=0; $j <= $i; $j++) { \n $dirFullPaths[$i].= $dirNames[$j].DIRECTORY_SEPARATOR;\n }\n $dirContents[$i] = listDir(realpath($dirFullPaths[$i]));\n }\n echo \"<ul class='tree'>\";\n if(count($dirContents) == 1)\n echo \"<li class='tree-item opened current'><i onclick='expandTree(this)' class='material-icons'>arrow_drop_down</i>&3;\".addslashes($dirNames[0]).\"')\\\">&0;$dirNames[0]</a></li>\";\n else\n echo \"&2;&3;\".addslashes($dirNames[0]).\"')\\\">&0;$dirNames[0]</a></li>\";\n printTree($dirContents, $dirFullPaths ,$dirNames);\n echo \"</ul>\";\n}", "title": "" }, { "docid": "0c274389f22d85554177a4e7ee153f8b", "score": "0.522663", "text": "function addChild(){\n\t\n\tif(array_key_exists('add', $_POST))\n\t{\n\t\tif(checkEmpty($_POST['firstName']) and checkValidDate($_POST['DOB-Day'],$_POST['DOB-Month'],$_POST['DOB-Year']))\n\t\t{\n\n\t\t\t$sql = \"INSERT INTO `children` (`parentID1`,`cName`, `cDOBDay`, `cDOBMonth`, `cDOBYear`) VALUES (?,?,?,?,?)\";\n\n\t\t\t$stmt = mysqli_stmt_init($conn);\n\t\t\tif(!mysqli_stmt_prepare($stmt, $sql))\n\t\t\t{\n\n\t\t\t\t$flag=\"ERROR SQL Statement Failed\";\n\t\t\t\t$error->addFlag($flag);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmysqli_stmt_bind_param($stmt, \"ssiii\", $_SESSION['id'], $_POST['firstName'],$_POST['DOB-DAY'],$_POST['DOB-Month'],$_POST['DOB-Year']);\n\t\t\t\tmysqli_stmt_execute($stmt);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c38b535615ef25043e5a27a94d767513", "score": "0.5205537", "text": "function update_category_rel($dbo, $cat_id){\n //redo this for the categories table, do I need to select child?\n $cats = $_POST['cat'];\n foreach($cats as $cat){\n $stmt = $dbo->prepare(\"INSERT INTO CGRYREL(CGRYREL_ID_PARENT, CGRYREL_ID_CHILD) VALUES(:id, :cat_id)\");\n $stmt->bindParam(':cat_id', $cat_id);\n $stmt->bindParam(':id', $cat);\n\n try_or_die($stmt);\n }\n\n $stmt = null;\n\n}", "title": "" }, { "docid": "01c7faa6977b116ac41688990226f77f", "score": "0.5180548", "text": "public function addChildrenFromObjectAtPropertyToTreeAtPath(\n $object,\n $propertyKeyPath = 'children',\n $treePath = '0'\n );", "title": "" }, { "docid": "22c227139eaad064ec335bde23111f25", "score": "0.51711535", "text": "public function getPathChild(array $path): NodeInterface;", "title": "" }, { "docid": "1f6c0daa49f0457c7f7a73320e87f27d", "score": "0.5155453", "text": "public function addChild(File $child);", "title": "" }, { "docid": "bbc329cc967551ccc905a35c44958b3f", "score": "0.51514316", "text": "public function addChild(array $values);", "title": "" }, { "docid": "b5f2e000790c5a5d2de990d9546425c6", "score": "0.5147378", "text": "public function loadTree();", "title": "" }, { "docid": "049f8482fd46f723a595c1734f3990ef", "score": "0.5141851", "text": "public function addChild( \\Aimeos\\MW\\Tree\\Node\\Iface $node );", "title": "" }, { "docid": "1d862399e6faf81a981b06dac558e491", "score": "0.51380295", "text": "function _parseaddressnl_civix_insert_navigation_menu(&$menu, $path, $item, $parentId = NULL) {\n static $navId;\n\n // If we are done going down the path, insert menu\n if (empty($path)) {\n if (!$navId) $navId = CRM_Core_DAO::singleValueQuery(\"SELECT max(id) FROM civicrm_navigation\");\n $navId ++;\n $menu[$navId] = array (\n 'attributes' => array_merge($item, array(\n 'label' => CRM_Utils_Array::value('name', $item),\n 'active' => 1,\n 'parentID' => $parentId,\n 'navID' => $navId,\n ))\n );\n return true;\n } else {\n // Find an recurse into the next level down\n $found = false;\n $path = explode('/', $path);\n $first = array_shift($path);\n foreach ($menu as $key => &$entry) {\n if ($entry['attributes']['name'] == $first) {\n if (!$entry['child']) $entry['child'] = array();\n $found = _parseaddressnl_civix_insert_navigation_menu($entry['child'], implode('/', $path), $item, $key);\n }\n }\n return $found;\n }\n}", "title": "" }, { "docid": "51a3b2cdd925cdb8b103aa2ca2be8a1b", "score": "0.5132753", "text": "function path_add_to_cache($node_id, $paths)\n{\n\tpath_db_load();\n\tglobal $db_prefix;\n\n\tforeach ($paths as $path)\n\t{\n\t\tif (isset($_SESSION['murrix']['pathcache_node'][$path]))\n\t\t{\n\t\t\tif ($_SESSION['murrix']['pathcache_node'][$path] == $node_id)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\tpath_del_from_cache($node_id);\n\t\t}\n\t\n\t\t$query = \"INSERT INTO `\".$db_prefix.\"pathcache` (`node_id` , `path`, `language`) VALUES('$node_id', '$path', '\".$_SESSION['murrix']['pathcache_language'].\"')\";\n\t\tif (!($result = mysql_query($query)))\n\t\t{\n\t\t\t$message = \"<b>An error occured while inserting</b><br/>\";\n\t\t\t$message .= \"<b>Table:</b> \".$db_prefix.\"pathcache`<br/>\";\n\t\t\t$message .= \"<b>Query:</b> $query<br/>\";\n\t\t\t$message .= \"<b>Error Num:</b> \" . mysql_errno() . \"<br/>\";\n\t\t\t$message .= \"<b>Error:</b> \" . mysql_error() . \"<br/>\";\n\t\t\techo $message;\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isset($_SESSION['murrix']['pathcache_path'][$node_id]))\n\t\t\t$_SESSION['murrix']['pathcache_path'][$node_id] = array($path);\n\t\telse\n\t\t{\n\t\t\tif (!in_array($path, $_SESSION['murrix']['pathcache_path'][$node_id]))\n\t\t\t\tarray_push($_SESSION['murrix']['pathcache_path'][$node_id], $path);\n\t\t}\n\n\t\t$_SESSION['murrix']['pathcache_node'][$path] = $node_id;\n\t}\n}", "title": "" }, { "docid": "47a95deebd425632f118e7fd5b45a286", "score": "0.5129776", "text": "function get_children(){\n //\n //Scan the server for folders in this full_path\n $paths = scandir($this->full_name);\n //\n //Map all the ifolders to nodes. \n foreach ($paths as $path){\n //\n //Get the basename of this path\n $name = pathinfo($path,PATHINFO_BASENAME);\n //\n //Yield an ordinary folder/file, indexed by the name\n //\n //Find out whether this is a folder or a file\n //if file create new file else new folder\n if(is_dir($path)){\n //\n yield $name => new folder($name, $path, $this);\n }else{\n //\n yield $name => new file($name, $path, $this);\n }\n } \n }", "title": "" }, { "docid": "52e3679b09c62db4268c2da66aea2467", "score": "0.51276076", "text": "function saveMenu($parent, $children) {\n\t\t\t//print \"sM($parent, \".print_r($children, true).\")<br>\\n\";\n\t\t\tglobal $db, $site;\n\t\t\t$i = 1;\n\t\t\tforeach ($children as $k => $v) {\n\t\t\t\t$guid = substr($children[$k]['id'], 3);\n\t\t\t\tif ($guid) {\n\t\t\t\t\t$query = \"UPDATE pages SET parent = '$parent', sort_order=$k WHERE guid = '$guid' AND msv=\".$site->id;\n\t\t\t\t\t$db->query($query);\n\t\t\t\t\t//print \"$query<br>\\n\";\n\t\t\t\t}\n\t\t\t\t// If this menu item has submenu items recursively call to process each submenu\n\t\t\t\tif (isset ( $children[$k]['children'][0] )) {\n\t\t\t\t\t$this->saveMenu($guid, $children[$k]['children']);\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b4b82e8b7cf51353a55971750143ffba", "score": "0.512355", "text": "public function create( $parent_id = null, $path = \"\" ) {\r\n $this->data[ 'subpage' ] = true;\r\n $this->_my_manage( $path, null, $parent_id );\r\n }", "title": "" }, { "docid": "bc17c9c03e63e18db4c349a8deac2844", "score": "0.5114913", "text": "function submit_category_rel($dbo, $cat_id){\n //redo this for the categories table, do I need to select child?\n $cats = $_POST['cat'];\n foreach($cats as $cat){\n $stmt = $dbo->prepare(\"INSERT INTO CGRYREL(CGRYREL_ID_PARENT, CGRYREL_ID_CHILD) VALUES(:id, :cat_id)\");\n $stmt->bindParam(':cat_id', $cat_id);\n $stmt->bindParam(':id', $cat);\n\n try_or_die($stmt);\n }\n\n $stmt = null;\n\n}", "title": "" }, { "docid": "380f6fca60d24b0a99fec8617d549d00", "score": "0.5112828", "text": "function insertContent($commingin = '',$eject = '',$level = 0)\n\t{\n\t\t\n\t\t//echo \"info \" . $this->XMLlist->cur_node() . '(' . $this->XMLlist->show_cur_attrib('ID') . ')' . \"[\" . $this->XMLlist->position_stamp() . \"] $commingin, $eject, $level \\n\";\n\t\t\n\t\tif($commingin <> '')\n\t\t{\n\t\t\t//echo $commingin . '=' . $this->XMLlist->position_stamp() . \"\\n\";\n\t\t\t/*\n\t\t\techo $commingin . '=' . $this->XMLlist->position_stamp() . \"\\n\";\n\t\t\t\n\t\t\t$len1 = strlen($commingin);\n\t\t\t$len2 = strlen($this->XMLlist->position_stamp());\n\t\t\tif($len1 < $len2)\n\t\t\t{\n\t\t\t\t$min = strlen($len1);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$min = strlen($len2);\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t//looking for starttree\n\t\t\tif($level == 0)\n\t\t\t{\n\t\t\t\t$this->incomming_find = false; //to find spezific stamp\n\t\t\t\t\n\t\t\t\t$this->XMLlist->go_to_stamp($commingin);\n\t\t\t\n\t\t\t\twhile(!($this->XMLlist->cur_node() == 'TREE') && !($this->XMLlist->cur_node() == 'FINAL'))\n\t\t\t\t{\n\t\t\t\t\t//echo $this->XMLlist->cur_node();\n\t\t\t\t\tif(!$this->XMLlist->parent_node())return false;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$deep_level = count($kaki = explode('.',$this->XMLlist->position_stamp())) - 1;\n\t\t\t\t/*\n\t\t\t\techo $this->XMLlist->position_stamp();\n\t\t\t\tfor($k = 0;$k < count($kaki); $k++)\n\t\t\t\t{\n\t\t\t\t\techo $kaki[$k] . \"\\n\";\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t$this->array_incomming_list = explode('.',$commingin);\n\t\t\t\t/*\n\t\t\t\tfor($j = 0;$j < count($this->array_incomming_list); $j++)\n\t\t\t\t{\n\t\t\t\t\techo $this->array_incomming_list[$j] . \"\\n\";\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\tfor($i = $this->allowed_idcs($deep_level);$i < $this->XMLlist->index_child(); $i++)\n\t\t\t\t{\n\t\t\t\n\t\t\t\t\t$this->XMLlist->child_node($i);\n\t\t\t\t\t$stamp = $this->XMLlist->position_stamp();\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif($this->XMLlist->cur_node() == \"CONTENT\" || $this->XMLlist->cur_node() == \"LOAD_TEMPLATE\" || $this->XMLlist->cur_node() == \"PROGRAMM\")\n\t\t\t\t\n\t\t\t\t\t$this->insertContent($commingin,$eject,$deep_level + 1);\n\t\t\t\t\n\t\t\t\n\t\t\t\t$this->XMLlist->go_to_stamp($stamp);\n\t\t\t\t$this->XMLlist->parent_node();\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*\n\t\t\telse\n\t\t\t{\n\t\t\t\t$array_list = explode(',',$commingin);\n\t\t\t\t$sub_stamp = $array_list[0];\n\t\t\t\t\n\t\t\t\tfor($i = 1; $i < count($array_list);$i++)\n\t\t\t\t{\n\t\t\t\t\t$sub_stamp .= $array_list[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\tif($this->XMLlist->cur_node() == \"CONTENT\" || $this->XMLlist->cur_node() == \"LOAD_TEMPLATE\" || $this->XMLlist->cur_node() == \"PROGRAMM\")\n\t\t\t{\t\n\t\t\t\t$this->insertContent();\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\techo substr($commingin,0,$min) . ':' . substr($this->XMLlist->position_stamp(),0,$min) . \"\\n\";\n\t\t\tIf(substr($commingin,0,$min) == substr($this->XMLlist->position_stamp(),0,$min) )\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\t\n\t\tif($eject <> '')\n\t\t{\n\t\t\t//echo $eject . '=' . $this->XMLlist->position_stamp() . \"\\n\";\n\t\t\tIf($eject == $this->XMLlist->position_stamp())\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//echo \"steige aus \\n\";\n\t\t\t\t$this->eject = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\nif($this->show_time)\n{\necho ($this->microtime_float() - $this->timestamp2);\necho \" \" . $this->aktion . \" \";\necho \"<br>\\n\";\n\n$this->aktion = $this->XMLlist->cur_node() . \" name=\" . $this->XMLlist->show_cur_attrib('NAME') . \" id=\" . $this->XMLlist->show_cur_attrib('ID');\n$this->timestamp2 = $this->microtime_float();\n}\n\n\t\t//activate objects in parametertags\n\t\tif($this->XMLlist->cur_node() == \"PARAM\" && !$this->eject)\n\t\t{\n\t\tfor($i = $this->allowed_idcs($level);$i < $this->XMLlist->index_child(); $i++)\n\t\t{\n\t\t\t$this->XMLlist->child_node($i);\n\t\t\t$stamp = $this->XMLlist->position_stamp();\n\t\t\tif(\n\t\t\t\t$this->XMLlist->cur_node() == \"ELEMENT\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"OBJECT\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"LITERAL\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"PROGRAMM\"\n\n\t\t\t\t\n\t\t\t )\n\t\t\t\t$this->insertContent($commingin,$eject,$deep_level + 1);\n\n\t\t\t\t\n\t\t\t//echo $this->XMLlist->cur_node(); content\n\t\t\t$this->XMLlist->go_to_stamp($stamp);\n\t\t\t$this->XMLlist->parent_node();\n\t\t}\n\t\t}\n\t\t\n\t\t//local variable for cur node in stuctur (xml_multitree shows malfunction in later prozess)\n\t\t$my_structur = $this->XMLlist->cur_node();\n\t\t\n\t\t\n\t\t//----------------PROGRAMM-------------------------\n\t\tif($this->XMLlist->cur_node() == \"PROGRAMM\" && !$this->eject)\n\t\t{\n\t\t\t$void = false;\n\t\t\tfor($i = $this->allowed_idcs($level);$i < $this->XMLlist->index_child(); $i++)\n\t\t\t{\n\n\t\t\t\n\t\t\t$this->XMLlist->child_node($i);\n\t\t\t$stamp = $this->XMLlist->position_stamp();\n\t\t\t\n\t\t\tif(\n\t\t\t\t\t$this->XMLlist->cur_node() == \"PARAM\"\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t//---------------------------------------------------\t\n\t\t\t\t\t\t$find_idx = 0;\n\t\t\t\t\t\t$content = $this->XMLlist->show_cur_data($find_idx++);\n\t\t\t\t\t\t//echo $this->XMLlist->show_cur_attrib('NAME') . $this->XMLlist->index_child();\n\t\t\t\t\t\tfor($gh = 0;$gh < $this->XMLlist->index_child(); $gh++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->XMLlist->child_node($gh);\n\t\t\t\t\t\t\t$stampX = $this->XMLlist->position_stamp();\n\t\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t$this->XMLlist->cur_node() == \"OBJECT\"\n\n\t\t\t\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->insertContent();\n\t\t\t\t\t\t\t//$this->writes_object_content($this->XMLlist);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo $this->XMLlist->cur_node(); content\n\t\t\t\t\t\t\t$this->XMLlist->go_to_stamp($stampX);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//object ermittelt\n\t\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t!is_Null($obj = $this->XMLlist->show_cur_obj())\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//echo get_class($obj) . \"<p>\";\n\t\t\t\t\t\t\t\t//if(is_subclass_of($obj,'plugin'))\n\t\t\t\t\t\t\t\t//$content[$gh] = $obj->out();\n\t\t\t\t\t\t\t\t$content .= $obj->out();\n\t\t\t\t\t\t\t\t//echo $content;\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->XMLlist->parent_node();\n\t\t\t\t\t\t\t$content .= $this->XMLlist->show_cur_data($find_idx++);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t$key = $this->XMLlist->show_cur_attrib('NAME');\n\t\t\t\t\t$cont = $content;\n\t\t\t\t\t\n\t\t\t\t\tif(strtoupper($key) == 'IF')\n\t\t\t\t\t//echo $cont;\n\t\t\t\t\t//Backdoor\n\t\t\t\t\t$void = !eval('return '\n\t\t\t\t\t. str_replace(\n\t\t\t\t\tarray('$',';'),\n\t\t\t\t\tarray(' ','' ),\n\t\t\t\t\t$cont)\t. ';');\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(\n\t\t\t\t!$void\n\t\t\t\t&&\n\t\t\t\t(\n\t\t\t\t$this->XMLlist->cur_node() == \"CONTENT\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"PROGRAMM\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"ELEMENT\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"OBJECT\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"LITERAL\"\n\t\t\t\t)\n\n\t\t\t )\n\t\t\t {\n\t\t\t\t \n\t\t\t\t$this->insertContent($commingin,$eject,$deep_level + 1);\n\t\t\t\t\n\t\t\t }\t\n\t\t\t\t\n\t\t\t//echo $this->XMLlist->cur_node(); content\n\t\t\t$this->XMLlist->go_to_stamp($stamp);\n\t\t\t$this->XMLlist->parent_node();\n\n\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t}\t\t\n\t\t\n\t\t//----------------LOAD_TEMPLATE-------------------------\n\t\t//echo $this->XMLlist->cur_node() . \" \\n\";\n\t\tif($this->XMLlist->cur_node() == \"LOAD_TEMPLATE\" && !$this->eject)\n\t\t{\n\t\t\t\n\t\t\t$loading_id = $this->XMLlist->show_cur_attrib('ID');\n\t\t\t$loading_use = $this->XMLlist->show_cur_attrib('USE');\n\t\t\t$loading_method = $this->XMLlist->show_cur_attrib('METHOD');\n\t\t\t\n\t\t\t$this->heap['template'][$loading_id] = $this->XMLlist->show_cur_data();\n\t\t\t\n\t\t\t//$this->XMLlist->PostToHost($this->XMLlist->show_cur_data(), \"HTTP://www.XXXX.de\", $this->heap['template'][$loading_use],\"UTF-8\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t//!!! ben�tige Objekt\n\t\t//set both positions in xml-trees\t\t\n//----------------Content-------------------------\n\t\tif($this->XMLlist->cur_node() == \"CONTENT\" && !$this->eject)\n\t\t{\n\t\t\n\t\t\t//changes maintemplate, to edit an non maintemplate\n\t\t\tif ($other_template = $this->XMLlist->show_cur_attrib('ID'))\n\t\t\t{\n\t\t\t\n\t\t\t\tif($this->template = $this->heap['template'][$other_template])\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\techo \"Der Name $other_template konnte nicht bei den Templates gefunden werden\";\n\t\t\t\t$this->template = $this->maintemplate;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t$tag_name = $this->XMLlist->show_cur_attrib('NAME');\n\t\t\n\t\t\t\t$void = false;\n\t\t\n\t\t\t\tfor($i = $this->allowed_idcs($level);$i < $this->XMLlist->index_child(); $i++)\n\t\t\t\t{\n\t\t\t\t\t$this->XMLlist->child_node($i);\n\t\t\t\t\t$stamp3 = $this->XMLlist->position_stamp();\n\t\t\t\t\tif(\n\t\t\t\t\t$this->XMLlist->cur_node() == \"PARAM\"\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//---------------------------------------------------\t\n\t\t\t\t\t\tfor($gh = 0;$gh < $this->XMLlist->index_child(); $gh++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->XMLlist->child_node($gh);\n\t\t\t\t\t\t\t$stampX = $this->XMLlist->position_stamp();\n\t\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t$this->XMLlist->cur_node() == \"OBJECT\"\n\n\t\t\t\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->insertContent();\n\t\t\t\t\t\t\t//$this->writes_object_content($this->XMLlist);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo $this->XMLlist->cur_node(); content\n\t\t\t\t\t\t\t$this->XMLlist->go_to_stamp($stampX);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//object ermittelt\n\t\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t!is_Null($obj = $this->XMLlist->show_cur_obj())\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//echo get_class($obj) . \"<p>\";\n\t\t\t\t\t\t\t\t//if(is_subclass_of($obj,'plugin'))\n\t\t\t\t\t\t\t\t//$content[$gh] = $obj->out();\n\t\t\t\t\t\t\t\techo $obj->out();\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->XMLlist->parent_node();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t$key = $this->XMLlist->show_cur_attrib('NAME');\n\t\t\t\t\t$cont = $this->XMLlist->show_cur_data();\n\t\t\t\t\t\n\t\t\t\t\tif(strtoupper($key) == 'IF')\n\t\t\t\t\t{\n\t\t\t\t\t$void = eval('return' . str_replace(\n\t\t\t\t\tarray('$','(',')',';'),\n\t\t\t\t\tarray(' ',' ( ', ' ) ','' ),\n\t\t\t\t\t$cont) . ';');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t//{\n\t\t\t\t\t$tag_array[$this->XMLlist->show_cur_attrib('NAME')] = $this->XMLlist->show_cur_data();\n\t\t\t\t\t//}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t//echo $this->XMLlist->cur_node(); content\n\t\t\t\t\t$this->XMLlist->go_to_stamp($stamp3);\n\t\t\t\t\t$this->XMLlist->parent_node();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->XMLlist->change_URI($this->structur);\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t$this->XMLlist->change_URI($this->template);\n\t\t//echo $tag_name . ' ' . $tag_array['id'] . '<br>';\n\t\t$this->XMLlist->seek_node($tag_name,$tag_array);\n\t\t//echo $this->XMLlist->cur_node() . '<br>';\n\t\t//echo \"werde aufgerufen\". $this->XMLlist->show_cur_attrib('CLASS');\n\t\t\n\t\t$this->XMLlist->change_URI($this->structur);\n\t\t\n\t\tfor($i = $this->allowed_idcs($level);$i < $this->XMLlist->index_child(); $i++)\n\t\t{\n\n\t\t\t\n\t\t\t$this->XMLlist->child_node($i);\n\t\t\t$stamp = $this->XMLlist->position_stamp();\n\t\t\tif(\n\t\t\t\t!$void\n\t\t\t\t&&\n\t\t\t\t(\n\t\t\t\t$this->XMLlist->cur_node() == \"ELEMENT\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"OBJECT\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"LITERAL\"\n\t\t\t\t)\n\n\t\t\t )\n\t\t\t \n\t\t\t\t$this->insertContent($commingin,$eject,$deep_level + 1);\n\t\t\t\t\n\t\n\t\t\t\t\n\t\t\t\tif($this->XMLlist->cur_node() == \"ELEMENT\" && $this->XMLlist->show_cur_attrib('VALUE'))\n\t\t\t\t{\n\t\t\t\t//\techo $this->XMLlist->cur_node() . ' : ' . $this->XMLlist->show_cur_attrib('TYPE') . '-' . $this->XMLlist->show_cur_attrib('VALUE') . '::';\n\t\t\t\t$this->XMLlist->change_URI($this->template);\n\t\t\t\t//echo $this->XMLlist->cur_node() . '<br>';\n\t\t\t\t$this->XMLlist->parent_node();\n\t\t\t\t$this->XMLlist->change_URI($this->structur);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//echo $this->XMLlist->cur_node(); content\n\t\t\t$this->XMLlist->go_to_stamp($stamp);\n\t\t\t$this->XMLlist->parent_node();\n\t\t\t\tif ($this->XMLlist->cur_node() == \"CONTENT\" && $this->XMLlist->show_cur_attrib('ID') && ($this->XMLlist->show_pointer() == ($this->XMLlist->index_child() - 1)))\n\t\t\t\t\t{\n\t\t\t\n\t\t\t\t\t$this->template = $this->maintemplate;\n\t\t\t\t\t}\n\t\t}\n\t\t\t\n\t\t}\n//----------------End Content-------------------------\n\t\t//an object will be called looks function writes_object_content\n\t\tif($this->XMLlist->cur_node() == \"OBJECT\" && !$this->eject)\n\t\t{\n\n\t\t\t//echo \"call the object '\" . $this->XMLlist->show_cur_attrib('ID') . \"' in pos \" . $this->XMLlist->position_stamp() . \"<br>\\n\";\n\t\t\t$this->writes_object_content($this->XMLlist);\n\t\t}\n\n\n\t\t\n//----------------Element-------------------------\n\t\t//insert an simle Element or group of elements\n\t\t\n\t\tif($this->XMLlist->cur_node() == \"ELEMENT\" && !$this->eject)\n\t\t{\n\t\t\n\n\t\t\t//$this->XMLlist->change_idx(0);\n\t\t\t//echo \"<p>\" . $this->XMLlist->cur_node();\n\t\t\t//$this->XMLlist->change_idx(1);\n\t\t\t\n\t\t\t$type = $this->XMLlist->show_cur_attrib('TYPE');\n\t\t\t//id takes a tag of Db. see writes_id_content\n\t\t\t\n\t\t\tif($type == \"id\")\n\t\t\t{\n\t\t\t$id = $this->XMLlist->show_cur_attrib('ID');\n\t\t\t$this->writes_id_content($id,$this->XMLlist);\n\t\t\t}\n\t\t\t//group can include several tags. see writes_group_content\n\t\t\tif($type == \"group\")\n\t\t\t{\n\t\t\t\n\t\t\t\t$id = $this->XMLlist->show_cur_attrib('ID');\n\t\t\t//echo $id;\n\t\t\t\t$this->writes_group_content($id,$this->XMLlist);\n\t\t\t}\n\t\t\t//xhtml creates a tag direct without DB. no individual function\n\t\t\tif($type == \"xhtml\")\n\t\t\t{\n\n\t\t\t\t$mode = explode(';',strtoupper($this->XMLlist->show_cur_attrib('MODE')));\n\t\t\t\t\n\t\t\t\t//finds name and content of the tag\n\t\t\t\t$value = $this->XMLlist->show_cur_attrib('VALUE');\n\t\t\t\t$attrib = $this->XMLlist->show_cur_attrib(); //maybe not nessesary\n\t\t\t\t\n\t\t\t\t//$data2 = $this->XMLlist->show_cur_data(); //ermittelt den inhalt des knotens\n\t\t\t//echo $this->XMLlist->show_cur_data(0);\n\t\t\t\t\n\t\t\t\t//creates a tag in outputdocument\n\t\t\t\t$this->XMLlist->change_URI($this->template);\n\t\t\t\t$stamp = $this->XMLlist->position_stamp();\n\t\t\t\t//to edit current element \n\t\t\t\tif($value <> \"\" )\n\t\t\t\t{\n\t\t\t\t$this->XMLlist->create_node($stamp);\n\t\t\t\t$this->XMLlist->set_node_name($value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$pos_of_object = 0;\n\t\t\t\t//$obj_content = array();\n\t\t\t\t$tagdata[0] = 'hallo';\n\t\t\t\t//creates attributes depending of all params in tag\n\t\t\t\t$this->XMLlist->change_URI($this->structur);\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t//echo $this->XMLlist->show_cur_data();\n\t\t\t\t//Bearbeitung aller unterknoten\n\t\t\t\t//gegenl�ufiger z�hler\n\t\t\t\t$data_array;\n\t\t\t\t$real_pos = 0;\n\t\t\t\t$data_array[0] = ''; \n\t\t\t\t$i;\n\t\t\t\t//$data_array[0] .= $this->XMLlist->show_cur_data(0);\n\t\t\t\tfor($i = $this->allowed_idcs($level);$i < $this->XMLlist->many_cur_data() || $i < $this->XMLlist->index_child(); $i++)\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t//echo \"zaehler1:\" . $real_pos . \" zaehler2:\" . $i . \" loops:\" . $this->XMLlist->index_child() . \" content:\" . $this->XMLlist->show_cur_data($i) . \"<br>\\n\"; \n\t\t\t\tif(is_Null($this->XMLlist->show_cur_data($i)))\n\t\t\t\t{\n\t\t\t\t\t//echo \"null $real_pos \" . $this->XMLlist->index_child();\n\t\t\t\t\t$data_array[$real_pos] .= \"\";\n\t\t\t\t\t//echo $data_array[$real_pos];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//echo $this->XMLlist->show_cur_data($i) . \" $real_pos \" . $i . \" \" . $this->XMLlist->index_child();\n\n\t\t\t\t\t\t$data_array[$real_pos] .= $this->XMLlist->show_cur_data($i);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\tif(\n\t\t\t\t\t$this->XMLlist->cur_node() == \"PARAM\" //parameter f�r attribute\n\t\t\t\t\t)\n\t\t\t\t\t{ //Param list\n\t\t\t\t\t//$real_pos--; //warum\n\t\t\t\t\t//$real_pos++;\n\t\t\t\t\t\t$content = \"\";\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//---------------------------------------------------\t\n\t\t\t\t\t\tfor($gh = 0;$gh < $this->XMLlist->index_child(); $gh++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->XMLlist->child_node($gh);\n\t\t\t\t\t\t\t$stampX = $this->XMLlist->position_stamp();\n\t\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t$this->XMLlist->cur_node() == \"OBJECT\" //verarbeitet alle objekte \n\n\t\t\t\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t$this->insertContent();\n\t\t\t\t\t\t\t//$this->writes_object_content($this->XMLlist);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//kehrt zur�ck zu objekt event unnuetz\n\t\t\t\t\t\t\t$this->XMLlist->go_to_stamp($stampX);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//object ermittelt\n\t\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t!is_Null($obj = $this->XMLlist->show_cur_obj())\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//echo get_class($obj) . \"<p>\";\n\t\t\t\t\t\t\t\tif(is_subclass_of($obj,'plugin'))\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$content[$gh] = $obj->out();\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->XMLlist->parent_node();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t//objekte in param abgearbeitet\n\t\t\t\t\t\t\n\t\t\t\t\t\t$modi = '';\n\t\t\t\t\t\tfor($xt = 0;$xt <= $this->XMLlist->index_child(); $xt++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$modi = $this->XMLlist->show_cur_data(($xt ));\n\t\t\t\t\t\t$this->XMLlist->clear_node_cdata($xt);\n\t\t\t\t\t\t//echo $modi . 'booh';\n\t\t\t\t\t\t//echo \"$modi\" . $content[$xt];\n\t\t\t\t\t\t$this->XMLlist->set_node_cdata($modi . $content[$xt],$xt);\n\t\t\t\t\t\t//\n\t\t\t\t\t\t//$this->XMLlist->set_node_cdata($content[$xt],$xt);\n\t\t\t\t\t\t//clear_node_cdata($pos=null)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//-----------------------------------------------------------------\n\t\t\t\t\t\t\n\t\t\t\t\t$key = $this->XMLlist->show_cur_attrib('NAME');\n\t\t\t\t\t$cont = $this->XMLlist->show_cur_data();\n\t\t\t\t\t\n\t\t\t\t\t$this->XMLlist->change_URI($this->template);\n\t\t\t\t\t$this->XMLlist->set_node_attrib($key,$cont);\n\t\t\t\t\t$this->XMLlist->change_URI($this->structur);\n\n\t\t\t\t\t} //param list end\n\t\t\t//echo $this->XMLlist->cur_node(); content\n\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(\n\t\t\t\t\t$this->XMLlist->cur_node() <> \"PARAM\" || //parameter f�r attribute\n\t\t\t\t\t$this->XMLlist->cur_node() <> \"OBJECT\"\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$real_pos++;\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\t\t$this->XMLlist->go_to_stamp($stamp3);\n\t\t\t\t\t\n\t\t\t\t\t$this->XMLlist->parent_node();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//echo implode($data_array,',');\n\t\t\t\t\t//if($data2 <> \"\")$this->XMLlist->set_node_cdata($data2,0); //needs to be updated, sicks all rows to one\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//$data[$i+1] = $this->XMLlist->show_cur_data($i+1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//echo \"wieder raus $real_pos-------------------<br>\\n\";\n\t\t\t\t//$data_array[$real_pos] .= $this->XMLlist->show_cur_data($this->XMLlist->many_cur_data() - 1);\n\t\t\t\t\n\t\t\t\t//for($zah = 0;$zah < $this->XMLlist->many_cur_data();$zah++){echo $this->XMLlist->show_cur_data($zah) . \" :: $zah<br>\\n\";}\n\t\t\t\t\n\t\t\t\t//for($za = 0;$za < count($data_array);$za++){echo $data_array[$za] . \":: $za ::\" . count($data_array) . \"<br>\\n\";}\n\t\t\t\t\n\n\t\t\t}\n\t\t//$this->XMLlist->change_idx(0);\n\t\t\n\t\t//echo \"werde aufgerufen\". $this->XMLlist->cur_node();\n\t\t\n\t\t\n\t\t//calls all elements or literals in last tag\n\t\tfor($i = $this->allowed_idcs($level);$i < $this->XMLlist->index_child(); $i++)\n\t\t{\n\t\t\t$this->XMLlist->child_node($i);\n\t\t\t$stamp = $this->XMLlist->position_stamp();\n\t\t\tif(\n\t\t\t\t$this->XMLlist->cur_node() == \"ELEMENT\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"LITERAL\"\n\t\t\t\t||\n\t\t\t\t$this->XMLlist->cur_node() == \"OBJECT\"\n\t\t\t\t\n\n\t\t\t )\n\t\t\t\t$this->insertContent($commingin,$eject,$deep_level + 1);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//kontrolle\n\t\t\t\t//echo $this->XMLlist->cur_node() . '/n';\n\t\t\t\t\n\t\t\t\tif($this->XMLlist->cur_node() == \"ELEMENT\" && $this->XMLlist->show_cur_attrib('VALUE'))\n\t\t\t\t{\n\t\t\t\t$this->XMLlist->change_URI($this->template);\n\t\t\t\t$this->XMLlist->parent_node();\n\t\t\t\t$this->XMLlist->change_URI($this->structur);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//leafs current tag\n\t\t\t//echo $this->XMLlist->cur_node(); content\n\t\t\t$this->XMLlist->go_to_stamp($stamp);\n\t\t\t\n\t\t\t\n\t\t\t$this->XMLlist->parent_node();\n\t\t}\t\t\n\t\t\n\t\t//hier muss die abfrage fuer den Kontext hin, da hier bereits alle nicht Parmetertags abgearbeitet wurden\n\t\t//request for Kontext is needed to be here, because of all subnodes, whicht are allready actualised.\n\t\t\n\t\t//echo $my_structur ;\n\t\tif($type == \"xhtml\" && $my_structur == \"ELEMENT\" && !$this->eject)\n\t\t{\n\t\t\t/*\n\t\tfor($i = $this->allowed_idcs($level); $i < $this->XMLlist->index_child(); $i++)\n\t\t{\n\t\t\t\t//if a node exist\n\t\t\t\tif($this->XMLlist->index_child() > $i)\n\t\t\t\t{\n\t\t\t\t\t$this->XMLlist->child_node($i);\n\t\t\t\t\t$stamp3 = $this->XMLlist->position_stamp();\n\t\t\t\t\t\n\t\t\t\t\t//*\n\t\t\t\t\tif(\n\t\t\t\t\t$this->XMLlist->cur_node() == \"OBJECT\" //objekte f�r die textknoten\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t//$real_pos++;\n\t\t\t\t\t\t\t//$this->insertContent(); //!\n\t\t\t\t\t\t\t//$this->writes_object_content($this->XMLlist);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo $this->XMLlist->show_cur_attrib('NAME') . ' - ';\n\t\t\t\t\t\t\techo $this->XMLlist->show_cur_obj() . \"<br>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//object ermittelt\n\t\t\t\t\t\t\tif(\n\t\t\t\t\t\t\t!is_Null($obj = $this->XMLlist->show_cur_obj())\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t//{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo get_class($obj) . \"<p>\";\n\t\t\t\t\t\t\t\t//if(is_subclass_of($obj,'plugin'))\n\t\t\t\t\t\t\t\t//{\n\t\t\t\t\t\t\t\t//$data_array[$real_pos] .= $obj->out();\n\t\t\t\t\t\t\t\t//echo $obj->out() . $obj->decription();\n\n\t\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t//$pos_of_object++;\t\t\n\t\t\t\t\t}\n\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t$this->XMLlist->go_to_stamp($stamp3);\n\t\t\t$this->XMLlist->parent_node();\n\t\t}// end for\n\t\t*/\n\t\t\t\t//writes cdata from tree-doc to specific cdata in tag of cur doc\n\t\t\t\t$this->XMLlist->change_URI($this->template);\n\t\t\t\t\n\t\t\t\tif(trim(implode($data_array,',')) <> \"\")\n\t\t\t\t{\n\t\t\t\t\tif(in_array(\"TRUNCATE\",$mode))\t$this->XMLlist->clear_node_cdata();\t\t\n\t\t\t\t\t$this->XMLlist->set_node_cdata( 'me' . $this->trim_func(implode($data_array,''),in_array(\"NOTRIM\",$mode)),0); //needs to be updated, sicks all rows to one\n\t\t\t\t}\n\t\t\t\t//for($gh = 0;$gh < count($data); $gh++)\n\t\t\t\t//{\n\t\t\t\t//\techo $data[$gh];\n\t\t\t\t//\t$this->XMLlist->set_node_cdata($data[$gh],$gh);\n\t\t\t\t//}\n\t\t\t\t\t\t\t\t\n\t\t\t\t$this->XMLlist->change_URI($this->structur);\n\t\t\n\t\t}//end if\n\t\t\n\t\t\n\t\t\n//----------------End Element-------------------------\n\t}", "title": "" }, { "docid": "cfa4e2984fe774cd48275329fcf66f40", "score": "0.51094705", "text": "public abstract function subtree(): void;", "title": "" }, { "docid": "0f011b20227c3f98026e82b3f7d69896", "score": "0.51064336", "text": "public function add_tree_entry($p_id, $p_text)\n {\n global $g_comp_template_language_manager;\n $this->m_menu_tree[$p_id] = [\n \"text\" => $g_comp_template_language_manager->get($p_text),\n \"mode\" => C__WF__VIEW__LIST\n ];\n }", "title": "" }, { "docid": "94ba0e85353be57f4b8f9067c804e9fa", "score": "0.50933534", "text": "function get_children($data) {\r\n //we map the project id to the first type of drive \r\n\r\n if(isset($data[\"request_type\"]) && $data[\"request_type\"] == \"get_tree_first_load\") {\r\n $id = $this->get_id_from_project_id((int)$data[\"id\"]);\r\n //$id = 1 ;\r\n } else {\r\n $id = (int)$data[\"id\"];\r\n }\r\n\r\n \r\n //$id = (int)$data[\"id\"];\r\n \r\n //root\r\n $root = $this->_get_node($id);\r\n \r\n $tmp = $this->_get_children($id);\r\n \r\n //create default folder\r\n\t\tif($id=== 1 && count($tmp) === 0) {\r\n\t\t\t$this->_create_default();\r\n\t\t\t$tmp = $this->_get_children($id);\r\n\t\t}\r\n\t\t$result = array();\r\n\t\tif($id === 0) return json_encode($result);\r\n \r\n /*\r\n $result[] = array(\r\n \"attr\" => array(\"id\" => \"node_\".$id, \"rel\" => $root[$this->fields['type']]),\r\n\t\t \"data\" => $root[$this->fields[\"title\"]],\r\n\t\t \"state\" => ((int) $root[$this->fields[\"right\"]] - (int) $root[$this->fields[\"left\"]] > 1) ? \"closed\" : \"\"\r\n );\r\n */\r\n\t\tforeach($tmp as $k => $v) {\r\n\t\t\t$result[] = array(\r\n\t\t\t\t\"attr\" => array(\"id\" => \"node_\".$k, \"rel\" => $v[$this->fields[\"type\"]]),\r\n\t\t\t\t\"data\" => $v[$this->fields[\"title\"]],\r\n\t\t\t\t\"state\" => ((int)$v[$this->fields[\"right\"]] - (int)$v[$this->fields[\"left\"]] > 1) ? \"closed\" : \"\"\r\n //\"state\" => \"closed\" \r\n\t\t\t);\r\n\t\t}\r\n\t\treturn json_encode($result);\r\n\t}", "title": "" }, { "docid": "e0a0e9f2d7d2c839f324b7f8463d3fe5", "score": "0.50809866", "text": "public function nestDirs(){\n foreach (array_values($this->path2IODict) as $ioContainer ){\n $parentPath = $ioContainer->getParentPath();\n if(array_key_exists($parentPath, $this->path2IODict)) {\n $parentDir = $this->path2IODict[$parentPath];\n $ioContainer->setParentDir($parentDir);\n $parentDir->addContent($ioContainer);\n }\n else{\n $this->rootDir = $ioContainer;\n $ioContainer->setParentDir(NULL);\n }\n }\n }", "title": "" }, { "docid": "4e2a416b5b93da646d87442ba83be8bb", "score": "0.50731444", "text": "public function action_treeview()\n\t{\n\t\t$template = ORM::factory('Template')->where('active','=','1')->find();\n\t\t\n\t\t$modules = ORM::factory('Module')->where('template_id','=',$template->id);\n\t\t$mappings = ORM::factory('StructureColumnMapping')->find_all();\n\n\t\t$outArr = array(\n\t\t\t'children' => array()\n\t\t);\n\t\t\n\t\t$language = ORM::factory('System_Setting')->get_language()->shortform;\n\n\t\t$structures = ORM::factory('Structure')\n\t\t\t->order_by('position','asc')\n\t\t\t->find_all();\n\n\t\tforeach ($structures as $s) {\n\t\t\t$columnsArr = array();\n\t\t\t$mappings = ORM::factory('StructureColumnMapping')->find_all();\n\n\t\t\tforeach($mappings as $m) {\n\t\t\t\t// if the current mapping has the same category (structure)\n\t\t\t\t// we want to add it with all article references in the output\n\t\t\t\t// array\n\t\t\t\tif ($m->structure_id == $s->id) {\n\t\t\t\t\t$module = ORM::factory('Module')\n\t\t\t\t\t\t->where('id','=',$m->module_id)\n\t\t\t\t\t\t->find();\n\n\t\t\t\t\t// insert articles (if allowed by module)\n\t\t\t\t\tif ($module->allowarticles == 1) {\n\t\t\t\t\t\t$articlesArr = array();\n\t\t\t\t\t\t$articles = ORM::factory('Article')\n\t\t\t\t\t\t\t->where('structure_column_mapping_id','=',$m->id)\n\t\t\t\t\t\t\t->order_by('position', 'ASC')\n\t\t\t\t\t\t\t->find_all();\n\n\t\t\t\t\t\tforeach($articles as $a) {\n\t\t\t\t\t\t\t$articlesArr[] = array(\n\t\t\t\t\t\t\t\t'text' => $a->title,\n\t\t\t\t\t\t\t\t'id' => $a->id,\n\t\t\t\t\t\t\t\t'iconCls' => ($a->active == 1) ? 'icon-active' : 'icon-inactive',\n\t\t\t\t\t\t\t\t'leaf' => true,\n\t\t\t\t\t\t\t\t//'allowDrop' => false,\n\t\t\t\t\t\t\t\t//'mapping_id' => null,\n\t\t\t\t\t\t\t\t//'children' => null,\n\t\t\t\t\t\t\t\t//'expanded' => false\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$columnsArr[] = array(\n\t\t\t\t\t\t\t'text' => (($language == 'en') ? 'Area ' : 'Abschnitt ') . ($m->column + 1),\n\t\t\t\t\t\t\t'expanded' => false,\n\t\t\t\t\t\t\t'allowDrop' => true,\n\t\t\t\t\t\t\t'hrefTarget' => $m->id, // need to \"hide\" the mapping_id into hrefTarget, since custom fields are not interpreted by ExtJS\n\t\t\t\t\t\t\t'children' => $articlesArr,\n\t\t\t\t\t\t\t'leaf' => false,\n\t\t\t\t\t\t\t//'id' => null,\n\t\t\t\t\t\t\t//'iconCls' => null\n\t\t\t\t\t\t\t//'children' => null\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now that we have all data, the output array can be wrapped up\n\t\t\t$outArr['children']['expanded'] = true;\n\t\t\t$outArr['children']['allowDrop'] = false;\n\t\t\t$outArr['children']['text'] = (($language == 'en') ? 'Structures' : 'Rubriken');\n\t\t\t$outArr['children']['children'][] = array(\n\t\t\t\t'text' => $s->title,\n\t\t\t\t'expanded' => false,\n\t\t\t\t'allowDrop' => false,\n\t\t\t\t'children' => $columnsArr,\n\t\t\t\t'leaf' => false,\n\t\t\t\t//'mapping_id' => null,\n\t\t\t\t//'id' => null,\n\t\t\t\t//'iconCls' => null\n\t\t\t);\n\t\t}\n\n\t\t// finally we can add all the \"orphaned\" articles that are missing a mapping\n\t\t$articles = ORM::factory('Article')\n\t\t\t\t\t\t->where('structure_column_mapping_id','=',null)\n\t\t\t\t\t\t->find_all();\n\t\tif ($articles->count() > 0)\t{\n\t\t\t$articlesArr = array();\n\t\t\tforeach ($articles as $a) {\n\t\t\t\t$articlesArr[] = array(\n\t\t\t\t\t'text' => $a->title,\n\t\t\t\t\t'id' => $a->id,\n\t\t\t\t\t'iconCls' => ($a->active == 1) ? 'icon-active' : 'icon-inactive',\n\t\t\t\t\t'leaf' => true\n\t\t\t\t);\n\t\t\t}\n\t\t\t$outArr['children']['children'][] = array(\n\t\t\t\t'text' => (($language == 'en') ? 'ORPHANED ARTICLES' : 'VERWAISTE ARTIKEL'),\n\t\t\t\t'expanded' => false,\n\t\t\t\t'allowDrop' => true,\n\t\t\t\t'hrefTarget' => null, // again mapping_id has to be hidden\n\t\t\t\t'leaf' => false,\n\t\t\t\t'children' => $articlesArr\n\t\t\t);\n\t\t}\n\n\t\t$this->template->result = $outArr;\n\t}", "title": "" }, { "docid": "4de6fa7a3a1545f54585b4f54efae127", "score": "0.5069669", "text": "function feedback_add_children_to_parents($id, $rel=0)\n{\n\t$sql=\"UPDATE \".PREFIX.\"feedback SET children=children+1, children_rel=children_rel+\".sql_safe($rel).\" WHERE id=\".sql_safe($id).\";\";\n\tmysql_query($sql);\n\t//add to all parents too.\n\t$sql=\"SELECT merged_with FROM \".PREFIX.\"feedback WHERE id=\".sql_safe($id).\" AND merged_with IS NOT NULL;\";\n\tif($ff=mysql_query($sql))\n\t{\n\t\tif($f=mysql_fetch_assoc($ff))\n\t\t{\n\t\t\tfeedback_add_children_to_parents($f['merged_with'], $rel);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7c4bae132402793f3924048755c1b968", "score": "0.50602055", "text": "public function children();", "title": "" }, { "docid": "7c4bae132402793f3924048755c1b968", "score": "0.50602055", "text": "public function children();", "title": "" }, { "docid": "2d464cd64a47662eb61e2111108c205c", "score": "0.5060131", "text": "public function addChild(NodeInterface $node): void;", "title": "" }, { "docid": "61362088b244c945e3d66b455017af16", "score": "0.5058017", "text": "public function add_node( $title, $children = null ) {\n\t\t$this->list[$this->_sub] = array();\n\t\t$this->list[$this->_sub]['item'] = '<span class=path_link id=\\'path_link_'.$this->_id.'_'.$this->_sub.'\\' onmouseover=\"show_path_children(\\''.$this->_id.'_'.$this->_sub.'\\')\" onmouseout=\"hide_path_children(\\''.$this->_id.'_'.$this->_sub.'\\')\">' . ($title) . '</span>';\n\t\tif( is_array($children) ) {\n\t\t\t$this->list[$this->_sub]['children'] = array();\n\t\t\t$this->list[$this->_sub]['children_open'] = '<div class=path_submenu id=\\'path_'.$this->_id.'_'.$this->_sub.'\\' onmouseover=\"show_path_children(\\''.$this->_id.'_'.$this->_sub.'\\')\" onmouseout=\"hide_path_children(\\''.$this->_id.'_'.$this->_sub.'\\')\">';\n\t\t\tforeach($children as $l) {\n\t\t\t\t$this->list[$this->_sub]['children'][] = $l;\n\t\t\t}\n\t\t\t$this->list[$this->_sub]['children_close'] = '</div>';\n\t\t\t$this->list[$this->_sub]['children_num'] = count($this->list[$this->_sub]['children']);\n\t\t} else\n\t\t\t$this->list[$this->_sub]['children_num'] = 0;\n\t\t$this->_sub++;\n\t}", "title": "" }, { "docid": "2790a1891a1bfa75619b83bb16b6a70a", "score": "0.50561976", "text": "public function DataClosureTablePattern(){\n\n $lastID = 0;\n $level = 0;\n $pathArr = array();\n for($i = count($this->_path)-1; $i >= 0; $i--){\n $pathArr[] = array(\n 'path_id' => $this->_path[$i][0]['category_id'],\n 'level' => $level\n );\n\n $level++;\n\n $lastID = $this->_path[$i][0]['category_id'];\n }\n\n for($i=0; $i < count($pathArr); $i++){\n $this->insertPathCategory($lastID, $pathArr[$i]['path_id'], $i);\n }\n }", "title": "" }, { "docid": "396c21394131c0d9dd1e5aa70612bbe8", "score": "0.5038989", "text": "private function init_steps() {\n $refs = array();\n $qry = \"SELECT steps.id, steps.pid, steps.num, steps.name FROM `steps` WHERE steps.template_id = 1 ORDER BY pid, num;\";\n $res = $this->db->query($qry);\n\n if($res && $res->num_rows) {\n while($data = $res->fetch_object()) {\n $thisref = &$refs[ $data->id ];\n $thisref['id'] = $data->id;\n $thisref['pid'] = $data->pid;\n $thisref['name'] = $this->lingual->get_text($data->name);\n\n if ($data->pid == 0) {\n $this->steps[ $data->id ] = &$thisref;\n } else {\n $refs[$data->pid]['children'][ $data->id ] = &$thisref;\n }\n }\n } else {\n echo 'Error when constructing tree...';\n }\n }", "title": "" }, { "docid": "a82396d2a9560735aa0dd09daccaa475", "score": "0.50355756", "text": "protected function fillChildren()\n {\n foreach ($this->getConfig('children') as $roleName => $permissionsNames) {\n $role = $this->authManager->getRole($roleName);\n foreach ($permissionsNames as $permissionName) {\n $permission = $this->authManager->getPermission($permissionName);\n if (!$this->authManager->hasChild($role, $permission)) {\n $this->authManager->addChild($role, $permission);\n }\n }\n }\n }", "title": "" }, { "docid": "43119ddcdb04db5dd66c19190da9a9df", "score": "0.5027136", "text": "function render_draggable_menu_children($children, $page_id)\n{\n $indent_line = \"\\n\";\n $indent_tab = \"\\t\";\n\n $output = $indent_tab . '<ol class=\"dd-list\">' . $indent_line;\n foreach ($children as $item) {\n $page_id++;\n $menu_title = '';\n $menu_attr = 'data-ptype=\"' . $item->ptype . '\" ';\n\n if ($item->ptype == 'static') {\n\n $menu_attr .= ' data-pname=\"' . $item->pname . '\"';\n $menu_attr .= ' data-pslug=\"' . $item->pslug . '\"';\n $menu_title = get_static_option($item->pname);\n\n } elseif ($item->ptype == 'dynamic') {\n\n $menu_attr .= ' data-pid=\"' . $item->pid . '\"';\n $menu_details = Page::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n\n } elseif ($item->ptype == 'custom') {\n $menu_attr .= ' data-purl=\"' . $item->purl . '\"';\n $menu_attr .= ' data-pname=\"' . $item->pname . '\"';\n $menu_title = $item->pname;\n } elseif ($item->ptype == 'service' || $item->ptype == 'event' || $item->ptype == 'work' || $item->ptype == 'blog' || $item->ptype == 'job' || $item->ptype == 'knowledgebase' || $item->ptype == 'product' || $item->ptype == 'donation') {\n $menu_attr .= ' data-pid=\"' . $item->pid . '\"';\n\n if ($item->ptype == 'service') {\n $menu_details = \\App\\Services::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n } elseif ($item->ptype == 'event') {\n $menu_details = \\App\\Events::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n } elseif ($item->ptype == 'work') {\n $menu_details = \\App\\Works::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n } elseif ($item->ptype == 'blog') {\n $menu_details = \\App\\Blog::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n } elseif ($item->ptype == 'job') {\n $menu_details = \\App\\Jobs::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n } elseif ($item->ptype == 'knowledgebase') {\n $menu_details = \\App\\Knowledgebase::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n } elseif ($item->ptype == 'product') {\n $menu_details = \\App\\Products::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n } elseif ($item->ptype == 'donation') {\n $menu_details = \\App\\Donation::find($item->pid);\n $menu_title = !empty($menu_details) ? $menu_details->title : '';\n }\n }\n $icon_value = property_exists($item, 'icon') ? 'value=\"' . $item->icon . '\"' : '';\n $icon_data = property_exists($item, 'icon') ? 'data-icon=\"' . $item->icon . '\"' : '';\n $link_target = property_exists($item, 'antarget') ? 'value=\"' . $item->antarget . '\"' : '';\n\n if (!empty($menu_title)){\n $output .= $indent_tab . $indent_tab . '<li class=\"dd-item\" data-id=\"' . $page_id . '\" ' . $menu_attr . ' ' . $icon_data . '>' . $indent_line;\n $output .= $indent_tab . $indent_tab . $indent_tab . '<div class=\"dd-handle\">' . $menu_title . '</div>' . $indent_line;\n $output .= $indent_tab . $indent_tab . $indent_tab . '<span class=\"remove_item\">x</span>' . $indent_line;\n $output .= $indent_tab . '<span class=\"expand\"><i class=\"ti-angle-down\"></i></span>' . $indent_line;\n $output .= $indent_tab . '<div class=\"dd-body hide\">';\n\n $output .= '<input type=\"text\" class=\"anchor_target\" placeholder=\"eg: _blank\" ' . $link_target . '/>';\n $output .= '<input type=\"text\" class=\"icon_picker\" placeholder=\"eg: fas-fa-facebook\" ' . $icon_value . '/>';\n $output .= '</div>' . $indent_line;\n }\n\n if (property_exists($item, 'children')) {\n $output .= render_draggable_menu_children($item->children, $page_id);\n }\n if (!empty($menu_title)) {\n $output .= $indent_tab . $indent_tab . '</li>' . $indent_line;\n }\n }\n $output .= $indent_tab . '</ol>' . $indent_line;\n return $output;\n}", "title": "" }, { "docid": "8cf9448ad52d3b398f5a5eb420688b88", "score": "0.50263566", "text": "public function addChildren(array $nodes) {\r\n\t\tforeach ($nodes as $n)\r\n\t\t\t$n->parent = $this;\r\n\t\t$this->children = array_merge($this->children, $nodes);\r\n\t}", "title": "" }, { "docid": "3e29bea487270311544e71721210d293", "score": "0.5023047", "text": "public function add_children_to_menu( $items ) {\n\t\t$menu_order = count( $items ) + 1000;\n\t\t$filter_added = false;\n\n\t\tforeach ( $items as $item ) {\n\t\t\tif ( ! $this->is_menu_item_supported( $item->db_id, $item->type, $item->object ) || ! $this->is_enabled_for_menu_item( $item->db_id ) )\n\t\t\t\tcontinue;\n\n\t\t\t// Get all descendants\n\t\t\tswitch ( $item->type ) {\n\n\t\t\t\tcase 'post_type':\n\t\t\t\t\t// Using get_pages() instead of get_posts() because we want ALL descendants\n\t\t\t\t\t$children = get_pages( array(\n\t\t\t\t\t\t'child_of' => $item->object_id,\n\t\t\t\t\t\t'post_type' => $item->object,\n\t\t\t\t\t\t'sort_column' => 'menu_order, post_title',\n\t\t\t\t\t) );\n\n\t\t\t\t\t$parent_field = 'post_parent';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'taxonomy' :\n\t\t\t\t\t$children = get_terms( $item->object, array(\n\t\t\t\t\t\t'child_of' => $item->object_id,\n\t\t\t\t\t) );\n\n\t\t\t\t\t$parent_field = 'parent';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( empty( $children ) || is_wp_error( $children ) )\n\t\t\t\tcontinue;\n\n\t\t\t// Menu items are being added, so later fix the \"current\" values for highlighting\n\t\t\tif ( ! $filter_added )\n\t\t\t\tadd_filter( 'wp_nav_menu_objects', array( &$this, 'fix_menu_current_item' ) );\n\n\t\t\t// Add each child to the menu\n\t\t\tforeach ( $children as $child ) {\n\t\t\t\t$child = wp_setup_nav_menu_item( $child );\n\t\t\t\t$child->db_id = $child->ID;\n\n\t\t\t\t$this->added[$child->ID] = true; // We'll need this later\n\n\t\t\t\t// Set the parent menu item.\n\t\t\t\t// When adding items as children of existing menu items, their IDs won't match up\n\t\t\t\t// which means that the parent value can't always be used.\n\t\t\t\tif ( $child->$parent_field == $item->object_id ) {\n\t\t\t\t\t$child->menu_item_parent = $item->ID; // Children\n\t\t\t\t} else {\n\t\t\t\t\t$child->menu_item_parent = $child->$parent_field ; // Grandchildren, etc.\n\t\t\t\t}\n\n\t\t\t\t// The menu_order has to be unique, so make up new ones\n\t\t\t\t// The items are already sorted due to the get_pages()\n\t\t\t\t$menu_order++;\n\t\t\t\t$child->menu_order = $menu_order;\n\n\t\t\t\t$items[] = $child;\n\t\t\t}\n\t\t}\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "53ac6a23a10241f8715d43fbd5720499", "score": "0.50164914", "text": "function getTree($pidList){\n\n\t\t$finalTree = array();\n\n\t\t//check if starting point is empty\n\t\tif (!$pidList) {\n\t\t\treturn $finalTree;\n\t\t}\n\n\t\t$startingPoints = explode(',',$pidList);\n\t\t\n\t\tforeach ($startingPoints as $startingPoint) {\n\n\t\t\t//get startingpoint\n\t\t\t$startingPointRecord = t3lib_BEfunc::getRecord('pages', $startingPoint);\n\n\t\t\t//get childrens\n\t\t\t$tree = t3lib_div::makeInstance('t3lib_pageTree');\n\t\t\t$tree->init(t3lib_BEfunc::deleteClause('pages'));\n\t\t\t$tree->makeHTML = false;\n\n\t\t\t//add nav title\n\t\t\t//$tree->addField('nav_title',1);\n\n\t\t\t//get value of the Typoscript\n\t\t\t$depth = intval($this->conf['depth']);\n\t\t\t$c = $tree->getTree($startingPoint, $depth, '');\n\n\t\t\t//add startingPoint in the tree\n\t\t\t$temp['row'] = $startingPointRecord;\n\t\t\t$tree->tree[] = $temp;\n\t\t\t$finalTree = array_merge ($finalTree,$tree->tree);\n\t\t}\n\t\treturn $finalTree;\n\n\t}", "title": "" }, { "docid": "b28447a478a6029fdc364e8377bb8f57", "score": "0.5008194", "text": "protected function multitree() {\n\t}", "title": "" }, { "docid": "79c2f73368611c40926bc972cd6203b3", "score": "0.50051415", "text": "private function moveDataScopeToChildren(array $meta, $path)\n {\n $pathMeta = $this->arrayManager->get($path, $meta);\n\n if (isset($pathMeta['arguments']['data']['config']['dataScope'])\n && $pathMeta['arguments']['data']['config']['dataScope']\n ) {\n $parentDataScope = $pathMeta['arguments']['data']['config']['dataScope'];\n $metaUpdate = [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'dataScope' => ''\n ]\n ]\n ]\n ];\n\n foreach ($pathMeta['children'] as $childKey => $child) {\n $childComponentType = isset($child['arguments']['data']['config']['componentType'])\n ? $child['arguments']['data']['config']['componentType'] : '';\n if ($childComponentType == Container::NAME) {\n foreach ($pathMeta['children'][$childKey]['children'] as $containerChildKey => $containerChild) {\n $containerChildDataScope = isset($child['arguments']['data']['config']['dataScope'])\n ? $child['arguments']['data']['config']['dataScope'] : '';\n $metaUpdate['children'][$childKey]['children'][$containerChildKey] = [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'dataScope' => ($parentDataScope ? $parentDataScope . '.' : '')\n . ($containerChildDataScope ? $containerChildDataScope : $containerChildKey)\n ]\n ]\n ]\n ];\n }\n } else {\n $childDataScope = isset($child['arguments']['data']['config']['dataScope'])\n ? $child['arguments']['data']['config']['dataScope'] : '';\n $metaUpdate['children'][$childKey] = [\n 'arguments' => [\n 'data' => [\n 'config' => [\n 'dataScope' => ($parentDataScope ? $parentDataScope . '.' : '')\n . ($childDataScope ? $childDataScope : $childKey)\n ]\n ]\n ]\n ];\n }\n }\n\n $meta = $this->arrayManager->merge($path, $meta, $metaUpdate);\n }\n return $meta;\n }", "title": "" }, { "docid": "0abac8d305290ea49190fe0f4910b8fd", "score": "0.5001585", "text": "protected function preAssembleChildren()\r\n {\r\n $this->assembledChildren = [];\r\n if(is_array($this->children))\r\n foreach ($this->children as $child) {\r\n if(is_string($child)){\r\n $this->assembledChildren[] = $this->evaluateZX($child);\r\n }else{\r\n $childElem = new XmlElement($child, $this);\r\n $this->assembledChildren[] = $childElem->assemble();\r\n\r\n }\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "efd38003f99980f92f3cf0609788c11b", "score": "0.4997722", "text": "public function testSaveWithChildren()\n {\n for ($i = 1; $i < 6; $i++) {\n $this->__testSaveRoot(true, $i);\n }\n }", "title": "" }, { "docid": "6772472b55eb2117f0422fc33597b931", "score": "0.49968442", "text": "function addNewFolderRow($lastInsertFolderId)\r\n{\r\n global $pdo;\r\n $userId = getCurrentUserID();\r\n $sql = \"SELECT id,name FROM folders WHERE id = :lastAddId AND user_id = :user_id\";\r\n $stmt = $pdo->prepare($sql);\r\n $stmt->execute([\":lastAddId\" => $lastInsertFolderId, \":user_id\" => $userId]);\r\n $records = $stmt->fetchAll(PDO::FETCH_OBJ);\r\n return $records;\r\n}", "title": "" }, { "docid": "1769bf8e45e1142960c98fe97119d9d4", "score": "0.49953863", "text": "public function addAll($path)\n {\n $folderNames = array(\n self::FOLDER_BUCKET,\n self::FOLDER_CONFIG,\n self::FOLDER_CLASS,\n self::FOLDER_TEMPLATE,\n self::FOLDER_I18N,\n self::FOLDER_INCLUDE,\n );\n\n $logger = new \\MPF\\Log\\Logger();\n\n foreach ($folderNames as $type) {\n if (is_dir($path . $type)) {\n $newPath = $path . $type . '/';\n\n // if we found the key already in the array we remove it to avoid duplicates\n // we still add it to give a chance to re-organise priorities\n $foundKey = array_search($newPath, self::$paths[$type]);\n if ($foundKey) {\n self::$paths[$foundKey] = null;\n unset(self::$paths[$type][$foundKey]);\n }\n\n $logger->debug('Found dir \"{newPath}\"', array(\n 'category' => Category::FRAMEWORK | Category::ENVIRONMENT,\n 'className' => 'ENV',\n 'newPath' => $newPath\n ));\n array_unshift(self::$paths[$type], $newPath);\n }\n }\n }", "title": "" }, { "docid": "11edebf1d5f43e6ef69c71925b8c8817", "score": "0.49907494", "text": "public function insert(self ...$nodes): self\n {\n if (! is_array($this->content)) {\n $this->content = [];\n }\n\n foreach ($nodes as $node) {\n $node->parent = $this;\n $this->content[] = $node;\n }\n\n return $this;\n }", "title": "" }, { "docid": "5bc594055ef9b75580a80c48e27d0bdf", "score": "0.49845305", "text": "function addToArray($id,$name,$parentID,$url=\"\",$target=\"\", $hasChild=1, $onclick = ''){\n\t\tif ($hasChild==1){ $icon=\"/images/dhtmlgoodies_folder.gif\"; }\n\t\tif ($hasChild!=1){ $icon=\"/images/dhtmlgoodies_sheet.gif\"; }\n\t\tif(empty($parentID))$parentID=0;\n\t\t$this->elementArray[$parentID][] = array(\n\t\t\t'id' => $id,\n\t\t\t'title' => $name,\n\t\t\t'url' => $url,\n\t\t\t'target' => $target,\n\t\t\t'icon' => $icon,\n\t\t\t'onclick' => $onclick\n\t\t);\n\t}", "title": "" }, { "docid": "b952efe5cbea67a9c212d4e6d9180a3b", "score": "0.4976526", "text": "public function run()\n {\n //\n DB::table('menus')->insert(\n \t\n [\n \t[\n\t 'title' => 'Главная',\n\t 'path' => 'luxwatches.loc',\n\t 'parent' => '0'\n ],\n\n [\n \t'title' => 'Мужские',\n\t 'path' => 'luxwatches.loc\\watches\\men',\n\t 'parent' => '0'\n ],\n\n [\n \t'title' => 'Женские',\n\t 'path' => 'luxwatches.loc\\watches\\women',\n\t 'parent' => '0'\n ],\n\n [\n \t'title' => 'Детские',\n\t 'path' => 'luxwatches.loc\\watches\\kids',\n\t 'parent' => '0'\n ],\n\n [\n \t'title' => 'Блог',\n\t 'path' => 'luxwatches.loc\\blog',\n\t 'parent' => '0'\n ],\n\n [\n \t'title' => 'Контакты',\n\t 'path' => 'luxwatches.loc\\contact',\n\t 'parent' => '0'\n ],\n\n [\n \t'title' => 'Armani',\n\t 'path' => 'luxwatches.loc\\watches\\men\\armani',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Casio',\n\t 'path' => 'luxwatches.loc\\watches\\men\\casio',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Hugo Boss',\n\t 'path' => 'luxwatches.loc\\watches\\men\\hugo-boss',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Orient',\n\t 'path' => 'luxwatches.loc\\watches\\men\\orient',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Swiss',\n\t 'path' => 'luxwatches.loc\\watches\\men\\swiss',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Alfex',\n\t 'path' => 'luxwatches.loc\\watches\\women\\alfex',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Casio',\n\t 'path' => 'luxwatches.loc\\watches\\women\\casio',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Certina',\n\t 'path' => 'luxwatches.loc\\watches\\women\\certina',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Nautica',\n\t 'path' => 'luxwatches.loc\\watches\\women\\nautica',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Q&Q',\n\t 'path' => 'luxwatches.loc\\watches\\women\\q&q',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Royal London',\n\t 'path' => 'luxwatches.loc\\watches\\women\\r-london',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Calipso',\n\t 'path' => 'luxwatches.loc\\watches\\kids\\calipso',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Calipso',\n\t 'path' => 'luxwatches.loc\\watches\\kids\\timex',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Q&Q',\n\t 'path' => 'luxwatches.loc\\watches\\kids\\q&q',\n\t 'parent' => '3'\n ],\n\n [\n \t'title' => 'Disney',\n\t 'path' => 'luxwatches.loc\\watches\\kids\\disney',\n\t 'parent' => '3'\n ]\n ]);\n\n }", "title": "" }, { "docid": "2c949d2ef5bb3603c6e5e81faeba885d", "score": "0.49729005", "text": "function insertNewSegment($name,$parent_id){\n\t$con=mysqli_connect(\"localhost\",\"root\",\"root\",\"segments\");\n\t// Check connection\n\tif (mysqli_connect_errno()){\n\t\techo \"Failed to connect to MySQL: \" . mysqli_connect_error();\n\t} else {\n\t\t$q = mysqli_query($con, \"INSERT IGNORE INTO `segs` SET name = '$name', parent = '$parent_id' \");\n\t\treturn mysqli_insert_id($con);\n\t}\n}", "title": "" }, { "docid": "8ed637d1d76dab2fd6e12e540fdd052a", "score": "0.49687067", "text": "function insert_as_first_child_of(&$node){\n\t\tif(!$this->is_orphan() || \n\t\t\t$node->tree->is_orphan() || \n\t\t\t$node->tree->mpttree->tree_table != $this->mpttree->tree_table)\n\t\t\t\treturn false;\n\t\t\n\t\tif($ret = $this->instance->append_node($node->{$this->opts['left']},$this->orm->_strip_data($this->record)))\n\t\t{\n\t\t\tlist($this->record->{$this->opts['left']},$this->record->{$this->opts['right']},$this->record->__id) = $ret;\n\t\t\t$this->parent =& $node;\n\t\t\t\n\t\t\tif($this->parent->tree->children != null) // check if parent already has data\n\t\t\t\t$this->array_unshift_ref($this->parent->tree->children,$this);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "630265bd7091ca61079fafa2fa3ec6a9", "score": "0.4965029", "text": "function setTagChildren() {\n \t\t$this->yakTag[] = \"Children\";\n \t}", "title": "" }, { "docid": "c577aceaaf693ad4cae9a97fabf1b767", "score": "0.49642766", "text": "function setChildren($children) {\n $this->removeAll();\n foreach($children as $c) {\n $this->addNode($c);\n }\n }", "title": "" }, { "docid": "e564bd6a84b7bdf49598940300cced2d", "score": "0.49602014", "text": "function admin_menu_tree_page_view_add_page() {\n\n\tglobal $wpdb;\n\n\t/*\n\t(\n\t[action] => cms_tpv_add_page \n\t[pageID] => cms-tpv-1318\n\ttype\n\t)\n\taction\tadmin_menu_tree_page_view_add_page\n\tpageID\t448\n\tpage_titles[]\tpending inside\n\tpost_status\tpending\n\tpost_type\tpage\n\ttype\tinside\n\t*/\n\t$type = $_POST[\"type\"];\n\t$pageID = (int) $_POST[\"pageID\"];\n\t$post_type = $_POST[\"post_type\"];\n\t$wpml_lang = isset($_POST[\"wpml_lang\"]) ? $_POST[\"wpml_lang\"] : \"\";\n\t$page_titles = (array) $_POST[\"page_titles\"];\n\t$ref_post = get_post($pageID);\n\t$post_status = $_POST[\"post_status\"];\n\tif (!$post_status) { $post_status = \"draft\"; }\n\n\t$post_id_to_return = NULL;\n\n\tif (\"after\" == $type) {\n\n\t\t/*\n\t\t\tadd page under/below ref_post\n\t\t*/\n\n\t\tif (!function_exists(\"admin_menu_tree_page_view_add_page_after\")) {\n\t\tfunction admin_menu_tree_page_view_add_page_after($ref_post_id, $page_title, $post_type, $post_status = \"draft\") {\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$ref_post = get_post($ref_post_id);\n\t\t\t// update menu_order of all pages below our page\n\t\t\t$wpdb->query( $wpdb->prepare( \"UPDATE $wpdb->posts SET menu_order = menu_order+2 WHERE post_parent = %d AND menu_order >= %d AND id <> %d \", $ref_post->post_parent, $ref_post->menu_order, $ref_post->ID ) );\n\t\t\t\n\t\t\t// create a new page and then goto it\n\t\t\t$post_new = array();\n\t\t\t$post_new[\"menu_order\"] = $ref_post->menu_order+1;\n\t\t\t$post_new[\"post_parent\"] = $ref_post->post_parent;\n\t\t\t$post_new[\"post_type\"] = \"page\";\n\t\t\t$post_new[\"post_status\"] = $post_status;\n\t\t\t$post_new[\"post_title\"] = $page_title;\n\t\t\t$post_new[\"post_content\"] = \"\";\n\t\t\t$post_new[\"post_type\"] = $post_type;\n\t\t\t$newPostID = wp_insert_post($post_new);\n\t\t\treturn $newPostID;\n\t\t}\n\t\t}\n\t\t\n\t\t$ref_post_id = $ref_post->ID;\n\t\t$loopNum = 0;\n\t\tforeach ($page_titles as $one_page_title) {\n\t\t\t$newPostID = admin_menu_tree_page_view_add_page_after($ref_post_id, $one_page_title, $post_type, $post_status);\n\t\t\t$new_post = get_post($newPostID);\n\t\t\t$ref_post_id = $new_post->ID;\n\t\t\tif ($loopNum == 0) {\n\t\t\t\t$post_id_to_return = $newPostID;\n\t\t\t}\n\t\t\t$loopNum++;\n\t\t}\n\t\t\n\n\t} else if ( \"inside\" == $type ) {\n\n\t\t/*\n\t\t\tadd page inside ref_post\n\t\t*/\n\t\tif (!function_exists(\"admin_menu_tree_page_view_add_page_inside\")) {\n\t\tfunction admin_menu_tree_page_view_add_page_inside($ref_post_id, $page_title, $post_type, $post_status = \"draft\") {\n\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$ref_post = get_post($ref_post_id);\n\n\t\t\t// update menu_order, so our new post is the only one with order 0\n\t\t\t$wpdb->query( $wpdb->prepare( \"UPDATE $wpdb->posts SET menu_order = menu_order+1 WHERE post_parent = %d\", $ref_post->ID) );\t\t\n\t\n\t\t\t$post_new = array();\n\t\t\t$post_new[\"menu_order\"] = 0;\n\t\t\t$post_new[\"post_parent\"] = $ref_post->ID;\n\t\t\t$post_new[\"post_type\"] = \"page\";\n\t\t\t$post_new[\"post_status\"] = $post_status;\n\t\t\t$post_new[\"post_title\"] = $page_title;\n\t\t\t$post_new[\"post_content\"] = \"\";\n\t\t\t$post_new[\"post_type\"] = $post_type;\n\t\t\t$newPostID = wp_insert_post($post_new);\n\t\t\treturn $newPostID;\n\t\t\n\t\t}\n\t\t}\n\t\t\n\t\t// add reversed\n\t\t$ref_post_id = $ref_post->ID;\n\t\t$page_titles = array_reverse($page_titles);\n\t\t$loopNum = 0;\n\t\tforeach ($page_titles as $one_page_title) {\n\t\t\t$newPostID = admin_menu_tree_page_view_add_page_inside($ref_post_id, $one_page_title, $post_type, $post_status);\n\t\t\t$new_post = get_post($newPostID);\n\t\t\t// $ref_post_id = $new_post->ID;\n\t\t\tif ($loopNum == 0) {\n\t\t\t\t$post_id_to_return = $newPostID;\n\t\t\t}\n\t\t\t$loopNum++;\n\t\t}\n\t\t$post_id_to_return = $newPostID;\n\n\t}\n\t\n\tif ($post_id_to_return) {\n\t\t// return editlink for the newly created page\n\t\t$editLink = get_edit_post_link($post_id_to_return, '');\n\t\tif ($wpml_lang) {\n\t\t\t$editLink = add_query_arg(\"lang\", $wpml_lang, $editLink);\n\t\t}\n\t\techo $editLink;\n\t} else {\n\t\t// fail, tell js\n\t\techo \"0\";\n\t}\n\t#print_r($post_new);\n\texit;\n}", "title": "" }, { "docid": "c13847953d42855f398d08cedf8c6c52", "score": "0.49584424", "text": "private function executeSequenceInsert()\n {\n $this->getParentEntityID();\n $this->getNextSequenceID();\n $columns[] = 'id';\n $columns[] = 'media_id';\n $columns[] = 'creation_date';\n $values[] = $this->entity_id;\n $values[] = $this->parent_id;\n $values[] = date('Y-m-d');\n foreach ($this->temp_array AS $key => $value) {\n $columns[] = $key;\n $values[] = $value;\n }\n $sequence_handler = $this->prepareSequenceInsert($columns);\n $res = $this->db->execute($sequence_handler, $values);\n $this->handleDbError($res);\n }", "title": "" }, { "docid": "9b8eb9d915b8f6f6bbff29d5f94a1d92", "score": "0.4954505", "text": "private function insert($value)\n {\n if (is_null($this->root)) {\n $this->root = new Sort_BinaryTreeNode($value);\n } else {\n $this->insertRec($this->root, $value);\n }\n }", "title": "" }, { "docid": "ef6218471fcf7870977d76c85d6552ef", "score": "0.49529836", "text": "public function addChild($key, Node $node);", "title": "" }, { "docid": "5fcb67c813c07064de9ae1b978a51201", "score": "0.49510258", "text": "public function addChild($name, $value = null);", "title": "" }, { "docid": "0cb284193fbe358c2d3974f395ddf6a1", "score": "0.4949701", "text": "function addChildVersion($ids)\n {\n $newids = array();\n foreach ($ids as $id)\n $newids[] = $id;\n $newids = array_merge($newids, $this->getChildVersions($id));\n return $newids;\n }", "title": "" }, { "docid": "8bef9b50fe560223d80167bbfa474abe", "score": "0.49496427", "text": "function addNewFolder($info) {\n\t\tforeach ($info as $key=>$value)\n\t\t{\n\t\t\t$info[$key]=mysql_escape_string($value);\n\t\t}\n \t\n \t//$this->db->select_db(DB_NAME);\n\t\t$query = \"INSERT INTO `doc_container` \".\n\t\t\t\"(`id`, `name`, `type`, `parent_id`, `parent_category`) VALUES (\".\n\t\t\t\"NULL, '\".$info['name'].\"', '\".DocContainerItem::FOLDER_ITEM.\"', '\".$info['parent_id'].\"', '\".$info['parent_category'].\"');\"; \t\n \t$this->db->query($query);\n }", "title": "" }, { "docid": "702f8b745835788a5b4dbabb4b09a53d", "score": "0.4947353", "text": "function tree_build_path($n,$options=array()){\n\t$a=explode('/',trim($n,'/'));\n\textract($options);\n\tif(empty($defaultTable)) $defaultTable='relatebase_tree';\n\tif(!isset($Tree_ID))$Tree_ID=NULL;\n\tif(!empty($lastNodeValues)){\n\t $str = '';\n\t\tforeach($lastNodeValues as $n=>$v){\n\t\t\t$str.=$n.\"='\".addslashes($v).\"',\\n\";\n\t\t}\n\t}\n\t$i = 0;\n\tforeach($a as $n=>$v){\n\t\t$i++;\n\t\tif($o=q(\"SELECT ID FROM \".$defaultTable.\" WHERE Tree_ID\".(is_null($Tree_ID)?' IS NULL':'='.$Tree_ID).\" AND Name='\".addslashes($v).\"' AND Type='\".(!empty($lastNodeType) && $i==count($a) ? $lastNodeType : 'folder').\"'\", O_VALUE)){\n\t\t\t//OK\n\t\t\t$Tree_ID=$o;\n\t\t}else{\n\t\t\t$Tree_ID=q(\"INSERT INTO \".$defaultTable.\" SET \n\t\t\t\".($Tree_ID ? 'Tree_ID='.$Tree_ID.',' : '').\"\n\t\t\t\".($lastNodeValues && $i==count($a) ? $str : '').\"\n\t\t\tType='\".($lastNodeType && $i==count($a) ? $lastNodeType : 'folder').\"', \n\t\t\tName='\".addslashes($v).\"', \n\t\t\tCreateDate=NOW(), \n\t\t\tCreator='\".(!empty($Creator) ? $Creator : ($_SESSION['systemUserName'] ? $_SESSION['systemUserName'] : 'system')).\"'\", O_INSERTID);\n\t\t}\n\t}\n\treturn $Tree_ID;\n}", "title": "" }, { "docid": "2d6c1ea9317820dc8d4ee096fec98262", "score": "0.494391", "text": "protected function _insert() {\n \tif(!$this->guid) { $this->guid = \\Core\\Base\\Core::guid( (int)$this->parent_id . $this->title . $this->group_id ); }\n }", "title": "" }, { "docid": "a93342ae772fd7c088fa7719aa7d08e9", "score": "0.49433076", "text": "protected function build_tree($path_list)\r\n {\r\n $path_tree = array();\r\n foreach ($path_list as $path => $id) {\r\n $list = explode('/', trim($path, '/'));\r\n $last_dir =& $path_tree;\r\n foreach ($list as $dir) {\r\n $last_dir =& $last_dir[$dir];\r\n }\r\n //$last_dir['__title'] = $title;\r\n $last_dir['id'] = $id;\r\n $last_dir['text'] = $id;\r\n $last_dir['type'] = 'file';\r\n }\r\n\r\n return $path_tree;\r\n }", "title": "" }, { "docid": "30b0e29355b81e8e076c505ff491bcd2", "score": "0.4943178", "text": "protected function _insertTreeBlock($arr)\n\t{\n\t\t$array = &$arr['vars'];\n\t\tforeach ($array as $key => $value) {\n\t\t\tif ($value['vars']['idTarget'] == $arr['idTarget']) {\n\t\t\t\t$array = $arr['varsTarget'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($value['child']) {\n\t\t\t\t$array[$key]['child'] = $this->_insertTreeBlock(array(\n\t\t\t\t\t'vars' => $array[$key]['child'],\n\t\t\t\t\t'idTarget' => $arr['idTarget'],\n\t\t\t\t\t'varsTarget' => $arr['varsTarget'],\n\t\t\t\t));\n\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "297589d49b8fb9f756511c8c9de0de45", "score": "0.49418473", "text": "function add_child($category_id = 0) {\r\n if ($category_id <= 0)\r\n $cid = (int) $this->id;\r\n else\r\n $cid = (int) $category_id;\r\n if ($cid > 0) {\r\n $query = \"SELECT * FROM {$this->name_table}\r\n WHERE {$this->name_id}=$cid\r\n \" . $this->sql_where();\r\n $_info = \\e::db_getonerow($query);\r\n } else\r\n $_info = false;\r\n if (!$_info)\r\n return false;\r\n\r\n \\e::db_execute('BEGIN;');\r\n $query = \"UPDATE {$this->name_table}\r\n SET {$this->name_finish}={$this->name_finish}+2\r\n WHERE {$this->name_finish}>={$_info[$this->name_finish]}\r\n \" . $this->sql_where();\r\n // prn($query);\r\n \\e::db_execute($query);\r\n\r\n $query = \"UPDATE {$this->name_table}\r\n SET {$this->name_start} ={$this->name_start}+2\r\n WHERE {$this->name_start}>={$_info[$this->name_finish]}\r\n \" . $this->sql_where();\r\n // prn($query);\r\n \\e::db_execute($query);\r\n\r\n $new_start = $_info[$this->name_finish];\r\n $new_finish = $_info[$this->name_finish] + 1;\r\n $new_deep = $_info[$this->name_deep] + 1;\r\n $query = \"INSERT INTO {$this->name_table}(start, finish, deep)\r\n values( $new_start, $new_finish, {$new_deep} );\";\r\n // prn($query);\r\n \\e::db_execute($query);\r\n \\e::db_execute('COMMIT;');\r\n\r\n $query = \"SELECT LAST_INSERT_ID() AS newid;\";\r\n $newid = \\e::db_getonerow($query);\r\n\r\n return $newid['newid'];\r\n }", "title": "" }, { "docid": "96daa0bc0d39f94cca94d68e3f6125ad", "score": "0.49380445", "text": "public function getPathElements($path){\n\t\t$return = array();\n\t\t$return[] = array('name'=>$this->getName(), 'url'=>$this->getUrl());\n\n\n\t\t$paths = explode('/',$path);\n\t\t$sUrl = $this->getActualBranch();\n\t\tforeach($paths as $k => $sPath){\n\t\t\tif(!$sPath) continue;\n\t\t\t$sUrl .= '/'.$sPath;\n\t\t\t$return[] = array('name'=>$sPath,'url'=>$this->getUrl('home').'/tree/'.$sUrl);\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "e55ab368ea5374458579ebd156a1818d", "score": "0.49288598", "text": "public function setChildren($children);", "title": "" }, { "docid": "105dbdc0821c6b2d3274721ca49bdbd8", "score": "0.49263576", "text": "private function move_children()\n {\n if($this->site->get_children_of($this->old_key)) {\n foreach($this->site->get_children_of($this->old_key) as $child) {\n if(!$child->move($this->key)) {\n $this->add_error(\"Could not move child (\".$child->get_error_string().\").\");\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "4cf8c899def7ca0c3e3c8310aec08e50", "score": "0.49228248", "text": "function insert_records($parent_id=0, $level=0)\n\t{\n\t\tglobal $dbc;\n\t\tsrand();\t// seeding random generator \n\t\t$number_recs_on_the_level=rand(0, MAX_RECS_ON_LEVEL);\t// number of records on the level (from the parent)\n\n\t\t\n\t\t// For each record: write it into db, recursively call insert_records() if we have not reach the bottom yet\n\t\tfor($i=0; $i<$number_recs_on_the_level; $i++)\t\n\t\t{\n\t\t\t$str=get_random_string();\n\t\t\t$q=\"insert into \".TABLE.\" (name, parent_id) values ('$str', $parent_id)\";\n\t\t\t$r=mysqli_query($dbc, $q);\n\t\t\t$id=mysqli_insert_id($dbc);\n\t\t\tif($level>0)\t// Do we need children?\n\t\t\t{\n\t\t\t\tinsert_records($id, $level-1);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "79c45feadd0ea842405cdfecc2cc40dd", "score": "0.4909854", "text": "private function ReadPathTree()\n\t{\n\t\t$this->pathTreeRead = true;\n\n\t\tif (empty($this->path)) {\n\t\t\t/* this is a top level tree, it has no subpath */\n\t\t\treturn;\n\t\t}\n\n\t\t$path = $this->path;\n\n\t\twhile (($pos = strrpos($path, '/')) !== false) {\n\t\t\t$path = substr($path, 0, $pos);\n\t\t\t$pathhash = $this->commit->PathToHash($path);\n\t\t\tif (!empty($pathhash)) {\n\t\t\t\t$parent = $this->GetProject()->GetTree($pathhash);\n\t\t\t\t$parent->SetPath($path);\n\t\t\t\t$this->pathTree[] = $parent;\n\t\t\t}\n\t\t}\n\n\t\tif (count($this->pathTree) > 0) {\n\t\t\t$this->pathTree = array_reverse($this->pathTree);\n\t\t}\n\t}", "title": "" }, { "docid": "485149d43c5f3bc596fbc959d3d7ba51", "score": "0.49056804", "text": "protected function addChildrenData(\\DOMDocument $xml, \\DOMElement $archive, int $pid)\n {\n // Add children node\n $children = $xml->createElement('children');\n $children = $archive->appendChild($children);\n\n $objChildren = StyleManagerModel::findByPid($pid);\n\n if($objChildren === null)\n {\n return;\n }\n\n $this->loadDataContainer('tl_style_manager');\n\n while($objChildren->next())\n {\n $row = $xml->createElement('child');\n $row->setAttribute('alias', $objChildren->alias);\n $row = $children->appendChild($row);\n\n // Add field data\n $this->addRowData($xml, $row, $objChildren->row());\n }\n }", "title": "" }, { "docid": "e260fc7691020b94c1719ea7494e81f4", "score": "0.490352", "text": "function rebuild_tree($mysqli,$parent,$lft){\n $rgt=$lft+1;\n $sql=\"select name from root where parent= '\".$parent.\"'\";\n $res=$mysqli->query($sql);\n while($row=mysqli_fetch_array($res)){\n var_dump($row['name']);\n $rgt=rebuild_tree($mysqli,$row['name'],$rgt);\n var_dump($rgt);\n }\n $sql=\"update root set lft= '\".$lft.\"',rgt='\".$rgt.\"' where name='\".$parent.\"'\";\n $res=$mysqli->query($sql);\n var_dump($res);\n return $rgt+1;\n}", "title": "" }, { "docid": "573dc89403acb199440a519793af9be4", "score": "0.4903419", "text": "public function addChildren( $nodes, $indexStart ) {\n\t\t\t// use splice and merge to add the nodes\n\t\t\t$this->children = array_merge( array_slice( $this->children, 0, $indexStart + 1 ), $nodes, \n\t\t\t \tarray_slice( $this->children, $indexStart + 1 ) );\n\t\t}", "title": "" }, { "docid": "8699f17d6d359a82885661e8dfc1db98", "score": "0.49029416", "text": "public function Insert($post)\n\t{\n\t\t$post['sort'] = parent::last_sort_val(array('parent_id' => $post['parent_id']));\n\n\t\treturn parent::Insert($post);\n\t}", "title": "" }, { "docid": "763bfe34482583d1089df080519756a0", "score": "0.4899994", "text": "function update_item($doc,$parent, $old, $new) {\n\n for ($i = 0; $i < $new->childNodes->length; $i++) {\n $child = $new->childNodes->item($i);\n if ($child->nodeType === XML_TEXT_NODE) {\n #$nd->appendChild($node->cloneNode(true));\n }\n else{\n\n $name = $child->nodeName;\n $found = false;\n \n // look if a child exists already with that nodename\n for ($j = 0; $j < $old->childNodes->length; $j++) {\n $oldchild = $old->childNodes->item($j);\n $oldname = $oldchild->nodeName;\n if ($oldname == $name){\n $found = true;\n }\n }\n if (! $found) {\n #echo \"Adding Node \";\n #echo $name;\n #echo \"\\n\";\n //echo $old;\n\n $node2 = $doc->importNode($child, true);\n if ($node2) {\n if ($parent){\n $parent->appendChild($node2);\n \n } else {\n #echo \"no parent\";\n }\n }\n else {\n #echo \"no node\";\n print_r($child);\n }\n }\n }\n }\n \n}", "title": "" }, { "docid": "313c1ec5623c5ab8b2b392263f1cc933", "score": "0.4887906", "text": "public function addTemplatePath($path)\n {\n // Just force to array\n settype($path, 'array');\n\n // Loop through the path directories\n foreach ($path as $dir) {\n // No surrounding spaces allowed!\n $dir = trim($dir);\n\n // Add trailing separators as needed\n if (substr($dir, -1) != DIRECTORY_SEPARATOR) {\n // Directory\n $dir .= DIRECTORY_SEPARATOR;\n }\n\n // Add to the top of the search dirs\n array_unshift($this->templatePaths, $dir);\n }\n }", "title": "" }, { "docid": "0a35ab6b94eb93afabfc90762f931d06", "score": "0.4872152", "text": "public function prependChild() {\n $argCount = func_num_args();\n $args = func_get_args();\n \n //PrependChild(Node ParentNode, Node ThisNode)\n if($argCount == 2){\n $args[0]->insertBefore($args[1], $args[0]->firstChild);\n }\n //PrependChild(Node ThisNode)\n else{\n //execute query if ResultNodes == null\n if(is_null($this->resultNodes)) {\n //execute query\n $this->executeQuery();\n }\n $this->prependChild($this->resultNodes[0], $args[0]);\n }\n \n return $this;\n }", "title": "" }, { "docid": "09f0fcd51eec8d6ae1537383c0e4f40a", "score": "0.48637554", "text": "public function add_child(Kohana_ORM_Nested_Sets $node)\n {\n return $node->insert_as_last_child_of($this);\n }", "title": "" }, { "docid": "af18f5efd3b51701461d36a01eae4469", "score": "0.48603776", "text": "public function addPaths($paths, $prepend = false);", "title": "" } ]
93f9660c472195461272513df184cd3f
$obj = new Application();
[ { "docid": "e6521783e56af0d8f907315d16848595", "score": "0.0", "text": "public function test___construct() {\n\t\t}", "title": "" } ]
[ { "docid": "1e68b6949d253fd9e59d08ce13c1ffff", "score": "0.7142825", "text": "public function __construct() {\n $this->app = Application::getInstance();\n }", "title": "" }, { "docid": "0abe082172f1d9fa6657a75bb2e619ff", "score": "0.66969556", "text": "function ApplicationObj()\n {\n return $this->ApplicationObj;\n }", "title": "" }, { "docid": "a12be2e13f06bf6b2653eadfff7dc10b", "score": "0.6660932", "text": "function app(): Application {\n\treturn Kernel::singleton()->application();\n}", "title": "" }, { "docid": "fc70df5faa877f06f15bce2d6ca7ee81", "score": "0.66485727", "text": "static function getInstance(){\n\t\n\t\tif (self::$_instance === null) {\n\t\t\tself::$_instance = new App();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "title": "" }, { "docid": "0e158ed1c45b11cb725eb4eebf73966c", "score": "0.656363", "text": "public function getApplication()\n {\n }", "title": "" }, { "docid": "0452b2084ccffeccf007e5da5546193b", "score": "0.65404856", "text": "public function __construct()\n {\n //self::$app = $this;\n $this->config = new Config();\n $this->logs = new Logs();\n $this->game = new Game($this->config, $this->logs);\n }", "title": "" }, { "docid": "9b23b971f7720ce8ed42274bd59be42f", "score": "0.6522214", "text": "abstract protected function createApplication();", "title": "" }, { "docid": "015984d369a6b2b4b03f42483d6fc94b", "score": "0.6497189", "text": "function &getInstance()\n{\n return \\core\\App::getInstance();\n}", "title": "" }, { "docid": "7be0c1410c514fefae0d77626c914513", "score": "0.6479428", "text": "public static function Instance()\n\t{\n\t\tif (self::$instance == NULL)\n\t\t\tself::$instance = new Application();\n\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "c63dbe4f373118fa92df6dd483a79d88", "score": "0.64712405", "text": "public function __construct()\n {\n $this->application = null;\n }", "title": "" }, { "docid": "9ed1509ac5a97d51f90d9bcb0863d1ed", "score": "0.64665985", "text": "public static function instance()\n {\n static $app;\n if (!$app) {\n $app = parent::instance();\n $app->configure(array(\n 'web server' => 'nginx', # httpd(apache), lighttpd\n 'jsonp callback' => 'callback',\n 'ajoy root' => dirname(__file__),\n 'app id' => sprintf('%x', crc32($_SERVER['SCRIPT_FILENAME'])),\n 'components' => array(\n 'db' => array(\n 'interface' => 'IAjoyDatabase',\n 'class' => 'AjoyDatabase',\n ),\n 'cache' => array(\n 'interface' => 'IAjoyCache',\n 'class' => 'AjoyCache',\n ),\n 'session' => array(\n 'interface' => 'IAjoySession',\n 'class' => 'AjoySession',\n ),\n 'logger' => array(\n 'interface' => 'IAjoyLogger',\n 'class' => 'AjoyLogger',\n ),\n 'view' => array(\n 'interface' => 'IAjoyView',\n 'class' => 'AjoyView',\n ),\n 'request' => array(\n 'class' => 'AjoyRequest',\n ),\n 'response' => array(\n 'class' => 'AjoyResponse',\n ),\n 'validator' => array(\n 'class' => 'AjoyValidation',\n )\n ),\n 'modules' => array(),\n ));\n }\n return $app;\n }", "title": "" }, { "docid": "cc5f816b7fc600a982e70c79045d6c63", "score": "0.64603335", "text": "public function getApplication();", "title": "" }, { "docid": "cc5f816b7fc600a982e70c79045d6c63", "score": "0.64603335", "text": "public function getApplication();", "title": "" }, { "docid": "da8e1a6d7182fa14b104631d88cde32e", "score": "0.64285123", "text": "abstract protected function getApplication();", "title": "" }, { "docid": "2f7e3ecebdaf64f65f1186795960a7d9", "score": "0.6419268", "text": "public function __construct(Application $app){\n $this->app = $app;\n }", "title": "" }, { "docid": "26ab86aff0faa73251cda1dc766bec1d", "score": "0.6337368", "text": "public function __construct(Application $app)\r\n {\r\n $this->app = $app;\r\n }", "title": "" }, { "docid": "73800fd4175baf61dd4ea250025718a1", "score": "0.6327128", "text": "protected function getApp()\n {\n return new class extends Application {\n public function __construct()\n {\n // \"Mock\" Command_Container\n $cc = new class([], []) extends Command_Container {\n public function processArgs(array $ags): void\n {\n return;\n }\n };\n parent::__construct($cc);\n }\n };\n }", "title": "" }, { "docid": "185a9fd45090b4c91d2ab8ddc2ba9a16", "score": "0.6312512", "text": "public function __construct(){\n //from outside when we new the object\n }", "title": "" }, { "docid": "0c95000c5b55a9921a23cec711dbbffb", "score": "0.6304441", "text": "public function __construct($app){\n\t\t$this->App = $app;\n\t}", "title": "" }, { "docid": "e28002cb250d561351c7adf128b1d9cd", "score": "0.63011575", "text": "public static function app()\n\t{\n\t\treturn self::$_application;\n\t}", "title": "" }, { "docid": "6180124b32fab4949dff46ad08da955c", "score": "0.6288218", "text": "public function getApplication() {}", "title": "" }, { "docid": "21dd1d96f028ea9f2db57e88c50fb6e3", "score": "0.623786", "text": "public static function app() {}", "title": "" }, { "docid": "833ef66ea7249c1d53bc5cbb456a92a6", "score": "0.6232886", "text": "static private function getApp()\n {\n if (self::$app === null) {\n self::$app = new Application();\n }\n \n return self::$app;\n }", "title": "" }, { "docid": "0ef77caaf5705dc7d3758ab5bfc3f03f", "score": "0.6227592", "text": "public function __construct(Application $application)\n {\n $this->application = $application;\n }", "title": "" }, { "docid": "219809912c88210d9b5fa627691d8f22", "score": "0.62116444", "text": "function &get_instance()\n{\n return Controller::getInstance();\n}", "title": "" }, { "docid": "9a1577eb4fca21441c83dcff4aa93a11", "score": "0.6209715", "text": "public function instance();", "title": "" }, { "docid": "8de34836aeb75fa5fb11458617499b5d", "score": "0.62004507", "text": "public function __construct($app){\n $this->_app = $app;\n }", "title": "" }, { "docid": "600237085c97110dc9776727c944ebe5", "score": "0.6177839", "text": "public function application () {\n\t\t\n\t\treturn $this->application;\n\t\t\n\t}", "title": "" }, { "docid": "95b2bb4940878595bde20f4716c4401b", "score": "0.6176402", "text": "public function createApplication()\n {\n // TODO: Implement createApplication() method.\n }", "title": "" }, { "docid": "95b2bb4940878595bde20f4716c4401b", "score": "0.6176402", "text": "public function createApplication()\n {\n // TODO: Implement createApplication() method.\n }", "title": "" }, { "docid": "a94ffa66bb13581d930ad9b5a4a9fc74", "score": "0.6172964", "text": "function get_application()\n {\n return $this->application;\n }", "title": "" }, { "docid": "9a644bf55d8c42b73a14451a42199fb7", "score": "0.6162842", "text": "public function __construct() {\n //$objCore = new Core();\n //default constructor for this class\n }", "title": "" }, { "docid": "58a30519d8dc9b9cddaaabc4b5f42a8c", "score": "0.6136784", "text": "public static function instance();", "title": "" }, { "docid": "58a30519d8dc9b9cddaaabc4b5f42a8c", "score": "0.6136784", "text": "public static function instance();", "title": "" }, { "docid": "3ba3116bc711454c38974626482f6f3b", "score": "0.61310244", "text": "function ApplicationScaffolding()\n {\n $this->__construct();\n }", "title": "" }, { "docid": "be62232575145137a2f378a7bad3ea83", "score": "0.6128487", "text": "public function __construct()\n {\n // echo \"The object is currently being constructed.\";\n }", "title": "" }, { "docid": "9b1bb70b4642fd204c4520ba643c5f6a", "score": "0.61091477", "text": "protected function getSilexApp()\n {\n return new Application();\n }", "title": "" }, { "docid": "9c3905b198da33433df75ba3d6e49aa1", "score": "0.6099542", "text": "public static function getInstance()\n\t{\n\t\tif(self::$app === null) {\n\t\t\treturn new self;\n\t\t}\n\t\treturn self::$app;\n\t}", "title": "" }, { "docid": "43f9dd2a7859197e0f0d1eff8265cee6", "score": "0.60660195", "text": "public function getApplication(){\n\t\treturn $this->_application;\n\t}", "title": "" }, { "docid": "550f2fe93a40eef28ae4e34e567b2179", "score": "0.6064234", "text": "public function __construct() {\n\n $this->setApp();\n }", "title": "" }, { "docid": "5c9acc65d203d5c07cfb6cf1154f1ffa", "score": "0.60549504", "text": "public function __construct(Application $application)\n {\n $this->application = $application;\n }", "title": "" }, { "docid": "5c9acc65d203d5c07cfb6cf1154f1ffa", "score": "0.60549504", "text": "public function __construct(Application $application)\n {\n $this->application = $application;\n }", "title": "" }, { "docid": "d96a289d1852d8cf98bc3023f535c172", "score": "0.6049421", "text": "public function __construct($app)\n {\n parent::__construct($app);\n }", "title": "" }, { "docid": "f4dc6d80778508148caf81ba7ba5799c", "score": "0.60450244", "text": "public function createAppInstance()\n {\n $settings = new Settings();\n $config = $settings->getConfig();\n\n $this->app = new \\Slim\\App([\n \"settings\" => $config\n ]);\n }", "title": "" }, { "docid": "8f4ec89c85e35a04fa555675b820b94e", "score": "0.60307616", "text": "public function __construct() \n {\n //that needs to be managed automatically\n print \"Constructed!\\n\";\n }", "title": "" }, { "docid": "89c1474908ea22e7ac1d7952ef46ae42", "score": "0.6020256", "text": "public function __construct(Application $app)\n\t{\n\t\t$this->app = $app;\n\t}", "title": "" }, { "docid": "89c1474908ea22e7ac1d7952ef46ae42", "score": "0.6020256", "text": "public function __construct(Application $app)\n\t{\n\t\t$this->app = $app;\n\t}", "title": "" }, { "docid": "df83dab1b36fc89e7513b9ef4c2c37ec", "score": "0.6010547", "text": "function __construct(){\n\t\tparent::__construct('main', TRUE, TRUE);\n\t}", "title": "" }, { "docid": "33caad7acb8651ff674c0064ad0895c1", "score": "0.5943201", "text": "private static function createApplication(string $class, $config = null)\n\t{\n\t\tstatic::initialize();\n\t\treturn new $class($config);\n\t}", "title": "" }, { "docid": "d95065509cc1d0b4a6050f28f4592eed", "score": "0.5926165", "text": "function __constructor(){}", "title": "" }, { "docid": "67430655d652398f954eedd644c82a2c", "score": "0.5922796", "text": "abstract protected function app(): array;", "title": "" }, { "docid": "f1f6bdc97d44376e1a702bf5b266902b", "score": "0.5922139", "text": "private function __construct()\n {\n echo 'Singleton class instance';\n }", "title": "" }, { "docid": "c6c03ec709d5a3c31648fb911e69356d", "score": "0.59136087", "text": "function start_app(){\n\t$app = App::start();//Call the start() method to start the bootstrapping process\n\n\t//call the appropriate \n\t$app->callController();\n}", "title": "" }, { "docid": "9758599e2211c54aa6bb1ab59c2bbd8d", "score": "0.59100884", "text": "function __construct(){\n $this->database = new Database();\n }", "title": "" }, { "docid": "4eac9a23e28a9257f8a7cf98ae349793", "score": "0.5907194", "text": "function __construct()\n {\n//default constructor for this class\n }", "title": "" }, { "docid": "2d6ea25808a4a45e8915afcc380f6c44", "score": "0.59071165", "text": "public function __construct(Application $app)\n {\n parent::__construct($app);\n }", "title": "" }, { "docid": "d3e9c749464d582e9547fc41743c86bf", "score": "0.5906485", "text": "public static function starApp()\n {\n $url = App_controlador::getRute();\n $app = new App_controlador();\n //Incluir la vista que cargara mi aplicacion con include\n include_once 'vista/app.php';\n }", "title": "" }, { "docid": "d6d9c1d16034074de67652e342777fa2", "score": "0.58759236", "text": "public function __construct(Array $config = array()){\n\t\tself::$_instance = &$this;\n \n\t\t// set document root\n\t\t$config['document.root'] = str_replace('framework' . DIRECTORY_SEPARATOR . 'BasicApplication.php', '', __FILE__);\n \n\t\t// set base uri\n if(isset($_SERVER['HTTP_HOST'])){\n $remaining = str_replace(str_replace('/', DIRECTORY_SEPARATOR , $_SERVER['DOCUMENT_ROOT']), '', $config['document.root']);\n\t\t $config['base.uri'] = 'http://' . $_SERVER['HTTP_HOST'] . str_replace(DIRECTORY_SEPARATOR, '/', $remaining);\n }\n\n // set default sources\n $config['sources'][] = 'app' . DIRECTORY_SEPARATOR;\n\t\t$config['sources'][] = 'app' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR;\n\t\t$config['sources'][] = 'framework' . DIRECTORY_SEPARATOR;\n\t\t$config['sources'][] = 'framework' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR;\n\t\t$config['sources'][] = 'framework' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR;\n\n // save config\n\t\t$this->_config = new Config($config);\n\n\t\t// display php erros when debugging\n\t\tif($this->_config->debug){\n\t\t\terror_reporting(E_ALL);\n\t\t\tini_set('display_errors', 1);\n\t\t}\n\n\t\t// register autoloader\n\t\tif(!isset($this->_config->autoloader))\n\t\t\tspl_autoload_register(array($this, 'autoload'));\n\t\telse\n\t\t\tspl_autoload_register($this->_config->autoloader);\n\n\t\t// set the exception handler\n\t\tif(isset($this->_config->exceptionHandler)){\n\t\t\tset_exception_handler($this->_config->exceptionHandler);\n\t\t} else {\n\t\t\tset_exception_handler(function(Exception $e){\n\t\t\t\tif($this->_config->debug){\n\t\t\t\t\techo '<pre>';print_r($e);echo '</pre>';\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t// set the error handler\n\t\tif(isset($this->_config->errorHandler)){\n\t\t\tset_error_handler($this->_config->errorHandler);\n\t\t} else {\n\t\t\tset_error_handler(function($errno, $errstr, $error_file = null, $error_line = null, Array $error_context = null){\n\t\t\t\t$error = array('no' => $errno, 'error' => $errstr, 'file' => $error_file, 'line' => $error_line, 'context' => $error_context);\n\t\t\t\tif($this->_config->debug){\n\t\t\t\t\techo '<pre>';print_r($error);echo '</pre>';\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// handle http requests\n\t\tif(!isset($_SERVER['argv']) && isset($_SERVER['HTTP_HOST'])){\n\t\t\t// get router and request object\n\t\t\t$router = new routing\\Router();\n\t\t\t$this->_request = routing\\Request::instance();\n\t\t\t// register routes\n\t\t\tif(isset($config['routes'])){\n\t\t\t\tforeach($config['routes'] as $route){\n\t\t\t\t\t$router->registerRoute($route['requestMethod'], $route['route'], $route['callback']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// register controllers\n $sources = array();\n foreach($config['sources'] as $source)\n $sources[] = $this->_config->document_root . $source . 'controllers';\n $router->registerControllers($sources);\n\t\t\t// start a session\n\t\t\t$this->_session = new Session();\n\t\t\t// resolve the route\n\t\t\t$router->resolveRoute();\n\t\t}\n\t\t// handle console commands\n\t\telse if(isset($_SERVER['argv'], $_SERVER['argv'][0], $_SERVER['argv'][1])){\n\t\t\t$cmd = $_SERVER['argv'][1];\n\t\t\tunset($_SERVER['argv'][0], $_SERVER['argv'][1]);\n\t\t\t$class = '\\commands\\\\' . ucfirst($cmd) . 'Command';\n\t\t\tif(class_exists($class)){\n\t\t\t\t$command = new $class();\n\t\t\t\t$command->execute(array_values($_SERVER['argv']));\n\t\t\t} else {\n\t\t\t\tthrow new \\Exception('command ' . $cmd . ' not found');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0585633fe9d62596c82f15775b9ed329", "score": "0.58756363", "text": "static function instance();", "title": "" }, { "docid": "a536b64bf489918f59cbbee411092a0b", "score": "0.58708894", "text": "public function __construct(){\n //setup the application class\n $this->set_application();\n\n //setup smarty, with default template\n $this->reset_smarty($this->get_template_name());\n\n //check for postback and grab any commands\n if (isset($_POST[\"_is_postback\"])) {\n $this->unserialize_viewstate();\n $this->get_postback_command();\n }\n\n $this->warnings = array();\n $this->messages = array();\n\n //load function (a way of child classes running code at the point of class construction)\n $this->load();\n //check for postback vs load\n if (isset($_POST[\"_is_postback\"])) {\n $this->get_data();\n $this->unbind();\n $this->process();\n }else{\n $this->setup();\n $this->bind();\n $this->render();\n }\n //save the application class\n $this->save_application();\n }", "title": "" }, { "docid": "2a40dea716950db145d91f562f8a8c16", "score": "0.58690023", "text": "function getApplication() {\n\t\treturn $this->application;\n }", "title": "" }, { "docid": "b0e107a558a2ec0d234c6d6cd396f1f9", "score": "0.58649045", "text": "function new(){\n\n }", "title": "" }, { "docid": "2dbaa68bde0e60c3b625da231c3a0715", "score": "0.58571154", "text": "public static function app($_config) {\n return new self($_config);\n }", "title": "" }, { "docid": "c54f46718b30b8eee3aba7455d0d6332", "score": "0.5856585", "text": "public function getApplication(): Application|null;", "title": "" }, { "docid": "e9dece532b0ec6bafb3287232afc879a", "score": "0.58506364", "text": "function __construct () {\n}", "title": "" }, { "docid": "958805f95250c1f217ff70b895e28352", "score": "0.5848137", "text": "function Pessoa()\n{\n\n$this->database = new Database();\n\n}", "title": "" }, { "docid": "f3438a267682a3f84d1d3141a31e25f8", "score": "0.58461607", "text": "function __construct();", "title": "" }, { "docid": "0db64902cbed338e946d0279bfd5e4e3", "score": "0.58327675", "text": "public function __construct($app)\r\n {\r\n $this->app = $app;\r\n }", "title": "" }, { "docid": "73c0687ff72acc7c2511f150a10c4545", "score": "0.5832588", "text": "function hfw_main(){$this->__construct();}", "title": "" }, { "docid": "ed67f4aab5ee31ef501a2e21642edd14", "score": "0.5832537", "text": "public function load(): ApplicationInterface\n {\n return $this;\n }", "title": "" }, { "docid": "93c0850c58e2ebf912337f40d066472a", "score": "0.5831913", "text": "public function __construct();", "title": "" }, { "docid": "93c0850c58e2ebf912337f40d066472a", "score": "0.5831913", "text": "public function __construct();", "title": "" }, { "docid": "93c0850c58e2ebf912337f40d066472a", "score": "0.5831913", "text": "public function __construct();", "title": "" }, { "docid": "acdeeebd44d9d17a706e1792b19e6fea", "score": "0.5827456", "text": "public function __construct()\n {\n $this->_db = new \\application\\DB;\n }", "title": "" }, { "docid": "04a40aabcbcae14414699defd20e0e71", "score": "0.5821847", "text": "public function __construct() {\n \t$this->model = new Model();\n }", "title": "" }, { "docid": "e7446dab37e9438096676733abc9fd21", "score": "0.5820886", "text": "static public function init(Config $config)\r\n {\r\n return new Application($config);\r\n }", "title": "" }, { "docid": "80034aebbe79f61c1838134a3459fd07", "score": "0.5817919", "text": "function __construct() {\n $this->view = new view();\n //creating object of model class\n $this->model = new model();\n \n \n }", "title": "" }, { "docid": "f8f87e35a4a73ad7804d36bdf6a1e203", "score": "0.5800519", "text": "public function __construct($app)\n {\n parent::__construct($app);\n }", "title": "" }, { "docid": "a9a29aad9cebfc42c9fb59521a9edff6", "score": "0.57961524", "text": "function __construct()\n {}", "title": "" }, { "docid": "a13d49d446186c9d52e66ebf692d6a89", "score": "0.5793091", "text": "public function __construct()\n{\n}", "title": "" }, { "docid": "0aa63ff31ff110ab0461469abbf78c31", "score": "0.5788481", "text": "public function __construct()\n {\n // construct...\n }", "title": "" }, { "docid": "e1fda80324aacf2cb279e39642d94db2", "score": "0.5779787", "text": "public function getApplication() {\n\n\t\treturn $this -> application;\n\n\t}", "title": "" }, { "docid": "2f3254a9178b10b9e02d832c889df72a", "score": "0.5777444", "text": "function app() {\n return App::get();\n }", "title": "" }, { "docid": "599bf5cd44bbe24d304f7970abe3abde", "score": "0.5775765", "text": "private static function getSingleton(): ?Application\n\t{\n\t\treturn self::$_app;\n\t}", "title": "" }, { "docid": "ab88aea4b769ed5eea6081a39371dc6c", "score": "0.577431", "text": "public function __construct(){\n $this->db = new Database;\n }", "title": "" }, { "docid": "ab88aea4b769ed5eea6081a39371dc6c", "score": "0.577431", "text": "public function __construct(){\n $this->db = new Database;\n }", "title": "" }, { "docid": "ab88aea4b769ed5eea6081a39371dc6c", "score": "0.577431", "text": "public function __construct(){\n $this->db = new Database;\n }", "title": "" }, { "docid": "625f9a06d36447ad93213c888e45ef93", "score": "0.5766764", "text": "public function model()\n {\n return Application::class;\n }", "title": "" }, { "docid": "db46e8d149cddab86603439d7808dc88", "score": "0.5760595", "text": "public function __construct(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "db46e8d149cddab86603439d7808dc88", "score": "0.5760595", "text": "public function __construct(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "db46e8d149cddab86603439d7808dc88", "score": "0.5760595", "text": "public function __construct(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "db46e8d149cddab86603439d7808dc88", "score": "0.5760595", "text": "public function __construct(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "db46e8d149cddab86603439d7808dc88", "score": "0.5760595", "text": "public function __construct(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "db46e8d149cddab86603439d7808dc88", "score": "0.5760595", "text": "public function __construct(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "db46e8d149cddab86603439d7808dc88", "score": "0.5760595", "text": "public function __construct(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "db46e8d149cddab86603439d7808dc88", "score": "0.5760595", "text": "public function __construct(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "462c18531e5e5b5dd564bed85bf7c876", "score": "0.5757789", "text": "public function __construct(){\n\t\t$this->model = new Model();\n\t}", "title": "" }, { "docid": "c162e06d6d4b231d4101c3b1dfdc0d7e", "score": "0.575732", "text": "public function __construct ($app, $event);", "title": "" }, { "docid": "cbc105be61cc34748d58aaca1c904983", "score": "0.57544065", "text": "public function __construct () {}", "title": "" }, { "docid": "cbc105be61cc34748d58aaca1c904983", "score": "0.57544065", "text": "public function __construct () {}", "title": "" }, { "docid": "0561d6688d6ea5bc3d415fb803d2ffc3", "score": "0.574301", "text": "public function __construct($app)\n {\n $this->_app = $app;\n }", "title": "" } ]
ce6b5ce42844d63285c3a3c9fad64835
Check if directory is empty
[ { "docid": "a77d25dcc3fae2c6cfb55eebd07bc0b0", "score": "0.8317669", "text": "function is_empty($path) {\n if (count(scandir($path)) > 2) {\n return 0;\n } else {\n return 1;\n }\n }", "title": "" } ]
[ { "docid": "cab9b1f945e81a9fceca0ba76a23bfaf", "score": "0.7974787", "text": "function is_dir_empty($path) {\n if (!is_readable($path))\n trigger_error(\"path is not readable: $path\");\n\n $d = opendir($path);\n while ($entry = readdir($d))\n if ($entry != '.' && $entry != '..')\n return false;\n\n return true;\n}", "title": "" }, { "docid": "5f714ccf947ae68fe12f94ac8f016538", "score": "0.7970896", "text": "function is_dir_empty($dir) {\n if (!is_readable($dir)) \n return false; \n $handle = opendir($dir);\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "04d9a665ff7d43006c587ba3d8821046", "score": "0.79462284", "text": "function is_empty_dir($path) {\n // make the path is a directory.\n if(is_dir($path)){\n // use scandir to get the contents of the directory and array_diff to filter out . and ..\n $list = array_diff(scandir($path), array('..', '.'));\n // check to see if anything was found.\n if(empty($list)){\n return true;\n } else{\n return false;\n }\n } else {\n syslog(LOG_INFO, \"$path is not a directory.\");\n return false;\n }\n }", "title": "" }, { "docid": "f7a78650b0f9770e59aa0397a2f86559", "score": "0.7789584", "text": "private function abortIfDirectoryNotEmpty()\n {\n $path = trailingslashit($this->options->cloneDir);\n if (isset($this->options->mainJob) && $this->options->mainJob !== 'resetting' && $this->options->mainJob !== 'updating' && is_dir($path) && !wpstg_is_empty_dir($path)) {\n $this->returnException(\" Can not continue for security purposes. Directory {$path} is not empty! Use FTP or a file manager plugin and make sure it does not contain any files. \");\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7093594821c72f5bab6c98239b346325", "score": "0.75834614", "text": "function dirIsEmpty($dir) {\n\t \t$handle = opendir($dir);\n\t \twhile (false !== ($entry = readdir($handle))) {\n\t \tif ($entry != \".\" && $entry != \"..\") {\n\t \t\treturn FALSE;\n\t \t}\n\t \t}\n\t \treturn TRUE;\n\t}", "title": "" }, { "docid": "110dfd96df82802862111a7c110f420a", "score": "0.756746", "text": "public static function isEmpty(string $dir): bool\n {\n return count(static::read($dir)) === 0;\n }", "title": "" }, { "docid": "4ded92e903a13e06a992e7bdd32a6fbf", "score": "0.728138", "text": "function isEmptyDir( $dir )\r\n{\r\n\tif ( !is_dir( $dir ) ) return false;\r\n\r\n\tforeach ( scandir( $dir ) as $file ) {\r\n\t\treturn !in_array( $file, [ '.', '..', '.svn', '.git' ] ) ? false : true;\r\n\t}\r\n\r\n\treturn true;\r\n}", "title": "" }, { "docid": "4fe0d2f659120d8724c44ac019489546", "score": "0.7144796", "text": "public static function is_empty_dir($dirname)\n {\n $result = false;\n if (is_dir($dirname)) {\n $result = true;\n $handle = opendir($dirname);\n while (($name = readdir($handle)) !== false) {\n if ($name != \".\" && $name != \"..\") {\n $result = false;\n break;\n }\n }\n closedir($handle);\n }\n \n return $result;\n }", "title": "" }, { "docid": "67bf29a85dda3ab98017a5246ea6f031", "score": "0.7136671", "text": "function test_empty_single(){\n $dir = io_mktmpdir();\n $top = dirname($dir);\n $this->assertTrue($dir !== false);\n $this->assertTrue(is_dir($dir));\n\n // delete successfully\n $this->assertTrue(io_rmdir($dir, false));\n\n // check result\n clearstatcache();\n $this->assertFalse(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n // same again with deletefiles\n\n // set up test dir\n $dir = io_mktmpdir();\n $this->assertTrue($dir !== false);\n $this->assertTrue(is_dir($dir));\n\n // delete successfully\n $this->assertTrue(io_rmdir($dir, true));\n\n // check result\n clearstatcache();\n $this->assertFalse(is_dir($dir));\n $this->assertTrue(is_dir($top));\n }", "title": "" }, { "docid": "0870166b9eb651e032cd041912bea3af", "score": "0.70900494", "text": "protected function isEmptyFolder($path) {\n return (count(File::directories($path))>0) ? false : true;\n }", "title": "" }, { "docid": "9ab3f10cfaa36f0c104b286bf5c9a559", "score": "0.70704937", "text": "public static function isDirEmpty($dir)\n {\n if (!file_exists($dir)) {\n throw new InvalidArgumentException('The directory does not exist');\n }\n\n if (count(glob($dir.'/*', GLOB_NOSORT)) === 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4ec82b0fb8c87ddf486759f38212631c", "score": "0.7056373", "text": "protected function hasDirectory(): bool\n {\n return Tools::file_exists_cache($this->getDirectory());\n }", "title": "" }, { "docid": "f4b17827cd7d8cdb03e8cce248f49361", "score": "0.7056348", "text": "public static function emptyDirectory($dir_path)\n {\n OS::execute(\"find $dir_path -name ._\\\\* -print0 | xargs -0 rm -f\");\n OS::execute(\"rm -rf $dir_path/*\");\n\n return self::countFiles($dir_path) === 0;\n }", "title": "" }, { "docid": "83dd474d7e29e1ca8b004cc2aca161d2", "score": "0.7009741", "text": "public static function isEmpty(string $dir = ''): bool\n {\n return Dir::isEmpty(static::getBase() . '/' . $dir);\n }", "title": "" }, { "docid": "3f7338605ba9ff45f919080f9de07451", "score": "0.7002671", "text": "public function isEmpty(): bool\n {\n return empty($this->files);\n }", "title": "" }, { "docid": "d2041aa46ca12fb9536ef9ff3535829d", "score": "0.6990003", "text": "public /*bool*/ function getEmpty() /*throws FileException*/\r\n\t{\r\n\t\tif(!$this->exists)\r\n\t\t\tthrow new FileDoesNotExistException;\r\n\r\n\t\tif(is_null($this->_properties['empty'])) {\r\n\t\t\tif($this->isDirectory) {\r\n\t\t\t\t$this->_properties['empty'] = (count($this->children) === 0);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this->_properties['empty'] = ($this->size === 0);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $this->_properties['empty'];\r\n\t}", "title": "" }, { "docid": "12141d53f4c7e52fd8ebb5f37da6a0e3", "score": "0.6966781", "text": "function lfile_empty_dir($path, $delete_dir = false)\n\t{\n\t\tif (is_dir($path)) $dir_handle = opendir($path);\n\t\tif (!$dir_handle) return false;\n\n\t\twhile ($file = readdir($dir_handle))\n\t\t{\n\t\t\tif ($file != '.' && $file != '..' && $file != '.svn')\n\t\t\t{\n\t\t\t\tif (!is_dir($path . '/' . $file))\n\t\t\t\t{\n\t\t\t\t\tif (!@unlink($path . '/' . $file)) lerror_log(l('lfile_empty_dir on line 105 - couldn\\'t delete file: ' . $path . '/' . $file));\n\t\t\t\t}\n\t\t\t\telse lfile_delete_dir($path . '/' . $file); \n\t\t\t}\n\t\t}\n\n\t\tclosedir($dir_handle);\n\n\t\tif ($delete_dir)\n\t\t{\n\t\t\tif (!@rmdir($path)) lerror_log(l('lfile_empty_dir on line 115 - couldn\\'t delete directory: ' . $path));\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "87218e335f5d81ee9913ffa58c5f1b44", "score": "0.69374293", "text": "public static function isEmptyDir(string $dir): bool {\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file != '.' && $file != '..') {\n closedir($handle);\n return false;\n }\n }\n closedir($handle);\n }\n return true;\n }", "title": "" }, { "docid": "61c1eea3992a5f543e92ba97f63d503f", "score": "0.68179053", "text": "public function isDirectory();", "title": "" }, { "docid": "bd13e5597cdc860bd59db8f30f572277", "score": "0.67802155", "text": "protected function isDirectory() {}", "title": "" }, { "docid": "d8a75a299b7b51920a9a760379e46022", "score": "0.67703223", "text": "public function isDir();", "title": "" }, { "docid": "1924340465e047cbc799a737470eab46", "score": "0.6736248", "text": "public function isDirectory() {\n\t\treturn !$this->isFile();\n\t}", "title": "" }, { "docid": "48d46e5457ec0ebb7c565c3a448db764", "score": "0.67289394", "text": "public function exists()\n {\n return $this->adapter->isDir($this->path);\n }", "title": "" }, { "docid": "a768a0f6bc603e02610a51163a6c38fa", "score": "0.6688165", "text": "public static function isFileEmpty($file);", "title": "" }, { "docid": "d517a55ccd6bf92775a19f8be3bc551a", "score": "0.6680709", "text": "function checkFolderIsEmptyOrNot( $folderName ){\n $files = array ();\n if ( $handle = opendir ( $folderName ) ) {\n while ( false !== ( $file = readdir ( $handle ) ) ) {\n if ( $file != \".\" && $file != \"..\" ) {\n $files [] = $file;\n }\n }\n closedir ( $handle );\n }\n return ( count ( $files ) > 0 ) ? TRUE: FALSE;\n}", "title": "" }, { "docid": "c20fcdf93f56fa5cb037cf22b15fe3ed", "score": "0.6634412", "text": "public function isDirectory() {\n return FALSE;\n }", "title": "" }, { "docid": "7399d2efe88e7fc945b158a01630deb3", "score": "0.6595513", "text": "abstract public function isDirectory();", "title": "" }, { "docid": "28c9c59a24121b2be12c7a3f41844a5a", "score": "0.65814745", "text": "public function testClearNoDeleteRoot()\n {\n $path = self::$_path;\n FileSystem::clearDirectory($path, FALSE);\n $dirList = FileSystem::listDirectory($path);\n PHPUnit_Framework_Assert::assertTrue(empty($dirList));\n\n }", "title": "" }, { "docid": "564570977c07a03504c29fa33db815ec", "score": "0.6572675", "text": "public function isDir(): bool;", "title": "" }, { "docid": "0b0d1a8f908e07679ce897ca2b6c4a6b", "score": "0.65610635", "text": "public function exists() {\r\n\t\treturn is_dir((string) $this->path);\t\r\n\t}", "title": "" }, { "docid": "2d63b7c02897032e770d2425fa163353", "score": "0.6542424", "text": "public function testDelete_NotEmpty()\n {\n if (function_exists('posix_getuid') && posix_getuid() == 0) $this->markTestSkipped(\"Won't test this as root for safety reasons.\");\n\n $this->setExpectedException('Q\\Fs_Exception', \"Failed to delete '{$this->file}': Directory not empty\");\n $this->Fs_Node->delete();\n }", "title": "" }, { "docid": "9626effa58ca01c8ff8f9b14a5fd981f", "score": "0.65199786", "text": "public function deletePathIfEmptyNotExists()\n {\n $path = \"{$this->topLevelDirPath}/path/to/sub/folder\";\n $this->assertFileDoesNotExist($path, \"Unable to delete '{$path}'.\");\n $this->assertNull(F::deletePathIfEmpty($path));\n }", "title": "" }, { "docid": "7fe12324223137ce9fa14b150f306d55", "score": "0.6494154", "text": "function emptydir($dir) {\n\t$handle = opendir($dir);\n\n\twhile (($file = readdir($handle))!==false) {\n\t\t\n\t\tif((is_dir($file)) && ($file != \".\") && ($file != \"..\")){\n\t\t\techo $file.\"<br />\";\n\t\t\tremovedir($file);\n\t\t}else{\n\t\t//echo $file.\"<br />\";\n\t\t\t@unlink($dir.'/'.$file);\n\t\t}\n\t}\n\n\tclosedir($handle);\n}", "title": "" }, { "docid": "8dd850c7da1628f60deb0d657c199145", "score": "0.64871764", "text": "public function deletePathIfEmpty()\n {\n $path = \"{$this->topLevelDirPath}/path/to/sub/folder\";\n mkdir($path, 0755, true);\n $this->assertFileExists($path, \"Unable to create '{$path}'.\");\n F::deletePathIfEmpty($path, $this->topLevelDirPath);\n $this->assertFileDoesNotExist($path, \"Unable to delete '{$path}'.\");\n }", "title": "" }, { "docid": "67c3f0da45cd5e7e6b220d55802fcc68", "score": "0.6483147", "text": "public function is_empty()\n\t{\n\t\treturn ! $this->filename();\n\t}", "title": "" }, { "docid": "142fdb9d39d26689f4a0fdb498976059", "score": "0.64779824", "text": "function checkFolderIsEmptyOrNot ( $folderName ){\n $files = array ();\n if ( $handle = opendir ( $folderName ) ) {\n while ( false !== ( $file = readdir ( $handle ) ) ) {\n if ( $file != \".\" && $file != \"..\" )\n $files[] = $file;\n if(count($files) >= 1)\n break;\n }\n closedir ( $handle );\n }\n return ( count ( $files ) > 0 ) ? FALSE: TRUE;\n }", "title": "" }, { "docid": "9b2d0e79e104df466487924326ebdb16", "score": "0.64532584", "text": "public function isDirectory()\n {\n return $this->isDir();\n }", "title": "" }, { "docid": "1d25f92a01bd7185997eaab440564d55", "score": "0.640476", "text": "public function exists(): bool\n {\n return is_dir($this->root()) === true;\n }", "title": "" }, { "docid": "b0e7540958d7d4ae6aed0a0a414a54ab", "score": "0.6404321", "text": "public function deletePathIfEmptyNotEmpty()\n {\n $path = \"{$this->topLevelDirPath}/path/to/sub/folder\";\n $file = \"{$this->topLevelDirPath}/path/to/file.txt\";\n mkdir($path, 0777, true);\n touch($file);\n $this->assertFileExists($path, \"Unable to create '{$path}'.\");\n $this->assertFileExists($file, 'Unable to create text file');\n F::deletePathIfEmpty($path, $this->topLevelDirPath);\n $this->assertFileDoesNotExist(\"{$this->topLevelDirPath}/path/to/sub/folder\");\n $this->assertFileDoesNotExist(\"{$this->topLevelDirPath}/path/to/sub\");\n $this->assertFileExists($file, \"{$file} was deleted\");\n unlink($file);\n $this->assertFileDoesNotExist($file, \"{$file} was not deleted\");\n F::deletePathIfEmpty(\"{$this->topLevelDirPath}/path/to\", $this->topLevelDirPath);\n $this->assertFileDoesNotExist(\"{$this->topLevelDirPath}/path/to\");\n }", "title": "" }, { "docid": "a6fdbe0ea11ef9c9f5b401359782c0ff", "score": "0.6398443", "text": "function test_upload_dir_empty() {\n\t\tupdate_option('upload_path', '');\n\t\t$info = wp_upload_dir();\n\t\t$this->assertEquals( get_option( 'siteurl' ) . '/wp-content/uploads/' . gmstrftime('%Y/%m'), $info['url'] );\n\t\t$this->assertEquals( ABSPATH . 'wp-content/uploads/' . gmstrftime('%Y/%m'), $info['path'] );\n\t\t$this->assertEquals( gmstrftime('/%Y/%m'), $info['subdir'] );\n\t\t$this->assertEquals( '', $info['error'] );\n\t}", "title": "" }, { "docid": "829d3faaac25361034c787b93256c73d", "score": "0.63976693", "text": "protected function _package_empty($package){\n\t\t$file_handler = new AisisCore_FileHandling_File();\n\t\t\n\t\tif(null !== $file_handler->aisis_get_dir($package)){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5513f45b421191012b0f115b848fb8a3", "score": "0.6392687", "text": "public function exists()\n\t{\n\t\treturn is_dir($this->root);\n\t}", "title": "" }, { "docid": "d5f3618cfcd1fdba55d97af28e148a9d", "score": "0.6388556", "text": "public function isDirectory() {\n return TRUE;\n }", "title": "" }, { "docid": "326837ef230de55be6083bbc5a0aabbd", "score": "0.63703895", "text": "function lfile_delete_dir($path)\n\t{\n\t\treturn lfile_empty_dir($path, true);\n\t}", "title": "" }, { "docid": "72bec87a26b5e79274fb19644259d835", "score": "0.63622236", "text": "public function isDirectory(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ae49f63b78d48512fab427223033efa1", "score": "0.63563913", "text": "function test_nopes(){\n $dir = realpath(io_mktmpdir());\n $top = dirname($dir);\n $this->assertTrue($dir !== false);\n $this->assertTrue(is_dir($dir));\n\n // switch into it\n $this->assertTrue(chdir($dir));\n $this->assertEquals($dir, getcwd());\n\n\n $this->assertFalse(io_rmdir('', false));\n clearstatcache();\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n $this->assertFalse(io_rmdir('', true));\n clearstatcache();\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n $this->assertFalse(io_rmdir(null, false));\n clearstatcache();\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n $this->assertFalse(io_rmdir(null, true));\n clearstatcache();\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n $this->assertFalse(io_rmdir(false, false));\n clearstatcache();\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n $this->assertFalse(io_rmdir(false, true));\n clearstatcache();\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n $this->assertFalse(io_rmdir(array(), false));\n clearstatcache();\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n $this->assertFalse(io_rmdir(array(), true));\n clearstatcache();\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n $this->assertFileNotExists(\"$dir/this/does/not/exist\");\n $this->assertTrue(io_rmdir(\"$dir/this/does/not/exist\"));\n clearstatcache();\n $this->assertFileNotExists(\"$dir/this/does/not/exist\");\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_dir($top));\n }", "title": "" }, { "docid": "973dc5547ea01c16bfd87e807faa78cd", "score": "0.63546836", "text": "public function removeDirectoryIfEmpty($source, $path)\n {\n if (count($source->getFilesystem()->listContents($path)) > 0) {\n $this->modx->log(xPDO::LOG_LEVEL_ERROR, '[FileSluggy.removeDirectoryIfEmpty] Cannot remove directory because it is not empty: ' . $path);\n\n return false;\n }\n\n return $source->getFileSystem()->deleteDir($path);\n }", "title": "" }, { "docid": "04f1780d4150ea882b1ee1170f8785e1", "score": "0.63544613", "text": "public function is_empty($ignoredirs = true) {\n\n global $DB;\n\n $fs = get_file_storage();\n $context = context_course::instance($this->course);\n\n //TODO maybe make the component here and in /scaffold/designer a constant\n $fileinfo = array(\n 'component' => 'portfolioactmode_scaffold',\n 'filearea' => 'scaffoldset',\n 'itemid' => $this->id,\n 'contextid' => $context->id);\n\n $isempty = $fs->is_area_empty($fileinfo['contextid'], $fileinfo['component'],\n $fileinfo['filearea'], $fileinfo['itemid'], $ignoredirs);\n\n return $isempty;\n }", "title": "" }, { "docid": "ff15e0278f5d424893f07279c9b1994c", "score": "0.62869364", "text": "public function isEmpty(): bool\n {\n return sizeof($this->storage) === 0;\n }", "title": "" }, { "docid": "a059f8ac2c8a75f05e6f9891aa99a707", "score": "0.6281236", "text": "public function is_empty() {\n\t\t\tif ( 'inode/x-empty' === $this->detected_type ) return true;\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "eead36c67e40797f179aec957b01c128", "score": "0.6280356", "text": "public static function emptyDirectory($directory) {\n\t\tif(($result = \\Glue\\Helper\\Validator::batch(array(\n\t\t\t'$directory' => array($directory, 'isNotEmpty', 'isPathAllowed')\n\t\t))) !== true) {\n\t\t\tthrow new \\InvalidArgumentException(\\Glue\\Helper\\General::replace(array('method' => __METHOD__, 'parameter' => $result), GLUE_EXCEPTION_PARAMETER));\n\t\t}\n\n\t\ttry {\n\t\t\t$directory = \\Glue\\Helper\\Modifier::cleanPath($directory);\n\t\t\t$iterator = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($directory), \\RecursiveIteratorIterator::CHILD_FIRST );\n\n\t\t\tforeach($iterator as $path) {\n\t\t\t\tif($path->isFile() === true) {\n\t\t\t\t\tself::removeFile($path->getPathname());\n\t\t\t\t} else if($path->isDir() === true) {\n\t\t\t\t\tself::removeDirectory($path->getPathname());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tunset($directory, $iterator);\n\n\t\t\treturn true;\n\t\t} catch(\\Exception $exception) {\n\t\t\tthrow new \\RuntimeException(\\Glue\\Helper\\General::replace(array('method' => __METHOD__), GLUE_EXCEPTION_METHOD_FAILED), NULL, $exception);\n\t\t}\n\t}", "title": "" }, { "docid": "137bdf870e95159144e513f289774db4", "score": "0.6273042", "text": "public function isDir(): bool {\n return is_dir($this->path);\n }", "title": "" }, { "docid": "ea0381098ddb2d1c08e178a5b6da3bcd", "score": "0.62703323", "text": "public final function isDir(): bool\n {\n return is_dir($this->path);\n }", "title": "" }, { "docid": "2ed032d011940e9e950f350b91ad3bc0", "score": "0.6261224", "text": "function check_dir_status($dir) {\n if(file_exists($dir) && is_dir($dir)) {\n if(is_writable($dir)) {\n return true;\n }\n $this->error($dir.\" Directory is not writable \", E_USER_ERROR);\n return false;\n }\n if(mkdir($dir)) {\n return true;\n } \n else {\n $this->error($dir.\" Directory is not writable \", E_USER_ERROR);\n return false;\n }\n }", "title": "" }, { "docid": "3eb6c5e0ba16ce1d207f7b1818b9cfb1", "score": "0.6254642", "text": "function test_empty_hierarchy(){\n $dir = io_mktmpdir();\n $top = dirname($dir);\n $this->assertTrue($dir !== false);\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(io_mkdir_p(\"$dir/foo/bar/baz\"));\n $this->assertTrue(is_dir(\"$dir/foo/bar/baz\"));\n $this->assertTrue(io_mkdir_p(\"$dir/foobar/bar/baz\"));\n $this->assertTrue(is_dir(\"$dir/foobar/bar/baz\"));\n\n // delete successfully\n $this->assertTrue(io_rmdir($dir, false));\n\n // check result\n clearstatcache();\n $this->assertFalse(is_dir(\"$dir/foo/bar/baz\"));\n $this->assertFalse(is_dir(\"$dir/foobar/bar/baz\"));\n $this->assertFalse(is_dir($dir));\n $this->assertTrue(is_dir($top));\n\n // same again with deletefiles\n\n // setup hierachy and test it exists\n $dir = io_mktmpdir();\n $this->assertTrue($dir !== false);\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(io_mkdir_p(\"$dir/foo/bar/baz\"));\n $this->assertTrue(is_dir(\"$dir/foo/bar/baz\"));\n $this->assertTrue(io_mkdir_p(\"$dir/foobar/bar/baz\"));\n $this->assertTrue(is_dir(\"$dir/foobar/bar/baz\"));\n\n // delete successfully\n $this->assertTrue(io_rmdir($dir, true));\n\n // check result\n clearstatcache();\n $this->assertFalse(is_dir(\"$dir/foo/bar/baz\"));\n $this->assertFalse(is_dir(\"$dir/foobar/bar/baz\"));\n $this->assertFalse(is_dir($dir));\n $this->assertTrue(is_dir($top));\n }", "title": "" }, { "docid": "5095ddbbc300f47c2bcb70f62ed1c630", "score": "0.6239604", "text": "function verify_dir($path) {\n // see if directory or file already exists with a given path.\n if (!file_exists($path)) {\n mkdir($path, 0755, true);\n }\n // verify that the path is a directory.\n if (!is_dir($path)) {\n syslog(LOG_INFO, \"$path is not a directory.\");\n return false;\n }\n // verify that the directory is writable.\n if (!is_writeable($path)) {\n syslog(LOG_INFO, \"Could not write to $path.\");\n return false;\n }\n // if we have made it to the end without an error, return true.\n return true;\n }", "title": "" }, { "docid": "053ef7c1ea65565be8553b106486fc8d", "score": "0.62381965", "text": "public function empty_dir($path)\n {\n if (!is_dir($path) || !file_exists($path)) {\n return;\n }\n\n foreach (scandir($path) as $item) {\n if ($item == '.' || $item == '..') {\n continue;\n }\n\n unlink($this->safe_path($path . DIRECTORY_SEPARATOR . $item));\n }\n }", "title": "" }, { "docid": "98acc5e1e24aab99bc0de965891ddb42", "score": "0.62338287", "text": "private function ensureDirectoryExists()\n\t{\n\t\t//create directory if it doesn't exits\n\t\tif(!file_exists($this->getDirectory())){\n\t\t\tmkdir($this->getDirectory(), 0777, true);\n\t\t}\n\t}", "title": "" }, { "docid": "52671c14969a6334da792be356fa8c22", "score": "0.6196342", "text": "public function exists()\n\t{\n\t\treturn is_dir($this->db->getRootPath().$this->path);\n\t}", "title": "" }, { "docid": "b2dcb2e0d86cef37b6eed905c820c406", "score": "0.61900884", "text": "public static function emptyDirectory($dirname, $self_delete = false)\n {\n if (is_dir($dirname))\n $dir_handle = opendir($dirname);\n if (!$dir_handle)\n return false;\n while ($file = readdir($dir_handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (!is_dir($dirname . \"/\" . $file))\n @unlink($dirname . \"/\" . $file);\n else\n emptyDirectory($dirname . '/' . $file, true);\n }\n }\n closedir($dir_handle);\n if ($self_delete) {\n @rmdir($dirname);\n }\n return true;\n }", "title": "" }, { "docid": "b009ea69b7118eb9ce5a1b4f355cfda4", "score": "0.618862", "text": "private function deleteEmptyDirectory(string $name): bool\n {\n $path = $this->directory . '/' . $name;\n $directory = pathinfo($path, PATHINFO_DIRNAME);\n \n if (strpos($name, '/') !== false && count(scandir($directory)) == 2) {\n return rmdir($directory);\n }\n\n return true;\n }", "title": "" }, { "docid": "e13af16379517551ec19b1847f928493", "score": "0.61871374", "text": "public static function checkWritableDir()\n {\n }", "title": "" }, { "docid": "d3bac7c07f7710121b6cf29bb2c81e7d", "score": "0.6174676", "text": "private function isRootDir($path) {\n\t\t$this->log('enter: '.__FUNCTION__.\"($path)\", Util::DEBUG);\n\t\t$result = $path === '' || $path === '/' || $path === '.';\n\t\treturn $this->leave(__FUNCTION__, $result);\n\t}", "title": "" }, { "docid": "d1c734aeda62d8880914b27ced35c41a", "score": "0.61432123", "text": "public function isEmpty()\r\n\t{\r\n\t\treturn empty($this->storage);\r\n\t}", "title": "" }, { "docid": "2b6847c1880ff6fcf598ef92b4da2740", "score": "0.6134516", "text": "public function testOnAddEmptyDir()\n {\n $event = new PreAddEmptyDirEvent(\n $this->builder,\n 'test'\n );\n\n // when directory not exist\n $this->subscriber->onAddEmptyDir($event);\n\n self::assertFalse($event->isSkipped());\n\n // when directory exists\n $this->builder->addEmptyDir('test');\n\n $this->subscriber->onAddEmptyDir($event);\n\n self::assertTrue($event->isSkipped());\n }", "title": "" }, { "docid": "37ad1db4114aeee43b310ab24eb22e5b", "score": "0.6098672", "text": "private static function empty_dir( $dir ) {\n\t\t$cmd = Utils\\esc_cmd( 'rm -rf %s', $dir );\n\t\t$pr = WP_CLI::launch( $cmd, false /*exit_on_error*/, true /*return_detailed*/ ); // Won't fail if directory doesn't exist.\n\t\tif ( $pr->return_code ) {\n\t\t\tWP_CLI::error( sprintf( \"Failed to `%s`: (%d) %s\", $cmd, $pr->return_code, $pr->stderr ) );\n\t\t}\n\t\tif ( ! mkdir( $dir ) ) {\n\t\t\t$error = error_get_last();\n\t\t\tWP_CLI::error( sprintf( \"Failed to create '%s' directory: %s\", $dir, $error['message'] ) );\n\t\t}\n\t\tWP_CLI::log( sprintf( \"Removed existing contents of '%s'\", $dir ) );\n\t}", "title": "" }, { "docid": "1cfef3a7422001130a231d8bec911673", "score": "0.6098393", "text": "public function isBare()\n\t{\n\t\treturn $this->workingPath() === null;\n\t}", "title": "" }, { "docid": "38c83f22d8153519d2e715ddbb31d23c", "score": "0.60879654", "text": "function checkDir($dir) {\n $this->debug(\"<b>Check path</b><br/>\");\n if (!is_dir($dir)) {\n $this->debug(\"path does not exist<br/>\");\n // Break directory apart\n $dirs = explode('/', $dir);\n $tempDir = $dirs[0];\n $check = false;\n \n for ($i = 1; $i < count($dirs); $i++) {\n $this->debug(\"Checking \".$tempDir.\"<br/>\");\n if (is_writeable($tempDir)) {\n $check = true;\n } else {\n $error = $tempDir;\n }\n \n $tempDir .= '/'.$dirs[$i];\n // Check if directory exist\n if (!is_dir($tempDir)) {\n if ($check) {\n // Create directory\n $this->debug(\"Creating \".$tempDir.\"<br/>\");\n @mkdir($tempDir, 0777);\n @chmod($tempDir, 0777);\n } else {\n // Not enough permissions\n $this->error('permission', $error);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "903e29e01c1eafb6ae6602910d407877", "score": "0.60846055", "text": "public function getIsEmpty()\n {\n return $this->getError() == UPLOAD_ERR_NO_FILE;\n }", "title": "" }, { "docid": "eec7382cfd34f9b07eea5ad26da3e872", "score": "0.6071151", "text": "function wp_option_isempty($option) {\n $dirchk = checkdir();\n \n if(file_exists(WIPIOPTSPATH .\"/$option.wp\")) {\n if(filesize(WIPIOPTSPATH .\"/$option.wp\") == (int)0) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "216ee6ee819652021c071b82ef9e9bca", "score": "0.6067441", "text": "protected function isEmptyPath($path)\n {\n return $path == '/' || $path == '.' || $path == '' || $path === null;\n }", "title": "" }, { "docid": "a309cc256f61c0ed65ee2b9e8291d7b2", "score": "0.605612", "text": "public function isDirectory() {\n return FileSystem::getFileSystem()->isDirectory($this->absolutePath);\n }", "title": "" }, { "docid": "5e7500b86fb3069ebc8afca268a26111", "score": "0.6054803", "text": "public function actionIsFolderEmpty($folderId)\n {\n $count = Yii::$app->storage->getFolder($folderId)->getFilesCount();\n if ($count > 0) {\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "caff5de6106e813a2ab1af11eccfe78f", "score": "0.6053482", "text": "public function flush(): bool\n {\n if ( ! $this->files->isDirectory($this->directory)) {\n return false;\n }\n\n foreach ($this->files->directories($this->directory) as $directory) {\n if ( ! $this->files->deleteDirectory($directory)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "862758d24c876f792ff23fa066359579", "score": "0.6052997", "text": "function verifyDirectory( \\Common\\Type\\CPath $pPath )\n{\n // Initialize\n $bReturn = FALSE;\n // Verify\n if( $pPath->isValid() )\n {\n $pDirectory = new \\Common\\File\\CDirectory( $pPath );\n if( !$pDirectory->exists() )\n {\n $bReturn = $pDirectory->createDirectory();\n }\n $bReturn = $pDirectory->isDir() && $pDirectory->isWritable();\n unset($pDirectory);\n }\n return $bReturn;\n}", "title": "" }, { "docid": "c487e17175fb81ec458cf995b1a7c23c", "score": "0.60507596", "text": "function isDirectory()\n\t{\n\t\treturn is_dir($this->pathname);\n\t}", "title": "" }, { "docid": "ff52ee84a3f07704d300808e34e19f6e", "score": "0.6044281", "text": "public function empty() : bool {\n return $this->size === 0;\n }", "title": "" }, { "docid": "af7e66f6668c5630cc40352ae0995084", "score": "0.60432446", "text": "private function __checked_target_path() {\r\n\t\t$dir_exist = true;\r\n\t\tif (!is_dir($this->target_path)) {\r\n\t\t\t$dir_check = (!@mkdir($this->target_path)) ? false : true;\r\n\t\t}\r\n\t\treturn $dir_exist;\r\n\t}", "title": "" }, { "docid": "dcc8b8e6346d75e7d0ca8d0d079a8b09", "score": "0.6041021", "text": "public function check_dir($dir) {\n\t\tif (!is_dir($dir) || !is_writable($dir)) return false;\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "57f3ed7237ee077bd4a398453f9e68bf", "score": "0.6027181", "text": "public function directory_exists($path){\n if(is_dir($path)){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "7964ff7e1f9f163984c3f9d475f255eb", "score": "0.60174376", "text": "function dir(string $path): bool\n{\n return writable($path) && (is_dir($path) || mkdir($path, 0755, true));\n}", "title": "" }, { "docid": "8cc65f4b5bf5e80088299538d9db848f", "score": "0.6011925", "text": "public function streamIsDir(): bool\n {\n return false;\n }", "title": "" }, { "docid": "457d3b2951ee98e3703f3be3cbd09916", "score": "0.6002091", "text": "public function is_empty() {\n return ($this->size() === 0);\n }", "title": "" }, { "docid": "ad026e94f49def0727eac3380510db74", "score": "0.59822553", "text": "public function isRoot()\n {\n return count($this->path) == 0;\n }", "title": "" }, { "docid": "ae71128405f8b73478e653642bdd9ad9", "score": "0.59798837", "text": "private function isNotEmptyDirectory(string $directory) : bool\n {\n $filesystemIterator = new FilesystemIterator($directory);\n return $filesystemIterator->valid();\n }", "title": "" }, { "docid": "522267b143c611d21b4e3d1a29a4ac8d", "score": "0.59753346", "text": "public function isEmpty()\n {\n return (0 === $this->getSize());\n }", "title": "" }, { "docid": "b572a888a7ee3a73c523976b09f020c5", "score": "0.59734887", "text": "public function hasPath(): bool\n {\n return !empty($this->path);\n }", "title": "" }, { "docid": "b0231214412bd378468a0402850731b3", "score": "0.59651923", "text": "public function isEmpty(): bool\n {\n return $this->size === 0;\n }", "title": "" }, { "docid": "f106e693a61ff183f3647b09e3fad201", "score": "0.5957823", "text": "function deleteDirectory($path) {\n\t\t\tif (!$this->_exec(\"RMD $path\") || !$this->_checkCode()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "f96b868d625fcb2a5183538b282c2a69", "score": "0.5943824", "text": "private function checkDirectory()\r\n {\r\n $directory = dirname($this->url);\r\n\r\n if (strpos($directory, '://') !== false) {\r\n if (strtolower(substr($directory, 0, 7)) == 'file://') {\r\n $directory = substr($directory, 7);\r\n } else {\r\n $directory = null;\r\n }\r\n }\r\n\r\n if (!empty($directory) && !is_dir($directory)) {\r\n if (!mkdir($directory, 0777, true)) {\r\n throw new \\RuntimeException('Couldn\\'t create the directory \"' . $directory . '\".');\r\n }\r\n }\r\n }", "title": "" }, { "docid": "baca2819d186cfd0190c4bca1491e53e", "score": "0.59018797", "text": "public function allowsDeleteDir();", "title": "" }, { "docid": "f971b48ee1f603f0e0c328c28e0f0f7b", "score": "0.58994627", "text": "public function testInputFolderIsExist()\n {\n $folderPath = storage_path('/app/data/input');\n\n //-- assert if folder exist\n $this->assertTrue(file_exists($folderPath), \"Input Folder is not exist, Please create \". $folderPath);\n //-- assert if folder has a files\n $this->assertTrue((count(scandir($folderPath)) > 2),\"Input Folder ({$folderPath}) is Empty\");\n }", "title": "" }, { "docid": "31f68de5f2aa5c36c427e9edc5f4f3f7", "score": "0.58975434", "text": "public function isFolder() {\n return $this->exists() && ('dir' == $this->info('type'));\n }", "title": "" }, { "docid": "1624cb362cdad28eab3ed5d1fce6767f", "score": "0.58914196", "text": "public function testHas_Dir()\n {\n \tmkdir(\"{$this->file}/\" . basename($this->file) . '.x');\n $this->assertTrue($this->Fs_Node->has(basename($this->file) . '.x'));\n }", "title": "" }, { "docid": "cd85a9fbf8d6dff0ca55add428d22a69", "score": "0.5876855", "text": "public static function emptyDirectory($path)\n\t{\n\t\tforeach (glob($path) as $file) {\n\t\t\tif (is_file($file)) {\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "293b9feef18ffe6b8059378d362bb828", "score": "0.58703923", "text": "public static function removeEmptyDir($dir, $force = false)\n {\n global $reefless;\n\n $dir = (string) $dir;\n $parentDir = dirname($dir);\n $result = false;\n\n if (!$dir || strpos($dir, RL_FILES) !== 0 || strlen(RL_FILES) >= strlen($dir)) {\n return $result;\n }\n\n // remove empty folder\n if (count(scandir($dir)) === 2 || $force) {\n $result = $reefless->deleteDirectory($dir);\n }\n\n // remove empty parent folder\n if ($result && count(scandir($parentDir)) === 2) {\n $result = $reefless->deleteDirectory($parentDir);\n }\n\n return $result;\n }", "title": "" }, { "docid": "4c46e0d71267f95dfe36bbb0f728532c", "score": "0.5868884", "text": "public static function isEmpty($filename)\r\n\t{\r\n\t\tif(self::check($filename) && filesize($filename) > 0)\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "title": "" }, { "docid": "6ca08644bde0263b8f4030f6fb11cec1", "score": "0.5863181", "text": "public function testCount_Empty()\n\t{\n\t\t$this->cleanup(\"{$this->file}/\" . basename($this->file));\n\t\t$this->assertEquals(0, count($this->Fs_Node));\n\t}", "title": "" }, { "docid": "c3e53d37487eb671c6547a625b2ba611", "score": "0.5848987", "text": "final public function isDirectory(): bool\n {\n return $this->isDirectory;\n }", "title": "" }, { "docid": "cef0b6f8b765695741c60bfe2e22f67c", "score": "0.5843185", "text": "public function assertIsDir() {\n\t\tif ($this instanceof File || (file_exists($this->path) && !is_dir($this->path))) {\n\t\t\tthrow new NotADirectoryException($this);\n\t\t}\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "de0928b6c2c42d91f30ad486fafb8823", "score": "0.0", "text": "public function destroy($id)\n {\n try{\n $this->pdoObject=DB::connection()->getPdo();\n $this->id=(int) htmlentities(htmlspecialchars($id));\n $this->pdoObject->beginTransaction();\n $remove_rfp_sql=\"UPDATE trp set trp_status=5 where id=:id\";\n $remove_statement=$this->pdoObject->prepare($remove_rfp_sql);\n $remove_statement->bindParam(':id',$this->id);\n $remove_statement->execute();\n $this->pdoObject->commit();\n\n return $remove_statement->rowCount()>0?$remove_statement->rowCount():0;\n\n }catch(Exception $e){echo $e->getMessage();$this->pdoObject->rollback();}\n }", "title": "" } ]
[ { "docid": "9e3888bdb250b09daf6881b2c953ce96", "score": "0.7387817", "text": "protected function removeImageFromStorage (HCResources $resource)\n {\n $path = $this->uploadPath . $resource->id;\n\n if (Storage::has ($path)) {\n Storage::delete ($path);\n }\n }", "title": "" }, { "docid": "67120cc52c09f1239f92f34fd173437e", "score": "0.73339623", "text": "function remove($resource)\n {\n }", "title": "" }, { "docid": "3f1322e69a1884d9745c5ef5f1590e48", "score": "0.71433765", "text": "public function removeResource($resourceName);", "title": "" }, { "docid": "e8f55d4cc56465e75499a86915b35d9b", "score": "0.7044865", "text": "public function delete($resource);", "title": "" }, { "docid": "e390bf434f5cce46402b827d582cdcbe", "score": "0.7041061", "text": "public function removeResource(Resource $resource): void\n {\n if (!isset($this->resources[$resource->getUri()])) {\n return;\n }\n unset($this->resources[$resource->getUri()]);\n }", "title": "" }, { "docid": "96aa9ea6689a46a9441f009aa879d999", "score": "0.68867797", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n }", "title": "" }, { "docid": "d522def58731edf5dda07c4a8e3cb839", "score": "0.6841257", "text": "public function remove(IUser $user, ?IResource $resource): void;", "title": "" }, { "docid": "5b18f4f0f245d93e1d14486ac0afbbc7", "score": "0.673655", "text": "public function remove(ResourceInterface $resource)\n {\n $this->_em->remove($resource);\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "9d416bb966c467169e3ae97e3c181868", "score": "0.6369785", "text": "abstract function deleteResource(int $id);", "title": "" }, { "docid": "b9f567113f04c7ad2db0fe760a0a6fdc", "score": "0.6319542", "text": "public function unregisterResource()\n {\n Zend_Registry::get('acl')->remove($this);\n }", "title": "" }, { "docid": "13034525cd05a6a81ce72172a28a6888", "score": "0.6211458", "text": "public function delete()\n {\n $request = new StorageDeleteRequest();\n $request->setBucketName($this->bucket->getName());\n $request->setKey($this->key);\n\n [$response, $status] = $this->storage->_baseStorageClient->Delete($request)->wait();\n Utils::okOrThrow($status);\n }", "title": "" }, { "docid": "ae13b12a81ef5a04c54c2ae2a1fbfc6f", "score": "0.6172401", "text": "public function unsetStorageId();", "title": "" }, { "docid": "251c69886b6b7be9441be8fe7c79bf9f", "score": "0.6168834", "text": "public function destroy($id, $resource='typeProduct')\n {\n //\n }", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.6124334", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "ac2ff7081643a335753979289127eb7f", "score": "0.6100424", "text": "function destroy( $resource ){\n\n\n\n\n\n \n\n}", "title": "" }, { "docid": "7f77f3b95410a985ed02a0994980a5dd", "score": "0.6078814", "text": "public function deleteResource(AbstractNode $resource) : void;", "title": "" }, { "docid": "c1246d964fe6c011b7e9a2e92e2bce69", "score": "0.6050742", "text": "public function destroy($id)\n\t{\n\t\t//\n\t\t$file = \\App\\Resource::find($id)->image;\n\t\tunlink('pictures/' . $file);\n\t\t\\App\\Resource::destroy($id);\n\t\treturn Redirect::to('/');\n\t}", "title": "" }, { "docid": "e9a19d00feed0894857d58eb3e4aea34", "score": "0.6019884", "text": "protected function dropResource()\n {\n $this->dropFile('Resource', $this->getResourcePath());\n }", "title": "" }, { "docid": "6633698916692181c267e327ea427da6", "score": "0.5991338", "text": "public function rm( $path );", "title": "" }, { "docid": "6dd2ae009f2219fb531720e25a26531d", "score": "0.5973111", "text": "public function remove() {\n\t\t$this->storage->rmdir($this->path);\n\t\t$this->user->triggerChange('avatar');\n\t}", "title": "" }, { "docid": "4f634fd6a5cf444037bf2efc93dadfeb", "score": "0.59438646", "text": "public function clear()\n {\n \tunlink($this->_storage);\n }", "title": "" }, { "docid": "15a853ed70c99f4514a71c5e2d0b94aa", "score": "0.5934407", "text": "public function remove($resource)\n {\n try {\n $resourceId = $this->get($resource)->getResourceId();\n } catch (Zend_Acl_Exception $e) {\n require_once 'Zend/Acl/Exception.php';\n throw new Zend_Acl_Exception($e->getMessage(), $e->getCode(), $e);\n }\n\n $resourcesRemoved = [$resourceId];\n if (null !== ($resourceParent = $this->_resources[$resourceId]['parent'])) {\n unset($this->_resources[$resourceParent->getResourceId()]['children'][$resourceId]);\n }\n foreach ($this->_resources[$resourceId]['children'] as $childId => $child) {\n $this->remove($childId);\n $resourcesRemoved[] = $childId;\n }\n\n foreach ($resourcesRemoved as $resourceIdRemoved) {\n foreach ($this->_rules['byResourceId'] as $resourceIdCurrent => $rules) {\n if ($resourceIdRemoved === $resourceIdCurrent) {\n unset($this->_rules['byResourceId'][$resourceIdCurrent]);\n }\n }\n }\n\n unset($this->_resources[$resourceId]);\n\n return $this;\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.593359", "text": "public function remove($path);", "title": "" }, { "docid": "b8b5d5ca606833c889a1285814fba6f4", "score": "0.5918192", "text": "public function unlinkResource() {\n\t\t$this->resource=null;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1f9a1be4bb584e042a8ad8d688ac9917", "score": "0.59066796", "text": "public function delete() {\n if (file_exists($this->src)) unlink($this->src);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589437", "text": "public function remove();", "title": "" }, { "docid": "d03fcfa49d2ade09cffc8d88d701076d", "score": "0.58888936", "text": "public function dropStorageFromName($storageName);", "title": "" }, { "docid": "4b22b7ee3a57517ec9e3b86bea1578c9", "score": "0.5855511", "text": "public function clearStorage();", "title": "" }, { "docid": "84e424b359d9d6f2b49045a0bf4df9de", "score": "0.5823206", "text": "public function destroy($id)\n {\n $productImage = ProductImage::find($id);\n $productImage->delete();\n $fullPath = str_replace(\"storage\",\"/public\",$productImage->path);\n Storage::delete($fullPath);\n return $productImage;\n }", "title": "" }, { "docid": "2d75567656921f9588d0f6a09e30ea8c", "score": "0.5818753", "text": "public function testItShouldRemoveSpecifiedResource()\n {\n $this->json['data'] = [];\n $this->json('DELETE', $this->base_url . $this->getId(), [], $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure($this->json);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58118546", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "e53013c127607b9b9763311d1d78cf4b", "score": "0.5807113", "text": "public function detach()\n {\n if (!isset($this->resource)) {\n return null;\n }\n $resource = $this->resource;\n unset($this->resource);\n $this->size = null;\n $this->uri = null;\n $this->readable = false;\n $this->seekable = false;\n $this->writable = false;\n return $resource;\n }", "title": "" }, { "docid": "567e641bf24d438f1c69a4a617fddcb1", "score": "0.57968163", "text": "function delete($resource, $headers = array())\n {\n $result = $this->client->delete($this->build_url($resource), [\n 'headers' => array_merge([\n 'Authorization' => $this->getBearer()\n ], $headers)\n ]);\n return $result;\n }", "title": "" }, { "docid": "1dee477f6e099b050eb54e8469548631", "score": "0.57656145", "text": "public function destroy($id)\n {\n $slider=Slider::find($id);\n if($slider->image)\n {\n if(Storage::exists('public/slider/' . $slider->image)){\n $delete= Storage::delete('/public/slider/' . $slider->image); \n }\n }\n $slider->delete();\n alert::success('slider Deleted Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "4d84ab18e7e3c7bf3662c486977fb999", "score": "0.57361114", "text": "public function delete() {\n return $this->storage->delete($this->getId());\n }", "title": "" }, { "docid": "aa96241e32a2910707191042a72208b3", "score": "0.57349735", "text": "public function destroy(Resource $resource): JsonResponse\n {\n Storage::disk('article')->delete($resource->url);\n $resource->delete();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.deleted'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "cbac86afaa4d65131418099d416a05f8", "score": "0.5732262", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n\n if ($fileName = $resource->book->name) {\n $file = public_path() . '/resources/' . $fileName;\n unlink($file);\n }\n\n $resource->delete();\n\n $message = 'El recurso literario \"' . $resource->title . '\" ha sido eliminado.';\n $class = 'danger';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "30d12407d208c7245c67fe3e3c0e6844", "score": "0.57147574", "text": "public function remove (object $entity);", "title": "" }, { "docid": "148f851e6e394ade1c2f9c6b118d123d", "score": "0.5700188", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['status' => 'ok']);\n }", "title": "" }, { "docid": "dfafd8026a650244c991d50f54215453", "score": "0.56919247", "text": "public function free():void { unlink($this->getfilename()); }", "title": "" }, { "docid": "5b249643a990832f9ecd53f247c87bb4", "score": "0.5690996", "text": "public function destroy($id)\n {\n $find = DB::table('suppliers')->where('id',$id)->first();\n $photo = $find->photo;\n\n if($photo){\n unlink($photo);\n DB::table('suppliers')->where('id',$id)->delete();\n }else{\n DB::table('suppliers')->where('id',$id)->delete();\n }\n }", "title": "" }, { "docid": "c0f1056876f778bb47bd815edbae240a", "score": "0.5687271", "text": "public function destroy($id)\n {\n //\n\n $query = Picture::find($id);\n $collections = collect($query);\n $filename = $collections->get('title');\n // default is config/filesystems.php\n $contents = Storage::get($filename);\n Storage::delete($filename);\n Picture::destroy($id);\n \n return redirect('picture');\n //return $contents;\n \n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.56844676", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.56844676", "text": "public function delete($path);", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.5683676", "text": "public function remove(): void;", "title": "" }, { "docid": "bf109080b5ee3a89d2c795999303aee7", "score": "0.5680202", "text": "public function delete(){\n if($this->removable) {\n $directory = $this->getRootDir();\n\n App::fs()->remove($directory);\n }\n }", "title": "" }, { "docid": "3b5ab38f0f5c2e97d3b02bce08803b25", "score": "0.56794256", "text": "public function destroy($id)\n {\n \n $imageUpload = Image::findOrfail($id);\n\n File::delete([\n public_path(('/images/').$imageUpload->imageName),\n ]);\n $imageUpload->delete();\n }", "title": "" }, { "docid": "63bd4ba9d20687d38d658987b149d5fb", "score": "0.5678569", "text": "public function deleteResource(\n $uri = \"\",\n $headers = []\n );", "title": "" }, { "docid": "9821f26046d4f47083ca51bd2deff710", "score": "0.56747794", "text": "public function destroy($id)\n {\n //\n $item = post::find($id);\n \n$item->tags()->detach();\n $image_path = $item->file; // the value is : localhost/project/image/filename.format\n \n //Image::destroy($image_path);\n \n $item->delete();\n return redirect('post');\n }", "title": "" }, { "docid": "3d074a3589196f3e2c63d1b79c3a54f2", "score": "0.5670545", "text": "public function destroy()\n {\n $file = pathinfo(request()->getContent());\n $storagePath = $this->baseStoragePath();\n $path = \"{$storagePath}/{$file['basename']}\";\n\n $fileDeleted = Storage::disk(config('canvas.storage_disk'))->delete($path);\n\n if ($fileDeleted) {\n return response()->json([], 204);\n }\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.5667716", "text": "public function removeFile();", "title": "" }, { "docid": "3819490d97e5dfe8f2ffd81ae03e6e53", "score": "0.5666655", "text": "public function remove(ReadModelInterface $element);", "title": "" }, { "docid": "2d475aa3098e33e6020ec88b30a03b25", "score": "0.56638", "text": "public function purgeAsset($asset);", "title": "" }, { "docid": "b182edae2a719de4edc919c7a7b5885e", "score": "0.566344", "text": "public function destroy($id)\n {\n\n $post = Roler::findOrFail($id);\n\n $path=public_path('/storage/uploads/');\n if (isset($post->image)) {\n $oldname=$post->image;\n File::delete($path.''.$oldname);\n }\n\n if (Roler::where('id', $id)->delete()) {\n\n return redirect()->back()->with('success', 'Record deleted successfully');\n\n }\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "84ffd5d41241886a42efaaa6c4cb6c45", "score": "0.56579614", "text": "public function delete()\n {\n self::remove($this->key);\n $this->key = null;\n $this->value = null;\n }", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.56547964", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "dc84ba400b70ef909d87e4a92424f6ac", "score": "0.5648789", "text": "public function destroy($id)\n {\n $album = Album::find($id);\n if($album==null){\n return reidrect('/portfolio')->with('error','this portfolio does not exist');\n }else{\n if(Storage::delete('public/album_covers/'.$album->cover_image)){\n $album->delete();\n return redirect('/portfolio')->with('success','Album removed');\n }\n }\n}", "title": "" }, { "docid": "7257252b8ba3d014ab6c945b9b1f8774", "score": "0.5647581", "text": "public function destroy($id)\n {\n\n $slider = Slider::whereId($id)->first();\n $image = $slider->slider_image;\n $path = 'public/slider_images/'; \n Storage::delete( $path . $image); \n \n $data = Slider::findOrFail($id);\n $data->delete();\n\n Session::flash('success', 'Slider deleted successfully..');\n return redirect()->route('all.slider');\n }", "title": "" }, { "docid": "e24a8da2185cf275580016315ac8c0fe", "score": "0.56459355", "text": "public abstract function remove();", "title": "" }, { "docid": "884fba4384b6fac636fcb5fd3a0b8119", "score": "0.56453234", "text": "public function deletePhoto($resource, $id)\n {\n if (($resource === 'user') || ($resource === 'group') || ($resource === 'memo')) {\n\n //Validate Model is valid and return valid response\n list($param, $model) = $this->validateModelIsValid($resource, $id);\n //Get Image Name\n $image = $model->img_url;\n\n //Delete Avatar and Thumbnail\n if ($image != null) {\n Storage::delete(\"/$param/avatars/thumbnails/$image\");\n Storage::delete(\"/$param/avatars/$image\");\n }\n //Update Profile Photo Field To Null\n $model->img_url = null;\n //Save in Database\n $model->save();\n //Return Response\n return response()->json($model, 202);\n }\n\n return response('Invalid request', 400);\n\n }", "title": "" }, { "docid": "ff85d8135b960df73371ee3703e738a4", "score": "0.5644064", "text": "public function destroy($id)\n {\n $file_name = DB::table(\"research\")->where('id',$id)->value('research_image');\n unlink(public_path(\"front/assets/images/what-we-do/research/\".$file_name)); \n DB::table(\"research\")->where('id',$id)->delete();\n return redirect()->route('all-research')->with('msg','Research deleted successfully with the image');\n }", "title": "" }, { "docid": "684caecb3cebeb517274f1dbe758544f", "score": "0.5640124", "text": "abstract public function remove($scope = null, $pref = null);", "title": "" }, { "docid": "4dfae537943a63cbddf6151c77a88821", "score": "0.5636873", "text": "public function destroy($id)\n { \n $products = Product::findOrFail($id);\n // $delete = $products->slug;\n if($products->slug) {\n \\File::delete( public_path('storage/'.$products->slug ) );\n }\n \n // File::delete(public_path(\"storage/\"), $delete);\n Product::destroy($id);\n return redirect()->route('product-list.index')->with('success','Product Destory Successfully !!!');\n\n }", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56337065", "text": "public function delete(string $path);", "title": "" }, { "docid": "3cfb84429aef8127ecc19fa5934511fe", "score": "0.5618418", "text": "public function deleteTagging($resource)\n {\n $taggingList = $this->getEm()->createQueryBuilder()\n ->select('t')\n ->from('UnifikDoctrineBehaviorsBundle:Tagging', 't')\n ->where('t.resourceType = :type')\n ->setParameter('type', $resource->getResourceType())\n ->andWhere('t.resourceId = :id')\n ->setParameter('id', $resource->getId())\n ->getQuery()\n ->getResult();\n\n foreach ($taggingList as $tagging) {\n $this->getEm()->remove($tagging);\n }\n }", "title": "" }, { "docid": "30687a12463a759554c0cdd15b679592", "score": "0.56099033", "text": "public function remove (EntityInterface $entity);", "title": "" }, { "docid": "8bd2c06eeb1572fe4c48014cc912a6d6", "score": "0.56070143", "text": "public function delete() {\n @unlink($this->path());\n return parent::delete();\n }", "title": "" }, { "docid": "942f7427e779526c94189558d1185b66", "score": "0.5602359", "text": "public function delete()\n {\n Yii::debug(\"Deleting last upload.\", self::CATEGORY);\n unlink($this->path);\n Yii::$app->session->remove(self::cacheKey());\n }", "title": "" }, { "docid": "bc970628483c63b419ea48f599c8c972", "score": "0.55993605", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $photo = $product->image;\n if ($photo) {\n unlink($photo);\n Product::findOrFail($id)->delete(); \n }else{\n Product::findOrFail($id)->delete();\n }\n\n }", "title": "" }, { "docid": "14eedb590aed3088ebca2d6e88f88b70", "score": "0.55943435", "text": "public function destroy($id)\n {\n if ($id) {\n $storagek = Storagek::find($id);\n unlink(public_path('storage/images/').$storagek->file);\n $storagek->delete();\n return response()->json([\n \"success\" => true,\n \"message\" => \"File successfully delete\",\n ]);\n } else {\n return response()->json(['Err' => 'id no found']);\n }\n\n\n\n //\n }", "title": "" }, { "docid": "1b06eb968537fe78419acb4959d62e6d", "score": "0.5590582", "text": "public function destroy(Request $request, $id)\n\t{\n\t\t$storage = Storage::where('organization_id', $request->user()->organization_id)->where('storage_id', $id)->first();\n\n\t\tif ($storage) {\n\t\t\t$storage->delete();\n\t\t\tSession::flash('success', 'Склад была успешно удален из справочника!');\n\t\t} else {\n\t\t\tSession::flash('error', 'Склад не найден в справочнике!');\n\t\t}\n\n\t\treturn redirect()->route('storage.index');\n\t}", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.5585174", "text": "public function remove($file);", "title": "" }, { "docid": "b3f61ce5e85b70bb0bf7f3a5ad6064ba", "score": "0.55765617", "text": "function remove(){\n shm_remove($this->id);\n }", "title": "" }, { "docid": "68aa5a7a833751b6ce51749cd9ab047e", "score": "0.5571337", "text": "public function destroy()\n {\n LaraFile::delete(\"images/{Auth::user()->avatar}\");\n }", "title": "" }, { "docid": "1f9a85d3b28293dfe2336fc2953ad59f", "score": "0.5562531", "text": "public function destroy($id)\n {\n // get divide\n $divide = Divide::findOrFail($id);\n \n File::delete(public_path('image/') . $divide->img);\n \n if($divide->delete()) {\n return new DivideResource($divide);\n }\n }", "title": "" }, { "docid": "3a507f65a1de28bc6b0f34c5d713d3a2", "score": "0.55602777", "text": "public function removeUpload()\n {\n \tif ($file = $this->getAbsolutePath()) {\n \t\tunlink($file);\n \t}\n }", "title": "" }, { "docid": "82eeede68c38b70a29849c8d452c2f6a", "score": "0.5556631", "text": "public function destroy($id)\n { \n $product = Item::find($id);\n $image = $product->image;\n\n $basename ='img/products/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n if($basename != 'img/products/img_place_holder_product.png'){\n unlink($basename);\n }\n }\n $product->delete();\n\n Session::flash('success','Product Deleted');\n return redirect()->back();\n }", "title": "" }, { "docid": "e58edf0ef06400cd31b9c6df91114be3", "score": "0.5556309", "text": "public function destroy(Attribute $attribute)\n {\n //delete a attribute by softDelete.\n $userId = $attribute->Category->Store->user_id;\n\n if (auth()->id() == $userId) {\n if ($attribute->delete()) {\n return new AttributeResource($attribute);\n }\n } else {\n abort(400, 'the Auth user do not store owner');\n }\n }", "title": "" }, { "docid": "614063fb503a57e9decfce510aa95492", "score": "0.5556127", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n if (($oldFile = $product->photo) !== 'uyuni.jpg'){\n Storage::delete($oldFile);\n }\n $product->delete();\n return redirect()->route('product.index')->with('success', 'Product successfully destroyed');\n }", "title": "" }, { "docid": "7cdf7f14d455dbb5d9ed3ea3b44142b0", "score": "0.5555037", "text": "protected static function removeComponent()\n {\n (new Filesystem)->delete(\n resource_path('assets/js/components/ExampleComponent.vue')\n );\n }", "title": "" }, { "docid": "7488846bbe831c2c5afdad208317b7bd", "score": "0.55430317", "text": "public function destroy(File $file)\n {\n //\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', $file);\n }", "title": "" }, { "docid": "9d72fe7c299d9bc6b0d19ba6bb397fa3", "score": "0.55414784", "text": "public function destroy($id)\n {\n $product = Product::where('id', $id)->first();\n if ($product->image) {\n unlink($product->image);\n }\n Product::where('id', $id)->delete();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540394", "text": "public function remove($id);", "title": "" }, { "docid": "45876224e081764ab571b0cb929a5473", "score": "0.55344236", "text": "public function destroy($id)\n {\n\n $product=Product::find($id);\n $image=str_slug($product->imagePath);\n //no se borro la imagen ???\n Storage::delete($image);\n $product->delete();\n \n return back();\n \n }", "title": "" }, { "docid": "66928b15fb30f2f5cf746449308643ba", "score": "0.5534006", "text": "public function remove()\n {\n $this->_context->builder->waveletRemove($this->waveId, $this->waveletId);\n }", "title": "" }, { "docid": "a3bbd69ef2b058074f49c04b76cdbd14", "score": "0.55295706", "text": "public function delete() {\n if ($this->_filepath and is_writable($this->_filepath)) {\n unlink($this->_filepath);\n }\n }", "title": "" }, { "docid": "98e71b5db6e284bbc48862c743eb819b", "score": "0.55281925", "text": "public function destroy($id)\n {\n //\n $makale_resim = Article::find($id)->img->name;\n @unlink(public_path(\"uploads/\".$makale_resim));\n @unlink(public_path(\"uploads/thumb_\".$makale_resim));\n Img::where(\"imageable_id\",$id)->where(\"imageable_type\",\"App\\Article\")->delete();\n Article::destroy($id);\n Session::flash(\"durum\",1);\n return redirect(\"/admin/haber\");\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.5527044", "text": "public function delete();", "title": "" } ]
3b6c4f1575ba564bdc6ee9e761b56c5a
Remove Voluntarydegree from storage.
[ { "docid": "a6b7d14772f33eb01186548f3f3176da", "score": "0.5501238", "text": "public function destroy($id)\n {\n if (! Gate::allows('voluntarydegree_delete')) {\n return abort(401);\n }\n $voluntarydegree = Voluntarydegree::findOrFail($id);\n $voluntarydegree->delete();\n\n return redirect()->route('admin.voluntarydegrees.index');\n }", "title": "" } ]
[ { "docid": "2538f44eda21f137128f5169be2be40e", "score": "0.59685093", "text": "public function diminuir_vol()\r\n {\r\n if($this->get_ligada())\r\n {\r\n if($this->get_volume() > 0)\r\n {\r\n $this->volume--;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b015b6e879c1760ff9961716a8b99d07", "score": "0.5593317", "text": "public function perma_del($id)\n {\n if (! Gate::allows('voluntarydegree_delete')) {\n return abort(401);\n }\n $voluntarydegree = Voluntarydegree::onlyTrashed()->findOrFail($id);\n $voluntarydegree->forceDelete();\n\n return redirect()->route('admin.voluntarydegrees.index');\n }", "title": "" }, { "docid": "0970be01760e0e449ee46eafae6afae6", "score": "0.5552324", "text": "function removeStorage (Storage $storage) {\n\t\t$storages = new ArrayObject(array(), ArrayObject::STD_PROP_LIST);\n\t\tforeach($this->storages as $st) {\n\t\t\tif ($st !== $storage) {\n\t\t\t\t$storages[] = $st;\n\t\t\t}\n\t\t}\n\t\t$this->storages = $storages;\n\t}", "title": "" }, { "docid": "b1208cd9e86b43558e243757bb90108c", "score": "0.55072564", "text": "public function delete() {\n $this->_checkValid();\n $this->_apiConnection->volume->deleteVolume( $this->_fields['volumeID'] );\n $this->_setInvalid();\n }", "title": "" }, { "docid": "b3d43097aaf0a8321cdad5e1cc28229e", "score": "0.5462699", "text": "function detachStorage(): void\n {\n }", "title": "" }, { "docid": "dc01115e4541cda4444338b1d258be7f", "score": "0.5448271", "text": "public function unlockDependencyStorage()\n {\n\n }", "title": "" }, { "docid": "7b7913f1c23ba595ef3f6fe17cfb3858", "score": "0.54354614", "text": "public function destroy(/*Degree $degree,*/ Field $field)\n {\n //\n $field->delete();\n return $this->prepareJsonSuccessResponse(ResponseMessages::OPERATION_SUCCESSFUL, Response::HTTP_OK);\n }", "title": "" }, { "docid": "a7646fa343bcb89f4ae070ab20ab2222", "score": "0.53164095", "text": "public function unseal()\n {\n $this->Vault->unseal();\n }", "title": "" }, { "docid": "6be11ee55862810d4668a2f8381b9eb6", "score": "0.53152233", "text": "public function deleteTempSignature()\n {\n Storage::delete('temp_signature_pdf/temp_signature.pdf');\n }", "title": "" }, { "docid": "a50d19c729bcd0ecae4f0c64627ba229", "score": "0.52975416", "text": "public function delete() {\n $filename = self::getFilename($this->key);\n \n \tif (is_file($filename)) {\n \t\tunlink($filename);\n \t}\n \tunset(self::$members[$this->key]);\n }", "title": "" }, { "docid": "ab8ac45af1836b65019e192503eadc19", "score": "0.5289101", "text": "public function destroy(Additional $additional)\n {\n //\n }", "title": "" }, { "docid": "b424892541f7d29ba3534c92cd3121c0", "score": "0.52835184", "text": "public function destroy($id)\n {\n $model = str_slug('degrees','-');\n if(auth()->user()->permissions()->where('name','=','delete-'.$model)->first()!= null) {\n Degree::destroy($id);\n\n return redirect('serviceprovider/degrees')->with('flash_message', 'Degree deleted!');\n }\n return response(view('403'), 403);\n\n }", "title": "" }, { "docid": "9d0f4e05cfe1b98bef7bd0eeffbb8f21", "score": "0.5249288", "text": "public function destroy(Degree $degree)\n {\n $degree->delete();\n\n return redirect()->action('DegreeController@index');\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.524857", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.524857", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.524857", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.524857", "text": "public function remove();", "title": "" }, { "docid": "b7361e97557af4c910589251861d4352", "score": "0.5212603", "text": "public function destroy(SignoVital $signoVital)\n {\n //\n }", "title": "" }, { "docid": "1ae9665ebaf1561d52881b50b774ab80", "score": "0.51945424", "text": "private function eliminarArchivoLocal($ruta){\n \\Storage::delete($ruta);\n }", "title": "" }, { "docid": "f809de8f3832241d47b470866c69aba6", "score": "0.518366", "text": "public function delete()\n {\n // clean filesystem\n Storage::disk('videos')->delete($this->rapper1_round1);\n Storage::disk('videos')->delete($this->rapper2_round1);\n Storage::disk('videos')->delete($this->rapper1_round2);\n Storage::disk('videos')->delete($this->rapper2_round2);\n\n parent::delete();\n }", "title": "" }, { "docid": "7487c81dd31f7f6184b0b39cf7b9a917", "score": "0.5141004", "text": "public function destroy(Education $education)\n {\n //\n }", "title": "" }, { "docid": "39abb58e874d086fd4aa3ebf6a30bf22", "score": "0.5133205", "text": "public function destroy(vaginal $vaginal)\n {\n //\n }", "title": "" }, { "docid": "ae5bea1afd560527176dbb81288af541", "score": "0.5123482", "text": "public function destroy(EducationField $educationField)\n {\n //\n }", "title": "" }, { "docid": "847ed62ab87fd852eb233c9a62954158", "score": "0.5115773", "text": "public function uninstall() {\n $table = new $this->xmldb_table('block_assmgr_res_moodle');\n drop_table($table);\n }", "title": "" }, { "docid": "63fadfe9b10c359208b4a59e529ec0f8", "score": "0.51136714", "text": "public function delRight()\n {\n }", "title": "" }, { "docid": "322b0a3245de9331c78935634f838853", "score": "0.5087036", "text": "function remove() {\n global $db;\n $db->Execute(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key LIKE 'MODULE\\_PAYMENT\\_PAYLANE\\_%'\");\n $this->notify('NOTIFY_PAYMENT_PAYLANE_UNINSTALLED');\n }", "title": "" }, { "docid": "b43936679175964c7106825c7f90e006", "score": "0.5077898", "text": "public function destroy(Asistente $asistente)\n {\n\n\n $asistente->delete();\n }", "title": "" }, { "docid": "7062db6e2d0e69d32ca6c6684350c8c1", "score": "0.50305516", "text": "public function destroy(Maternity $maternity)\n {\n //\n }", "title": "" }, { "docid": "65349b1796b02820661d0bf953a7e562", "score": "0.50270766", "text": "function unmute(){\n\t\t\tglobal $db, $prefix, $x7c, $txt;\n\t\t\t$voiced = $x7c->room_data['voiced'];\n\t\t\t$their_id = $this->user_info->profile['id'];\n\t\t\t$room_id = $x7c->room_data['id'];\n\t\t\t$voiced = explode(\";\",$voiced);\n\t\t\t$key = array_search(\"-$their_id\",$voiced);\n\t\t\tunset($voiced[$key]);\n\t\t\t$voiced = implode(\";\",$voiced);\n\t\t\t$db->DoQuery(\"UPDATE {$prefix}rooms SET voiced='$voiced' WHERE id='$room_id'\");\n\t\t\t// Alert the room that they have a new operator\n\t\t\tinclude_once(\"./lib/message.php\");\n\t\t\talert_room($x7c->room_name,$txt[132],$this->user);\n\t\t}", "title": "" }, { "docid": "4ad6545e42681cb91a26622039932ba8", "score": "0.5022613", "text": "public function remove_store_data() {\n\t\treturn delete_option( 'livechat_store_token' );\n\t}", "title": "" }, { "docid": "927318d3938d4582d26e3e1b37ebd064", "score": "0.50205", "text": "public function delete($storagePath);", "title": "" }, { "docid": "f4faaeeeb3bb3e4525cb795355351503", "score": "0.50148946", "text": "public function manger(){\r\n Nourriture::removeFood($this->typeNourriture,$this->quantite);\r\n }", "title": "" }, { "docid": "f4faaeeeb3bb3e4525cb795355351503", "score": "0.50148946", "text": "public function manger(){\r\n Nourriture::removeFood($this->typeNourriture,$this->quantite);\r\n }", "title": "" }, { "docid": "e00982f962577e32f6920adfc2a48899", "score": "0.5013711", "text": "public function vaciar(){\n unset($this->productos);\n }", "title": "" }, { "docid": "87fe5aa101cfc85b55067a437c6c47d5", "score": "0.501045", "text": "public function demov2()\n {\n // logic\n }", "title": "" }, { "docid": "7f82d95c868d18acd2287dc1b5a29de9", "score": "0.50052583", "text": "public function remove(StockAssignmentInterface $assignment, bool $hard = false): void;", "title": "" }, { "docid": "7728a565af514d7f5c1c9c4d74dd3dd8", "score": "0.49724248", "text": "public function elimina() {\n\t\t//se chaiveVal non impostato non fa niente\n\t\tif (is_null($this->chiaveVal)) return;\n\t\t$this->_connessione->conn()->query(\"DELETE FROM $this->tabella WHERE $this->chiaveCol = '$this->chiaveVal';\");\n\t\t//elimina il valore della chiave\n\t\t$this->chiaveVal = NULL;\n\t}", "title": "" }, { "docid": "47c7e26713c5e9320767ccdfdd8e19a1", "score": "0.4954462", "text": "public function destroy(Volunteer $volunteer)\n {\n //\n }", "title": "" }, { "docid": "475d22992dbf16ddbbde7e840f8642e6", "score": "0.49466243", "text": "public function remove() { }", "title": "" }, { "docid": "8f3aa0c4a3726cc94828ac3650c10b63", "score": "0.49457854", "text": "public function eliminar(){\n\t\t$this -> delete();\n\t}", "title": "" }, { "docid": "30d770c16eae1349cd0c78f5b6112680", "score": "0.49444368", "text": "public function removeDayFromStorage(\\DateTime $day) {\n\t\tunset($this->dayStorage[$day->format('U')]);\n\t}", "title": "" }, { "docid": "097d0a49df31f404ce797eb16eb4bf90", "score": "0.49262875", "text": "function deletar_equipe($id_real_equipe) {\n $this->db->where(\"{$this->table}.id_real_equipe\", $id_real_equipe);\n $this->db->delete($this->table);\n }", "title": "" }, { "docid": "ff6da9d2c9991cb084abf27a4564c178", "score": "0.49243087", "text": "private function deleteUserExtraCurricular (){\n\t $this->obj_usrinfo = unserialize($_SESSION['userData']);\n\t echo $this->obj_usrinfo->deleteUserExtraCurricular($_POST['ExtraCurricularID']);\n\t $_SESSION ['userData'] = serialize ( $this->obj_usrinfo );\n\t}", "title": "" }, { "docid": "b06a434853519c979e9280317991f980", "score": "0.4912878", "text": "private function removeLock($storageFile) {\n @unlink($storageFile . '.lock');\n }", "title": "" }, { "docid": "99bdcbbae94d0e2b97071639a93e0b78", "score": "0.49000868", "text": "public function destroy(GeneralLedger $ledger)\n {\n //\n }", "title": "" }, { "docid": "c3a58d0d242a399353218bf5866bbdd5", "score": "0.4893939", "text": "public function destroy(College $college)\n {\n //\n }", "title": "" }, { "docid": "f2628bb2cfedf2c5b5cf3483247510f4", "score": "0.48838013", "text": "function unvoice(){\n\t\t\tglobal $db, $prefix, $x7c, $txt;\n\t\t\t$voiced = $x7c->room_data['voiced'];\n\t\t\t$their_id = $this->user_info->profile['id'];\n\t\t\t$room_id = $x7c->room_data['id'];\n\t\t\t$voiced = explode(\";\",$voiced);\n\t\t\t$key = array_search(\"$their_id\",$voiced);\n\t\t\tunset($voiced[$key]);\n\t\t\t$voiced = implode(\";\",$voiced);\n\t\t\t$db->DoQuery(\"UPDATE {$prefix}rooms SET voiced='$voiced' WHERE id='$room_id'\");\n\t\t\t// Alert the room that they have a new voiced user\n\t\t\tinclude_once(\"./lib/message.php\");\n\t\t\talert_room($x7c->room_name,$txt[130],$this->user);\n\t\t}", "title": "" }, { "docid": "974634c5207fb46b2957e96112d2ba84", "score": "0.4877405", "text": "public function destroy($angle)\n {\n $angle = Angle::findOrFail($angle);\n $angle->delete();\n \n // redirect\n Session::flash('message', 'Successfully deleted the angle!');\n return Redirect::to('angles');\n }", "title": "" }, { "docid": "64f0d24c873f6061b31378df8ac06324", "score": "0.48743612", "text": "protected function removeKey($key)\n {\n if ($this->lock) return;\n $this->lock = true;\n $vault = $this->getVault();\n unset($vault[md5($key)]);\n $this->set($this->vaultKey, $vault, $this->vaultLifeTime);\n $this->lock = false;\n }", "title": "" }, { "docid": "f893d815b63fb265ff4036e441cd1ca3", "score": "0.4862311", "text": "public function destroy(Request $request)\n { \n $nutriment_id = $request->nutriment;\n $id=$request->standard;\n $Standardtype = Standardtype::find($id);\n $Standardtype->nutriments()->detach($nutriment_id);\n \n return redirect()->route('Analysestype.index')\n ->with('success','Element supprimé avec success');\n }", "title": "" }, { "docid": "dc7124eb7e20b5feea634ca538bd9025", "score": "0.4856492", "text": "public function destroy() {\n $this->actual['sid'] = null;\n $this->actual['tok'] = null;\n }", "title": "" }, { "docid": "55a58f721419ced913f4d977ab7bffef", "score": "0.48557106", "text": "public function delete(): void {\n if (!$this->mysqli->query(\"delete from attacks where attack_id = '\" . $this->mysqli->escape_string($this->attack_id) . \"'\")) Logs::mysql($this->mysqli);\n if (!$this->mysqli->query(\"delete from resource_usage where id = \" . $this->usage->getId())) Logs::mysql($this->mysqli);\n $virus = $this->virusFactory->get($this->virus_id);\n $virus->usage()->minusStatic($this->usage)->saveState();\n $this->userFactory->get($virus->getUserHandle())->usage()->minusStatic($this->usage)->saveState();\n exec(\"rm -r \" . DATA_DIR . \"/attacks/$this->attack_id\");\n }", "title": "" }, { "docid": "a83e506414cf81a88a25ffb3a27058f0", "score": "0.48513502", "text": "public function remove($element){\r\n $hash = $this->hash($element);\r\n\t\tif(isset($this->data[$hash])) unset($this->data[$hash]);\r\n\t}", "title": "" }, { "docid": "48da3ea2db37bed732d2356a690c6aa3", "score": "0.48443958", "text": "function eliminarTablaMigracionLiquidacion() {\n\t\t\t$cnx= conectar_postgres();\n\t\t\t$cons = \"DROP TABLE Facturacion.LiquidacionMigracion\";\t\n\t\t\t$res = @pg_query($cnx, $cons);\n\t\t\t\tif (!$res) {\n\t\t\t\t\n\t\t\t\t\t/*echo \"<p class='error1'> Error de ejecucion </p>\".pg_last_error().\"<br>\";\n\t\t\t\t\techo \"<p class= 'subtitulo1'>Comando SQL </p> <br>\".$cons.\"<br>\"; \t\t\t\t\n\t\t\t\t\techo \"<br><br>\";\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "17b7c358e033f4cb24902fa32b28eae1", "score": "0.48388642", "text": "public function drop();", "title": "" }, { "docid": "d560232ab08a1a90c5e97d176e585c3f", "score": "0.48366094", "text": "public function delete()\n {\n $previousMode = $this->setInheritanceStorageMode(InheritanceStorage::STORAGE_MODE);\n\n parent::delete();\n\n $this->setInheritanceStorageMode($previousMode);\n }", "title": "" }, { "docid": "2f0fc9e8f03876205bb2269f16adf1d5", "score": "0.48308852", "text": "public function store(StoreVoluntarydegreesRequest $request)\n {\n if (! Gate::allows('voluntarydegree_create')) {\n return abort(401);\n }\n $voluntarydegree = Voluntarydegree::create($request->all());\n\n\n\n return redirect()->route('admin.voluntarydegrees.index');\n }", "title": "" }, { "docid": "4ab71acd1de7301eca8e37fa2168ab2d", "score": "0.48239884", "text": "public function remove() {\n }", "title": "" }, { "docid": "da6c4552b70c46248b94c68fa2b66f93", "score": "0.48232135", "text": "protected function deleteStore() {\n //We only had one key, but keep it robust in case we add more\n $keys = ['unl_import_data'];\n foreach ($keys as $key) {\n $this->store->delete($key);\n }\n }", "title": "" }, { "docid": "aaa80df76022d3e03b77291c0ac2e4fc", "score": "0.48195523", "text": "public function remove()\n {\n $sql = \"DELETE FROM cartridge WHERE id=?\";\n $this->dbObj->runQuery($sql, array(\n $this->getId()\n ));\n }", "title": "" }, { "docid": "385ebb1bed11db3c95cf6159aa71f582", "score": "0.48162624", "text": "private function deletePatient(){\n $VPatientsDB=USingleton::getInstance('VPatientsDB');\n $encCF=$VPatientsDB->get('p');\n \n $posCF=$this->getCfPosition($encCF);\n $cfPatient=EPatient::$istances[$posCF]->getCF();\n \n \n if ( $VPatientsDB->get('conf')==\"yes\" ){\n $FPatient=USingleton::getInstance('FPatient');\n $FCheckup= USingleton::getInstance('FCheckup');\n \n $FPatient->deletePatient($cfPatient);\n $FCheckup->deleteCheckup($cfPatient,\"all\"); //oltre al paziente cancello anche tutte le sue visite\n $message=\"eliminazione completata con successo\";\n $this->bodyHTML=$VPatientsDB->getInfoMessage($message,true);\n }\n else {\n $this->bodyHTML=$VPatientsDB->showPatientConfirmPage($cfPatient);\n }\n\t\t}", "title": "" }, { "docid": "a4df162a2128448ad44c06f74558a481", "score": "0.4815305", "text": "function eliminarLiquidacion() {\n\t\t//Realiza la insercion en Postgresql con base en los parametros\n\t\t\t\n\t\t\t$cnx = \tconectar_postgres();\n\t\t\t$cons = \"DELETE FROM Facturacion.Liquidacion\";\n\t\t\t\t\t \n\t\t\t$res = @pg_query($cnx, $cons);\n\t\t\t\tif (!$res) {\n\t\t\t\t\t\t\techo \"<p class='error1'> Error de ejecucion </p>\".pg_last_error().\"<br>\";\n\t\t\t\t\t\t\techo \"<p class= 'subtitulo1'>Comando SQL </p> <br>\".$cons.\"<br/> <br/> <br/>\"; \n\t\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "46228663984d6f84e17999e7fdae5afd", "score": "0.4812464", "text": "public function destroy(ProfessionalSummary $professionalSummary)\n {\n //\n }", "title": "" }, { "docid": "a479284051eb4fd5d6d99ed5acada805", "score": "0.48044753", "text": "public function forceDeleted(Tutor $tutor)\n {\n //\n }", "title": "" }, { "docid": "d6cc9b8195d4596a872244a0b68d018e", "score": "0.48019654", "text": "public function destroy($college)\n {\n College::find($college)->delete();\n }", "title": "" }, { "docid": "b548c4754a97bf8ac4c2d05bef2b2576", "score": "0.47955373", "text": "function deleteStoredObjectAttribute( $objectAttribute, $version = null )\n {\n $surveyID = $objectAttribute->attribute( self::CONTENT_VALUE );\n $survey = $this->fetchSurveyByID( $surveyID );\n if ( is_object( $survey ) )\n {\n $survey->remove();\n }\n }", "title": "" }, { "docid": "a5fea56c953762ffdefb6bbe7787dbfc", "score": "0.47948217", "text": "public function destroy(PoleWeight $poleWeight)\n {\n //\n }", "title": "" }, { "docid": "16ed197897194d1fd5d28591ebb9a0b2", "score": "0.47916406", "text": "public function destroy(Personal $personal)\n {\n //\n }", "title": "" }, { "docid": "03e6ac50222ec45a1a3cd4d7070b1eff", "score": "0.4790338", "text": "public function manger(){\r\n Nourriture::removeFood($$this->typeNourriture,$this->quantite);\r\n }", "title": "" }, { "docid": "9f0fd12cb7fe4b4563bcf49be1e83952", "score": "0.47899175", "text": "public function destroy($id)\n {\n \n $auxeliminar= auxiliar2ventas::find($id);\n\n $id2=$auxeliminar->idprods3;\n\n $costo =\\App\\producto::find($id2);\n //$lot=\\App\\lotes::find($id);\n $lot=\\App\\lotes::where('idprodsl',$id2)->get();\n $lot2=\\App\\lotes::find($lot[0]->id);\n\n \n $caj=$auxeliminar->cancompra3 * $costo->uniCaja;\n $uni=$auxeliminar->preciocomp3;\n\n $lot2->canlote = $lot2->canlote+($uni+$caj);\n $lot2->save();\n\n\n\n\n $auxeliminar->delete();\n return redirect('ventas/create'); \n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.4789467", "text": "public function delete();", "title": "" }, { "docid": "3efde446ab8755859704adf5e0f3e4b0", "score": "0.4787371", "text": "protected function clearStorage()\r\n {\r\n $filesystem = File::getFacadeRoot();\r\n $finder = new Finder();\r\n $paths = config('antares/installer::storage_path');\r\n $finder = $finder->files()->ignoreVCS(true);\r\n foreach ($paths as $path) {\r\n $current = storage_path($path);\r\n if (!is_dir($current)) {\r\n continue;\r\n }\r\n $finder = $finder->in($current);\r\n }\r\n $finder->exclude('.gitignore');\r\n foreach ($finder as $element) {\r\n $filesystem->delete($element);\r\n }\r\n try {\r\n $directories = $finder->directories();\r\n foreach ($directories as $dir) {\r\n $files = $filesystem->allFiles($dir->getPath(), true);\r\n if (empty($files)) {\r\n $filesystem->deleteDirectory($dir->getPath());\r\n }\r\n }\r\n } catch (Exception $e) {\r\n Log::emergency($e);\r\n }\r\n }", "title": "" }, { "docid": "3b0c5a53199184569821db5c30c192ec", "score": "0.4783699", "text": "public function uninstall() {\n\t\t$this->load->model('user/user_group');\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'access', 'extension/module/pavoheader' );\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'modify', 'extension/module/pavoheader' );\n\t\t// access - modify pavoheader edit\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'access', 'extension/module/pavoheader/edit' );\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'modify', 'extension/module/pavoheader/edit' );\n\t}", "title": "" }, { "docid": "185fdc5276a74776403e5f3a0f7a11ab", "score": "0.47762415", "text": "public function removeAccount();", "title": "" }, { "docid": "98f65c2a7806161ec1cb00ffa7dd1334", "score": "0.47695762", "text": "public function del(&$vo){\n\t\tif(mysql_query(\"DELETE FROM transaction WHERE tid=$vo->tid\")) {\n\t\t\t$vo->tid=0;\n\t\t}\n\t}", "title": "" }, { "docid": "9287746215f02801523345b66a24effb", "score": "0.47691095", "text": "public function forceDeleted(Video $video)\n {\n //\n }", "title": "" }, { "docid": "e752649426d622fc1c004d6b523b3afb", "score": "0.47637647", "text": "public function destroy(PersonalDetails $personalDetails)\n {\n //\n }", "title": "" }, { "docid": "ebf4f8002a7171bc64cb9650cad758e7", "score": "0.47604153", "text": "function deleteField($name) {\n\t\tunset( $this->value[$name] );\n\t}", "title": "" }, { "docid": "ee58518812cbd724fe63931f0d5e6696", "score": "0.47600704", "text": "public function delLeft()\n {\n }", "title": "" }, { "docid": "ebc0b66008397413a3e5c6f8f9c70d4d", "score": "0.47597256", "text": "public function destroy(Advanced_Salary $advanced_Salary)\n {\n //\n }", "title": "" }, { "docid": "4fb02ae20521d64ccdc1eac1271f8260", "score": "0.47519174", "text": "public function delete()\n {\n \\File::delete([\n storage_path() . '/' . $this->path\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "66f7d30c8790f2367a6a076ac995c8d9", "score": "0.4751374", "text": "public function reset()\n {\n $this->Consul->ensureRunning();\n $this->Vault->ensureStopped();\n\n $this->Consul->kv()->delete('vault/', ['recurse' => true])->json();\n\n $file = $this->Vault->getVaultKeyFile();\n if (file_exists($file)) {\n unlink($file);\n }\n\n $this->Vault->ensureRunning();\n }", "title": "" }, { "docid": "392a7e3138ed30cabf8a005931460b98", "score": "0.47456855", "text": "public function destroy(persyaratanumum $persyaratanumum)\n {\n //\n }", "title": "" }, { "docid": "0cb0536ff08f2e6e88e57744bc820000", "score": "0.47453895", "text": "public function removeUpload()\n {\n if($file = $this->getAbsolutePath())\n {\n unlink($file);\n }\n }", "title": "" } ]
1d47fa2136b758d786b0cebb627805e7
check we have a project
[ { "docid": "0e1d8112efb99f337632ed9d70bb7ed1", "score": "0.0", "text": "function run_upgrade_1_0($task, $args)\r\n{\r\n if (!file_exists('symfony') && !file_exists('SYMFONY'))\r\n {\r\n throw new Exception('You must be in a symfony project directory');\r\n }\r\n\r\n // upgrade propel.ini\r\n _upgrade_1_0_propel_ini();\r\n\r\n // upgrade i18n support\r\n _upgrade_1_0_i18n();\r\n\r\n // upgrade model classes\r\n _upgrade_1_0_propel_model();\r\n\r\n // migrate activate to enabled\r\n _upgrade_1_0_activate();\r\n\r\n // find all applications for this project\r\n $apps = pakeFinder::type('directory')->name(sfConfig::get('sf_app_module_dir_name'))->mindepth(1)->maxdepth(1)->relative()->in(sfConfig::get('sf_apps_dir_name'));\r\n\r\n // install symfony CLI\r\n if (file_exists(sfConfig::get('sf_root_dir').'/SYMFONY'))\r\n {\r\n pake_remove(sfConfig::get('sf_root_dir').'/SYMFONY', '');\r\n }\r\n pake_copy(sfConfig::get('sf_symfony_data_dir').'/skeleton/project/symfony', sfConfig::get('sf_root_dir').'/symfony');\r\n pake_chmod('symfony', sfConfig::get('sf_root_dir'), 0777);\r\n\r\n // update schemas\r\n _upgrade_1_0_schemas();\r\n\r\n // add bootstrap files for tests\r\n _add_1_0_test_bootstraps();\r\n\r\n // upgrade main config.php\r\n _upgrade_1_0_main_config_php();\r\n\r\n // upgrade all applications\r\n foreach ($apps as $app_module_dir)\r\n {\r\n $app = str_replace(DIRECTORY_SEPARATOR.sfConfig::get('sf_app_module_dir_name'), '', $app_module_dir);\r\n pake_echo_action('upgrade 1.0', pakeColor::colorize(sprintf('upgrading application \"%s\"', $app), array('fg' => 'cyan')));\r\n\r\n $app_dir = sfConfig::get('sf_apps_dir_name').'/'.$app;\r\n\r\n // upgrade config.php\r\n _upgrade_1_0_config_php($app_dir);\r\n\r\n // upgrade filters.yml\r\n _upgrade_1_0_filters_yml($app_dir);\r\n\r\n // upgrade all modules\r\n $dir = $app_dir.'/'.sfConfig::get('sf_app_module_dir_name');\r\n if ($dir)\r\n {\r\n // template dirs\r\n $template_dirs = pakeFinder::type('directory')->name('templates')->mindepth(1)->maxdepth(1)->in($dir);\r\n $template_dirs[] = $app_dir.'/'.sfConfig::get('sf_app_template_dir_name');\r\n\r\n _upgrade_1_0_deprecated_for_templates($template_dirs);\r\n\r\n _upgrade_1_0_date_form_helpers($template_dirs);\r\n\r\n _upgrade_1_0_deprecated_for_generator($app_dir);\r\n\r\n _upgrade_1_0_cache_yml($app_dir);\r\n\r\n // actions dirs\r\n $action_dirs = pakeFinder::type('directory')->name('actions')->mindepth(1)->maxdepth(1)->in($dir);\r\n\r\n _upgrade_1_0_deprecated_for_actions($action_dirs);\r\n\r\n // view.yml\r\n _upgrade_1_0_view_yml($app_dir);\r\n\r\n _upgrade_1_0_php_files($app_dir);\r\n }\r\n }\r\n\r\n pake_echo_action('upgrade 1.0', 'done');\r\n\r\n pake_mkdirs(sfConfig::get('sf_root_dir').'/plugins');\r\n if (is_dir(sfConfig::get('sf_lib_dir').'/plugins'))\r\n {\r\n pake_echo_comment('WARNING: you must re-install all your plugins');\r\n }\r\n\r\n pake_echo_comment('Now, you must:');\r\n pake_echo_comment(' - rebuild your model classes: symfony propel-build-model');\r\n pake_echo_comment(' - clear the cache: symfony cc');\r\n}", "title": "" } ]
[ { "docid": "e1fd60ec8b840df442892bf193f0daad", "score": "0.81110525", "text": "public function hasProject(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "103501298ee1afb3a1a47725dabc741f", "score": "0.7958403", "text": "public function hasProject(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "036d153513d703e75402157e112417e9", "score": "0.7867589", "text": "public function hasProject(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "b77e34ce2dde0ee1430ba34db6e12c8d", "score": "0.7175715", "text": "function project_exists( $p_project_id ) {\n\t# we're making use of the caching function here. If we succeed in caching the project then it exists and is\n\t# now cached for use by later function calls. If we can't cache it we return false.\n\tif( false == project_cache_row( $p_project_id, false ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "49095f546bc30d320ddc62ca6cfb4678", "score": "0.71465105", "text": "function project_ensure_exists( $p_project_id ) {\n\tif( !project_exists( $p_project_id ) ) {\n\t\terror_parameters( $p_project_id );\n\t\ttrigger_error( ERROR_PROJECT_NOT_FOUND, ERROR );\n\t}\n}", "title": "" }, { "docid": "0471dd82488aa52739c08189336b583c", "score": "0.7103015", "text": "function projectNameExists() {\r\n\t\tglobal $mysqli, $db_table_prefix;\r\n\t\t$stmt = $mysqli->prepare(\"SELECT active\r\n\t\t\t\t\t\tFROM \" . $db_table_prefix . \"projects\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\tproject_name = ?\r\n\t\t\t\t\t\tLIMIT 1\");\r\n\t\t$stmt->bind_param(\"s\", $this->projectname);\r\n\t\t$stmt->execute();\r\n\t\t$stmt->store_result();\r\n\t\t$num_returns = $stmt->num_rows;\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($num_returns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5bfda0347975c09b0573c49cf94f27d6", "score": "0.70804214", "text": "protected function checkProjectStatus()\r\n {\r\n if (empty($this->app->make('config')->get('app.key'))) {\r\n WelcomeController::start();\r\n } elseif ((empty($this->app->make('config')->get('database.connections.mysql.database'))\r\n || $this->app->make('config')->get('database.connections.mysql.database') === 'homestead')\r\n && !preg_match('/^' .preg_quote(url('/install'), '/g') . '/', url()->current())\r\n ) {\r\n redirect('/install')->send();\r\n }\r\n }", "title": "" }, { "docid": "600bc144fdee8b4b2bcd84afb797ae6a", "score": "0.67323947", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM projects WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested project (\". $this->id .\") does not exist - possibly the project has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\t\t\n\t\t// verify that phase exists and belongs to this project\n\t\tif ($this->phaseid)\n\t\t{\n\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t$sql_obj->string\t= \"SELECT projectid FROM project_phases WHERE id='\". $this->phaseid .\"' LIMIT 1\";\n\t\t\t$sql_obj->execute();\n\n\t\t\tif (!$sql_obj->num_rows())\n\t\t\t{\n\t\t\t\tlog_write(\"error\", \"page_output\", \"The requested phase (\". $this->phaseid .\") does not exist - possibly the phase has been deleted.\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql_obj->fetch_array();\n\n\t\t\t\tif ($sql_obj->data[0][\"projectid\"] != $this->id)\n\t\t\t\t{\n\t\t\t\t\tlog_write(\"error\", \"page_output\", \"The requested phase (\". $this->phaseid .\") does not belong to the selected project (\". $this->id .\")\");\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tunset($sql_obj);\n\t\t}\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "937f7031e81b8d8d73cc9313b4d02f20", "score": "0.6717831", "text": "public function check(Project $project);", "title": "" }, { "docid": "9f70ac80ceb415f10032b5df11359e90", "score": "0.66706955", "text": "public function valid()\n {\n return isset($this->projects[$this->position]);\n }", "title": "" }, { "docid": "58d66a821d6b54ceef4e4b167a25ee38", "score": "0.66432303", "text": "function project_table_empty() {\n\tglobal $g_cache_project;\n\n\t# If projects already cached, use the cache.\n\tif( isset( $g_cache_project ) && count( $g_cache_project ) > 0 ) {\n\t\treturn false;\n\t}\n\n\t# Otherwise, check if the projects table contains at least one project.\n\t$t_query = 'SELECT * FROM {project}';\n\t$t_result = db_query( $t_query, array(), 1 );\n\n\treturn db_num_rows( $t_result ) == 0;\n}", "title": "" }, { "docid": "d17df75eab376866200cadebc9146820", "score": "0.65855205", "text": "public function isEmpty()\n {\n return Project::count() == 0;\n }", "title": "" }, { "docid": "b7a27a40b89c1fa99c80c9b547b6295f", "score": "0.6471782", "text": "public function getHasProjectsAttribute()\n {\n return $this->projects->isNotEmpty();\n }", "title": "" }, { "docid": "1a5ba864f33f009c3619ede661b34f70", "score": "0.64039993", "text": "function Exists()\n {\n // If no id specify return false\n if(!$this->Id || !$this->ProjectId)\n {\n return false;\n }\n\n $query = pdo_query(\"SELECT count(*) AS c FROM buildgroup WHERE id='\".$this->Id.\"' AND projectid='\".$this->ProjectId.\"'\");\n add_last_sql_error(\"BuildGroup:Exists\",$this->ProjectId);\n $query_array = pdo_fetch_array($query);\n if($query_array['c']==0)\n {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "01a2fa77ec34c225b23585d8539db299", "score": "0.6392749", "text": "public function checkProjectById($projectId) {\n\t\t\tif ($statement = $this->Connection->prepare('SELECT * FROM projects WHERE project_id = ? LIMIT 1')) {\n\t\t\t\t$statement->bind_param('i', $projectId);\n\t\t\t\tif ($statement->execute()) {\n\t\t\t\t\t $result = $statement->get_result();\n\t\t\t\t\t $statement->free_result();\n\t\t\t\t\t $statement->close();\n\t\t\t\t\t if ($result->num_rows == 1) {\n\t\t\t\t\t\t return TRUE;\n\t\t\t\t\t } else {\n\t\t\t\t\t\t return FALSE;\n\t\t\t\t\t }\n\t\t\t\t} else {\n\t\t\t\t\tdie('Something went wrong with checkProjectId');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3b19b69db4be43d82cef226778abb48c", "score": "0.6372983", "text": "function ownedproject($projectid) {\n $dbconnect = dbconnect();\n\n $req = $dbconnect->query('SELECT * FROM projects WHERE id_project = '.$projectid);\n $res = $req->fetch();\n\n if ($res && $res['id_user'] == $_SESSION['user_id']) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "8e239cb8c7c15cd20b7c258a1320d778", "score": "0.63669175", "text": "public function checkId($id){\n try{\n $ret = DB::table('project')->where('id',$id)->first();\n\n return !empty($ret);\n \n }catch(Exception $ex){\n throw $ex;\n }\n }", "title": "" }, { "docid": "ccf1579e909c7032497994d00ed966d2", "score": "0.63476425", "text": "protected function getRequestedProject()\n {\n $id = $this->getEvent()->getRouteMatch()->getParam('project');\n $p4Admin = $this->getServiceLocator()->get('p4_admin');\n\n // attempt to retrieve the specified project\n // translate invalid/missing id's into a 404\n try {\n return Project::fetch($id, $p4Admin);\n } catch (NotFoundException $e) {\n } catch (\\InvalidArgumentException $e) {\n }\n\n $this->getResponse()->setStatusCode(404);\n return false;\n }", "title": "" }, { "docid": "9d7e79037f0475202b44f00f257e4607", "score": "0.6330722", "text": "function choose_project($x,$b=null){\n\t\tif(key_exists($x,$this->projects)){\n\t\t\t$this->choose_big($b);\n\t\t\tforeach($this as $t){\n\t\t\t\tif($this->key() == $x) break;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0d9944740ae81ef474c7ed08a969865f", "score": "0.63152564", "text": "public function isTheOnlyOne()\n {\n return $this->project->getVersions()->count() == 1;\n }", "title": "" }, { "docid": "37bcf6cb2d7d0aedbc46e43cb1a0fc29", "score": "0.629079", "text": "public function testCreateProject()\n {\n\n }", "title": "" }, { "docid": "c950fdf8ff62e50fa61c6b0cee75110b", "score": "0.6282375", "text": "public function checkProjectAccess( $project_id, $userid){\r\n\t\t\t $this->db->where('projectid', $project_id);\r\n\t\t\t $this->db->where('userid', $userid);\r\n\t\t\t $q = $this->db->get('user_assigned_projects');\r\n\t\t\t if($q->num_rows() > 0 ){\r\n\t\t\t\treturn true\t;\r\n\t\t\t }else{\r\n\t\t\t\treturn false;\r\n\t\t\t }\r\n\t\t\t \r\n\t }", "title": "" }, { "docid": "953e897d9b9027ba25f696f4efb639fa", "score": "0.6269699", "text": "function canCreateProject(IUser $user) {\n return Quotes::canManage($user) && Projects::canAdd($user) && ($this->isSent() || $this->isWon());\n }", "title": "" }, { "docid": "2b25ecc6171e9d34379a10fbda6eccff", "score": "0.6265486", "text": "protected function _isGarpProject($path) {\n\t\t$garpFolder = $path.DIRECTORY_SEPARATOR.'garp';\n\t\t$appFolder = $path.DIRECTORY_SEPARATOR.'application';\n\t\t$publicFolder = $path.DIRECTORY_SEPARATOR.'public';\n\t\t$garpInstalledThruComposer = file_exists($path . DIRECTORY_SEPARATOR . 'vendor' .\n\t\t\tDIRECTORY_SEPARATOR . 'grrr-amsterdam' .\n\t\t\tDIRECTORY_SEPARATOR . 'garp3');\n\t\treturn (file_exists($garpFolder) || $garpInstalledThruComposer) &&\n\t\t\tfile_exists($appFolder) &&\n\t\t\tfile_exists($publicFolder);\n\t}", "title": "" }, { "docid": "d0386b5c2084d847b3625ff9b8fc136c", "score": "0.625535", "text": "public function a_user_can_create_a_project()\n {\n $attributes = [\n 'titile' => $this->faker->sentence,\n 'descripton' => $this->faker->paragraph\n ];\n\n\n $this->post('/project', $attributes);\n $this->assertDatabaseHas('/project', $attributes);\n }", "title": "" }, { "docid": "3c985ae500dbe6f9a52d245fe87efc13", "score": "0.62440944", "text": "public function testProjectActionValid()\n {\n // add a project\n $projectData = array(\n 'id' => 'prjtest',\n 'name' => 'prjtest',\n 'members' => array('foo', 'bar', 'xyz')\n );\n $project = new Project($this->p4);\n $project->set($projectData)->save();\n\n $this->dispatch('/projects/prjtest');\n\n $this->assertRoute('project');\n $this->assertRouteMatch('projects', 'projects\\controller\\indexcontroller', 'project');\n $this->assertResponseStatusCode(200);\n $this->assertQueryContentContains('.project-navbar .brand', 'prjtest');\n }", "title": "" }, { "docid": "e345957be39a7224536e1b5ff621facc", "score": "0.62061155", "text": "function check_first_project(){\r\n \r\n // Change member type if first project\r\n if($this->session->userdata('member_type_name') == $this->Member_type->member_normal){\r\n $this->Member->change_member_type($this->session->userdata('member_id'), $this->Member_type->member_farmer_id);\r\n $this->gnc_authen->reset_session_member();\r\n }\r\n }", "title": "" }, { "docid": "1e5ea39d8a45c42cbee9713f71af579a", "score": "0.6194942", "text": "public function projects();", "title": "" }, { "docid": "1e5ea39d8a45c42cbee9713f71af579a", "score": "0.6194942", "text": "public function projects();", "title": "" }, { "docid": "579a52f56cd235a33f970520e6a75943", "score": "0.618809", "text": "public function testGetProjectTask()\n {\n $projectTasks = $this->client->getProjectTask(TESTS_PROJECT_ID, TESTS_TASK_ID);\n // check the first project task\n $this->assertTask($projectTasks, TESTS_PROJECT_ID);\n }", "title": "" }, { "docid": "dfd2b6e080b6a220172bd7464f427bd8", "score": "0.6184483", "text": "protected function isPerProjectInstallation()\n {\n return (bool) preg_match('/vendor\\/laravel\\/homestead/', __DIR__);\n }", "title": "" }, { "docid": "4ad99882c30ed58f7568160a2c6a0f7b", "score": "0.6170032", "text": "function isA($project_id = null){\n if($project_id !== null) $this->_project_id = $project_id;\n if(@$stmt = $this->mysqli->prepare(\"SELECT status_code, cancel FROM pending_projects WHERE project_id = ?\")){\n $stmt->bind_param('i', $this->_project_id);\n $stmt->execute();\n $stmt->store_result();\n if($stmt->num_rows === 1){\n $stmt->bind_result($status_code, $cancel);\n $stmt->fetch();\n if($this->getResultType($status_code, $cancel) === self::RT_PENDING) return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "ed9e613f8309746c94add2c458c2f0a3", "score": "0.612282", "text": "public function testCreateProject()\n {\n $basicDemographyProject = new RedCapProject(\n self::$config['api.url'],\n self::$config['basic.demography.api.token']\n );\n $this->assertNotNull($basicDemographyProject, \"Basic demography project not null.\");\n \n $longitudinalDataProject = new RedCapProject(\n self::$config['api.url'],\n self::$config['longitudinal.data.api.token']\n );\n $this->assertNotNull($longitudinalDataProject, \"Longitudinal data project not null.\");\n }", "title": "" }, { "docid": "4bdd091ff949ead5928b081f70e54135", "score": "0.6114392", "text": "public function getHasProjectsInProgressAttribute()\n {\n return Project::isNotEmptyAndArchived($this->projects);\n }", "title": "" }, { "docid": "5106925004775fc426943b23b9ca7fee", "score": "0.60728294", "text": "public function test_an_authenticated_user_can_view_their_single_project()\n {\n $user = factory(User::class)->create();\n // Who is logged in\n $this->signIn($user);\n // Who has a project\n $project = factory(Project::class)->create(['user_id' => $user->id]);\n // When we request the project\n $response = $this->get(route('projects.show', $project));\n // We should see it.\n $response->assertSee($project->title)->assertStatus(200);\n }", "title": "" }, { "docid": "3aee1ea60324f706ae54770e58d64e9b", "score": "0.6045351", "text": "public function oneProject(int $id){\n $list = $this->db->query(\"SELECT p.*,u.* FROM project p INNER JOIN util u ON p.utilidutil=u.idutil WHERE p.idproject=?\");\n $request = $this->db->prepare($list);\n $request->bindValue(1,$id,PDO::PARAM_INT);\n $request->execute();\n if($request->rowCount()){\n return $request->fetch(PDO::FETCH_ASSOC);\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "c2bb9363d91bd993227fce8cc886ba17", "score": "0.60432893", "text": "public function listProject(){\n $list = $this->db->query(\"SELECT * FROM project\");\n if($list->rowCount()){\n return $list->fetchAll(PDO::FETCH_ASSOC);\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "61780590fcc1e4dfcb71f6cc7e207c49", "score": "0.59784573", "text": "public function getProject();", "title": "" }, { "docid": "e7e99e97f5c79e3f2ca37bffb3181e95", "score": "0.5970176", "text": "public function isProjManagement($teamidList = NULL) {\n $project = ProjectCache::getInstance()->getProject($this->projectId);\n\n try {\n if (($project->isSideTasksProject($teamidList)) &&\n ($project->getManagementCategoryId() == $this->categoryId)) {\n\n self::$logger->debug(\"$this->bugId is a ProjectManagement task.\");\n return true;\n }\n } catch (Exception $e) {\n self::$logger->warn(\"isProjManagement(): \".$e->getMessage());\n throw $e;\n }\n return false;\n }", "title": "" }, { "docid": "5e75e4d4283f42d1a8aab0b5252b0f4c", "score": "0.59462905", "text": "public function authorize()\n {\n $project = Project::find($this->route('project'));\n // if project not exists\n if (! $project) {\n return false;\n }\n // if user is not owner of the project\n if ($project->owner->id !== auth()->user()->id) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "3e20f7d3a09e25a09328a126b2a3421c", "score": "0.5930413", "text": "private function checkProjectMember($projectId)\n {\n $userId = Authorizer::getResourceOwnerId();\n\n return $this->repository->hasMember($projectId, $userId);\n }", "title": "" }, { "docid": "700e27379c998704ad0cde97b8fd272e", "score": "0.59238434", "text": "function check_access_to_project( $p_project_id ) {\r\n\t\t$t_project_view_state = get_project_field( $p_project_id, 'view_state' );\r\n\r\n\t\t# Administrators ALWAYS pass.\r\n\t\tif ( get_current_user_field( 'access_level' ) >= ADMINISTRATOR ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t# public project accept all users\r\n\t\tif ( PUBLIC == $t_project_view_state ) {\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t# private projects require users to be assigned\r\n\t\t\t$t_project_access_level = get_project_access_level( $p_project_id );\r\n\t\t\t# -1 means not assigned, kick them out to the project selection screen\r\n\t\t\tif ( -1 == $t_project_access_level ) {\r\n\t\t\t\tprint_header_redirect( 'login_select_proj_page.php' );\r\n\t\t\t} else { # passed\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1e1873ccc5da8dd5c88600c0bcc4dcf7", "score": "0.59111893", "text": "private function checkProjectOwner($projectId)\n {\n $userId = Authorizer::getResourceOwnerId();\n\n return $this->repository->isOwner($projectId, $userId);\n }", "title": "" }, { "docid": "556bd3e5d0f3fe41eeac4ab2dee2fd15", "score": "0.5898738", "text": "public function get_project() {\n $this->verify_nonce( 'a2zpm_get_projects', $_POST['nonce'] );\n\n $project = new Projects();\n\n if ( ! empty( $_POST['id'] ) ) {\n $projects = $project->get_project( 'id', intval( $_POST['id'] ) );\n } else {\n $projects = $project->get_projects();\n }\n\n if ( is_wp_error( $projects ) ) {\n wp_send_json_error( $projects->get_error_messages() );\n }\n\n wp_send_json_success( $projects );\n }", "title": "" }, { "docid": "2b81bf28b68d2889aa635d42f055ed06", "score": "0.58765763", "text": "private function getProject()\n {\n //log_message('debug', \"function: \" . __FUNCTION__ . \" line: \". __LINE__);\n if (null !== $this->client) {\n $this->project = new \\Gitlab\\Model\\Project($this->config->item('git_project_id'), $this->client);\n }\n }", "title": "" }, { "docid": "aad5ac1ae05c6a41432000ab39e2530d", "score": "0.5874999", "text": "function project_check( $p_bug_id ) {\r\n\t\tglobal\t$g_project_cookie, $g_project_cookie_val, $g_view_all_cookie,\r\n\t\t\t\t$g_cookie_time_length, $g_cookie_path;\r\n\r\n\t\t$t_project_id = get_bug_field( $p_bug_id, \"project_id\" );\r\n\t\tif ( $t_project_id != $g_project_cookie_val ) {\r\n\t\t\tsetcookie( $g_project_cookie, $t_project_id, time()+$g_cookie_time_length, $g_cookie_path );\r\n\t\t\tsetcookie( $g_view_all_cookie, '' );\r\n\r\n\t\t\t$t_redirect_url = get_view_redirect_url( $p_bug_id, 1 );\r\n\t\t\tprint_header_redirect( $t_redirect_url );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "84ac88e5aae7d8b62afdf0789dc625e2", "score": "0.58516264", "text": "protected function validateProjectType() {\n if (isset($this->yaml['project']['type'])) {\n if ($this->yaml['project']['type'] !== 'git') {\n throw new BandaidError('UNKNOWN_PROJECT_TYPE', dt('Unknown project type in YAML file: \"@type\"', array('@type' => $this->yaml['project']['type'])));\n }\n return TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "3e06fddc22f08779bd920058fd20eef5", "score": "0.5849301", "text": "function isProjectTaskInfoPublic($project_task_id) {\n\t$res = db_query_params('SELECT group_project_id FROM project_task WHERE project_task_id=$1',\n\t\t\t array ($project_task_id)) ;\n\n\tif (!$res || db_numrows($res) < 1) {\n\t\treturn false;\n\t}\n\n\treturn RoleAnonymous::getInstance()->hasPermission('pm',\n\t\t\t\t\t\t\t db_result ($res, 0, 'group_project_id'),\n\t\t\t\t\t\t\t 'read') ;\n}", "title": "" }, { "docid": "a2207186592602e44961687302de9ad5", "score": "0.58409375", "text": "public function actionProject()\n {\n Project::syncBitbucket();\n return 0;\n }", "title": "" }, { "docid": "ef40ec7cd1fec16a0059a1a92f4d2b04", "score": "0.58348566", "text": "protected function _honeypotProjectCheck() {\n $api_key = JComponentHelper::getParams('com_comments')->get('honeypot_key');\n\n //if we dont have a api key, then we passed\n if (!$api_key) {\n return true;\n }\n\n // SBL check.\n $lookup = $api_key . '.' . $this->reverseIp($this->getClientIp()) . '.dnsbl.httpbl.org.';\n $result = gethostbyname($lookup);\n\n if ($result != $lookup) {\n $result = explode('.', $result);\n if ($result[0] == '127') {\n if ($result[3] >= 2) {\n return false;\n }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "b478e2a1cace7b0e22b5d8317966b85c", "score": "0.58342767", "text": "public function isActive() {\r\n\t\treturn $this->isActiveProject;\r\n\t}", "title": "" }, { "docid": "240b82c927e9e4bc967fe0154191bb91", "score": "0.5829253", "text": "public function show()\n\t{\n\t\ttry {\n\t\t\t$this->project->load('service.media', 'users', 'bid.user', 'contracts', 'history', 'messages.user');\n\t\t} catch ( \\Exception $e ) {\n\t\t\t$this->setError('Could not display the project.', 500);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->setSuccess('Displaying a project.', 200);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6cf64707ec4dfde9696b818ec582952e", "score": "0.5822109", "text": "public function belongsToProject($projectId = null)\n\t{\n\t\tif (!$projectId)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (!$this->masterExists())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif ($this->get('project_id') != $projectId)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3fbc77fb7f49dba188642cfe1e937528", "score": "0.5811145", "text": "public function addprojectAction()\n {\n $this->_helper->viewRenderer->setNoRender();\n $this->_helper->layout()->disableLayout();\n\n $project = new Sahara_Database_Record_Project();\n\n $success = true;\n $reason = '';\n\n /* Activity ID. */\n if (!($project->activity = $this->_request->getParam('activityID')))\n {\n $success = false;\n $reason = 'Parameter not supplied';\n }\n\n /* The Activity ID must be unique. */\n if (count(Sahara_Database_Record_Project::load(array('activity' => $project->activity))) != 0)\n {\n echo $this->view->json(array(\n 'success' => false,\n 'reason' => 'Activity ID is not unique'\n ));\n return;\n }\n\n /* User. */\n list($ns, $name) = explode(':', $this->_auth->getIdentity());\n if (!($project->user = Sahara_Database_Record_User::getLoginUser()))\n {\n $success = false;\n $reason = 'User not found.';\n }\n\n /* User class. */\n if (!($this->_request->getParam('userClass') &&\n $project->userClass = Sahara_Database_Record_UserClass::load($this->_request->getParam('userClass'))))\n {\n $success = false;\n $reason = 'Parameter not supplied or invalid.';\n }\n\n /* Project modifiers. */\n $project->is_open = $this->_request->getParam('openAccess') == 'true';\n $project->is_shared = $this->_request->getParam('shareCollection') == 'true';\n $project->auto_publish_collections = $this->_request->getParam('autoPublish') == 'true';\n\n /* Timestamps. */\n $project->creation_time = new DateTime();\n $project->last_update = new DateTime();\n\n /* Other metadata. */\n $definitions = Sahara_Database_Record_ProjectMetadataTypes::load();\n if (count($definitions) > 0)\n {\n foreach ($definitions as $def)\n {\n if ($this->_request->getParam($def->name) != null)\n {\n $metadata = new Sahara_Database_Record_ProjectMetadata();\n $metadata->type = $def;\n $metadata->value = $this->_request->getParam($def->name);\n $project->metadata = $metadata;\n\n /* If a metadata value validationr regex is stored, make sure the\n * value match the regex. */\n if ($def->regex && preg_match('/' . $def->regex . '/', $metadata->value) === 0)\n {\n $success = false;\n $reason = 'Value of metadata \\'' . $def->name . '\\' is not valid.';\n }\n }\n else if (!$def->is_optional)\n {\n $success = false;\n $reason = 'Missing metadata \\'' . $def->name . '\\'.';\n break;\n }\n }\n }\n\n /* Actually save the record. */\n if ($success)\n {\n try\n {\n $project->save();\n }\n catch (Sahara_Database_Exception $ex)\n {\n $this->_logger->error('Failed to add activity with error: ' . $ex->getMessage());\n $success = false;\n $reason = $ex->getMessage();\n }\n }\n\n echo $this->view->json(array('success' => $success, 'reason' => $reason));\n }", "title": "" }, { "docid": "1a2d0394ba57fdd50c45ef8a5f406c45", "score": "0.5809763", "text": "protected function createProj()\n {\n $this->data['channel'] = trim($this->data['channel'], '@# ');\n\n $newproj = Project::firstOrCreate(\n $this->data\n );\n\n if ($newproj) {\n $this->say('Проект успешно создан!');\n } else {\n $this->say('Не смог создать проект');\n }\n }", "title": "" }, { "docid": "d76ca667ba3516567086a19016552bc2", "score": "0.57822895", "text": "static function exists( $p_user_id, $p_project_id = ALL_PROJECTS ) {\n\t\tif( false === \\Core\\User\\Pref::cache_row( $p_user_id, $p_project_id, false ) ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "02c644d30cdfb5e272f332144dd59199", "score": "0.57636315", "text": "function projects()\n {\n global $con;\n\t\t$projects = array();\n\t\t$ok_or_failed = 'No projects currently accepted and running.';\n\t\t$today = time();\n\t\t//$sql = \"SELECT * FROM projects as p, projectbasics as pb WHERE pb.fundingStatus='r' AND p.published=1 AND p.accepted=1 AND FROM_UNIXTIME(projectEnd,'%Y-%m-%d')<='\".$today.\"' AND projectEnd!='0' AND projectEnd IS NOT NULL AND p.projectId=pb.projectId\";\n\t\t//skip requirement for published and accepted and running for early testing\n\t\t$sql = \"SELECT * FROM projects as p, projectbasics as pb WHERE pb.fundingStatus='r' AND projectStart <= \".$today.\" AND projectEnd >= \".$today.\" AND p.projectId=pb.projectId\";\n\t\tif (isset($_REQUEST['test']) && ($_REQUEST['test'] == 1)) {\n\t\t\t$sql = \"SELECT * FROM projects as p, projectbasics as pb WHERE p.published=1 AND p.accepted=0 AND pb.projectEnd > \".$today.\" AND p.projectId=pb.projectId\";\n\t\t}\n\t\t$projects_r=$con->recordselect($sql);\n\t\tif(mysql_num_rows($projects_r)>0) {\n\t\t\t$ok_or_failed = 'OK';\n\t\t\twhile($project=mysql_fetch_assoc($projects_r)) {\n\t\t\t\t$filtered = array();\n\t\t\t\tforeach($project as $key => $val) { // remove redundant array elements\n\t\t\t\t\tif (!is_numeric($key)) {\t\t\t // only leave those with key names\n\t\t\t\t\t\tif (in_array($key, array('fundingGoal','fundingStatus','projectCategory','projectEnd','projectId',\n\t\t\t\t\t\t\t\t\t'projectLocation','projectStart','projectTitle','shortBlurb',\n\t\t\t\t\t\t\t\t\t'userId','rewardedAmount'))) {\n\t\t\t\t\t\t\tif (($key == 'rewardedAmount') && ($val == '')) $val = 0; \n\t\t\t\t\t\t\t$filtered[$key] = $val;\n\t\t\t\t\t\t\tif (($key == 'projectCategory')) {\n\t\t\t\t\t\t\t\t// also get project name\n\t\t\t\t\t\t\t\tif (is_numeric($val) && ($val > 0)) {\n\t\t\t\t\t\t\t\t\t$category_rec=mysql_fetch_array($con->recordselect(\"SELECT `categoryName` FROM `categories` WHERE categoryId = '\".$val.\"'\"));\n\t\t\t\t\t\t\t\t\t$filtered['categoryName'] = (is_array($category_rec) && array_key_exists('categoryName',$category_rec)) ? $category_rec['categoryName'] : '';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$filtered['categoryName'] = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$qry1=$con->recordselect(\"SELECT * FROM `users` WHERE `userId` = \".$project['userId'].\" \");\n\t\t\t\t$valid_user=mysql_fetch_array($qry1);\t\n\t\t\t\t$filtered['name'] = $valid_user['name'];\n\t\t\t\t$picpath = (!empty($valid_user['profilePicture'])) ? $valid_user['profilePicture'] : 'images/site/no_image.jpg';\n\t\t\t\t$filtered['profilePicture'] = SITE_URL.$picpath;\n\t\t\t\t\n\t\t\t\t$sql = \"SELECT * FROM productimages WHERE projectId = \".$project['projectId'].\" AND approved = 1 \";\n\t\t\t\t$images_r=$con->recordselect($sql);\n\t\t\t\t$image_array = array();\n\t\t\t\tif(mysql_num_rows($images_r)>0) {\n\t\t\t\t\twhile($image=mysql_fetch_assoc($images_r)) {\n\t\t\t\t\t\t$filename = DIR_FS.$image['image700by370'];\n\t\t\t\t\t\tlist($width, $height) = getimagesize($filename); \n\t\t\t\t\t\t$image_array[] = array('url' => SITE_URL.$image['image700by370'], 'width' => $width, 'height' => $height, 'isVideo' => $image['isVideo']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sql = \"SELECT * FROM projectstory WHERE projectId = \".$project['projectId'].\" \";\n\t\t\t\t$story_r=$con->recordselect($sql);\n\t\t\t\tif(mysql_num_rows($story_r)>0) {\n\t\t\t\t\t$story=mysql_fetch_assoc($story_r);\n\t\t\t\t\tif ($story['projectVideo']!='') {\n\t\t\t\t\t\t$image_array[] = array('url' => $story['projectVideo'], 'width' => '480', 'height' => '360', 'isVideo' => 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$filtered['media'] = $image_array;\n\t\t\t\tarray_push($projects,$filtered);\n\t\t\t}\n\t\t} \n\t \n if ($ok_or_failed != 'OK') {\n\t\t\t$response_array = array('completion' => 'NOK', 'error' => $ok_or_failed);\n\t\t} else {\n\t\t\t$response_array = array('completion' => 'OK', 'content' => $projects);\n\t\t}\n\t\treturn $response_array;\n }", "title": "" }, { "docid": "3313931c0400a6c029b7cad5d8b792ae", "score": "0.57600874", "text": "public function testGetProjectTasks()\n {\n try {\n $projectTasks = $this->client->getProjectTasks(TESTS_PROJECT_ID);\n $this->assertTrue(is_array($projectTasks));\n if (empty($projectTasks))\n return;\n \n // check the first project task\n $this->assertTask($projectTasks[0], TESTS_PROJECT_ID);\n } catch (\\Cloudwords\\Exception $e) {\n $this->fail($e->getMessage());\n }\n \n return;\n }", "title": "" }, { "docid": "905fe41a928b568fc39bb814c4a83f98", "score": "0.5757842", "text": "protected function checkProject($identifier, $abort = true)\n {\n if (!$project = $this->projectsService->oneByIdentifier($identifier)) {\n return $abort ? abort(404) : false;\n }\n\n // check project status\n if ($project->isArchived()) {\n return $abort ? abort(403) : false;\n }\n\n // check module status for project\n if (!$this->enabledModulesService->check($project->id, $this->issuesService::MODULE_NAME)) {\n return $abort ? abort(403) : false;\n }\n\n if (!($group = $this->usersService->groupBots()) || !$this->projectsService->isMember($project->id, [$group->id])) {\n return $abort ? abort(403) : false;\n }\n\n return $project;\n }", "title": "" }, { "docid": "f8dee0815f51cf0c68782188eeb1b9fd", "score": "0.57430357", "text": "protected function validateProject()\n {\n return request()->validate([\n 'title' => ['required', 'min:3', 'max:255'],\n 'description' => ['required', 'min:3', 'max:255']\n ]);\n\n }", "title": "" }, { "docid": "fbfc482c9235bd8362659d6752ad1b5e", "score": "0.57402104", "text": "function project_includes_user( $p_project_id, $p_user_id ) {\n\tdb_param_push();\n\t$t_query = 'SELECT COUNT(*) FROM {project_user_list}\n\t\t\t\t WHERE project_id=' . db_param() . ' AND\n\t\t\t\t\t\tuser_id=' . db_param();\n\t$t_result = db_query( $t_query, array( $p_project_id, $p_user_id ) );\n\n\tif( 0 == db_result( $t_result ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "7052dba72898af4941a39e6296cb75bc", "score": "0.57396334", "text": "public function payment_supports_project($project_id)\n {\n $data = DB::select('select d_r.drive_id from projects as p inner join document_reference as d_r on p.id = d_r.project_id\n where d_r.project_id = ? and d_r.is_folder = true and d_r.name = \\'Contabilidad\\'',[$project_id]);\n return $data[0];\n }", "title": "" }, { "docid": "f9e6e1245a833aca7c1d85ad47af64f0", "score": "0.57325584", "text": "public function get_project($project_id, $retfields=null) {\n\t\t$db = GetGlobal('db');\n\t $UserName = GetGlobal('UserName');\n\t\tif ((!$UserName)||(!$project_id)) return false;\t\t\t\n\t\t$user = decode($UserName);\n\n\t\t$qf = $retfields ? ','.$retfields : null; \n\t\t$query = \"SELECT id{$qf} from projects WHERE id='{$project_id}'\";\n\t\t$result = $db->Execute($query,2);\n\t\t\n\t\tif ($result->fields['id'])\t{\n\t\t if ($retfields) {\n\t\t\t $retarray = array();\n\t\t\t $fx = explode(',',$retfields);\n\t\t\t foreach ($fx as $field)\n\t\t\t\t\t$retarray[$field] = $result->fields[$field];\t\n\t\t\t\treturn (array) $retarray;\t\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn true; //already in\n\t\t}\n\n return false;\t\t\n\t}", "title": "" }, { "docid": "00585b75a72b5c5dac29c57705c9fdf6", "score": "0.5730605", "text": "public function readProject()\n {\n $this->associate('Project', 'projects');\n $project = $this->find()?? null;\n if ($project) {\n return api(array('project' => $project));\n } else {\n return api(array('error' => true));\n }\n \n }", "title": "" }, { "docid": "8077f5b56d2f0cacde627d0d423ed6e4", "score": "0.5728348", "text": "abstract protected function getProjectName();", "title": "" }, { "docid": "e0b2a5d360d854c1e80b880d2d102f4f", "score": "0.5723695", "text": "protected function actWecactprj() {\r\n $lPid = $this->getParam('pid');\r\n\r\n $lCli = new CApi_Wec_Robot();\r\n $lCli->loadConfig();\r\n if (!$lCli -> login()) {\r\n return false;\r\n }\r\n $lCli->startProject($lPid);\r\n return TRUE;\r\n }", "title": "" }, { "docid": "0f87626de0602bc5569ce695da3fa104", "score": "0.5713441", "text": "public function user_in_projects_button($code=null) {\n\t $UserName = GetGlobal('UserName');\n\t if ((!$UserName)||(!$code)) return false;\n\t \n\t $prj = $this->user_in_projects();\n\t //print_r($prj);\n\t \n\t if (!empty($prj)) {\n\t\t\n\t\t/*if (count($prj)==1) { //one project button //get_href..NOT EXIST\n\t\t\t$mydate = time();//$block['start']; //is timestamp\n\t\t\t$pid = $prj[0]['id'];//$block['project'];\n\t\t\t$ptitle = $prj[0]['title'];//localize('_ADDCARTITEM',getlocal());//$block['ptitle'];\n\t\t\t$button = $this->get_href($mydate,$ptitle,null,$pid,$ptitle,$code);\t\t\n\t\t}\t\n\t\telse {//many projects ..select option\n\t\t*/\n\t\t $projects_label = localize('MGANTTI_DPC', getlocal());\n $mydate = time();\n\n\t\t\t$projects[0] = \"--{$projects_label}--\";\n\t\t\tforeach ($prj as $p=>$proj) {\n\t\t\t\t$pid = $proj['id'];\n\t\t\t\t$ptitle = $proj['title'];\n\t\t\t\t//$action = $this->get_href($mydate,null,null,$pid,$ptitle,$code,true);\n\t\t\t\t$projects[$pid] = $ptitle;\n }\n\t\t\t$combo = $this->make_combo('exchange_projects_for_'.$code,$projects,null,'cart_load_project');\t\t\t\n\t\t\treturn ($combo);\n\t\t//}\n\t\t\n //return ($button);\t\t\n\t }\t\n\t \n\t return false;\n\t}", "title": "" }, { "docid": "55a69353aac91e47d730977ac1a23eea", "score": "0.57120216", "text": "public function project_permission($project_id = null) {\n\t\tif(is_null($project_id)) {\n\t\t\t$project_id = Project::current()->id;\n\t\t}\n\n\t\tif($this->permission('project-all')) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif(Project\\User::check_assign($this->id, $project_id)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3bc058708b032d4bc58aff5eeaa2052c", "score": "0.570699", "text": "function project_access_check( $p_bug_id, $p_project_id=\"0\" ) {\r\n\t\tglobal\t$g_logout_page, $g_mantis_project_user_list_table,\r\n\t\t\t\t$g_mantis_project_table, $g_mantis_bug_table,\r\n\t\t\t\t$g_login_select_proj_page,\r\n\t\t\t\t$g_project_cookie_val;\r\n\r\n\t\tproject_check( $p_bug_id );\r\n\r\n\t\t# Administrators ALWAYS pass.\r\n\t\tif ( get_current_user_field( \"access_level\" ) >= ADMINISTRATOR ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t# access_level check\r\n\t\t$t_project_id = get_bug_field( $p_bug_id, \"project_id\" );\r\n\t\t$t_project_view_state = get_project_field( $t_project_id, \"view_state\" );\r\n\r\n\t\t# public project accept all users\r\n\t\tif ( PUBLIC == $t_project_view_state ) {\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t# private projects require users to be assigned\r\n\t\t\t$t_project_access_level = get_project_access_level( $t_project_id );\r\n\t\t\tif ( -1 == $t_project_access_level ) {\r\n\t\t\t\tprint_header_redirect( $g_login_select_proj_page );\r\n\t\t\t} else {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6f7567078a7197834ca5766dd525d02c", "score": "0.57008106", "text": "public function nottestAddProjectUnauthenticated()\n {\n $this->assertFalse($this->loginPage->addProject->displayed());\n }", "title": "" }, { "docid": "2179dbac1db390c05fbbd7f8e3e771c6", "score": "0.5693364", "text": "public function testCreateProjectForUser()\n {\n $this->actingAs(self::$user, 'api')\n ->json('POST', '/api/v1/projects', ['Name' => 'SuperProject',\n 'ProjectDescription' => 'SuperGreatProject'\n ])\n ->seeJson([\n 'SUT_id' => 1,\n 'Name' => 'SuperProject',\n 'ProjectDescription' => 'SuperGreatProject'\n ]);\n\n $this->seeInDatabase('SUT', [\n 'SUT_id' => 1,\n 'Name' => 'SuperProject',\n 'ProjectDescription' => 'SuperGreatProject'\n ]);\n\n }", "title": "" }, { "docid": "5c1173195d6578676a4d6eba1ff43ada", "score": "0.56838155", "text": "public function testGetProjectTasksWithStatusOpen()\n {\n $projectTasks = $this->client->getProjectTasksByStatus(TESTS_PROJECT_ID, 'open');\n $this->assertTrue(is_array($projectTasks));\n if (empty($projectTasks))\n return;\n \n // check the first project task\n $this->assertTask($projectTasks[0], TESTS_PROJECT_ID);\n }", "title": "" }, { "docid": "251ca0b645592656f5d8f5f8e9b5aa7d", "score": "0.5680392", "text": "public function hasBuild()\n {\n return ($this->build instanceof Build);\n }", "title": "" }, { "docid": "7193cefa60f4ebc2b0273247038617a2", "score": "0.5672079", "text": "public function chooseProject()\n\t{\n\t\tif(Auth::user()->type=='admin'){\n\t\t\t$projects=Project::where('done',0)->get();\n\t\t\t$array=['active'=>'emp','projects'=>$projects];\n\t\t\treturn view('production.allprojects',$array);\n\t\t}\n\t\telse\n\t\t\tabort('404');\n\t}", "title": "" }, { "docid": "8d151816190e9566f6358419d39b3222", "score": "0.5670074", "text": "public function isReadOnProjectAllowed ($projectId) {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t$userId = $db->esc($_SESSION['nobug'.RANDOMKEY.'userId']);\r\n\t\t$groupsSql = \"\";\r\n\t\t\r\n\t\t$groupsArray = $this->getAllGroups($userId);\r\n\t\t$groupCounter = count($groupsArray);\t\t\r\n\t\tfor ($x = 0; $x < $groupCounter; $x++)\r\n\t\t{\r\n\t\t\tif ($x == 0) {\r\n\t\t\t\t$groupsSql = $groupsSql . \"'\".$groupsArray[$x].\"'\";\r\n\t\t\t}\r\n\t\t\t$groupsSql = $groupsSql . \",'\".$groupsArray[$x].\"'\";\r\n\t\t}\r\n\t\t\r\n\t\t$allowedProjectsSql = \"SELECT * FROM project WHERE (group_read IN (\" . $groupsSql . \") OR group_write IN (\" . $groupsSql . \") OR group_admin IN (\" . $groupsSql . \"))\" .\r\n\t\t\t\t\t\t\t\t\" AND id = \" . $projectId;\r\n\t\t$query = $db->query($allowedProjectsSql);\r\n\t\tif ($query == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif ($query->num_rows == 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "bf4cf6ddbf735b4f505d54bee443a104", "score": "0.56620336", "text": "public function completeProjects()\n\t{\n\t\ttry {\n\t\t\t$this->projects = Project::where('started', true)\n\t\t\t\t\t\t\t\t\t ->where('service_end', '<', Carbon::now())\n\t\t\t\t\t\t\t\t\t ->get();\n\n\t\t\tforeach ( $this->projects as $project ) {\n\t\t\t\t$this->project = $project;\n\n\t\t\t\tif ( !$this->complete() ) throw new Exception;\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\t$this->setError('Could not fetch projects for completion.', 500);\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->setSuccess('Successfully marked projects that should be completed.', 200);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "803c1d0f8eda22db18e6de2d49bea64c", "score": "0.5647853", "text": "public function addTestProject()\n {\n $this->projectFormPage->name = 'Test Project';\n $this->projectFormPage->addMember('vera');\n $this->projectFormPage->addMember('admin');\n\n $project = $this->projectFormPage->submitProjectForm();\n\n $projectName = $project->name->text();\n $this->assertTrue($project->name->text() == 'Test Project');\n $this->assertTrue($project->memberCount->text() == 2);\n }", "title": "" }, { "docid": "7a5be50a45a315ab612e1dc4f6bc14e9", "score": "0.56458336", "text": "public function findOneProject($id){\n\t\t$project = $this->em->getRepository ('\\App\\Entity\\Project')->findOneById ( $id );\n\t\tif($project){\n\t\t\treturn $project;\n\t\t}else {\n\t\t\tthrow new \\Exception(\"This user doesn't exists\");\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "892f6ec7737c4be14b427515d03153da", "score": "0.5638674", "text": "function init_git_project() {\n $this->setProperty('project_name', '');\n $this->setProperty('makefile_url', '');\n $this->setProperty('project_type', '');\n $this->setProperty('install_profile', 'standard');\n $this->setProperty('domain_basename', '');\n $this->setProperty('web_server', '@server_master');\n $this->setProperty('db_server', '@server_localhost');\n\n // Specify that the following are subcontexts.\n $this->is_oid('db_server');\n $this->is_oid('web_server');\n }", "title": "" }, { "docid": "97ef976f55ab37262dfb40703b608c98", "score": "0.56288844", "text": "public function isAdminOnProjectAllowed ($projectId) {\r\n\t\t$db = new DB();\r\n\t\t$db->connect();\r\n\t\t$userId = $db->esc($_SESSION['nobug'.RANDOMKEY.'userId']);\r\n\t\t$groupsSql = \"\";\r\n\t\t\r\n\t\t$groupsArray = $this->getAllGroups($userId);\r\n\t\t$groupCounter = count($groupsArray);\t\t\r\n\t\tfor ($x = 0; $x < $groupCounter; $x++)\r\n\t\t{\r\n\t\t\tif ($x == 0) {\r\n\t\t\t\t$groupsSql = $groupsSql . \"'\".$groupsArray[$x].\"'\";\r\n\t\t\t}\r\n\t\t\t$groupsSql = $groupsSql . \",'\".$groupsArray[$x].\"'\";\r\n\t\t}\r\n\t\t\r\n\t\t$allowedProjectsSql = \"SELECT * FROM project WHERE (group_admin IN (\" . $groupsSql . \"))\".\r\n\t\t\t\t\t\t\t\t\" AND id = \" . $projectId;\r\n\t\t$query = $db->query($allowedProjectsSql);\r\n\t\tif ($query == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif ($query->num_rows != 1) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "93a4c8cfd6037ce09fe10c8af346db34", "score": "0.56238335", "text": "function exist() {\n\n return($this->getPackage() && !$this->getPackage()->isDeleted());\n\n }", "title": "" }, { "docid": "e880d44c4bed226bc76362284ebe4ad7", "score": "0.561823", "text": "public function testAddProject()\n {\n $this->loginPage->openLoginDialog();\n $this->loginPage->username = $this->p4users['vera']['User'];\n $this->loginPage->password = $this->p4users['vera']['Password'];\n $this->loginPage->submitLoginDialog();\n\n $this->projectFormPage = $this->loginPage->projectAdd();\n $this->verifyProjectForm();\n $this->addTestProject();\n }", "title": "" }, { "docid": "c25b9276fa23f8572633c254edb5a23c", "score": "0.56171334", "text": "public function deleteProjectById($pr_id)\n\t{\n\t\t$project = $this->getProjectById($pr_id);\n \t\tif( (false === $project) || !(is_object($project)) ){\n \t\t\treturn false;\n \t\t}\n\t\treturn (boolean) $project->delete();\n\t}", "title": "" }, { "docid": "81766d0e3ae740e03a6a860e5fabfe67", "score": "0.5616735", "text": "function plugin_chkVersion_nexproject() {\n global $_PRJCONF;\n return $_PRJCONF['version'];\n}", "title": "" }, { "docid": "079d65c7d613b0e0fe7d149f1888e58a", "score": "0.56023455", "text": "public function test_can_see_all_projects()\n {\n $this->withoutExceptionHandling(); //con este codigo nos muestra informacion más detallada del error\n\n $project = factory(Project::class)->create();\n\n $response = $this->get(route('projects.index')); //con esto hacemos el request a la ruta index\n\n $response->assertStatus(200); // Con esto indicamos que esperamos un codigo 200 que es un código de exito\n\n $response->assertViewIs('projects.index'); //con esto indicamos que esperamos la vista projects.index\n\n $response->assertViewHas('projects'); //con esto indicamos la variable que queremos recibir en la vista\n\n $response->assertSee($project->title); //Esperamos que en la vista se muestre el titulo del proyecto\n\n }", "title": "" }, { "docid": "9d4c913dd2851bbc75c76a55da383fe8", "score": "0.5595212", "text": "private function isOwner($projectId)\n {\n $userId = Authorizer::getResourceOwnerId(); \n return $this->repository->isOwner($projectId, $userId); \n }", "title": "" }, { "docid": "588153819f5b023f54e4930e1426dc74", "score": "0.5593092", "text": "public function test_an_authenticated_user_can_view_their_own_projects()\n {\n $user = factory(User::class)->create();\n // Who is logged in\n $this->signIn($user);\n // Who has 5 projects\n $projectForAuthenticatedUser = factory(Project::class)->create(['user_id' => $user->id]);\n $projectNotForAuthenticatedUser = factory(Project::class)->create(['user_id' => '9001']); // Over 9000!\n // When they visit the projects page\n $response = $this->get(route('projects.index'));\n // They should only see thier own projects\n $response->assertSee($projectForAuthenticatedUser->title);\n // and not other peoples\n $response->assertDontSee($projectNotForAuthenticatedUser->title);\n }", "title": "" }, { "docid": "589b737b1c4f37883596444f8a22260b", "score": "0.5584546", "text": "public static function getProjects();", "title": "" }, { "docid": "574e372da0356247a5cbc3942655e20d", "score": "0.5582174", "text": "function canAdd($user, $project) {\n return $user->isProjectLeader($project) || $user->isProjectManager();\n }", "title": "" }, { "docid": "cd52e14b9d177cfb00a80811625aae6f", "score": "0.5575185", "text": "protected function get_dependancies_exist() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "57b7fb02f4a171ed337c56b90523c18f", "score": "0.55706483", "text": "protected function actWecprj() {\r\n $lJid = $this -> getParam('jid');\r\n $lSrc = $this -> getParam('src');\r\n\r\n $lDraft = stristr($lJid, 'A') ? TRUE : FALSE;\r\n\r\n $lSql = new CCor_TblIte('al_job_arc_'.MID);\r\n $lSql -> addCnd('jobid='.esc($lJid));\r\n $lSql -> getIterator();\r\n $lRes = $lSql -> getDat();\r\n\r\n $lArchived = $lRes ? TRUE : FALSE;\r\n\r\n if (!$lDraft AND !$lArchived) {\r\n $lWec = new CApp_Wec($lSrc, $lJid);\r\n $lWecPrjId = $lWec -> createWebcenterProject();\r\n }\r\n\r\n return TRUE;\r\n }", "title": "" }, { "docid": "4b540e114543021d75ee9eb10ade5f61", "score": "0.5566191", "text": "protected function shouldStart()\n\t{\n\t\ttry {\n\t\t\t$this->project->load('users');\n\t\t} catch ( \\Exception $e ) {\n\t\t\t$this->setError('Could not load users when seeing if the project should start.', 500);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Loop through each user for the project.\n\t\tforeach ($this->project->users as $user) {\n\t\t\t// If one of them still haven't accepted we shouldn't start.\n\t\t\tif ( !$user->pivot->accepted ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8742e309438d093c17500c6744859f2f", "score": "0.55532795", "text": "function processProjectCreate($project)\n {\n if ($project->getConf()->getVal('scm') != 'mtn') {\n return;\n }\n\n if (Pluf::f('mtn_db_access', 'local') == 'local') {\n return;\n }\n\n // This guard cleans up on any kind of error, and here is how it works:\n // As long as the guard is not committed, it keeps a reference to\n // the given project. When the guard is destroyed and the reference\n // is still present, it deletes the object. The deletion indirectly\n // also calls into this plugin again, as the project delete hook\n // will be called, that removes any changes we've made during the\n // process.\n $projectGuard = new IDF_Plugin_SyncMonotone_ModelGuard($project);\n\n $projecttempl = Pluf::f('mtn_repositories', false);\n if ($projecttempl === false) {\n $this->_diagnoseProblem(\n __('\"mtn_repositories\" must be defined in your configuration file')\n );\n }\n\n $usher_config = Pluf::f('mtn_usher_conf', false);\n if (!$usher_config || !is_writable($usher_config)) {\n $this->_diagnoseProblem(\n __('\"mtn_usher_conf\" does not exist or is not writable')\n );\n }\n\n $mtnpostpush = realpath(dirname(__FILE__) . '/../../../scripts/mtn-post-push');\n if (!file_exists($mtnpostpush)) {\n $this->_diagnoseProblem(sprintf(\n __('Could not find mtn-post-push script \"%s\"'), $mtnpostpush\n ));\n }\n\n // check some static configuration files\n $confdir = Pluf::f('mtn_confdir', false);\n if ($confdir === false) {\n $confdir = dirname(__FILE__).'/SyncMonotone/';\n }\n $confdir_contents = array(\n 'monotonerc.in',\n 'remote-automate-permissions.in',\n 'hooks.d/',\n 'hooks.d/indefero_authorize_remote_automate.lua',\n 'hooks.d/indefero_post_push.conf.in',\n 'hooks.d/indefero_post_push.lua',\n );\n // enable remote command execution of read-only commands\n // only for public projects\n if (!$project->private) {\n // this is linked and not copied to be able to update\n // the list of read-only commands on upgrades\n $confdir_contents[] = 'hooks.d/indefero_authorize_remote_automate.conf';\n }\n\n // check whether we should handle additional files in the config directory\n $confdir_extra_contents = Pluf::f('mtn_confdir_extra', false);\n if ($confdir_extra_contents !== false) {\n $confdir_contents =\n array_merge($confdir_contents, $confdir_extra_contents);\n }\n foreach ($confdir_contents as $content) {\n if (!file_exists($confdir.$content)) {\n $this->_diagnoseProblem(sprintf(\n __('The configuration file \"%s\" is missing'), $content\n ));\n }\n }\n\n $shortname = $project->shortname;\n $projectpath = sprintf($projecttempl, $shortname);\n if (file_exists($projectpath)) {\n $this->_diagnoseProblem(sprintf(\n __('The project path \"%s\" already exists'), $projectpath\n ));\n }\n\n if (!@mkdir($projectpath)) {\n $this->_diagnoseProblem(sprintf(\n __('The project path \"%s\" could not be created'),\n $projectpath\n ));\n }\n\n //\n // step 1) create a new database\n //\n $dbfile = $projectpath.'/database.mtn';\n $cmd = sprintf('db init -d %s', escapeshellarg($dbfile));\n $this->_mtn_exec($cmd);\n\n //\n // step 2) create a server key\n //\n // try to parse the key's domain part from the remote_url's host\n // name, otherwise fall back to the configured Apache server name\n $server = $_SERVER['SERVER_NAME'];\n $remote_url = Pluf::f('mtn_remote_url');\n if (($parsed = parse_url($remote_url)) !== false &&\n !empty($parsed['host'])) {\n $server = $parsed['host'];\n }\n\n $serverkey = $shortname.'-server@'.$server;\n $cmd = sprintf('au generate_key --confdir=%s %s \"\"',\n escapeshellarg($projectpath),\n escapeshellarg($serverkey)\n );\n $this->_mtn_exec($cmd);\n\n //\n // step 3) create a client key, and save it in IDF\n //\n $keydir = Pluf::f('tmp_folder').'/mtn-client-keys';\n if (!file_exists($keydir)) {\n if (!@mkdir($keydir)) {\n $this->_diagnoseProblem(sprintf(\n __('The key directory \"%s\" could not be created'),\n $keydir\n ));\n }\n }\n\n $clientkey_name = $shortname.'-client@'.$server;\n $cmd = sprintf('au generate_key --keydir=%s %s \"\"',\n escapeshellarg($keydir),\n escapeshellarg($clientkey_name)\n );\n $keyinfo = $this->_mtn_exec($cmd);\n\n $parsed_keyinfo = array();\n try {\n $parsed_keyinfo = IDF_Scm_Monotone_BasicIO::parse($keyinfo);\n }\n catch (Exception $e) {\n $this->_diagnoseProblem(sprintf(\n __('Could not parse key information: %s'), $e->getMessage()\n ));\n }\n\n $clientkey_hash = $parsed_keyinfo[0][1]['hash'];\n $clientkey_file = $keydir . '/' . $clientkey_name . '.' . $clientkey_hash;\n $clientkey_data = file_get_contents($clientkey_file);\n\n $project->getConf()->setVal('mtn_client_key_name', $clientkey_name);\n $project->getConf()->setVal('mtn_client_key_hash', $clientkey_hash);\n $project->getConf()->setVal('mtn_client_key_data', $clientkey_data);\n\n // add the public client key to the server\n $cmd = sprintf('au get_public_key --keydir=%s %s',\n escapeshellarg($keydir),\n escapeshellarg($clientkey_hash)\n );\n $clientkey_pubdata = $this->_mtn_exec($cmd);\n\n $cmd = sprintf('au put_public_key --db=%s %s',\n escapeshellarg($dbfile),\n escapeshellarg($clientkey_pubdata)\n );\n $this->_mtn_exec($cmd);\n\n //\n // step 4) setup the configuration\n //\n\n // we assume that all confdir entries ending with a slash mean a\n // directory that has to be created, that all files ending on \".in\"\n // have to be processed and copied in place and that all other files\n // just need to be symlinked from the original location\n foreach ($confdir_contents as $content) {\n $filepath = $projectpath.'/'.$content;\n if (substr($content, -1) == '/') {\n if (!@mkdir($filepath)) {\n $this->_diagnoseProblem(sprintf(\n __('Could not create configuration directory \"%s\"'),\n $filepath\n ));\n }\n continue;\n }\n\n if (substr($content, -3) != '.in') {\n if (!@symlink($confdir.$content, $filepath)) {\n $this->_diagnoseProblem(sprintf(\n __('Could not create symlink for configuration file \"%s\"'),\n $filepath\n ));\n }\n continue;\n }\n\n $filecontents = file_get_contents($confdir.'/'.$content);\n $filecontents = str_replace(\n array('%%MTNPOSTPUSH%%', '%%PROJECT%%', '%%MTNCLIENTKEY%%'),\n array($mtnpostpush, $shortname, $clientkey_hash),\n $filecontents\n );\n\n // remove the .in\n $filepath = substr($filepath, 0, -3);\n if (@file_put_contents($filepath, $filecontents, LOCK_EX) === false) {\n $this->_diagnoseProblem(sprintf(\n __('Could not write configuration file \"%s\"'),\n $filepath\n ));\n }\n }\n\n //\n // step 5) read in and append the usher config with the new server\n //\n $usher_rc = file_get_contents($usher_config);\n $parsed_config = array();\n try {\n $parsed_config = IDF_Scm_Monotone_BasicIO::parse($usher_rc);\n }\n catch (Exception $e) {\n $this->_diagnoseProblem(sprintf(\n __('Could not parse usher configuration in \"%1$s\": %2$s'),\n $usher_config, $e->getMessage()\n ));\n }\n\n // ensure we haven't configured a server with this name already\n foreach ($parsed_config as $stanzas) {\n foreach ($stanzas as $stanza_line) {\n if ($stanza_line['key'] == 'server' &&\n $stanza_line['values'][0] == $shortname) {\n $this->_diagnoseProblem(sprintf(\n __('usher configuration already contains a server '.\n 'entry named \"%s\"'),\n $shortname\n ));\n }\n }\n }\n\n $new_server = array(\n array('key' => 'server', 'values' => array($shortname)),\n array('key' => 'local', 'values' => array(\n '--confdir', $projectpath,\n '-d', $dbfile,\n '--timestamps',\n '--ticker=dot'\n )),\n );\n\n $parsed_config[] = $new_server;\n $usher_rc = IDF_Scm_Monotone_BasicIO::compile($parsed_config);\n\n // FIXME: more sanity - what happens on failing writes? we do not\n // have a backup copy of usher.conf around...\n if (@file_put_contents($usher_config, $usher_rc, LOCK_EX) === false) {\n $this->_diagnoseProblem(sprintf(\n __('Could not write usher configuration file \"%s\"'),\n $usher_config\n ));\n }\n\n //\n // step 6) reload usher to pick up the new configuration\n //\n IDF_Scm_Monotone_Usher::reload();\n\n // commit the guard, so the newly created project is not deleted\n $projectGuard->commit();\n }", "title": "" }, { "docid": "ed71ae89a18c41827bbde297915db67d", "score": "0.55485123", "text": "public function projectAction(){\n\tif($this->_getParam('id',false)){\n\t\t$projects = new ResearchProjects();\n\t\t$this->view->projects = $projects->getProjectDetails($this->_getParam('id'));\n\t} else {\n\t\tthrow new Exception($this->_missingParameter);\n\t}\n }", "title": "" }, { "docid": "01699d73828b140b78eddbb39ad64781", "score": "0.5541243", "text": "function isCancelled(){\n if(@$stmt = $this->mysqli->prepare('SELECT COUNT(*) FROM pending_projects WHERE project_id = ? AND cancel = TRUE')){\n $stmt->bind_param('i', $this->_project_id);\n $stmt->execute();\n $stmt->store_result();\n $stmt->bind_result($count);\n $stmt->fetch();\n if($count == 1) return true;\n }\n return false;\n }", "title": "" }, { "docid": "a343e04efcd89a819079608d4ca9bb29", "score": "0.55299425", "text": "private function git_ready() {\n\t\tif( $this->is_initialized() === false ) {\n\t\t\treturn false;\n\t\t}\n\t\t// Make sure we have all of our repo data setup\n\t\tif( empty( parent::$plugin_settings['git_user'] ) || empty( parent::$plugin_settings['git_repo'] ) || empty( parent::$plugin_settings['api_key'] ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6fdf0a8698f4ca5a9ab20e42a74f494c", "score": "0.55208224", "text": "function project_is_name_unique( $p_name, $p_exclude_id = null ) {\n\tdb_param_push();\n\t$t_query = 'SELECT COUNT(*) FROM {project} WHERE name=' . db_param();\n\t$t_param = array( $p_name );\n\tif( $p_exclude_id ) {\n\t\t$t_query .= ' AND id <> ' . db_param();\n\t\t$t_param[] = (int)$p_exclude_id;\n\t}\n\t$t_result = db_query( $t_query, $t_param );\n\n\treturn 0 == db_result( $t_result );\n}", "title": "" }, { "docid": "0dd6e8024f257f97dfe840957c971ba3", "score": "0.55132914", "text": "function active_projects() {\n if(!$this->request->isAsyncCall()) {\n $this->redirectTo('projects');\n } // if\n \n $this->skip_layout = true;\n $this->smarty->assign('projects', Projects::findByUser($this->logged_user, array(PROJECT_STATUS_ACTIVE)));\n }", "title": "" }, { "docid": "c36204b6a882a0b636a1a3c65fab9968", "score": "0.55063343", "text": "public function actionCheckTasks()\n {\n $tasks = Task::getAll();\n if (is_null($tasks) || empty($tasks)) {\n echo \"There are no tasks!\\r\\n\";\n return false;\n }\n echo \"There are tasks!\\r\\n\";\n return true;\n }", "title": "" }, { "docid": "0264c7021b0b056c981af4f615890561", "score": "0.55029523", "text": "public function authorize() {\n $input = $this->all();\n $project = Project::findOrFail($input['project_id']);\n return $project->canAddTasks(Auth::user());\n }", "title": "" }, { "docid": "2da4d52824886312d53bd615c37b3145", "score": "0.5487847", "text": "function get_one_project($project_name){\n\n $query = $this->db->prepare(\"SELECT * FROM `Projects` WHERE `project_name` = :project_name\");\n\n try{\n $query->execute(array(':project_name' => $project_name));\n }\n catch (PDOEXCEPTION $e) {\n die($e->getMessage());\n }\n return $query->fetchALL();\n }", "title": "" } ]
471f68653331ef40cb57686adadc4f1a
addPath() Add path to repositories where Action_Helpers could be found.
[ { "docid": "0642d64345275f133a85aa716dbb80b5", "score": "0.5033882", "text": "static public function addPath($path, $prefix = 'Zend_Controller_Action_Helper')\n {\n self::getPluginLoader()->addPrefixPath($prefix, $path);\n }", "title": "" } ]
[ { "docid": "107c1106ad6aef93908eda28e725cd38", "score": "0.6458003", "text": "function _initActionHelpers(){\n Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers', 'My_Action_Helper');\n }", "title": "" }, { "docid": "3563b33a96365b879837b5c02e7e8833", "score": "0.6274688", "text": "public function addPath($path);", "title": "" }, { "docid": "3563b33a96365b879837b5c02e7e8833", "score": "0.6274688", "text": "public function addPath($path);", "title": "" }, { "docid": "234c432f0e314f3ac65dd17d5c343e8d", "score": "0.62728226", "text": "public function addHelperPath($path)\n\t{\n\t\t$this->addPath('helper', $path);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3de6835ab5294279a35de1840b2e5ace", "score": "0.59397095", "text": "function addLocations(){\n $l = $this->api->locate('addons', __NAMESPACE__, 'location');\n $addon = $this->api->locate('addons', __NAMESPACE__);\n $this->api->pathfinder->addLocation($addon, array(\n 'template' => 'templates',\n //'css' => 'templates/css',\n //'js' => 'js',\n ))->setParent($l);\n }", "title": "" }, { "docid": "1611c7440e6ce8116979138727e320ca", "score": "0.59093356", "text": "protected function _initViewHelperPaths()\n {\n \t$this->bootstrap('view');\n \t$view = $this->getResource('view');\n \t$view->addHelperPath(APPLICATION_PATH . '/../library/Application/Global/View/Helper', 'Application_Global_View_Helper_');\n }", "title": "" }, { "docid": "4627b1c12f48f293a730f4bdb2b683de", "score": "0.5845702", "text": "protected function loadActionHelpers()\n {\n Zend_Controller_Action_HelperBroker::addPath(\n APPLICATION_PATH . DIRECTORY_SEPARATOR . \"controllers\" . DIRECTORY_SEPARATOR . \"helpers\",\n \"Application_Controller_Helper_\"\n );\n }", "title": "" }, { "docid": "4bcbae002e8c12b1d0eaf344b0d7f8bc", "score": "0.57999915", "text": "private function addHelpers() {\n\n $this->info('Adding helpers to composer.json');\n\n $path = base_path('composer.json');\n $contents = file_get_contents($path);\n $manipulator = new JsonManipulator($contents);\n $jsonContents = $manipulator->getContents();\n $decoded = JsonFile::parseJson($jsonContents);\n $datas = isset($decoded['extra']['include_files']) ? $decoded['extra']['include_files'] : [];\n $value = 'vendor/mediactive-digital/medkit/src/helpers.php';\n\n foreach ($datas as $key => $entry) {\n\n if ($entry == $value) {\n\n $value = '';\n\n break;\n }\n }\n\n if ($value) {\n\n $datas[] = $value;\n $manipulator->addProperty('extra.include_files', $datas);\n $contents = $manipulator->getContents();\n\n file_put_contents($path, $contents);\n }\n else {\n\n $this->error(' #ERR1 [SKIP] ' . $path . ' already has helpers');\n }\n }", "title": "" }, { "docid": "4c134d1e429d48bb10bd7d6940b7a519", "score": "0.57956547", "text": "public function add_path($rel_path)\n\t{\n\t\treturn ninja::add_path($rel_path);\n\t}", "title": "" }, { "docid": "ddc6ce5c467b45d340a2a30555f6dfec", "score": "0.5691517", "text": "public static function add(&$path) {\n $path = preg_replace('/((?:^|\\\\/)[^\\\\/\\\\.]+?)$/isD', '$1/', $path);\n }", "title": "" }, { "docid": "9079fde5d698303be216814dc2bd6805", "score": "0.5540768", "text": "private function registerHelpers()\n {\n \tif (is_file(__DIR__.'/../helpers.php')) {\n \t\trequire_once __DIR__ . '/../helpers.php';\n\t }\n }", "title": "" }, { "docid": "23cf8088b0d4b9cdc008b23b6f346bbe", "score": "0.5514981", "text": "private static function helpers()\n {\n return 'App/Helpers/';\n }", "title": "" }, { "docid": "50bbd5c4536a6d269cac370c38b0644b", "score": "0.5485842", "text": "public function addPath($path)\n {\n $this->_paths[] = $path;\n }", "title": "" }, { "docid": "ac9a4ca516a821e2383f26e8c03e7466", "score": "0.54522187", "text": "public function addPath(string $patch, string $namespace = null): void;", "title": "" }, { "docid": "51d5bf29fe78cdf7370e8b243bdacdbe", "score": "0.54444844", "text": "protected function registerHelpers()\n {\n if (file_exists($file = __DIR__.'/Helpers/helpers.php')) {\n require $file;\n }\n }", "title": "" }, { "docid": "29705e37600f6ac69ff4434e44d0322e", "score": "0.5434203", "text": "public function getAdditionalSearchPath() {}", "title": "" }, { "docid": "2dfc53adedc5e42551eba1190c21c0b4", "score": "0.53823584", "text": "protected function registerHelpers()\n {\n require __DIR__.'/Support/helpers.php';\n }", "title": "" }, { "docid": "8da21d454959e9959a6dd7c7c8ffd578", "score": "0.52852094", "text": "public static function addPath( $path )\n\t{\n\t\t$path = rtrim($path, '/');\n\t\t$path = rtrim($path, '\\\\');\n\t\t$path .= DIRECTORY_SEPARATOR;\n\n\t\tif ( @!is_dir($path) ) {\n\t\t\trequire_once 'Mapper/Exception.php';\n\t\t\tthrow new Orm_Mapper_Exception(\"The path '$path' does not exist'\");\n\t\t}\n\n\t\tself::$_paths[$path] = $path;\n\t}", "title": "" }, { "docid": "1bd90cb27f15ddd18c5b5a79dc6c4748", "score": "0.52616733", "text": "function hook_admin_paths() {\n $paths = array(\n 'mymodule/*/add' => TRUE,\n 'mymodule/*/edit' => TRUE,\n );\n return $paths;\n}", "title": "" }, { "docid": "ddb6aac266955fdb1b616bfc311f0f31", "score": "0.524784", "text": "function goodcatch_laravel_modules_path ($append = '')\n {\n return goodcatch_vendor_path () . '/laravel-modules/src' . $append;\n }", "title": "" }, { "docid": "d48d810a2d377f5263e950a45c1b4884", "score": "0.52459455", "text": "static public final function appendPath($path)\n {\n\tif (!is_dir($path)) {\n \t throw new Exception(sprintf('Include path \"%s\" does not exists', $path));\n\t}\n\tself::$_paths[] = $path;\n }", "title": "" }, { "docid": "7e0ec1bd000a1fdafa43de5ebaf44f64", "score": "0.52344126", "text": "public function loadHelpers(){\n $this->file->require('vendor/helpers.php');\n }", "title": "" }, { "docid": "19f22a55292dd57bb0868f4a672c15c8", "score": "0.52333945", "text": "public function addPath($path)\n\t{\t\n\t\t$path = realpath($path);\n\t\tif (!$path) return $this;\n\n\t\tif (!$this->_init) $this->init();\n\n\t\t$this->_paths[$path] = $path;\n\t\t\n\t\t$this->_classes = array_merge($this->_classes,$this->getClasses($path));\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f23fd4bdc7c72938cf0a927f7f61bc0f", "score": "0.5226741", "text": "static function addPath(string $controllersFolder) {\n\t\t$_paths[] = $controllersFolder;\n\t}", "title": "" }, { "docid": "2e9e42b1bc60948e2b7ff8f38f3173ae", "score": "0.5223361", "text": "public function addPath($path, array $descriptions = null);", "title": "" }, { "docid": "7fa40d690116ac17d7e00b40c5d6d5cc", "score": "0.5154189", "text": "function addonsPath($path = '')\n {\n return dan()->make('path.addons').($path ? '/'.$path : null);\n }", "title": "" }, { "docid": "6214acbfba2ad6d3444bac85791ea729", "score": "0.51399094", "text": "public function helpers(){\n $path = app_path();\n $path = database_path();\n \n \n return $path;\n\n }", "title": "" }, { "docid": "142b4edb247eb95776c55d479ef1afe2", "score": "0.5128699", "text": "function addHelper() {\r\n $args = func_get_args();\r\n if(!is_array($args)) {\r\n return false;\r\n } // if\r\n \r\n foreach($args as $helper_name) {\r\n if(trim($helper_name) == '') {\r\n continue;\r\n } // if\r\n \r\n if(!in_array($helper_name, $this->helpers) && $this->engine->useHelper($helper_name)) {\r\n $this->helpers[] = $helper_name;\r\n } // if\r\n } // foreach\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "8e9af32c9938563dd15be3e964258170", "score": "0.5120766", "text": "public function add_path($path, $type = null) {\n\t\tis_null ( $type ) and $type = $this->_path_folders;\n\t\tempty ( $path ) and $path = DOCROOT;\n\t\t\n\t\tif (is_array ( $type )) {\n\t\t\tforeach ( $type as $key => $folder ) {\n\t\t\t\tis_numeric ( $key ) and $key = $folder;\n\t\t\t\t$folder = $this->_unify_path ( $path ) . ltrim ( $this->_unify_path ( $folder ), DS );\n\t\t\t\tarray_unshift ( $this->_asset_paths [$key], $folder );\n\t\t\t}\n\t\t} else {\n\t\t\t// create the asset type if it doesn't exist\n\t\t\tif (! isset ( $this->_asset_paths [$type] )) {\n\t\t\t\t$this->_asset_paths [$type] = array ();\n\t\t\t\t$this->_path_folders [$type] = $type . '/';\n\t\t\t}\n\t\t\t\n\t\t\t$path = $this->_unify_path ( $path );\n\t\t\tarray_unshift ( $this->_asset_paths [$type], $path );\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "280998b54afc8c33f2d9baf40d2c615a", "score": "0.5114094", "text": "private function loadHelpers() {\n\t\t\t// Helpers existentes no core.\n\t\t\t$core_helpers = array('Date','Html','Image','Text','Paginate');\n\n\t\t\t$this->helpers = array_merge($this->helpers, $this->config['default_helpers']);\n\t\t\t// Adiciona os helpers na view.\n\t\t\tforeach ($this->helpers as $helper) {\n\t\t\t\t$local = in_array($helper, $core_helpers) ? CORE : ROOT;\n\t\t\t\trequire $local.\"/helpers/\".$helper.\"Helper.php\";\n\t\t\t\t$class = $helper.'Helper';\n\t\t\t\t$this->add(strtolower($helper), new $class($this->i18n));\n\t\t\t}\n\n\t\t\t// Adiciona os helpers requeridos em outros helpers.\n\t\t\tforeach ($this->helpers as $helper) {\n\t\t\t\t$helper = $this->template->get(strtolower($helper));\n\t\t\t\tforeach ($helper->uses as $name) {\n\t\t\t\t\t$name = strtolower($name);\n\t\t\t\t\t$helper->$name = $this->template->get($name);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "357d6c973756fbec72d42e9cf23027ed", "score": "0.5098319", "text": "public function addPath($path, PackageReader $reader = null) {\n if (!isset($reader))\n $reader = true;\n $path = Paths::convertRealPath($path);\n $this->paths[$path] = $reader; \n }", "title": "" }, { "docid": "7c051954b8e554a08923b9309e2049bb", "score": "0.5080062", "text": "public function add($_path)\n {\n $shell_command = \"cd {$this->project_folder}\" . $this->command_separator;\n $shell_command .= \"{$this->path_to_git_bin} add --force {$_path} \" . self::GET_RESULT_DIRECTIVE;\n return shell_exec($shell_command);\n }", "title": "" }, { "docid": "d8111fbe2df8b0f2a767a34bd1125891", "score": "0.50726575", "text": "public function addPath(string $namespace, string $path = null):void;", "title": "" }, { "docid": "609fce32b31edcdc6c0cbe068bc6b97f", "score": "0.5064176", "text": "public function addViewPath($paths);", "title": "" }, { "docid": "814d97e30d37301b13ba0d7bd44bc24f", "score": "0.5064158", "text": "public static function GetHelpersDir () {\n\t\treturn static::$helpersDir;\n\t}", "title": "" }, { "docid": "e457181bb4397a930be16b6bcebfa601", "score": "0.5042443", "text": "function add_resource_dir($path,$url,$append_nc=true,$ext=false)\n{\n $url = buildQuery($url);\n if( !$ext ) $ext = RESOURCE_EXTENSIONS;\n $GLOBALS['CONFIG']['resources'][] = compact('ext','path','url','append_nc');\n}", "title": "" }, { "docid": "3c6ba9003d8fdaadfa219b5ab51bc164", "score": "0.5013568", "text": "protected function _initActionHelpers()\n {\n \\Zend_Controller_Action_HelperBroker::addPrefix('Gems_Controller_Action_Helper');\n }", "title": "" }, { "docid": "a57c238fe8aaba451460fea09f48e231", "score": "0.49878103", "text": "function includePathAdd($path) {\n\t\tRuntime::_requires('4.3.0', 'includePathAdd');\n\t\tif (empty($path)) return false;\n\t\t$paths = Runtime::includePaths();\n\t\tif (is_array($path)) {\n\t\t\t$paths = array_merge($paths, $path);\n\t\t} else {\n\t\t\t$paths[] = $path;\n\t\t}\n\t\tset_include_path(join(PATH_SEPARATOR, $paths));\n\t\treturn $paths;\n\t}", "title": "" }, { "docid": "99581b06efa1afe352625c0f3b8f7421", "score": "0.49677473", "text": "public function addPath($path)\n {\n $this->paths[] = $path;\n\n return true;\n }", "title": "" }, { "docid": "ccfe190329e20af0ab771050488826c3", "score": "0.49631897", "text": "static public function add_path($var,$path,$prepend_base = true) {\n $f3 = Base::instance();\n if ($f3->exists($var)) {\n $inc = $f3->get($var);\n } else {\n $inc = [];\n }\n if (!is_array($path)) $path = [ $path ];\n $base = $prepend_base ? $f3->get('BASE') : '';\n foreach ($path as $p) {\n $inc[$base.$p] = $base.$p;\n }\n $f3->set($var,$inc);\n }", "title": "" }, { "docid": "4f9c05138bcfc0ac95998077306406a2", "score": "0.4948696", "text": "function bf_get_dir( $append = '' ) {\n\n\t\treturn BF_PATH . $append;\n\t}", "title": "" }, { "docid": "237ab0f638f76e27fcf069b6699c75bb", "score": "0.49447364", "text": "protected function registerHelpers()\n {\n $helperSet = $this->getHelperSet();\n\n // Twig\n $twigBaseDirs = array(\n __DIR__ . '/../../../res/twig'\n );\n if (isset($this->config['twig']['baseDirs']) && is_array($this->config['twig']['baseDirs'])) {\n $twigBaseDirs = array_merge(array_reverse($this->config['twig']['baseDirs']), $twigBaseDirs);\n }\n $helperSet->set(new TwigHelper($twigBaseDirs), 'twig');\n\n foreach ($this->config['helpers'] as $helperName => $helperClass) {\n if (class_exists($helperClass)) {\n $helperSet->set(new $helperClass(), $helperName);\n }\n }\n }", "title": "" }, { "docid": "82bec12aa75f1641717def86dc05f67d", "score": "0.4937634", "text": "public function addEditorHelper($name, UploadEditorHelperInterface $helper);", "title": "" }, { "docid": "fb12818a52798ae66c06b3c0b1847284", "score": "0.4936507", "text": "public function configurePluginPath()\n {\n // follow links and do not recurse. No need to exclude VC because they do not end with *Plugin\n $finder = sfFinder::type('dir')->maxdepth(0)->ignore_version_control(false)->follow_link()->name('*Plugin');\n $dirs = array(\n sfConfig::get('sf_lib_dir').'/plugins',\n );\n\n foreach ($finder->in($dirs) as $path)\n {\n $this->setPluginPath(basename($path), $path);\n }\n }", "title": "" }, { "docid": "5bf9249f074c7a3b7340f73edbe25ea4", "score": "0.49233568", "text": "function joinPathComponents($pathStr, $addPath)\n{\n if (strcmp(substr($pathStr, -1), \"/\") != 0)\n $pathStr .= \"/\";\n\n return $pathStr . $addPath;\n}", "title": "" }, { "docid": "dee0ba05f86f22de8169c4d2acc0f89b", "score": "0.49198782", "text": "private function find_path () {\n\t\tglobal $db, $table_prefix, $cj_modules, $cj_error;\n\t\t//this is a pretend path and bears no relation to file location\n\t\t$path_prefix = \"/\";\n\t\t\n\t\t//check we are not on the default page\n\t\tif ($this->init_location[0] != \"\") {\n\t\t\t\n\t\t\t//inter through exploded path as chunks\n\t\t\tforeach ($this->init_location as $path_chunk) {\n\t\t\t\t\n\t\t\t\t//make sure we ignore special chunks, there might be more of these later (/login, /logout, /edit, /admin, etc)\n\t\t\t\tif ($path_chunk != \"debug\") {\n\t\t\t\t\t\n\t\t\t\t\t//check to see if chunk is a hook or indicating a module\n\t\t\t\t\t$check_hook = $this->check_if_hook($path_chunk, $path_prefix);\t\n\t\t\t\t\t\n\t\t\t\t\t//if a hook...\n\t\t\t\t\tif ($check_hook == FALSE) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($path_prefix != \"/\") $path_prefix .= \"/\";\n\t\t\t\t\t\tif ($path_chunk == \"login\") {\n\t\t\t\t\t\t\t$this->login = TRUE;\n\t\t\t\t\t\t} else if($path_chunk == \"logout\") {\n\t\t\t\t\t\t\t$this->logout = TRUE;\n\t\t\t\t\t\t} else {\t\t\t\t\t\t\n\t\t\t\t\t\t\t//add hook holder to imaginary path\n\t\t\t\t\t\t\t$path_prefix .= \"{%hook%}\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//add content of hook to hook array, later this will get passed to the selected module\n \t \t$this->hooks[] = $path_chunk;\n \t \n \t //or not a hook... \t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($path_prefix != \"/\") $path_prefix .= \"/\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t//add module indicator to imaginary path \n\t\t\t\t\t\t$path_prefix .= $path_chunk;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//check to see if the module exists and is loaded, (this will also be 'is enabled' later I think\n\t\t\t\t\t\tif(ISSET($cj_modules->m_list[$check_hook]['name'])){\n\t\t\t\t\t\t\tif ($path_chunk == \"login\") {\n\t\t\t\t\t\t\t\t$this->login = TRUE;\n\t\t\t\t\t\t\t} else if($path_chunk == \"logout\") {\n\t\t\t\t\t\t\t\t$this->logout = TRUE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//if parent is not defined then it's a primary or tertiary module and doesn't have a parent dependency\n\t\t\t\t\t\t\t//it may still have dependencies but I think it will be set up so that it won't 'enable' without \n\t\t\t\t\t\t\t//dependencies already installed. \n\t\t\t\t\t\t\tif (!ISSET($cj_modules->m_list[$check_hook]['parent'])) {\n\n\t\t\t\t\t\t\t\t//tertiaries won't be called from the address bar (or at least not directly), so this is a primary because it's not a secondary \n\t\t\t\t\t\t\t\t$this->primary = \t$check_hook;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//if it does have a parent we need to make sure that both parent and child module is loaded\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->primary = \t$cj_modules->m_list[$check_hook]['parent'];\n\t\t\t\t\t\t\t\t$this->secondary = \t$check_hook;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if we can't find module_id in database then the module clearly hasn't made it that far (installation failure)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//add to error log for debugging (other things might be going wrong(?) \n\t\t\t\t\t\t\t$cj_error->put_error(\"ERROR\", \"no module with id: \".$check_hook.\" could be found!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//not sure if this will be useful later on, but setting anyway for the time being (it's our imaginary path)\n\t\t$this->path_with_hooks = $path_prefix;\n\t\t\n\t\t//check to see if last chunk is \"/debug\" and if so set debug mode on.\n\t\tif ($this->init_location[count($this->init_location)-1] == \"debug\"){\n\t\t\t$this->debug_mode_on = TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "e74ddaa49b50299d9ca206ed9cb8ff27", "score": "0.49103412", "text": "protected function addViewsRepositoryToRootComposer()\n {\n $composer = json_decode(file_get_contents(base_path('composer.json')), true);\n\n $composer['repositories'][] = [\n 'type' => 'path',\n 'url' => './'.$this->relativeViewsPath(),\n ];\n\n file_put_contents(\n base_path('composer.json'),\n json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)\n );\n }", "title": "" }, { "docid": "ca074657eb0f46d070acf7d86cec3a0c", "score": "0.49082503", "text": "function le_admin_path_alias()\n{\n PathAlias::create([\n 'path' => '/node/add/webbuilder',\n 'alias' => '/webbuilders/neu',\n ])->save();\n\n PathAlias::create([\n 'path' => '/node/add/project',\n 'alias' => '/projects/neu',\n ])->save();\n\n PathAlias::create([\n 'path' => '/node/add/sponsor',\n 'alias' => '/sponsors/neu',\n ])->save();\n\n PathAlias::create([\n 'path' => '/node/add/partner',\n 'alias' => '/partners/neu',\n ])->save();\n\n PathAlias::create([\n 'path' => '/node/add/blog_article',\n 'alias' => '/blog-articles/neu',\n ])->save();\n}", "title": "" }, { "docid": "7a5d56b3031e588bb5e792460dd7e693", "score": "0.48998147", "text": "function addFile($path)\n {\n }", "title": "" }, { "docid": "e8bcaf30651875264fc85dd000aaf662", "score": "0.48953", "text": "function goodcatch_resource_path ($append = '')\n {\n return goodcatch_vendor_path ('/laravel-modules/resources') . $append;\n }", "title": "" }, { "docid": "a8b3ff0263b3e91a65ea6f59eb46cbda", "score": "0.488438", "text": "public function available_add($path, $handle='', $dependencies=[]){\n\t\t$path = Url::resolve_relative($path);\n\t\t$add = [$path, $handle, $dependencies];\n\t\tif($handle){\n\t\t\t$this->available[$handle] = &$add;\n\t\t}\n\t\t$this->available_paths[$path] = &$add;\n\t}", "title": "" }, { "docid": "09f59b4cdd1080f50e2b7784b7709b7e", "score": "0.48731044", "text": "public function addPathElement($path, $reset = false)\n {\n $elements = array();\n $path = ltrim($path, '/');\n if (strpos($path, '/') !== false) {\n $elements = explode('/', $path);\n } else {\n $elements[] = $path;\n }\n if ($reset) {\n $this->path = $elements;\n } elseif (!empty($this->path)) {\n $this->path = array_merge($this->path, $elements);\n } else {\n $this->path = $elements;\n }\n return $this;\n }", "title": "" }, { "docid": "5220dd90725915b37056d7e9d51ffd04", "score": "0.4870689", "text": "public function addByPath($asset_path){\n #i: Get asset container\n $asset = $this->parseAsset($asset_path);\n\n #i: Add object to collection\n $this->add($asset);\n }", "title": "" }, { "docid": "d91801caf615515743ec5f6faf1c85e0", "score": "0.48659483", "text": "public function addProtectedPath(string $path): self;", "title": "" }, { "docid": "870d9d2090775a7d5be3466b0e88f58a", "score": "0.48473957", "text": "public function addHelper($h) {\n $this->helpers .= '|' . $h;\n return $this;\n }", "title": "" }, { "docid": "3baaa2aec45f3cc9ee1b063d06f592a2", "score": "0.4837203", "text": "protected function setPath()\n {\n $this->path = (has_filter('sober/controller/path') ? apply_filters('sober/controller/path', rtrim($this->path)) : get_stylesheet_directory() . '/controllers');\n }", "title": "" }, { "docid": "cee999e2d8edb710cfa1beee7e62e653", "score": "0.48332345", "text": "public static function addContentTypeIncludePath($path = null)\r\n\t{\r\n\t\t// If the internal paths have not been initialised, do so with the base table path.\r\n\t\tif (empty(self::$_contentTypeIncludePaths))\r\n\t\t{\r\n\t\t\tself::$_contentTypeIncludePaths = JPATH_COMPONENT_ADMINISTRATOR . '/models/content_types';\r\n\t\t}\r\n\r\n\t\t// Convert the passed path(s) to add to an array.\r\n\t\tsettype($path, 'array');\r\n\r\n\t\t// If we have new paths to add, do so.\r\n\t\tif (!empty($path))\r\n\t\t{\r\n\t\t\t// Check and add each individual new path.\r\n\t\t\tforeach ($path as $dir)\r\n\t\t\t{\r\n\t\t\t\t// Sanitize path.\r\n\t\t\t\t$dir = trim($dir);\r\n\r\n\t\t\t\t// Add to the front of the list so that custom paths are searched first.\r\n\t\t\t\tif (!in_array($dir, self::$_contentTypeIncludePaths))\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_unshift(self::$_contentTypeIncludePaths, $dir);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn self::$_contentTypeIncludePaths;\r\n\t}", "title": "" }, { "docid": "2a48bd1429c4af52910485f229b51a3c", "score": "0.48330942", "text": "protected function _Load_Helpers() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/helpers');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_helper_init',$this);\r\n }", "title": "" }, { "docid": "32ceb32f1355ae35c30b5a585cdf20cc", "score": "0.48314148", "text": "protected function add()\n {\n// $this->addRoutes('posts', ['controller' => 'Posts', 'action' => 'index']);\n $this->addRoute('{controller}');\n $this->addRoute('{controller}/{action}');\n $this->addRoute('{controller}/{action}/{id:\\d+}');\n $this->addRoute('admin/{action}/{controller}');\n }", "title": "" }, { "docid": "bd28036e36da0514dddd5af03462ff21", "score": "0.48287526", "text": "protected function addPath($type, $path)\n\t{\n\t\t// Just force to array\n\t\tsettype($path, 'array');\n\n\t\t// Loop through the path directories\n\t\tforeach ($path as $dir)\n\t\t{\n\t\t\t// no surrounding spaces allowed!\n\t\t\t$dir = trim($dir);\n\n\t\t\t// Add trailing separators as needed\n\t\t\tif (substr($dir, -1) != DIRECTORY_SEPARATOR)\n\t\t\t{\n\t\t\t\t// Directory\n\t\t\t\t$dir .= DIRECTORY_SEPARATOR;\n\t\t\t}\n\n\t\t\t// Add to the top of the search dirs\n\t\t\tarray_unshift($this->_path[$type], $dir);\n\t\t}\n\t}", "title": "" }, { "docid": "827eb7025b6e16d912382e4955212ec5", "score": "0.4820217", "text": "static public function appendIncludePath($path)\r\n {\r\n \tset_include_path( \r\n \t\tget_include_path() . \r\n \t\t$path . PATH_SEPARATOR\r\n \t);\r\n }", "title": "" }, { "docid": "129ee0408d5073209d934309f2d23a21", "score": "0.48140028", "text": "protected function _initViewHelpers()\n {\n $this->bootstrap('layout');\n $layout = $this->getResource('layout');\n $view = $layout->getView();\n\n $view->addHelperPath(\"ZendX/JQuery/View/Helper\", \"ZendX_JQuery_View_Helper\");\n $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();\n $viewRenderer->setView($view);\n Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);\n }", "title": "" }, { "docid": "517cff0a1a1be1555d0f1be1a920da1a", "score": "0.47910428", "text": "protected function defineSitePath() {}", "title": "" }, { "docid": "2b1cb024c3bdbb7f7c8bb6ae1a0c8501", "score": "0.47685486", "text": "function goodcatch_vendor_path ($append = '')\n {\n return base_path () . '/vendor/goodcatch' . $append;\n }", "title": "" }, { "docid": "0a83d18cad0330f63a1072141569996e", "score": "0.47581652", "text": "protected abstract function getPath();", "title": "" }, { "docid": "05334dbec511bc7212fdd06e47c84947", "score": "0.47532743", "text": "public function add($path = '')\n\t{\n\t\tif (config_item('enable_hooks') !== FALSE) \n\t\t{\n\t\t\t$path = rtrim($path, '/');\n\n\t\t\tif (file_exists($path.'/config/hooks.php')) \n\t\t\t{\n\t\t\t\tinclude($path.'/config/hooks.php');\n\t\t\t}\t\n\t\t\tif (file_exists($path.'/config/'.ENVIRONMENT.'/hooks.php'))\n\t\t\t{\n\t\t\t\tinclude($path.'/config/'.ENVIRONMENT.'/hooks.php');\n\t\t\t}\n\t\t\t// If there are no hooks, we're done.\n\t\t\tif ( ! isset($hook) OR ! is_array($hook))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Name collisions\n\t\t\t$this->hooks = array_merge_recursive($hook, $this->hooks);\n\t\t\treturn $this->enabled = TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "6f71056d895a4600d61b953027474781", "score": "0.47532627", "text": "protected function bindPathsInContainer()\n {\n// $this->instance('path', $this->path());\n //$this->instance('path.base', $this->basePath());\n // $this->instance('path.lang', $this->langPath());\n // $this->instance('path.config', $this->configPath());\n // $this->instance('path.public', $this->publicPath());\n // $this->instance('path.storage', $this->storagePath());\n // $this->instance('path.database', $this->databasePath());\n // $this->instance('path.resources', $this->resourcePath());\n // $this->instance('path.bootstrap', $this->bootstrapPath());\n }", "title": "" }, { "docid": "9a7d3e4d7c52c4418796634ad220acea", "score": "0.47531322", "text": "function path($path='') {\n return $this->base_dir . $path;\n }", "title": "" }, { "docid": "3f49f27250b009ad51ba04b4adb1df7c", "score": "0.47343615", "text": "public function addPath($path, $namespace = null)\n {\n $this->paths[$namespace] = $path;\n\n $viewRegistry = $this->renderer->getViewRegistry();\n $viewRegistry->appendPath($path);\n\n $layoutRegistry = $this->renderer->getLayoutRegistry();\n $layoutRegistry->appendPath($path);\n }", "title": "" }, { "docid": "918d1de4f797a682e2a10e913c33824c", "score": "0.4724228", "text": "function set_path($path, $value)\n{\n\t$GLOBALS['laravel_paths'][$path] = $value;\n}", "title": "" }, { "docid": "27d1accef48abde75568f033fee23ca8", "score": "0.47238097", "text": "function classpath_add($path, $recursive=true, $part=false)\n{\n\tglobal $CONFIG;\n\tsystem_ensure_path_ending($path,true);\n\tif( !$part )\n\t\t$part = $CONFIG['system']['application_name'];\n\t$CONFIG['class_path'][$part][] = $path;\n\tif( !in_array($part, $CONFIG['class_path']['order']) )\n\t\t$CONFIG['class_path']['order'][] = $part;\n\t\t\t\n\tif( $recursive && is_dir($path) )\n\t{\n\t\tforeach( system_glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT) as $sub )\n\t\t\tclasspath_add($sub, true, $part);\n\t}\n}", "title": "" }, { "docid": "44114ab677a958c5fae6dc8040c8cba8", "score": "0.472131", "text": "private function loadHelpers()\n {\n foreach($this->helpers as $helper)\n {\n require app_path() . '/' . $helper;\n }\n }", "title": "" }, { "docid": "cbbd113140b9c2a6414b5e7fc4974641", "score": "0.47205606", "text": "public function addPath($path)\n {\n\n $this->options['paths'][] = $path;\n\n return $this;\n }", "title": "" }, { "docid": "5efc7b67eb2c1e1d471c4272030f7c5a", "score": "0.47164944", "text": "protected function _setupJsHelpers() {\n /**\n * @var AssetBlock $block\n */\n $block = $this->assets[$this->settings['jsHelpersBlock']];\n\n $collection = $block->getCollection();\n\n foreach (array_reverse($this->jsHelpers) as $path) {\n $collection->insert(new JsAsset($path));\n }\n\n $globals = [\n '$css.path' => '/css/',\n '$script.path' => '/js/'\n ];\n\n foreach ($globals as $name => $val) {\n $collection->insert(new JsGlobalAsset($name, $val));\n }\n }", "title": "" }, { "docid": "210e8bb7b5427a1b2b35f848210b3431", "score": "0.4716308", "text": "abstract protected function setupInstallPaths();", "title": "" }, { "docid": "cb8db27dd5bd667fe75493c2101d42d2", "score": "0.47161037", "text": "public function withPath($path)\n {\n }", "title": "" }, { "docid": "23f5e39fe93235494e51e4701894576f", "score": "0.47156006", "text": "public function set_package_path()\n\t{\n\t\t$module_path=$this->_ci->config->item('module_path');\n\t\t$this->_ci->load->set_package_path($module_path.'/'.$this->type.'/'.$this->key);\n\t}", "title": "" }, { "docid": "e38e13081a21042bd6999cf5bb78babf", "score": "0.47153795", "text": "public static function SetHelpersDir ($helpersDir = 'Helpers') {\n\t\treturn static::$helpersDir = $helpersDir;\n\t}", "title": "" }, { "docid": "60709a371a6d99ef88c4ed26fb5a4130", "score": "0.47104344", "text": "public function withPath($path);", "title": "" }, { "docid": "707b11f57df87d1e20a37089c4e2503a", "score": "0.47049692", "text": "function MyMod_Setup_Path()\n {\n $path=$this->ApplicationObj()->MyApp_Setup_Path();\n\n if (\n !empty($this->ModuleName)\n &&\n !empty($this->ApplicationObj()->SubModulesVars[ $this->ModuleName ])\n )\n {\n $path.= \n \"/\".\n preg_replace\n (\n '/\\.php$/',\n \"\",\n $this->ApplicationObj()->SubModulesVars[ $this->ModuleName ][ 'SqlFile' ]\n );\n }\n\n return $path;\n }", "title": "" }, { "docid": "132b7828230c87e39547c221d5560310", "score": "0.46938825", "text": "public function addExtHelpers()\n\t{\n\t\t# site-context-dependent JS support file for Extjs\n\t\t$render = $this->getTemplate('izomi_extjs_helpers');\n\t\treturn $render;\n\t}", "title": "" }, { "docid": "8701190f9196dccec4fc391d460f27e3", "score": "0.46891516", "text": "public static function addBasePath($base_path) {\n $base_path = rtrim($base_path, '/');\n\n self::$base_path[] = $base_path;\n }", "title": "" }, { "docid": "bfa6964a102120c49353b3660c23848a", "score": "0.46840116", "text": "abstract public function path($path = null);", "title": "" }, { "docid": "4966a715b72412ec6f18078e0d6c2e38", "score": "0.46812162", "text": "public function onMigrationPath($to_host, $path) {\nglobal $_LW;\nreturn $path; // make any changes and then return the updated path\n}", "title": "" }, { "docid": "4db1dae1f6534e79ea151ddf77b9767a", "score": "0.4680068", "text": "function addImage($path);", "title": "" }, { "docid": "889d03eab835eba79ced4baf571c0042", "score": "0.46778426", "text": "protected function setModulePath()\n {\n $this->path = __DIR__;\n }", "title": "" }, { "docid": "137053a075b0cf889f96ab1b642d0b71", "score": "0.46743065", "text": "public static function plugin_path($path)\n {\n }", "title": "" }, { "docid": "6bf15fed41fd3609ce259d1ed8fb11fa", "score": "0.46727088", "text": "public function addModuleDirectory($path) {\r\n\t\t$path = realpath($path);\r\n\t\tif (!is_dir($path)) throw new Exception('module path err!');\r\n\t\t\r\n\t\t$dh = opendir($path);\r\n while (($file = readdir($dh)) !== false) {\r\n if ('.' == $file || '..' == $file || !is_dir($path . DIRECTORY_SEPARATOR. $file)) {\r\n \tcontinue;\r\n }\r\n $module = $file;\r\n\t\t\t$moduleDir = $path . DIRECTORY_SEPARATOR. $file . DIRECTORY_SEPARATOR . $this->getModuleControllerDirectoryName();\r\n\t\t\t$this->addControllerDirectory($moduleDir, $module);\r\n }\r\n closedir($dh);\r\n\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "76d9a3cc6af0961cc5923d9f4b959def", "score": "0.46674526", "text": "static public function addHelper(Zend_Controller_Action_Helper_Abstract $helper)\n {\n self::getStack()->push($helper);\n return;\n }", "title": "" }, { "docid": "140b2af73e06e7bce294548d583a8bbe", "score": "0.4651955", "text": "public function addAction(){\n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t}", "title": "" }, { "docid": "e962622be4a3d75e36bccfb330495f2a", "score": "0.46503413", "text": "public function addFieldPath($new = null)\n\t{\n\t\treturn JFormHelper::addFieldPath($new);\n\t}", "title": "" }, { "docid": "d75e46c69f15cfc998dc53da67d7f160", "score": "0.4635641", "text": "public function addPath($path, $namespace = '', $prepend = FALSE) {\n if ($prepend === TRUE) {\n return $this->prependPath($path, $namespace);\n } else {\n if (!empty($namespace)) {\n $path = array (\n $path, str_replace('_', '/', $namespace)\n );\n } \n $this->paths []= $path;\n }\n return $this;\n }", "title": "" }, { "docid": "6f69901b10cf610198c22329602f4c01", "score": "0.46345717", "text": "function _initViewHelpers()\n {\n // defined in /config/application.ini\n $this->bootstrap('layout');\n $layout = $this->getResource('layout');\n $view = $layout->getView();\n $view->addHelperPath(APPLICATION_PATH . '/common/helpers', 'My_View_Helper');\n $view->addHelperPath(APPLICATION_PATH . '/controllers/helpers', 'My_Action_Helper');\n //$view->addHelperPath(APPLICATION_PATH .'/view/helpers', '');\n\n //enable Zend JQuery\n ZendX_JQuery::enableView($view);\n\n // use zend helpers to generate meta tags\n $view->doctype('HTML4_STRICT');\n $view->headMeta()->appendHttpEquiv('Content-type', 'text/html;charset=utf-8')\n ->appendName('description', 'FACES');\n\n // use zend helpers to seperate major and minor titles\n $view->headTitle()->setSeparator(' - ');\n $view->headTitle('FACES');\n }", "title": "" }, { "docid": "5a64ae5046e957650e0056710cd42a4c", "score": "0.4634122", "text": "public function addBasePath($path, $classPrefix = 'Zend_View');", "title": "" }, { "docid": "e22a59fd2efb7a270894a1cc61571576", "score": "0.4623985", "text": "public function setPath($name = null, $_path, $appBaseDir = false){\n return $this->_getObjectPath()->addPath($name, $_path, $appBaseDir);\n }", "title": "" }, { "docid": "e28eef17c76b17fc1ce6d588a9f3fad2", "score": "0.46206218", "text": "public function addControllerDirectory($path, $name)\r\n {\r\n $this->_frontController->addControllerDirectory($path, $name);\r\n }", "title": "" }, { "docid": "bca697b98b46d18c24be03836d466039", "score": "0.46183816", "text": "protected function replaceHelpersFile(string $content): void\n {\n $this->files->replace($this->config['file_path'], $content);\n }", "title": "" }, { "docid": "59065a755e3014efae216a66ba148e5d", "score": "0.4617102", "text": "abstract public function getPath();", "title": "" }, { "docid": "59065a755e3014efae216a66ba148e5d", "score": "0.4617102", "text": "abstract public function getPath();", "title": "" }, { "docid": "582564ebaf970e7699ddfe6dfde49dbd", "score": "0.4616041", "text": "public function add($path, $handle=false, $dependencies=[]){\n\t\tUrl::resolve_relative($path);\n\t\tif($this->check_added_path($path)){\n\t\t\treturn false;\n\t\t}\n\t\tforeach($dependencies as $dependency){\n\t\t\tif(!$this->check_added($dependency)){\n\t\t\t\t$this->add_from_available($dependency);\n\t\t\t}\n\t\t}\n\n\t\t$add = [$path, $handle, $dependencies];;\n\t\t$this->added[] = &$add;\n\t\t$this->added_paths[$add[0]] = &$add;\n\t\tif($handle){\n\t\t\t$this->added_handles[$add[1]] = &$add;\n\t\t}\n\t}", "title": "" } ]
830be66a11d9c48bb1bab3d4e641a591
Gets an array of EmailTemplate objects which contain a foreign key that references this object. If this collection has already been initialized with an identical Criteria, it returns the collection. Otherwise if this Person has previously been saved, it will retrieve related EmailTemplates from storage. If this Person is new, it will return an empty collection or the current collection, the criteria is ignored on a new object.
[ { "docid": "468568e6c555624b6205be64059fc52a", "score": "0.7484462", "text": "public function getEmailTemplates($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collEmailTemplates === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collEmailTemplates = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(EmailTemplatePeer::PERSON_ID, $this->id);\n\n\t\t\t\tEmailTemplatePeer::addSelectColumns($criteria);\n\t\t\t\t$this->collEmailTemplates = EmailTemplatePeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(EmailTemplatePeer::PERSON_ID, $this->id);\n\n\t\t\t\tEmailTemplatePeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastEmailTemplateCriteria) || !$this->lastEmailTemplateCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collEmailTemplates = EmailTemplatePeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastEmailTemplateCriteria = $criteria;\n\t\treturn $this->collEmailTemplates;\n\t}", "title": "" } ]
[ { "docid": "7557c7ac8dff58a07c6432576d06e39f", "score": "0.56942505", "text": "static function listTemplates() {\n $query = EmailmarketingTemplates::select('et.id as id', 'et.name as name', 'et.from as emailfrom', 'et.to as emailto')\n ->from('template_emails as et');\n $result = $query->get()->toArray();\n if (count($result) > 0) return $result;\n return array();\n }", "title": "" }, { "docid": "3e46c37a72ce938551e81f5c6fc19415", "score": "0.5586938", "text": "function get_emails()\n\t{\n\t\t// First, get the list of IDs.\n\t\t$query = \"SELECT id from emails where parent_id='$this->id' AND deleted=0\";\n\n\t\treturn $this->build_related_list($query, new Email());\n\t}", "title": "" }, { "docid": "7d20df6b6bf13dc920630f8a9f2e06a4", "score": "0.55101055", "text": "public function loadTemplates()\n {\n $this->templates = SL::getCollectionTemplates($this->uid);\n\n return $this->templates;\n }", "title": "" }, { "docid": "852d6eb1559d27f1006af078bfc6d8aa", "score": "0.54797024", "text": "public function getEmailListPersons($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collEmailListPersons === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collEmailListPersons = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(EmailListPersonPeer::PERSON_ID, $this->id);\n\n\t\t\t\tEmailListPersonPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collEmailListPersons = EmailListPersonPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(EmailListPersonPeer::PERSON_ID, $this->id);\n\n\t\t\t\tEmailListPersonPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastEmailListPersonCriteria) || !$this->lastEmailListPersonCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collEmailListPersons = EmailListPersonPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastEmailListPersonCriteria = $criteria;\n\t\treturn $this->collEmailListPersons;\n\t}", "title": "" }, { "docid": "188be9a858974feb47236a7e448b2dc2", "score": "0.5428564", "text": "public function templates()\n {\n return $this->hasMany('App\\UserFormTemplate');\n }", "title": "" }, { "docid": "8157f2b2dbc30b86a12c0d839c1c5032", "score": "0.52407396", "text": "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = OrderTemplateItemPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "title": "" }, { "docid": "0be9e7c3822c5b95c03b5cfa082a40e5", "score": "0.5193254", "text": "public function template()\n {\n \treturn $this->hasMany(SMSTemplate::class, \"account_id\", \"id\");\n }", "title": "" }, { "docid": "e089bb90be7bf960b3ec44a11adc0de1", "score": "0.50926554", "text": "public function getEmailsSubscribes()\n {\n return $this->hasMany(EmailsSubscribes::className(), ['sid' => 'id']);\n }", "title": "" }, { "docid": "01488825be430bb17bd9d4f46b3b6622", "score": "0.5069313", "text": "public function getActiveInvoiceTemplateEntries()\n\t{\n\t\ttry {\n\t\t\treturn $this->soap->getActiveInvoiceTemplateEntries($this->sessionId);\n\t\t} catch (Exception $e) {\n\t\t\t$this->_handleException($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "2fda46de5b23363233ef9919cecbaf28", "score": "0.5010048", "text": "public function getEntityCollection()\n {\n $entityModel = $this->entityFactory->create();\n return $entityModel->getCollection();\n }", "title": "" }, { "docid": "e5e74e967c047091fe1a935b3e2f14fd", "score": "0.4986541", "text": "public function geContactPersonTemplates()\n {\n return $this->getTemplateGroup('contact_person_');\n }", "title": "" }, { "docid": "95fc8e2e887f3f39845c845142048ad6", "score": "0.49691048", "text": "public function templatesGet()\n\t{\n\t\treturn $this->templates;\n\t}", "title": "" }, { "docid": "2d0e240da769488740d370ed85432d2b", "score": "0.49548396", "text": "public function getVictimMailingss(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collVictimMailingssPartial && !$this->isNew();\n if (null === $this->collVictimMailingss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collVictimMailingss) {\n // return empty collection\n $this->initVictimMailingss();\n } else {\n $collVictimMailingss = ChildVictimMailingsQuery::create(null, $criteria)\n ->filterByMailing($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collVictimMailingssPartial && count($collVictimMailingss)) {\n $this->initVictimMailingss(false);\n\n foreach ($collVictimMailingss as $obj) {\n if (false == $this->collVictimMailingss->contains($obj)) {\n $this->collVictimMailingss->append($obj);\n }\n }\n\n $this->collVictimMailingssPartial = true;\n }\n\n return $collVictimMailingss;\n }\n\n if ($partial && $this->collVictimMailingss) {\n foreach ($this->collVictimMailingss as $obj) {\n if ($obj->isNew()) {\n $collVictimMailingss[] = $obj;\n }\n }\n }\n\n $this->collVictimMailingss = $collVictimMailingss;\n $this->collVictimMailingssPartial = false;\n }\n }\n\n return $this->collVictimMailingss;\n }", "title": "" }, { "docid": "dbecba04d9c8adee313803231179fe9d", "score": "0.49225608", "text": "public function getEmailQueues($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collEmailQueues === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collEmailQueues = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(EmailQueuePeer::PERSON_ID, $this->id);\n\n\t\t\t\tEmailQueuePeer::addSelectColumns($criteria);\n\t\t\t\t$this->collEmailQueues = EmailQueuePeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(EmailQueuePeer::PERSON_ID, $this->id);\n\n\t\t\t\tEmailQueuePeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastEmailQueueCriteria) || !$this->lastEmailQueueCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collEmailQueues = EmailQueuePeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastEmailQueueCriteria = $criteria;\n\t\treturn $this->collEmailQueues;\n\t}", "title": "" }, { "docid": "0aae95befcae1cc6195a2cc155f4954e", "score": "0.49102977", "text": "public function getPgs($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif(null === $this->collPgs || null !== $criteria) {\n\t\t\tif ($this->isNew() && null === $this->collPgs) {\n\t\t\t\t// return empty collection\n\t\t\t\t$this->initPgs();\n\t\t\t} else {\n\t\t\t\t$collPgs = PgQuery::create(null, $criteria)\n\t\t\t\t\t->filterByIgreja($this)\n\t\t\t\t\t->find($con);\n\t\t\t\tif (null !== $criteria) {\n\t\t\t\t\treturn $collPgs;\n\t\t\t\t}\n\t\t\t\t$this->collPgs = $collPgs;\n\t\t\t}\n\t\t}\n\t\treturn $this->collPgs;\n\t}", "title": "" }, { "docid": "a56b164c80726c1b340b94d3bccbc2b1", "score": "0.4905303", "text": "public function getEmails(){\n //get all emails and return names & id for use in UI\n //currnetly not working\n $email = new Email();\n $emails = $email->all();\n\n return $emails;\n }", "title": "" }, { "docid": "6bb98da65c2c63d563f05eb075ce259a", "score": "0.489937", "text": "public function index()\n {\n $emailTemplates = $this->allResources($this->emailTemplateRepository);\n\n return EmailTemplateResource::collection($emailTemplates);\n }", "title": "" }, { "docid": "9e461f930eefad7a89fdcdfeeed4b19f", "score": "0.48792595", "text": "public function getContacts($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collContacts === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collContacts = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(ContactPeer::PERSON_ID, $this->id);\n\n\t\t\t\tContactPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collContacts = ContactPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(ContactPeer::PERSON_ID, $this->id);\n\n\t\t\t\tContactPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastContactCriteria) || !$this->lastContactCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collContacts = ContactPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastContactCriteria = $criteria;\n\t\treturn $this->collContacts;\n\t}", "title": "" }, { "docid": "e50aac2694696b6aa1523d63c1c18fcb", "score": "0.48585016", "text": "public static function getAttachmentsFromTemplate($id)\n\t{\n\t\tif (Cache::has('MailAttachmentsFromTemplete', $id)) {\n\t\t\treturn Cache::get('MailAttachmentsFromTemplete', $id);\n\t\t}\n\t\t$ids = (new \\App\\Db\\Query())->select(['u_#__documents_emailtemplates.crmid'])->from('u_#__documents_emailtemplates')\n\t\t\t->innerJoin('vtiger_crmentity', 'u_#__documents_emailtemplates.relcrmid = vtiger_crmentity.crmid')\n\t\t\t->where(['vtiger_crmentity.deleted' => 0, 'u_#__documents_emailtemplates.relcrmid' => $id])->column();\n\t\t$attachments = [];\n\t\tif ($ids) {\n\t\t\t$attachments['attachments'] = ['ids' => $ids];\n\t\t}\n\t\tCache::save('MailAttachmentsFromTemplete', $id, $attachments, Cache::LONG);\n\t\treturn $attachments;\n\t}", "title": "" }, { "docid": "44bea14e3fdb2faaf60d2fc83714e78e", "score": "0.4843224", "text": "function getEmailTemplate($id = null) {\n if( empty($id) || is_null($id) ){\n return false;\n }\n App::import('Model','EmailTemplate');\n $this->EmailTemplate = & new EmailTemplate();\n $template = $this->EmailTemplate->find('first',array(\n 'conditions'=>array(\"EmailTemplate.id\" => $id)));\n return $template;\n }", "title": "" }, { "docid": "0619f76f0470d50a5fac38893d42d66e", "score": "0.4806803", "text": "public function getRequesters($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collRequesters === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collRequesters = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(RequesterPeer::PERSON_ID, $this->id);\n\n\t\t\t\tRequesterPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collRequesters = RequesterPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(RequesterPeer::PERSON_ID, $this->id);\n\n\t\t\t\tRequesterPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastRequesterCriteria) || !$this->lastRequesterCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collRequesters = RequesterPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastRequesterCriteria = $criteria;\n\t\treturn $this->collRequesters;\n\t}", "title": "" }, { "docid": "d932f995941b83589c51166b99183b57", "score": "0.48059273", "text": "function getPermittedEmailTemplate($user_id, $type= 'all')\n {\n if (empty($user_id)) {\n return array();\n }\n\n $this->recursive = -1;\n return $this->find($type, array(\n 'conditions' => array('OR' => array(\n array('creator_id' => $user_id),\n array('availability' => '1')\n ))\n ));\n }", "title": "" }, { "docid": "86c697118c301fb4f83c29a050a8de28", "score": "0.48025367", "text": "public function getEmails() : array {\n $sqlQuery = 'SELECT * FROM emails';\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute();\n\n $dataSet = [];\n while ($row = $statement->fetch()) {\n $dataSet[] = new Email($row);\n }\n return $dataSet;\n }", "title": "" }, { "docid": "6be524b939aaf65196525976cdf6caff", "score": "0.47950417", "text": "public function countEmailTemplates(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t} else {\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($distinct) {\n\t\t\t$criteria->setDistinct();\n\t\t}\n\n\t\t$count = null;\n\n\t\tif ($this->collEmailTemplates === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t\t$count = 0;\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(EmailTemplatePeer::PERSON_ID, $this->id);\n\n\t\t\t\t$count = EmailTemplatePeer::doCount($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return count of the collection.\n\n\n\t\t\t\t$criteria->add(EmailTemplatePeer::PERSON_ID, $this->id);\n\n\t\t\t\tif (!isset($this->lastEmailTemplateCriteria) || !$this->lastEmailTemplateCriteria->equals($criteria)) {\n\t\t\t\t\t$count = EmailTemplatePeer::doCount($criteria, $con);\n\t\t\t\t} else {\n\t\t\t\t\t$count = count($this->collEmailTemplates);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$count = count($this->collEmailTemplates);\n\t\t\t}\n\t\t}\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "9a1a333ee98e722c263dd6b828acd21d", "score": "0.47827178", "text": "function return_existing_template( $collection, $template ) {\n\treturn array_filter( $collection, function( $data ) use ($template) {\n\t\treturn $data['template'] === $template;\n\t} );\n}", "title": "" }, { "docid": "ecc03b0e3f890b6c2edf46726bf375c7", "score": "0.4775545", "text": "public function template()\n {\n return $this->hasOne('App\\UserFormTemplate');\n }", "title": "" }, { "docid": "2de3ea392657bc47031d670c1df1c135", "score": "0.47718188", "text": "public function persons()\n {\n return $this->morphToMany(Person::class, 'contactable')->withTimestamps()->orderBy('created_at','desc');\n }", "title": "" }, { "docid": "b3ea2fc0cea6b2ae909265c7bda4d4d3", "score": "0.47691882", "text": "public function getTemplateList();", "title": "" }, { "docid": "87cb75ee7c998c7c861bf6b7d0bf94bc", "score": "0.47600394", "text": "public function emailCollection()\n {\n return $this->hasMany('App\\UserFormEmailCollection','form_key','form_key');\n }", "title": "" }, { "docid": "07fd25f6bff216602d5a3017e5022a15", "score": "0.47572944", "text": "public function loadList() {\n # code...\n $sql = \"SELECT * FROM email_templates\";\n $select = $this->db->select($sql);\n return $select;\n }", "title": "" }, { "docid": "37985dc776bb7d2d2ad2ce657b2617eb", "score": "0.4751104", "text": "public function emailCollection()\n {\n return $this->hasMany('App\\UserFormEmailCollection');\n }", "title": "" }, { "docid": "0724a5db2707b4f128adc760ecbe8cc4", "score": "0.474959", "text": "private function getParticipantCollection()\n {\n $participants = [];\n\n foreach ($this->participants as $participant) {\n $participants[] = new Participant($participant);\n }\n\n return $participants;\n }", "title": "" }, { "docid": "144bc089143a927d9b53f13c79b6c02d", "score": "0.47402957", "text": "public function getOnceCriteria(): Collection;", "title": "" }, { "docid": "41d8cd8eeddf286f38a93801e3afab85", "score": "0.472935", "text": "public function getPhotos() {\n return $this->findDependentRowset('My_Model_Table_Photo');\n }", "title": "" }, { "docid": "770ba48600e5c92e4ca57d0a7a9d695f", "score": "0.47291186", "text": "public function populateOwned()\n {\n if ($this->relation !== 'BelongsToMany') {\n return;\n }\n\n $this->owned = $this->parent->{$this->parentToChild}->pluck($this->model->getKeyName());\n\n return $this->owned;\n }", "title": "" }, { "docid": "1be4c2bf654ed8c1273fe0bb0cc6cb5c", "score": "0.47276425", "text": "public function persons(): Persons\n {\n return new Persons($this->config);\n }", "title": "" }, { "docid": "9d985c7a8597c86f2932349ba40813f8", "score": "0.47087714", "text": "public function emails()\n {\n return $this->morphOne(Email::class, 'email');\n }", "title": "" }, { "docid": "44301d8d5e1a488e4b4fe8676db39bef", "score": "0.47047892", "text": "public function persons()\n {\n return $this->morphedByMany(\\Illuminate\\Support\\Facades\\Config::get('sitec.core.models.person', \\Telefonica\\Models\\Actors\\Person::class), 'skillable');\n }", "title": "" }, { "docid": "b988b98e63260d7fc7d7ad664828468c", "score": "0.46999702", "text": "public function getPassengers($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collPassengers === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collPassengers = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(PassengerPeer::PERSON_ID, $this->id);\n\n\t\t\t\tPassengerPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collPassengers = PassengerPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(PassengerPeer::PERSON_ID, $this->id);\n\n\t\t\t\tPassengerPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastPassengerCriteria) || !$this->lastPassengerCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collPassengers = PassengerPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastPassengerCriteria = $criteria;\n\t\treturn $this->collPassengers;\n\t}", "title": "" }, { "docid": "ca55de9595f7b224b26378a50073207d", "score": "0.46937773", "text": "function getMyEmailTemplate($user_id, $type = 'all')\n {\n $this->recursive = -1;\n return $this->find($type, array(\n 'conditions' => array('creator_id' => $user_id)\n ));\n }", "title": "" }, { "docid": "30c510ddc0bfa330a45a19fb85af3350", "score": "0.4684404", "text": "public function getCollection() : PersistentCollectionInterface\n {\n return $this->collection;\n }", "title": "" }, { "docid": "d822f28bc5bafe0d0c39a6f839ad63b2", "score": "0.4683653", "text": "public function getEntityCollection()\n {\n return $this->getInstance(EntityCollection::class);\n }", "title": "" }, { "docid": "6edcefffe43919b4957b6c1696bb2b7b", "score": "0.4681079", "text": "public function getGeneratedEmails(): array;", "title": "" }, { "docid": "3b8b761568f9c8a4f18ff1e91f793504", "score": "0.46809077", "text": "public function retrivePersons(){\n\t return Person::all();\n\t}", "title": "" }, { "docid": "fefb0de278375cb0188c1dda664976ad", "score": "0.46763232", "text": "public function getContactEnrichments($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collContactEnrichmentsPartial && !$this->isNew();\n if (null === $this->collContactEnrichments || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collContactEnrichments) {\n // return empty collection\n $this->initContactEnrichments();\n } else {\n $collContactEnrichments = ContactEnrichmentQuery::create(null, $criteria)\n ->filterByLicense($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collContactEnrichmentsPartial && count($collContactEnrichments)) {\n $this->initContactEnrichments(false);\n\n foreach ($collContactEnrichments as $obj) {\n if (false == $this->collContactEnrichments->contains($obj)) {\n $this->collContactEnrichments->append($obj);\n }\n }\n\n $this->collContactEnrichmentsPartial = true;\n }\n\n $collContactEnrichments->getInternalIterator()->rewind();\n\n return $collContactEnrichments;\n }\n\n if ($partial && $this->collContactEnrichments) {\n foreach ($this->collContactEnrichments as $obj) {\n if ($obj->isNew()) {\n $collContactEnrichments[] = $obj;\n }\n }\n }\n\n $this->collContactEnrichments = $collContactEnrichments;\n $this->collContactEnrichmentsPartial = false;\n }\n }\n\n return $this->collContactEnrichments;\n }", "title": "" }, { "docid": "f80f1a73dd1d20e71bc49fbd9883cfed", "score": "0.467002", "text": "public function all()\n {\n return $this->templates;\n }", "title": "" }, { "docid": "26f8c769ffa0a6e5bcb80c39a690401f", "score": "0.46696767", "text": "public function getTemplates()\n {\n $templates = SSViewer::get_templates_by_class($this, '', __CLASS__);\n // Prefer any custom template\n if ($this->getTemplate()) {\n array_unshift($templates, $this->getTemplate());\n }\n return $templates;\n }", "title": "" }, { "docid": "2bbbc270fb393e628d378b7f072067ec", "score": "0.46569", "text": "public function getPressContacts($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collPressContactsPartial && !$this->isNew();\n if (null === $this->collPressContacts || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collPressContacts) {\n // return empty collection\n $this->initPressContacts();\n } else {\n $collPressContacts = PressContactQuery::create(null, $criteria)\n ->filterByLicense($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collPressContactsPartial && count($collPressContacts)) {\n $this->initPressContacts(false);\n\n foreach ($collPressContacts as $obj) {\n if (false == $this->collPressContacts->contains($obj)) {\n $this->collPressContacts->append($obj);\n }\n }\n\n $this->collPressContactsPartial = true;\n }\n\n $collPressContacts->getInternalIterator()->rewind();\n\n return $collPressContacts;\n }\n\n if ($partial && $this->collPressContacts) {\n foreach ($this->collPressContacts as $obj) {\n if ($obj->isNew()) {\n $collPressContacts[] = $obj;\n }\n }\n }\n\n $this->collPressContacts = $collPressContacts;\n $this->collPressContactsPartial = false;\n }\n }\n\n return $this->collPressContacts;\n }", "title": "" }, { "docid": "1c57916a037701ba37150bc8d84829a7", "score": "0.46412605", "text": "public function getEmails() {\n\t\treturn Email::getForQueue($this->id);\n\t}", "title": "" }, { "docid": "18dada91c6f406577b4d51836edb5a38", "score": "0.46382162", "text": "public function getValues(): array\n {\n if (!$this->transactionalEmailsApi) {\n return [];\n }\n\n $limit = 50;\n $offset = 0;\n $total = null;\n $mailTemplateObjects = [];\n\n do {\n $response = $this->transactionalEmailsApi->getSmtpTemplates('true', $limit, $offset);\n\n if (null === $total) {\n $total = $response->getCount();\n }\n\n $newMailTemplateObjects = $response->getTemplates();\n if (0 === \\count($newMailTemplateObjects)) {\n break;\n }\n\n $mailTemplateObjects = \\array_merge($mailTemplateObjects, $newMailTemplateObjects);\n $offset += $limit;\n } while (\\count($mailTemplateObjects) < $total);\n\n $mailTemplates = [];\n\n foreach ($mailTemplateObjects as $template) {\n if (($template['tag'] ?? null) !== 'optin') {\n continue;\n }\n\n $mailTemplates[] = [\n 'name' => $template['id'],\n 'title' => $template['name'],\n ];\n }\n\n return $mailTemplates;\n }", "title": "" }, { "docid": "2b4a47caf13ce0a7c5f66e75683d5e8e", "score": "0.46247557", "text": "public function getCollection();", "title": "" }, { "docid": "2b4a47caf13ce0a7c5f66e75683d5e8e", "score": "0.46247557", "text": "public function getCollection();", "title": "" }, { "docid": "2b4a47caf13ce0a7c5f66e75683d5e8e", "score": "0.46247557", "text": "public function getCollection();", "title": "" }, { "docid": "15c50a2ce549618a0b7808b3faea9544", "score": "0.46132025", "text": "public function getChanges()\n {\n return Changes::find()->where(['templateId' => $this->id])->all();\n }", "title": "" }, { "docid": "2df717cce4fb353b53e32ebde498715c", "score": "0.46087918", "text": "public function findAll()\n {\n return $this->om->getRepository('InnovaPathBundle:Path\\PathTemplate')->findAll();\n }", "title": "" }, { "docid": "43fd651ab361c7d61b242b586dce982f", "score": "0.4596605", "text": "public function getCollection()\n {\n $rows = $this->_adapter->fetchAll();\n\n $collection = array();\n\n foreach ($rows as $row) {\n $collection[] = $this->_mapObject($row);\n }\n\n return $collection;\n }", "title": "" }, { "docid": "237ba818c0f25313c9da3c71a899c2ed", "score": "0.45945185", "text": "public function getPersons() {\n\n\t\t$language = \\JFactory::getLanguage()->getTag();\n\t\t//$dql = \"SELECT p FROM entity:Person p\";\n\t\t//$dql .= \" WHERE p.language IN ('\" . $language . \"','*')\";\n\t\t//$dql .= \" ORDER BY p.LastName ASC\"; // no, there is no lastname-field: that is the cb-field, so you should join them!\n\n\t\t//$query = $this->em->createQuery($dql);\n\t\t$qb = $this->em->createQueryBuilder();\n\t\t$qb->select('p')\n\t\t\t->from('\\entity:Person', 'p');\n\t\t$query = $qb->getQuery();\n\n\t\t$persons = $query->getResult();\n\n\t\treturn $persons;\n\t}", "title": "" }, { "docid": "ee868ec61e4572a5de3e007940e0b711", "score": "0.45874745", "text": "public function collection() {\n\t\t$collection = false;\n\t\tif (isset($this->belongs_to_collection)) {\n\t\t\t$collection = new Collection($this->belongs_to_collection->id);\n\t\t}\n\t\treturn $collection;\n\t}", "title": "" }, { "docid": "69c89ae1bba0e37a78961949dd4908eb", "score": "0.4580512", "text": "public function getEmailtemplateKeys() {\n return $this->_values;\n }", "title": "" }, { "docid": "a60a7d5ccc893e03d02e1e65a0a282d2", "score": "0.45795995", "text": "public function supplieremails()\n {\n return $this->hasMany('App\\SupplierEmail', 'supplier_id');\n }", "title": "" }, { "docid": "f392cb20af9eed05dfe67f0d188c5548", "score": "0.45674574", "text": "public function idTemplates(): array;", "title": "" }, { "docid": "6a0cebf242432781c928f4264dacc831", "score": "0.45649981", "text": "public function getUserMailingss(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collUserMailingssPartial && !$this->isNew();\n if (null === $this->collUserMailingss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collUserMailingss) {\n // return empty collection\n $this->initUserMailingss();\n } else {\n $collUserMailingss = ChildUserMailingsQuery::create(null, $criteria)\n ->filterByMailing($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collUserMailingssPartial && count($collUserMailingss)) {\n $this->initUserMailingss(false);\n\n foreach ($collUserMailingss as $obj) {\n if (false == $this->collUserMailingss->contains($obj)) {\n $this->collUserMailingss->append($obj);\n }\n }\n\n $this->collUserMailingssPartial = true;\n }\n\n return $collUserMailingss;\n }\n\n if ($partial && $this->collUserMailingss) {\n foreach ($this->collUserMailingss as $obj) {\n if ($obj->isNew()) {\n $collUserMailingss[] = $obj;\n }\n }\n }\n\n $this->collUserMailingss = $collUserMailingss;\n $this->collUserMailingssPartial = false;\n }\n }\n\n return $this->collUserMailingss;\n }", "title": "" }, { "docid": "eb02fd481bb00367946b6eb2f8c683bd", "score": "0.45576784", "text": "public function events()\n {\n return $this->hasMany(NovaMailEvent::class, 'mail_template_id');\n }", "title": "" }, { "docid": "b3ed502f060b6432cecbc1311e0decac", "score": "0.4553243", "text": "public function getEmails(){\n\n return $this->emails;\n }", "title": "" }, { "docid": "54b279dff081b1be71cfa9c33c98bf22", "score": "0.45513478", "text": "public function getCollection()\r\n {\r\n if (isset($this->collection)) {\r\n return $this->collection;\r\n }\r\n\r\n $articles = array_get($this->getArray(), $this->articleElement);\r\n\r\n return $this->collection = new Collection($articles);\r\n }", "title": "" }, { "docid": "f06adb47b1e6249c29e44ae60b3fdce1", "score": "0.45394534", "text": "static function getCampaignTemplatesByCampaignId($campaign_id)\n {\n $query = EmailmarketingCampaigntemplate::where('campaign_id', $campaign_id);\n $result = $query->get()->toArray();\n if (count($result) > 0) return $result;\n return array();\n }", "title": "" }, { "docid": "12fe0d5256a85dde21b832556b1be05c", "score": "0.45378295", "text": "protected function readTemplates() {\n\t\t// get template ids\n\t\t$templateIDs = array();\n\t\t$sql = \"SELECT\t\ttemplateName, templatePackID, templateID, template.packageID\n\t\t\tFROM\t\twcf\".WCF_N.\"_template template,\n\t\t\t\t\twcf\".WCF_N.\"_package_dependency package_dependency\n\t\t\tWHERE \t\ttemplate.packageID = package_dependency.dependency\n\t\t\t\t\tAND package_dependency.packageID = \".PACKAGE_ID.\"\n\t\t\tORDER BY\tpackage_dependency.priority\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\tif (!isset($templateIDs[$row['templateName'].'-'.$row['templatePackID']]) || PACKAGE_ID == $row['packageID']) {\n\t\t\t\t$templateIDs[$row['templateName'].'-'.$row['templatePackID']] = $row['templateID'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// get template\n\t\tif (count($templateIDs)) { \n\t\t\t$sql = \"SELECT\t\ttemplateID, templateName\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_template\n\t\t\t\tWHERE\t\ttemplatePackID = \".$this->templatePackID.\"\n\t\t\t\t\t\tAND templateID IN (\".implode(',', $templateIDs).\")\n\t\t\t\tORDER BY\ttemplateName\";\n\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$this->templates[$row['templateID']] = $row['templateName'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f113b34a2990658e9f9db055798cd638", "score": "0.4530684", "text": "public function getTemps()\n {\n return $this->hasMany(Templates::className(), ['id' => 'temp_id'])->viaTable('temp_to_shop', ['sid' => 'id']);\n }", "title": "" }, { "docid": "c37bb412a814fa5f69bd793deafb7ef6", "score": "0.45244765", "text": "public function getObjects()\n {\n return $this->hasMany(Object::className(), ['federal_subject_id' => 'federal_subject_id']);\n }", "title": "" }, { "docid": "476a15d8a7e93ec628eeb6d6f7faca0a", "score": "0.451718", "text": "function customcert_get_templates() {\n global $DB;\n\n return $DB->get_records_menu('customcert_template', array(), 'name ASC', 'id, name');\n}", "title": "" }, { "docid": "71dd46be787c3e4769c5da5a8c3949f6", "score": "0.45170182", "text": "public static function getAll(){\n\t\t$liste = DB::getInstance()->query('select * from template', [], DB::FETCH_ALL);\n\t\treturn $liste;\n\t}", "title": "" }, { "docid": "a9d6a49f455ba77dd498a0ffab8d7d6d", "score": "0.45015332", "text": "public function &getTemplate()\n\t{\n\t\t// Initialise variables.\n\t\t$pk\t\t= $this->getState('extension.id');\n\t\t$db\t\t= $this->getDbo();\n\t\t$result\t= false;\n\n\t\t// Get the template information.\n\t\t$db->setQuery(\n\t\t\t'SELECT extension_id, client_id, element' .\n\t\t\t' FROM #__extensions' .\n\t\t\t' WHERE extension_id = '.(int) $pk.\n\t\t\t' AND type = '.$db->quote('template')\n\t\t);\n\n\t\t$result = $db->loadObject();\n\t\tif (empty($result))\n\t\t{\n\t\t\tif ($error = $db->getErrorMsg()) {\n\t\t\t\t$this->setError($error);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->setError(JText::_('COM_TEMPLATES_ERROR_EXTENSION_RECORD_NOT_FOUND'));\n\t\t\t}\n\t\t\t$this->_template = false;\n\t\t}\n\t\telse {\n\t\t\t$this->_template = $result;\n\t\t}\n\n\t\treturn $this->_template;\n\t}", "title": "" }, { "docid": "b4f881282260d32d29c1e90e779086ce", "score": "0.44868806", "text": "public function getNotificacions($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collNotificacionsPartial && !$this->isNew();\n if (null === $this->collNotificacions || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collNotificacions) {\n // return empty collection\n $this->initNotificacions();\n } else {\n $collNotificacions = NotificacionQuery::create(null, $criteria)\n ->filterByProducto($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collNotificacionsPartial && count($collNotificacions)) {\n $this->initNotificacions(false);\n\n foreach ($collNotificacions as $obj) {\n if (false == $this->collNotificacions->contains($obj)) {\n $this->collNotificacions->append($obj);\n }\n }\n\n $this->collNotificacionsPartial = true;\n }\n\n $collNotificacions->getInternalIterator()->rewind();\n\n return $collNotificacions;\n }\n\n if ($partial && $this->collNotificacions) {\n foreach ($this->collNotificacions as $obj) {\n if ($obj->isNew()) {\n $collNotificacions[] = $obj;\n }\n }\n }\n\n $this->collNotificacions = $collNotificacions;\n $this->collNotificacionsPartial = false;\n }\n }\n\n return $this->collNotificacions;\n }", "title": "" }, { "docid": "0ca7348623a9a7f0f3dca8a7521e168f", "score": "0.44827938", "text": "public function getGroupMailingss(Criteria $criteria = null, ConnectionInterface $con = null)\n {\n $partial = $this->collGroupMailingssPartial && !$this->isNew();\n if (null === $this->collGroupMailingss || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collGroupMailingss) {\n // return empty collection\n $this->initGroupMailingss();\n } else {\n $collGroupMailingss = ChildGroupMailingsQuery::create(null, $criteria)\n ->filterByMailing($this)\n ->find($con);\n\n if (null !== $criteria) {\n if (false !== $this->collGroupMailingssPartial && count($collGroupMailingss)) {\n $this->initGroupMailingss(false);\n\n foreach ($collGroupMailingss as $obj) {\n if (false == $this->collGroupMailingss->contains($obj)) {\n $this->collGroupMailingss->append($obj);\n }\n }\n\n $this->collGroupMailingssPartial = true;\n }\n\n return $collGroupMailingss;\n }\n\n if ($partial && $this->collGroupMailingss) {\n foreach ($this->collGroupMailingss as $obj) {\n if ($obj->isNew()) {\n $collGroupMailingss[] = $obj;\n }\n }\n }\n\n $this->collGroupMailingss = $collGroupMailingss;\n $this->collGroupMailingssPartial = false;\n }\n }\n\n return $this->collGroupMailingss;\n }", "title": "" }, { "docid": "7267323444df58e66b2787d054451528", "score": "0.4477796", "text": "public static function getNotificationTemplates()\n {\n return DB::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'kb_web_push_template p');\n }", "title": "" }, { "docid": "c79bd5eabd5a5ccafc793e22b6880936", "score": "0.44757932", "text": "public function get(){\n // Le résultat sera un tableau d'instances de Personnage.\n $sujet = [];\n\n $q = $this->_db->prepare('SELECT * FROM questions ');\n $q->execute();\n\n $donnees = $q->fetchAll(PDO::FETCH_ASSOC);\n foreach ($donnees as $donnee) {\n $sujet[] = new Question($donnee);\n }\n return $sujet;\n }", "title": "" }, { "docid": "21b64ff9bd0298f5c84e70f0346636c6", "score": "0.44659054", "text": "public function get()\n {\n if($this->content) {\n $fields = $this->content->typology->fields;\n }\n\n if($this->typology) {\n $fields = $this->typology->fields;\n }\n\n foreach($fields as &$typologyField) {\n if($this->content) {\n foreach($this->content->fields as $k => $contentField) {\n if($typologyField->identifier == $contentField->name) {\n $typologyField->value = $this->content->getFieldValues($typologyField->identifier, $typologyField->type, $this->languages);\n $this->fields[$typologyField->identifier] = $typologyField;\n }\n }\n }\n\n if(!isset($typologyField->value)) {\n $typologyField->value = null;\n $this->fields[$typologyField->identifier] = $typologyField;\n }\n }\n\n return new FieldsCollection($this->fields);\n }", "title": "" }, { "docid": "0297b855fb7d06ec429c58a360d5c539", "score": "0.4462403", "text": "function portfolioactmode_template_get_referenced_items_from_template($templateid) {\n\n global $DB, $CFG;\n\n $sql = <<<EOF\n\n SELECT i.id , i.reference FROM {$CFG->prefix}portfolioact_template t\n INNER JOIN {portfolioact_tmpl_pages} p ON p.template = t.id\n INNER JOIN {portfolioact_tmpl_items} i ON i.page = p.id\n WHERE t.id = ? AND i.type = 'reference'\n\nEOF;\n\n $reference_items = $DB->get_records_sql($sql, array($templateid));\n $reference_items_ids = array();\n foreach ($reference_items as $itemrec) {\n $reference_items_ids[] = $itemrec->reference;\n }\n\n return $reference_items_ids;\n\n}", "title": "" }, { "docid": "fd9db12a013c2fc18b312f9a053a0277", "score": "0.44568074", "text": "public function getinboxsRelatedByUserId($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collinboxsRelatedByUserId === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collinboxsRelatedByUserId = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(inboxPeer::USER_ID, $this->id);\n\n\t\t\t\tinboxPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collinboxsRelatedByUserId = inboxPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(inboxPeer::USER_ID, $this->id);\n\n\t\t\t\tinboxPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastinboxRelatedByUserIdCriteria) || !$this->lastinboxRelatedByUserIdCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collinboxsRelatedByUserId = inboxPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastinboxRelatedByUserIdCriteria = $criteria;\n\t\treturn $this->collinboxsRelatedByUserId;\n\t}", "title": "" }, { "docid": "eb84cbd3799e8ef5dcb30bb9d7b94334", "score": "0.445315", "text": "public function template()\n {\n return $this->belongsTo('App\\Template');\n }", "title": "" }, { "docid": "fd1f97ceab50616f281a50c9e214058c", "score": "0.44525406", "text": "function getOfPeople($people) {\n $rel = $this->getRelation('_person');\n $res = $rel->getSrc($people); \n return $res;\n }", "title": "" }, { "docid": "0adde7b68ec94b0cb7ea97f0f89c296a", "score": "0.44474688", "text": "public static function existingTags(): Collection\n {\n $model = self::taggedModelString();\n\n return $model::query()\n ->distinct()\n ->join('tags', 'tag_id', '=', 'tags.id')\n ->where('taggable_type', '=', (new static)->getMorphClass())\n ->orderBy('weight', 'DESC')\n ->get(['name as name', 'tags.weight as weight']);\n }", "title": "" }, { "docid": "6226fe85d1c8433c066733887aaef0f6", "score": "0.44450042", "text": "public function objects()\n {\n return $this->hasMany('Modules\\Documents\\Entities\\Object', 'pool_uid', 'uid');\n }", "title": "" }, { "docid": "b5edd2f6e5cd4ae4e05a53e0c99d245c", "score": "0.4441915", "text": "public function getDataFields()\n {\n return $this->hasOne(DataFieldTemplates::className(), ['id' => 'data_field_template_id']);\n }", "title": "" }, { "docid": "9cc88d378fe0b8269fdc25949a163563", "score": "0.4441671", "text": "public function template()\n {\n return $this->belongsTo('\\Rocket\\Pages\\Templates\\Template');\n }", "title": "" }, { "docid": "ff694149b1f3e07d965ecbb6bba193e0", "score": "0.44360727", "text": "public function getNotificationsRelatedByUserId($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collNotificationsRelatedByUserId === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collNotificationsRelatedByUserId = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(NotificationPeer::USER_ID, $this->id);\n\n\t\t\t\tNotificationPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collNotificationsRelatedByUserId = NotificationPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(NotificationPeer::USER_ID, $this->id);\n\n\t\t\t\tNotificationPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastNotificationRelatedByUserIdCriteria) || !$this->lastNotificationRelatedByUserIdCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collNotificationsRelatedByUserId = NotificationPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastNotificationRelatedByUserIdCriteria = $criteria;\n\t\treturn $this->collNotificationsRelatedByUserId;\n\t}", "title": "" }, { "docid": "12518eac2aa1ef58ebfdf2a3bdf198de", "score": "0.44328675", "text": "public function getSources(int $id): MailingTemplatesSourcesInterface;", "title": "" }, { "docid": "6e089a68ab30b4056d26fcb0cfee86ad", "score": "0.44316265", "text": "function getOfPersonPhotos($personPhotos) {\n $rel = $this->getRelation('_personPhotos');\n $res = $rel->getSrc($personPhotos); \n return $res;\n }", "title": "" }, { "docid": "4e13ce930d087dd04742020676d78cdf", "score": "0.44309", "text": "public function getProfilePhotos($criteria = null, PropelPDO $con = null)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collProfilePhotos === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t $this->collProfilePhotos = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(ProfilePhotoPeer::USER_ID, $this->id);\n\n\t\t\t\tProfilePhotoPeer::addSelectColumns($criteria);\n\t\t\t\t$this->collProfilePhotos = ProfilePhotoPeer::doSelect($criteria, $con);\n\t\t\t}\n\t\t} else {\n\t\t\t// criteria has no effect for a new object\n\t\t\tif (!$this->isNew()) {\n\t\t\t\t// the following code is to determine if a new query is\n\t\t\t\t// called for. If the criteria is the same as the last\n\t\t\t\t// one, just return the collection.\n\n\n\t\t\t\t$criteria->add(ProfilePhotoPeer::USER_ID, $this->id);\n\n\t\t\t\tProfilePhotoPeer::addSelectColumns($criteria);\n\t\t\t\tif (!isset($this->lastProfilePhotoCriteria) || !$this->lastProfilePhotoCriteria->equals($criteria)) {\n\t\t\t\t\t$this->collProfilePhotos = ProfilePhotoPeer::doSelect($criteria, $con);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->lastProfilePhotoCriteria = $criteria;\n\t\treturn $this->collProfilePhotos;\n\t}", "title": "" }, { "docid": "8ef0e1cb1f1eb0c0e2f673309af0e4ee", "score": "0.44291303", "text": "public function attachments()\n {\n return $this->hasMany('App\\Models\\Attachment');\n }", "title": "" }, { "docid": "30694f5060fbb7271c53e4aad6be2dc4", "score": "0.44281498", "text": "public function getMyTemplates() {\n return $this->client->MakeActiveTrailApiCall(\n EndPoints::$TEMPLATES['uri'],\n EndPoints::$TEMPLATES['method']\n );\n }", "title": "" }, { "docid": "db39210e3fcec6b2ff31b326a6db4610", "score": "0.44245481", "text": "public function getContactSubmissions(): array\n {\n $this->checkLoaded();\n\n return array_map(\n function ($el) {\n /** @var ContactSubmission $el */\n return $el->getId();\n },\n $this->getContainer()->call([ContactSubmission::class, 'where'], ['condition' => ['contact_id' => $this->getId()]])\n );\n }", "title": "" }, { "docid": "c6cef1b7fc28f8a68cc4d7cd861572c4", "score": "0.44234413", "text": "public function contacts()\n {\n return $this->transformCollection(\n $this->get(\"contacts\"),\n Contact::class\n );\n }", "title": "" }, { "docid": "820ba45bd387008945057b2cb57d993f", "score": "0.44211683", "text": "public function getCriteria(): Collection;", "title": "" }, { "docid": "e88c6beb8b9819262bc8f634facbe422", "score": "0.44205278", "text": "public function getEmailListPersonsJoinEmailList($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n\t{\n\t\tif ($criteria === null) {\n\t\t\t$criteria = new Criteria(PersonPeer::DATABASE_NAME);\n\t\t}\n\t\telseif ($criteria instanceof Criteria)\n\t\t{\n\t\t\t$criteria = clone $criteria;\n\t\t}\n\n\t\tif ($this->collEmailListPersons === null) {\n\t\t\tif ($this->isNew()) {\n\t\t\t\t$this->collEmailListPersons = array();\n\t\t\t} else {\n\n\t\t\t\t$criteria->add(EmailListPersonPeer::PERSON_ID, $this->id);\n\n\t\t\t\t$this->collEmailListPersons = EmailListPersonPeer::doSelectJoinEmailList($criteria, $con, $join_behavior);\n\t\t\t}\n\t\t} else {\n\t\t\t// the following code is to determine if a new query is\n\t\t\t// called for. If the criteria is the same as the last\n\t\t\t// one, just return the collection.\n\n\t\t\t$criteria->add(EmailListPersonPeer::PERSON_ID, $this->id);\n\n\t\t\tif (!isset($this->lastEmailListPersonCriteria) || !$this->lastEmailListPersonCriteria->equals($criteria)) {\n\t\t\t\t$this->collEmailListPersons = EmailListPersonPeer::doSelectJoinEmailList($criteria, $con, $join_behavior);\n\t\t\t}\n\t\t}\n\t\t$this->lastEmailListPersonCriteria = $criteria;\n\n\t\treturn $this->collEmailListPersons;\n\t}", "title": "" }, { "docid": "8f994e2fb88f2f06d85b8641af4cdc31", "score": "0.44182903", "text": "public function getPublicationRecipients($isPolice, $pubType)\n {\n /* @todo the commented code can't currently be used due to a bug with Doctrine Criteria when used with\n * many-to-many collections. The links below describe the issue. Once this has been fixed in our version of\n * Doctrine, uncommenting this code and removing the if ($recipient->getIsPolice() === $isPolice) check found\n * below, should improve performance on lists with a large number of recipients\n *\n * @link https://github.com/doctrine/doctrine2/issues/5644\n * @link https://github.com/doctrine/doctrine2/pull/5669/files\n **/\n //$expr = Criteria::expr();\n //$criteria = Criteria::create();\n //$criteria->where($expr->eq('isPolice', $isPolice));\n //$matchedRecipients = $this->recipients->matching($criteria);\n $matchedRecipients = $this->getRecipients(); //remove when code above is uncommented\n $checkPubMethod = ($pubType === 'A&D' ? 'getSendAppDecision' : 'getSendNoticesProcs');\n\n $recipients = [];\n\n /** @var RecipientEntity $recipient */\n foreach ($matchedRecipients as $recipient) {\n $email = $recipient->getEmailAddress();\n\n //remove this if statement once the doctrine criteria code is uncommented\n if ($recipient->getIsPolice() === $isPolice && $recipient->$checkPubMethod() === 'Y' && !empty($email)) {\n $recipients[$email] = $recipient->getContactName();\n }\n }\n\n return $recipients;\n }", "title": "" }, { "docid": "350b919f5e7f7f0e2b365121be4f6d02", "score": "0.44165224", "text": "public function findAll()\n {\n $conn = $this->getConnection();\n $this->_query = $conn->query(\"SELECT * FROM {$this->table_name}\");\n $objs = $this->_query->fetchAll(PDO::FETCH_ASSOC);\n // the model instantiated\n $models = array();\n\n if (!empty($objs)) {\n foreach ($objs as $obj) {\n $models[] = $this->newInstance($obj);\n }\n }\n\n return $models;\n }", "title": "" }, { "docid": "d2c3dd7d679ac9fc4a713e372e8eb8df", "score": "0.44149184", "text": "public function attachments() {\n return $this->hasMany('App\\Attachment');\n }", "title": "" }, { "docid": "b33474879b626a43a40e11a9eadd303a", "score": "0.44124058", "text": "abstract public function getCollection();", "title": "" }, { "docid": "136b78f8f69f59a9d4211e86f327d464", "score": "0.4409386", "text": "public function getMailAddressesForBatchSending()\n {\n $listing = $this->getListing();\n $ids = $listing->loadIdList();\n\n $class = ClassDefinition::getByName($this->class);\n $tableName = \"object_\" . $class->getId();\n\n $db = \\Pimcore\\Db::get();\n $emails = $db->fetchCol(\"SELECT email FROM $tableName WHERE o_id IN (\" . implode(\",\", $ids) . \")\");\n\n $containers = [];\n foreach ($emails as $email) {\n $containers[] = new SendingParamContainer($email, ['emailAddress' => $email]);\n }\n\n return $containers;\n }", "title": "" } ]
c321eb21e43f224abfebd1ef6601898b
Static function handles exceptions that are not caught in a try catch block.
[ { "docid": "91805242af3fa5bb7ea22de8358c0e3d", "score": "0.5536198", "text": "static public function handleException(\\Exception $ex)\n\t{\n\t\t//TODO: Check for stop propagation from event\n\n\t\t$event = new \\Framework\\Events\\CExceptionEvent($ex);\n\n\t\t//Send event to the listeners\n\t\t$listeners = CErrorHandlerObserver::getInstance()->_listeners;\n\t\t$default = $event->triggerListeners($listeners);\n\n\t\tif($default)\n\t\t{\n\t\t\techo \"Global Exception Caught:\\n\";\n\t\t\tvar_dump($ex);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "11f585680773b1609f2c01636e549b9b", "score": "0.69070655", "text": "function handler_for_exception(Exception $ex) {}", "title": "" }, { "docid": "76e0994bd9f3f53fdba11229f4f67993", "score": "0.6691165", "text": "abstract public function handle (Exception $e);", "title": "" }, { "docid": "a0afaf2d58c937eaeffa9ba6355b9aa9", "score": "0.6652155", "text": "public function handle( \\Exception $e );", "title": "" }, { "docid": "68aa25f7c5e4d57dab423d5c47fb41d2", "score": "0.65272284", "text": "public function try();", "title": "" }, { "docid": "4fb9ff73b49919113bd7f299493ea122", "score": "0.65253204", "text": "abstract protected function handleException(RhubarbException $er);", "title": "" }, { "docid": "9915497c0ee0e3e1decd2ebe501e5a9d", "score": "0.64788526", "text": "private function handleException(Exception $e)\n {\n }", "title": "" }, { "docid": "e7faf71d2fc07730f566c1926f168e22", "score": "0.615718", "text": "private function handleException()\n {\n if ($this->errorOccurredBeforeConnectCall()) {\n throw new ProblemInitializingSocketException($this->error);\n }\n\n if ($this->errorNumber === ClientException::ERROR_OPERATION_TIMEOUT) {\n throw new TimeoutException($this->error, $this->errorNumber);\n }\n\n throw new ClientException($this->error, $this->errorNumber);\n }", "title": "" }, { "docid": "9cc7ed30bf854e2b566279e01836814c", "score": "0.61103415", "text": "private function errorHandlingError()\n\t{\n\t\tself::criticalDie(self::MESSAGE_ERROR_HANDLING_ERROR);\n\t}", "title": "" }, { "docid": "15359a0642c9677a850ca867980e60fa", "score": "0.6074072", "text": "function restore_exception_handler () {}", "title": "" }, { "docid": "80e6c48347000deb1133d796ff449159", "score": "0.5992708", "text": "static function handle_exception($e) {\n try {\n\n static::ob_flush();\n\n if ($e instanceof Error) {\n add::handle_error( E_ERROR, $e->getMessage(), $e->getFile(), $e->getLine() );\n return null;\n }\n else if ( ! ( $e instanceof Exception) ) {\n $e = new e_system(\"Invalid handle_exception() argument: $e\", $e);\n }\n try {\n if (method_exists($e,'handle_exception')) {\n return $e->handle_exception();\n }\n else {\n throw new Exception(\"Non e_add exception sub class or no handle_exception() function found for exception\");\n }\n }\n catch (Exception $e2) {\n\n if ($e instanceof SmartyException) {\n static::handle_exception(\n new e_smarty(\n $e->getMessage(),\n # Fixed Issue #58, e_smarty data is too long\n array(\n 'message' => $e->getMessage(),\n 'code' => $e->getCode(),\n 'trace' => str_replace(\n array(\n add::config()->root_dir\n ,add::config()->add_dir\n )\n ,\n array(\n '*root_dir*',\n '*add_dir*',\n ),\n $e->getTraceAsString()\n ),\n )\n )\n );\n }\n\n if (add::content_type() == 'text/plain') {\n die(\n get_class($e).\"(#\".$e->getCode().\")\\r\\n\\r\\n\".\n $e->getMessage().\"\\r\\n\\r\\n\".$e->getFile().\":\".$e->getLine().\"\\r\\n\\r\\n\\r\\n\\r\\n\"\n );\n }\n else {\n\n if (add::is_developer()) {\n DEFINE('add\\terminal_error\\error_message',$e->getMessage());\n DEFINE('add\\terminal_error\\error_trace',$e->getTraceAsString());\n DEFINE('add\\terminal_error\\error_header',get_class($e));\n DEFINE('add\\terminal_error\\error_footer',$e->getFile().\":\".$e->getLine());\n }\n else {\n $debug_mail_to = add::config()->developer_emails;\n\n if (is_array($debug_mail_to) || is_object($debug_mail_to)) {\n $debug_mail_to = implode(\",\",(array)$debug_mail_to);\n }\n\n mail(\n $debug_mail_to,\n \"Terminal Error: \".$e->getMessage(),\n $e->getTraceAsString()\n );\n\n DEFINE('add\\terminal_error\\error_message','An error occured<br />please contact the system administrators or go back to <a href=\"'.add::config()->path.'\">Home</a>');\n DEFINE('add\\terminal_error\\error_header','Warning!');\n DEFINE('add\\terminal_error\\error_footer','Please contact the system administrators');\n DEFINE('add\\terminal_error\\error_trace','');\n }\n\n\n if (!headers_sent() && !add::include_include_file('terminal_error.php')) {\n throw new Exception(\"Failed to display terminal error\");\n }\n add::shutdown(false);\n }\n }\n }\n catch (Exception $e3) {\n $e1_string = \"<div style='color:red'>\".get_class($e).\"(#\".$e->getCode().\")\".$e->getMessage().\"\\r\\n\".$e->getFile().\":\".$e->getLine().\"</div>\";\n\n echo $e1_string;\n\n $e3_string = \"<div style='color:red'>\".get_class($e3).\"(#\".$e3->getCode().\")\".$e3->getMessage().\"\\r\\n\".$e3->getFile().\":\".$e3->getLine().\"</div>\";\n\n if ($e3_string != $e1_string) {\n echo $e3_string;\n }\n debug::var_dump($e3->getTraceAsString());\n\n die();\n }\n }", "title": "" }, { "docid": "3c5218fe1d61c77cd371563a504790d5", "score": "0.5920155", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n // Don't catch suppressed errors with '@' sign\n // @link http://stackoverflow.com/questions/7380782/error-supression-operator-and-set-error-handler\n $error_reporting = ini_get('error_reporting');\n if (!($error_reporting & $errno)) {\n return;\n }\n throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "title": "" }, { "docid": "58469ece8b0c74f8d26597c65abe0e6b", "score": "0.58726716", "text": "protected function handleException( \\Exception $exception )\n\t{\n\t\tthrow $exception;\n\t}", "title": "" }, { "docid": "c81f69b1468a2754ccd6e018c320f9ab", "score": "0.5827931", "text": "function exception_handler($exception = NULL){\n\t$backtrace = debug_backtrace();\n\tuncaught_error_handler(E_ERROR, $exception->getMessage(), $backtrace[0]['args'][2], $backtrace[0]['args'][3]);\n\texit;\n \n}", "title": "" }, { "docid": "bfc92d171e401b3bfed2f42064665d4a", "score": "0.5805189", "text": "public function apply(Exception $ex);", "title": "" }, { "docid": "a5075999e30cfaf5383e1961c95d6617", "score": "0.5784905", "text": "public static function exceptionHandler()\n {\n // Register the error handler.\n set_error_handler(function (...$args) {\n (new ExceptionHandler())->error(...$args);\n });\n\n // Register the exception handler.\n set_exception_handler(function (...$args) {\n (new ExceptionHandler())->exception(...$args);\n });\n\n // The error and exception handlers couldn't catch anything,\n // If there's any error aborting the current process is required.\n if (error_get_last() !== null) {\n die(\"500 error in the tower exception handler.\");\n }\n }", "title": "" }, { "docid": "e4d1e3f136671e7f4aeaa06b18843b45", "score": "0.5783038", "text": "private function handleErrors(){\n if($this->basecURL->errno() || $this->basecURL->error()){\n $errorMsg = $this->basecURL->error();\n $errorNumber = $this->basecURL->errno();\n throw new SdkException(\"cURL error during making API call. cURL Error Number:[\" . $errorNumber . \"] with error:[\" . $errorMsg . \"]\");\n }\n }", "title": "" }, { "docid": "9d709d4a9c12bb468ade24376e28d5de", "score": "0.5775478", "text": "public function functionWithException() {\r\n\r\n\t\t// Call the private function\r\n\t\t$this->_privateFunction();\r\n\r\n\t\t$this->test;\r\n\r\n\t\t// do something\r\n\t\tthrow new Exception('Exception');\r\n\t}", "title": "" }, { "docid": "af4f6b467e2ca0ff66e474e59fc44e39", "score": "0.57608974", "text": "public function try()\n { }", "title": "" }, { "docid": "e20e249c551131a6346b79feb053ca6e", "score": "0.57590073", "text": "function onException($e)\n {\n }", "title": "" }, { "docid": "fb79a34a14b47ad7bc3efaa098aa1591", "score": "0.5738128", "text": "public function handleException(Request $request, HttpException $exception);", "title": "" }, { "docid": "7d03c6e24a8ba0b64db0a329770fc3c0", "score": "0.5697066", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline) {\n\tthrow new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "title": "" }, { "docid": "8762553ea8a46a31d0bf9b21861e7e8e", "score": "0.5694289", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "title": "" }, { "docid": "8762553ea8a46a31d0bf9b21861e7e8e", "score": "0.5694289", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "title": "" }, { "docid": "8762553ea8a46a31d0bf9b21861e7e8e", "score": "0.5694289", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "title": "" }, { "docid": "5c3fa1fa25e442382518405078a5fd06", "score": "0.56748605", "text": "public function testHandleHandlesExceptionsAndRethrows(): void\n {\n $this->expectException(InvalidDocumentClassException::class);\n $this->expectExceptionMessage('Something failed.');\n\n $middleware = $this->getMiddleware();\n\n $middleware->handle(\n $this->getRequest(),\n static function (): void {\n throw new InvalidDocumentClassException('Something failed.');\n }\n );\n }", "title": "" }, { "docid": "4d2f718f07ab8fb72727d7454cfadfa4", "score": "0.5668356", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline) {\n throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "title": "" }, { "docid": "4d2f718f07ab8fb72727d7454cfadfa4", "score": "0.5668356", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline) {\n throw new ErrorException($errstr, $errno, 0, $errfile, $errline);\n}", "title": "" }, { "docid": "d1464e5fca9633125463f290d60d0a01", "score": "0.5658336", "text": "abstract protected function getGeneralErrorMessage(\\Exception $caught);", "title": "" }, { "docid": "9b779527215f078d17749758c6ae5dd8", "score": "0.5652603", "text": "function handleException(Exception $exception)\n {\n $this->test()->error(sprintf('%s: %s', get_class($exception), $exception->getMessage()));\n\n $traceData = $exception->getTrace();\n array_unshift($traceData, array(\n 'function' => '',\n 'file' => $exception->getFile() != null ? $exception->getFile() : 'n/a',\n 'line' => $exception->getLine() != null ? $exception->getLine() : 'n/a',\n 'args' => array(),\n ));\n\n $traces = array();\n $lineFormat = ' at %s%s%s() in %s line %s';\n for ($i = 0, $count = count($traceData); $i < $count; $i++)\n {\n $line = isset($traceData[$i]['line']) ? $traceData[$i]['line'] : 'n/a';\n $file = isset($traceData[$i]['file']) ? $traceData[$i]['file'] : 'n/a';\n $args = isset($traceData[$i]['args']) ? $traceData[$i]['args'] : array();\n $this->test()->error(sprintf($lineFormat,\n (isset($traceData[$i]['class']) ? $traceData[$i]['class'] : ''),\n (isset($traceData[$i]['type']) ? $traceData[$i]['type'] : ''),\n $traceData[$i]['function'],\n $file,\n $line\n ));\n }\n\n $this->test()->fail('An uncaught exception has been thrown.');\n }", "title": "" }, { "docid": "2f81a02b1886bb7319a45edc8f534d32", "score": "0.5640474", "text": "private function throwOnAnyError() :void\n {\n set_error_handler(function ($errno, $errStr, $errFile, $errLine) {\n if (!(error_reporting() & $errno)) {\n return false;\n }\n\n throw new \\RuntimeException(\"$errno: $errStr | File: $errFile | Line: $errLine\");\n });\n }", "title": "" }, { "docid": "07992f56c00c757d088c069ae2a78f40", "score": "0.5640324", "text": "function exceptionCheck (&$token, &$context_name) {\n \tif ('throws' == $token) {\n \t$this->_state = 'throws';\n } elseif ('throws' == $this->_state && $this->_isBase($context_name, -5)) {\n \t$context_name .= '/exception';\n $this->_exceptionNames[] = $token;\n } elseif ('throws' == $this->_state && $token == '{') {\n \t$this->_state = '';\n }\n }", "title": "" }, { "docid": "c5a64c1c52058c7ba7975d6a23c9c088", "score": "0.56251615", "text": "private function setup_error_handling()\n\t{\n\t\t# TODO\n\t}", "title": "" }, { "docid": "219fb3bdb70f0f092d656c4b5769d483", "score": "0.5575115", "text": "public function testErrorAndExceptionHandleWorkCorrectly()\n {\n //debug with err2ex = true\n Moy::getConfig()->set('debug.err2ex', true);\n $debug = new Moy_Debug();\n $this->assertEquals(true, $debug->supportErr2Ex());\n $this->assertEquals(E_ALL | E_STRICT, $debug->getErrorLevel());\n $this->assertEquals(10, $debug->getTraceDepth());\n\n //catch error\n $catched = false;\n try {\n strpos();\n } catch (Moy_Exception_Error $ex) {\n $catched = true;\n }\n $this->assertEquals(true, $catched);\n\n //debug with err2ex = false\n Moy::getConfig()->set('debug.err2ex', false);\n $debug = new Moy_Debug();\n $this->assertEquals(false, $debug->supportErr2Ex());\n\n //catch error\n strpos(); $line = __LINE__;\n $file = __FILE__;\n $type = Moy::ERR_WARNING;\n\n $prefix = '[WARNING] (PHP E_WARNING) strpos() expects at least 2 parameters, 0 given @' .\n \"$file#$line\\n #0 \";\n $this->assertStringStartsWith($prefix, $debug->export());\n }", "title": "" }, { "docid": "57d41e33a87a6193085bbbcc9de99fb4", "score": "0.55727017", "text": "static public function handleException($exception)\n\t{\n\t\t$message = ($exception->getMessage()) ? $exception->getMessage() : '{no message}';\n\t\tif ($exception instanceof fException) {\n\t\t\t$trace = $exception->formatTrace();\n\t\t} else {\n\t\t\t$trace = $exception->getTraceAsString();\n\t\t}\n\t\t$code = ($exception->getCode()) ? ' (code ' . $exception->getCode() . ')' : '';\n\t\t\n\t\t$info = $trace . \"\\n\" . $message . $code;\n\t\t$headline = self::compose(\"Uncaught\") . \" \" . get_class($exception);\n\t\t$info_block = $headline . \"\\n\" . str_pad('', strlen($headline), '-') . \"\\n\" . trim($info);\n\t\t\t\t\n\t\tself::sendMessageToDestination('exception', $info_block);\n\t\t\n\t\tif (self::$exception_handler_callback === NULL) {\n\t\t\tif (self::$exception_destination != 'html' && $exception instanceof fException) {\n\t\t\t\t$exception->printMessage();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\ttry {\n\t\t\tself::call(self::$exception_handler_callback, self::$exception_handler_parameters);\n\t\t} catch (Exception $e) {\n\t\t\ttrigger_error(\n\t\t\t\tself::compose(\n\t\t\t\t\t'An exception was thrown in the %s closing code callback',\n\t\t\t\t\t'setExceptionHandling()'\n\t\t\t\t),\n\t\t\t\tE_USER_ERROR\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "ef02077389324951af372ac645f2ff9b", "score": "0.5550775", "text": "public function throwsAnythingExcept()\n {\n try {\n $this->data[0]();\n } catch (Exception $exception) {\n $exceptionClass = get_class($exception);\n if ($exceptionClass === $this->data[1]) {\n throw new DidNotMatchException(\n \"Expected any exception except {$this->data[1]} to be \" .\n \"thrown, but $exceptionClass was thrown.\"\n );\n }\n }\n }", "title": "" }, { "docid": "5e6fbe4d15c17b3dc38a61e8b0808abe", "score": "0.5549145", "text": "function catchException($e){\n# print 'Error obteniendo los datos de Youtube. Revise que la clave sea valida.';\n# else\n# print '';\n}", "title": "" }, { "docid": "1b859e645dfe5cb52f6946ff5134e21e", "score": "0.5544793", "text": "function exceptionHandler($e) {\r\n\techo \"<div style=\\\"padding: 20px; margin-bottom: 10px; font-family: monospace; font-size: 16px; border: 2px solid #FF0000; background :#FFCC00; white-space: pre;\\\">\";\r\n\techo '<strong>Uncaught ' . get_class($e) . '</strong> (' . $e->getCode() . \")\\n\\n\";\r\n\techo \"<strong>Location</strong>: \" . $e->getFile() . \" line \" . $e->getLine() . \"\\n\";\r\n\techo \"<strong> Message</strong>: \" . htmlentities($e->getMessage()) . \"\\n\";\r\n\techo \"<strong> Stack</strong>:\\n<div style=\\\"padding: 5px 0px 0px 50px\\\">\" . htmlentities($e->getTraceAsString ()) . \"</div>\";\r\n\techo \"</div>\";\r\n}", "title": "" }, { "docid": "8d92c23bb72e7f78ef74baf012493a16", "score": "0.5540854", "text": "protected abstract function filterException(\\Exception $exception): \\Exception;", "title": "" }, { "docid": "b20dbc511cee850f1ce11f29f5829ef5", "score": "0.5533574", "text": "function set_exception_handler ($exception_handler) {}", "title": "" }, { "docid": "a142b2bc4bae2e1e2f4c61547b891f50", "score": "0.55326957", "text": "public function testException()\n {\n }", "title": "" }, { "docid": "11942e1d691344079b475358d81b1116", "score": "0.55293316", "text": "public function hasToThrowExceptions();", "title": "" }, { "docid": "fc66ef323b1c5392e6a89bd229142c4e", "score": "0.55145305", "text": "public function exception()\n {\n return Exception::i();\n }", "title": "" }, { "docid": "b6962aa652d88b4bef43ae6a5e54ce7b", "score": "0.55076885", "text": "protected function _handle_error()\n {\n // @todo Use more specific exception classes... although this requires that the API has a rethink\n throw new Cashpoint_Exception($this->data->error);\n }", "title": "" }, { "docid": "56d62af8d859b85dea86ee646013c64f", "score": "0.5496505", "text": "function e($errno, $errstr, $errfile, $errline) {\r\n if ($errstr == \"Division by zero\") {\r\n throw new Exception($errstr, $errno);\r\n }\r\n }", "title": "" }, { "docid": "a66fa281c96d8a448a6a9d3da04556d2", "score": "0.5482332", "text": "protected function handleException(\\Exception $exception)\n {\n $this->parentHandleException($exception);\n }", "title": "" }, { "docid": "6058879d132b8d62c3cce6cddabf6403", "score": "0.54708433", "text": "function www_exception($exception) {\n global $gBitSmarty, $gBitSystem;\n $gBitSmarty->assign('exception', $exception);\n $gBitSystem->fatalError($exception);\n}", "title": "" }, { "docid": "2dcb7eb94e6bb140c3559811265baefc", "score": "0.5451225", "text": "function exception_handler($exception) {\n\n if(is_a($exception, \"DataServerException\")) {\n $error_query = \"code=data&url=\" . urlencode($_SERVER['REQUEST_URI']);\n } else {\n $error_query = \"code=internal\";\n }\n $error_url = \"../error-page/?{$error_query}\";\n\n $recipients = array(\n \"zootsuitbrian@gmail.com\",\n );\n\n $recipient_str = implode(\", \", $recipients);\n\n // a text representation of the exception\n ob_start();\n var_dump($exception);\n $text = ob_get_contents();\n ob_end_clean();\n\n if(!Page::is_spider()) {\n mail(\n $recipient_str, \n \"mobile web page experiencing problems\",\n \"the following url is throwing exceptions: http://mobi.mit.edu{$_SERVER['REQUEST_URI']}\\n\" .\n \"Exception:\\n\" . \n \"$text\\n\" .\n \"The User-Agent: \\\"{$_SERVER['HTTP_USER_AGENT']}\\\"\\n\" .\n \"The referer URL: \\\"{$_SERVER['HTTP_REFERER']}\\\"\"\n );\n }\n\n header(\"Location: {$error_url}\");\n die(0);\n}", "title": "" }, { "docid": "dbb59e89485d3ec8b5d6dfde905510a5", "score": "0.5431029", "text": "public static function handle_exception( $ex )\n {\n self::sys()->html = \"\";\n\n try\n {\n if ( ! self::sys()->isAjax() )\n { \n // FCGI Check for proper Header\n $header_prefix = self::get_proper_header();\n header( \n $header_prefix . \n \" 500 Internal Server Error.\", true, 500 );\n }\n\n $data = self::sys()->trace_dump_exception( $ex );\n\n $FILE = basename( $data[\"file\"] );\n $LINE = $data[\"line\"];\n $MSG = $data[\"msg\"];\n $TRACE = \"\";\n\n foreach( $data[\"trace\"] as $set )\n {\n $col=\"#557\";\n\n // Remove any path-type indication\n if ( isset( $set[\"args\"] ) )\n {\n // Get last base pathtype;\n $base = basename( \n dirname( $_SERVER['DOCUMENT_ROOT'] ) ) . \"/\";\n $set[\"args\"] = preg_replace( \n '_(?<=color\\:#884;\\\"\\>\\').*?'.\n preg_quote($base,\"_\").\n '_', \n '.../', $set[\"args\"] );\n }\n\n $a = ( isset( $set[\"args\"] ) ) \n ? '( <span class=\"tiny-exception-args\" '.\n 'style=\"color:#666\">'.\n $set[\"args\"].\n \"</span> );\" \n : \"\";\n\n $f = ( isset( $set[\"file\"] ) ) \n ? basename( $set[\"file\"] ) \n : \"\";\n\n $l = ( isset( $set[\"line\"] ) ) \n ? $set[\"line\"] \n : \"\";\n\n $t = ( isset( $set[\"type\"] ) \n && $set[\"type\"] != \"type ( undefined )\" )\n ? '<span class=\"tiny-exception-type\" style=\"color:'.\n ($col=$set[\"type\"]==\"->\"?\"#755\":\"#575\").'\">'.\n $set[\"type\"] .\n \"</span>\"\n : \"\";\n $fn = ( isset( $set[\"function\"] ) )\n ? \"<span class=\\\"tiny-exception-function\\\" \".\n \"style=\\\"color:$col\\\">\".\n $set[\"function\"] .\n \"</span>\"\n : \"\";\n $c = ( isset( $set[\"class\"] ) \n && $set[\"class\"] != \"class ( undefined )\")\n ? \"<span class=\\\"tiny-exception-class\\\" \".\n \"style=\\\"color:$col\\\">\".\n $set[\"class\"] .\n \"</span>\"\n : \"\";\n\n $TRACE .= \"<div style=\\\"\".\n \"width:95%;\".\n \"margin:0;\".\n \"padding:0;\".\n \"margin-left:2em;\\\">\".\n \"<div style=\\\"\".\n \"float:left;\".\n \"margin:0;\".\n \"padding:0;\".\n \"color:#666\\\">\".\n \"$f\".\n \"</div>\".\n \"<div style=\\\"\".\n \"float:right;\".\n \"margin:0;\".\n \"padding:0;\".\n \"color:#444\".\"\\\">\".\n \"Line $l\".\n \"</div>\".\n \"</div>\".\n \"<div style=\\\"\".\n \"width:100%;\".\n \"margin:0;\".\n \"padding:0;\".\n \"margin-bottom:.3em;\".\n \"margin-left:2.5em;\".\n \"clear:both;\\\">\".\n \"$c$t$fn $a\".\n \"</div>\";\n }\n\n $res = \"<h3 style=\\\"color:#f00;\\\">\".\n \"Exception: '\". $data[\"exc\"] .\"'\".\n \"</h3>\".\n \"<p>Msg: $MSG</p>\".\n \"<p>\".\n \"File: <b style=\\\"color:#666\\\">$FILE</b> \".\n \"in line \".\n \"<b style=\\\"color:#666\\\">$LINE</b>\".\n \"</p>\" .\n \"$TRACE\";\n\n $exception_html = self::sys()->failsafe_render( $res, true );\n\n // Added in v0.2.6\n // by default tiny stores now every occuring exception \n if ( self::sys()->caching_available == true )\n {\n // Store Exception into tiny's cache for latter review\n $target = self::sys()->base . \"/cache/exceptions\";\n\n if ( ! is_dir( $target ) )\n {\n // Get cache folder fileperms\n $cFilePerms = fileperms( dirname( $target ) );\n mkdir( $target, $cFilePerms, true );\n }\n $fn = $target . \"/\" . sha1( \n microtime(true) \n ) . \".exception\";\n\n file_put_contents( $fn, $exception_html );\n\n $fn = basename( $fn,\".exception\" );\n\n $fn = substr($fn, 0, 5) . \"...\" . substr( $fn, -5 );\n\n $stored_exception_path = \n \"/tinyAdmin/admin/exception/view/\" . $fn;\n }\n\n if ( self::sys()->isAjax() )\n {\n // We're responding to an ajax call. Do something.\n if ( self::sys()->dev_state != \"dev\" )\n {\n // Only set header in stable mode, otherwise debug \n // information wont be displayed properly under some \n // circumstances\n $header_prefix = self::get_proper_header();\n\n header( \n $header_prefix . \n \" 500 Internal Server Error.\", true, 500 );\n\n $result = array(\n \" A server error occured. That's all we know.\"\n );\n\n // dump the error message\n self::dump_ajax_error( $result );\n die();\n\n } else {\n\n $FILE = basename( $data[\"file\"] );\n $LINE = $data[\"line\"];\n $MSG = $data[\"msg\"];\n\n $result = array(\n \"file\" => $FILE,\n \"line\" => $LINE,\n \"msg\" => $MSG,\n \"code\" => \"Exception\"\n );\n }\n\n // Added in v0.2.6\n if ( self::sys()->caching_available == true )\n {\n $result['exc'] = $stored_exception_path;\n }\n\n // dump the error message\n self::dump_ajax_error( $result );\n die();\n }\n\n // Added in v0.2.6\n if ( self::sys()->caching_available == true \n && isset( $_SESSION['tinyadmin_is_logged_in'] ) \n && $_SESSION['tinyadmin_is_logged_in'] == true \n ) {\n // This way exceptions may be reviewed at a later time.\n header( 'Location: ' . $stored_exception_path );\n } else {\n // We don't store, so do a raw dump.\n echo $exception_html;\n }\n exit();\n\n }\n catch (Exception $e)\n {\n // Flush any buffered output\n // Added in 0.2.6\n self::clean_all_ob_levels();\n\n print get_class($e).\n \" thrown within the exception handler.\".\n \" Message: \".$e->getMessage().\n \" on line \".$e->getLine();\n }\n }", "title": "" }, { "docid": "bf114bebb8d7ac4491029ab569d8272a", "score": "0.54048514", "text": "abstract protected static function DO_ERRORS();", "title": "" }, { "docid": "406fda4ebf9bd8e9a1ce78b71614799d", "score": "0.53919923", "text": "function custom_error_handler($err_code, $err_msg, $err_file, $err_line) {\r\n\t$ExceptionHandle = new ExceptionHandle();\r\n\t$ExceptionHandle ->custom_error_handler($err_code, $err_msg, $err_file, $err_line);\r\n}", "title": "" }, { "docid": "4606f1aabb4b8bc4eb05faa506086bfe", "score": "0.53857666", "text": "public function testDoRequestCatchException()\n {\n $client = $this->getMockClientException();\n $domCrawler = $this->getMockDomCrawler()->makePartial();\n\n $crawl = new CrawlerUrl($client, $domCrawler);\n $result = $crawl->doRequest('http://example.com/unknown');\n\n $this->assertEquals(null, $result);\n }", "title": "" }, { "docid": "ac96805bfb3d7e995d4ce140c1b8be7b", "score": "0.53760666", "text": "protected function registerErrorHandling()\n {\n error_reporting(-1);\n\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n // ignore ACF non-numeric issue on PHP 7.1.x until it is fixed\n if (stripos($file, 'acf-repeater/views/field.php') !== false && $message === 'A non-numeric value encountered') {\n return false;\n }\n // ignore wordpress test cases\n if ($message === '/tmp/wordpress-tests-lib/includes/../data/themedir1 is not readable') {\n return false;\n }\n\n throw new ErrorException($message, 0, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n $this->handleUncaughtException($e);\n });\n\n register_shutdown_function(function () {\n $this->handleShutdown();\n });\n }", "title": "" }, { "docid": "9c10c99eecf6a1b89ecd117473223ac4", "score": "0.53724366", "text": "public static function startExceptionHandling(){\n\t\t\\Illuminate\\Foundation\\Application::startExceptionHandling();\n\t}", "title": "" }, { "docid": "44274e71b0ce60ea28ab5ddda477cc7d", "score": "0.5354461", "text": "public function testExceptions() {\n try {\n $object = new FileLoader(TEST_DIR . '/config/test.tmp');\n $this->assertFalse(true);\n\n } catch (Exception $e) {\n $this->assertTrue(true, $e->getMessage());\n }\n\n try {\n $object = new FileLoader(TEST_DIR . '/config/test.xml');\n $object->load();\n $this->assertFalse(true);\n\n } catch (Exception $e) {\n $this->assertTrue(true, $e->getMessage());\n }\n }", "title": "" }, { "docid": "7700ffeb1dd13f73394e7520cb504aa7", "score": "0.5341826", "text": "private function workWithException(\\Throwable $ex)\n {\n throw new \\Exception($ex);\n }", "title": "" }, { "docid": "c92df54aeded5a7b4854f85a44db3ad4", "score": "0.5335542", "text": "public function testGetException()\n {\n $indexer = new FileIndexer();\n $exceptionRaised = false;\n\n try {\n $indexer->get('/some_path/is_wrong');\n } catch (Exception $exception) {\n $exceptionRaised = true;\n }\n $this->assertTrue($exceptionRaised);\n }", "title": "" }, { "docid": "bb93d3e202f04e9072fa4cc804de00c7", "score": "0.53311926", "text": "public function testChainingExceptions()\n\t {\n\t\t R::freeze( TRUE );\n\t\t $exception = NULL;\n\t\t try {\n\t\t\t\t$book = R::load( 'book', 1, 'invalid sql' );\n\t\t} catch( RedException $exception ) {}\n\t\tpass();\n\t\tasrt( ( $exception instanceof RedException ), TRUE );\n\t\tasrt( ( $exception->getPrevious() instanceof \\Exception ), TRUE );\n\t }", "title": "" }, { "docid": "23bf76a6beb0e59357b3e94659271b95", "score": "0.53271323", "text": "public function exception(string $ex);", "title": "" }, { "docid": "59ef3a4b6914124a888c6d050c04a255", "score": "0.5321095", "text": "function en_exception_handler($exception) {\n echo \"Uncaught \" . get_class($exception) . \":\\n\";\n if ($exception instanceof EDAMUserException) {\n echo \"Error code: \" . EDAMErrorCode::$__names[$exception->errorCode] . \"\\n\";\n echo \"Parameter: \" . $exception->parameter . \"\\n\";\n } else if ($exception instanceof EDAMSystemException) {\n echo \"Error code: \" . EDAMErrorCode::$__names[$exception->errorCode] . \"\\n\";\n echo \"Message: \" . $exception->message . \"\\n\";\n } else {\n echo $exception;\n }\n}", "title": "" }, { "docid": "7c8ab6cf2d35c04b6ec46965ef8b15a4", "score": "0.53143036", "text": "function myExceptionHandler($exception) {\n echo \"Roo: Uncaught exception: <p>\" . $exception->getMessage() . \"</p><pre>\" . $exception->getTraceAsString(), \"</pre>\";\n}", "title": "" }, { "docid": "4cdcaafd2d5b8506053f4d4f09c438f9", "score": "0.5314165", "text": "private function _throwIfUnsafe()\n {\n if ($this->infinite) {\n throw new \\Exception(\n 'Stream source is unsafe, stream is infinite call take(n) to process finite number of source items'\n );\n }\n }", "title": "" }, { "docid": "4af7cd01fde7889ddd6fcbb0d0780f35", "score": "0.5314136", "text": "public function testExceptions()\n {\n // Test that the get method throws an exception if the $id parameter is empty.\n $caught_get_no_id_exception = false;\n try {\n self::$api->get(null);\n usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP);\n } catch (CoreException $e) {\n $caught_get_no_id_exception = $this->errorHasString($e, 'Invalid \"id\" parameter');\n }\n\n $this->assertTrue($caught_get_no_id_exception);\n\n // Test that the delete method throws an exception if the $id parameter is empty.\n $caught_delete_no_id_exception = false;\n try {\n self::$api->delete(null);\n usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP);\n } catch (CoreException $e) {\n $caught_delete_no_id_exception = $this->errorHasString($e, 'Invalid \"id\" parameter');\n }\n\n $this->assertTrue($caught_delete_no_id_exception);\n\n // Test that the update method throws an exception if the $id parameter is empty.\n $caught_update_no_id_exception = false;\n try {\n self::$api->update(null, []);\n usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP);\n } catch (CoreException $e) {\n $caught_update_no_id_exception = $this->errorHasString($e, 'Invalid \"id\" parameter');\n }\n\n $this->assertTrue($caught_update_no_id_exception);\n\n // Test that the create method throws an exception if the $identifier parameter is empty.\n $caught_create_empty_identifier_param_exception = false;\n try {\n self::$api->create(null, []);\n usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP);\n } catch (CoreException $e) {\n $caught_create_empty_identifier_param_exception = $this->errorHasString($e, 'Invalid \"identifier\" field');\n }\n\n $this->assertTrue($caught_create_empty_identifier_param_exception);\n\n $caught_create_invalid_identifier_field_exception = false;\n try {\n self::$api->create('identifier', ['identifier' => 1234]);\n usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP);\n } catch (CoreException $e) {\n $caught_create_invalid_identifier_field_exception = $this->errorHasString($e, 'Invalid \"identifier\" field');\n }\n\n $this->assertTrue($caught_create_invalid_identifier_field_exception);\n }", "title": "" }, { "docid": "6b43ae8ffa7b565574645fbbf6dd45b4", "score": "0.5307114", "text": "public function errHandle(CurlResponse $curlResponse, \\Exception $exception)\n {\n }", "title": "" }, { "docid": "239e26c7f0d964d6a1d308ed0f87845f", "score": "0.5296907", "text": "public function onException(Exception $exception);", "title": "" }, { "docid": "aa8ee3e7d741696079f0991a4a3df372", "score": "0.52948606", "text": "public function onException($context, \\Exception $exception);", "title": "" }, { "docid": "3eb58e3d624f269f72212cd6bc7e839e", "score": "0.52892905", "text": "private function load_exceptions()\r\n {\r\n $exceptions = array('BackendProException', 'DatabaseException');\r\n\r\n foreach($exceptions as $exception)\r\n {\r\n list($path, $file) = Modules::find($exception, 'core', 'exceptions/');\r\n\r\n if (!Modules::load_file($file, $path))\r\n {\r\n show_error('Failed to load the base controller ' . $file);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "d297ea7759d22e7eba4a29c3af13fbc9", "score": "0.5281844", "text": "public static function handleException(\\stdClass $json)\n {\n if ($app = self::app()) {\n // if the app has Google Analytics, send an event\n if ($id = $app->getGoogleAnalyticsId()) {\n GoogleAnalytics::event($id, 'Exceptions', 'ApiServiceErrorException', $json->Message);\n GoogleAnalytics::event($id, 'Exceptions', 'ApiServiceCodeException', $json->Debug->Code);\n }\n }\n }", "title": "" }, { "docid": "52b60e66de90928e840030d6e5f6bf77", "score": "0.5280592", "text": "public function Cdtn_TryCatch()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif( count($this -> Insertions) < 3 )\n\t\t\t{\n\t\t\t\tthrow new Exception(Core::UNICAT_XCPT_MAIN_CLS, Core::UNICAT_XCPT_MAIN_FNC, Core::UNICAT_XCPT_SEC_VAR_PRHBLWRARRSIZE);\n\t\t\t}\n\t\t}\n\t\tcatch( Exception $Exception )\n\t\t{\n\t\t\t$Exception -> ExceptionWarning(get_called_class(), __FUNCTION__, $Exception -> Get_VariableNameAsText($this -> Insertions), 3);\n\t\t}\n\n\t\t$FFiller_Basic = new CodeGenerator(Core::JASC_MODE_RTLINS);\n\t\t$FFiller_Basic -> Set_ExportWay(Core::UNICAT_OPTION_SKIP);\n\t\t$FFiller_Basic -> Set_ScriptKeyword(Core::JASC_OPTION_TRY);\n\t\t$FFiller_Basic -> Set_TextFormatter();\n\t\t$FFiller_Basic -> Set_BlockBorder(Core::JASC_OPTION_BRCS);\n\t\t$FFiller_Basic -> Set_Value($this -> Insertions[0]);\n\t\t$FFiller_Basic -> Set_TextFormatter();\n\t\t$FFiller_Basic -> Set_ScriptKeyword(Core::JASC_OPTION_CATCH);\n\t\t$FFiller_Basic -> Set_BlockBorder(Core::JASC_OPTION_CMNBRKTS);\n\t\t$FFiller_Basic -> Set_Value($this -> Insertions[1]);\n\t\t$FFiller_Basic -> Set_TextFormatter();\n\t\t$FFiller_Basic -> Set_BlockBorder(Core::JASC_OPTION_BRCS);\n\t\t$FFiller_Basic -> Set_Value($this -> Insertions[2]);\n\t\t$FFiller_Basic -> Set_TextFormatter();\n\t\t$this -> LocalCode = $FFiller_Basic -> Execute();\n\t}", "title": "" }, { "docid": "d250ebc72d93c13b3fabbff25652c390", "score": "0.5278613", "text": "public function handleException(\\Exception $exception)\n {\n $this->exception = new RunnableException($exception);\n }", "title": "" }, { "docid": "8c08a0bc4890c8808252a418f0838891", "score": "0.5276256", "text": "private function catch_upload_engine_exceptions($e, $handle, $try_again, $basename, $from) {\n\t\tglobal $updraftplus;\n\t\t\n\t\t$this->log(\"ERROR: upload error (\".get_class($e).\"): \".$e->getMessage().' (line: '.$e->getLine().', file: '.$e->getFile().')');\n\t\t$this->client->setDefer(false);\n\t\tfclose($handle);\n\t\t$this->jobdata_delete('resume_'.md5($basename));\n\t\tif (false == $try_again) throw($e);\n\t\t// Reset this counter to prevent the something_useful_happened condition's possibility being sent into the far future and potentially missed\n\t\tif ($updraftplus->current_resumption > 9) $updraftplus->jobdata_set('uploaded_lastreset', $updraftplus->current_resumption);\n\t\treturn $this->do_upload_engine($basename, $from, false);\n\t}", "title": "" }, { "docid": "a1f397de44d2e1c65095e2a6b79d11a6", "score": "0.52738297", "text": "public function testProcessingContinuesWhenExceptionIsThrownInOriginalProcess(): void\n {\n $httpLogger = new HttpLoggerStub();\n $middleware = $this->getMiddleware($httpLogger);\n\n try {\n $middleware->handle(\n $this->getRequest(),\n static function (): void {\n throw new InvalidDocumentClassException('Something failed.');\n }\n );\n } catch (InvalidDocumentClassException $exception) {\n // catching exception so we can assert the the process continues to send data to http logger\n }\n\n self::assertInstanceOf(ServerRequestInterface::class, $httpLogger->getRequest());\n self::assertNull($httpLogger->getResponse());\n self::assertInstanceOf(DateTime::class, $httpLogger->getNow());\n }", "title": "" }, { "docid": "c07f08027559864c5c27eaad3365a3b3", "score": "0.52707857", "text": "public static function handleException($exception) {\n restore_error_handler();\n restore_exception_handler();\n\n $category = 'exception.' . get_class($exception);\n\n // php <5.2 doesn't support string conversion auto-magically\n $message = $exception->__toString();\n if (isset($_SERVER['REQUEST_URI']))\n $message.=\"\\nREQUEST_URI=\" . $_SERVER['REQUEST_URI'];\n if (isset($_SERVER['HTTP_REFERER']))\n $message.=\"\\nHTTP_REFERER=\" . $_SERVER['HTTP_REFERER'];\n $message.=\"\\n---\";\n\n try {\n self::displayException($exception);\n } catch (Exception $e) {\n self::displayException($e);\n }\n\n try {\n exit();\n } catch (Exception $e) {\n // use the most primitive way to log error\n $msg = get_class($e) . ': ' . $e->getMessage() . ' (' . $e->getFile() . ':' . $e->getLine() . \")\\n\";\n $msg .= $e->getTraceAsString() . \"\\n\";\n $msg .= \"Previous exception:\\n\";\n $msg .= get_class($exception) . ': ' . $exception->getMessage() . ' (' . $exception->getFile() . ':' . $exception->getLine() . \")\\n\";\n $msg .= $exception->getTraceAsString() . \"\\n\";\n $msg .= '$_SERVER=' . var_export($_SERVER, true);\n error_log($msg);\n exit(1);\n }\n }", "title": "" }, { "docid": "935a2880fee0895a085f77a10f9f3c0d", "score": "0.5270719", "text": "protected function _init()\n {\n // by _init(). Must use LazyUserException.\" error when users throw the\n // wrong exception:\n // throw new \\Exception('test');\n\n throw new \\LazyJsonMapper\\Exception\\LazyUserException('Hello world! Thrown by a failing constructor.');\n }", "title": "" }, { "docid": "648b4698ec1a0890ced798beefd83221", "score": "0.5267661", "text": "#[@test, @expect('scriptlet.ScriptletException')]\n public function exceptionInDoWrapped() {\n $this->newRequest('GET', new \\peer\\URL('http://localhost/'));\n \n $s= newinstance('scriptlet.HttpScriptlet', array(), '{\n public function doGet($request, $response) {\n throw new IllegalArgumentException(\"TEST\");\n }\n }');\n $response= $s->process();\n }", "title": "" }, { "docid": "42ab1ef06bc52d001237da7e8ca430eb", "score": "0.5262427", "text": "private function throwSingletonException() {\n\t\tthrow new \\Exception('Eine Singelton-Instanz darf in der Regel werden geklont noch serialisiert werden.', 1001);\n\t}", "title": "" }, { "docid": "08d263f6968825e76fa71ca948458803", "score": "0.5261988", "text": "function exception_for($reason)\n{\n return Create::exceptionFor($reason);\n}", "title": "" }, { "docid": "5909ac39a2358805aad7bd74fa9c1657", "score": "0.5260319", "text": "public function __invoke()\n {\n $root = \\dirname(__DIR__);\n\n $pdo = new \\PDO();\n\n throw new CustomException('Error Processing Request', 1);\n }", "title": "" }, { "docid": "fefe20123877ca01acbe88f0a59ba666", "score": "0.5252466", "text": "public static function restoreExceptionHandler()\n {\n return restore_exception_handler();\n }", "title": "" }, { "docid": "9cf06478dfac97b13b6d290e1d7dde0b", "score": "0.5231285", "text": "private function processException($exception)\n {\n //TODO - we are now failing. Replace error handler with instant\n //shutdown handler.\n $fallBackHandler = ['Tier\\Tier', 'processException'];\n if (class_exists('\\Throwable') === true) {\n $fallBackHandler = ['Tier\\Tier', 'processThrowable'];\n }\n\n $handler = $this->exceptionResolver->getExceptionHandler(\n $exception,\n $fallBackHandler\n );\n\n// if (is_a($exception, 'Exception') === true) {\n// $exceptionContext = ExceptionContext::fromException($exception);\n// }\n// else {\n// $exceptionContext = ExceptionContext::fromThrowable($exception);\n// }\n\n try {\n// $injector = clone $this->injector;\n// $injector->share($exceptionContext);\n// $injector->execute($handler);\n call_user_func($handler, $exception);\n }\n catch (\\Exception $e) {\n //Fatal error shutdown\n echo $e->getMessage();\n exit(-1);\n }\n catch (\\Throwable $e) {\n //Fatal error shutdown\n echo $e->getMessage();\n exit(-1);\n }\n }", "title": "" }, { "docid": "e75e039ffa1faead4546e621a79a8fd7", "score": "0.52267337", "text": "public function testHandleException()\n\t{\n\t\t$exception = new Exception(\"test-error\");\n\t\t$this->object->expects($this->any())->method('test')->with()->will($this->throwException($exception));\n\t\t\n\t\ttry {\n\t\t\t$this->RPC_Server_XMLRPC->handle(xmlrpc_encode_request('test', array()));\n\t\t} catch (Exception $e) {\n\t\t\t$this->fail(\"Exception was not caught\");\n\t\t}\n\n\t\t$this->assertEquals(xmlrpc_encode(array(\"faultCode\"=>-1, \"faultString\"=>\"Unexpected exception.\")), $GLOBALS['__output']);\n\t\t$this->assertEquals(\"<extraInfo><type>X-Exception</type><value><string>test-error</string></value></extraInfo>\", str_replace(array(\"\\n\", \" \"), '', $GLOBALS['__extra']));\n\t}", "title": "" }, { "docid": "1862f5871ea5053b93a1be18fdf97328", "score": "0.5225825", "text": "private function handleRequestException(HttpClientException $e) {\n if ($response = $e->getResponse()) {\n $exception = new Exception($response->getReasonPhrase(), $response->getStatusCode(), $e);\n //$exception->setBody(json_decode($response->getBody()));\n\n throw $exception;\n }\n\n throw new Exception($e->getMessage(), 500, $e);\n }", "title": "" }, { "docid": "879530c2aff40d0c79fc9dbb7c6b85b3", "score": "0.52143663", "text": "protected function handleError($msg){\n\t\tthrow new Exception($msg);\n\t}", "title": "" }, { "docid": "be4d0f88624cde090fc34acd9fe550c9", "score": "0.52066004", "text": "public function handleException($exception){\n echo \"-------------------------------\\n\";\n var_dump($exception);\n die();\n }", "title": "" }, { "docid": "b03b033c05894a8c9fa6be653e134e6e", "score": "0.52008826", "text": "public function throwException(){\n if($this->error != null)\n throw new Exception($this->error);\n }", "title": "" }, { "docid": "4146b64675ea4907aa9f16d1d6a4644e", "score": "0.5200811", "text": "function exception_handler($exception)\n{\n errorpage('An exception occured: ', $exception->getMessage(), true);\n}", "title": "" }, { "docid": "3f2766118a49d03bdcbee8b3c37861a2", "score": "0.5195986", "text": "public function handle_exception($e) {\n if ($e instanceof TSScriptException) {\n $this->usage($e->getMessage(), max($e->getCode(), 1));\n }\n if ($this->cli_exception_handler !== null) {\n call_user_func($this->cli_exception_handler, $e);\n }\n exit($e->getCode());\n }", "title": "" }, { "docid": "e3c3659a0dd0017523c78f60b0b52ca4", "score": "0.5195673", "text": "public function process() {\n ErrorHandler::logException($this);\n }", "title": "" }, { "docid": "2b546f5cb5feecc9d21eaac26aa689b9", "score": "0.5190278", "text": "function exceptionHandler ($e) {\n echo \"<p><strong>Problem </strong>\" . $e->getMessage() .\n \" in file \" . $e->getFile() .\n \", on line \" . $e->getLine() . \"</p>\";\n}", "title": "" }, { "docid": "d149b1363821335bef8041eeacfe2ad3", "score": "0.5178519", "text": "function Exception_Handler($e)\n{\n\tif(file_exists(LOCK_FILE))\n\t{\n\t\tunlink(LOCK_FILE);\n\t}\n\tdie('Exception: '.$e->getMessage().\"\\n\");\n}", "title": "" }, { "docid": "c483cacc166946aca0e5dacb3441ae52", "score": "0.5162041", "text": "public static function exception($e) {\n self::$client->captureException($e);\n }", "title": "" }, { "docid": "e7181789dd6f5db939885cab87d255aa", "score": "0.5161441", "text": "public function handleException(\\Exception $exception)\r\n {\r\n if (!$this->ignorePrevHandler && $this->prevExceptionHandler) {\r\n call_user_func($this->prevExceptionHandler, $exception);\r\n }\r\n\r\n if (404 == $exception->getCode()) {\r\n if ($this->triggerHandler('notFound', $exception)) {\r\n return;\r\n }\r\n }\r\n\r\n if (!$this->triggerHandler('error', $exception)) {\r\n $this->internalHandleException($exception);\r\n }\r\n\r\n restore_exception_handler();\r\n }", "title": "" }, { "docid": "719cd850735ce9100f6f22ba381dca5b", "score": "0.51561224", "text": "function DieOnError()\t{ return true; \t}", "title": "" }, { "docid": "928608ecc6226e5ea1cc9d7ed0a47c45", "score": "0.5155802", "text": "abstract protected function errno();", "title": "" }, { "docid": "f41f6a3593a09c6befc904fcd81b6b55", "score": "0.51491797", "text": "public function areExceptionsCaught() : bool;", "title": "" }, { "docid": "b9d24826de534cb92c33fb03b3f6b6c0", "score": "0.5142997", "text": "private function handleException($e) {\n echo \"Database error: \" . $e->getMessage();\n exit;\n }", "title": "" }, { "docid": "349d4974c1def229b3cd5dff085cec7b", "score": "0.51424634", "text": "protected function registerErrorHandling()\n {\n error_reporting(-1);\n\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n throw new ErrorException($message, 0, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n $this->handleUncaughtException($e);\n });\n\n register_shutdown_function(function () {\n $this->handleShutdown();\n });\n }", "title": "" }, { "docid": "a981a375b4715d574aee3c464f37c366", "score": "0.5140343", "text": "public function testException()\n {\n $parser = new Hostingcheck_Scenario_Parser_ClassName();\n\n $parser->parse('Info', 'FooBarBizBaz');\n }", "title": "" }, { "docid": "bfef14e7f0c6cd0d166d448faf1fdc9c", "score": "0.51226944", "text": "final public function processException(RhubarbException $er)\n {\n if ($this->shouldTrapException($er)) {\n return $this->handleException($er);\n } else {\n // If exception trapping is disabled we should just rethrow the exception.\n throw $er;\n }\n }", "title": "" }, { "docid": "8b6afe635114c681dd26063315e0d147", "score": "0.51184577", "text": "public function testRunMethodHandleException() {\n\t\t$moduleStub = $this->getMockForAbstractClass('Simovative\\Framework\\Module\\Module');\n\t\t$factoryStub = $this->getMockBuilder('Simovative\\Framework\\Dependency\\FactoryInterface')->getMock();\n\t\t$this->kernelStub->method('getModules')->willReturn(array(\n\t\t\t$moduleStub \n\t\t));\n\t\t\n\t\t$moduleStub->method('createFactory')\n\t\t\t->willReturn($factoryStub);\n\t\t\n\t\t$moduleStub->method('createNavigationContainer')\n\t\t\t->willReturn(null);\n\t\t\n\t\t$this->getRequestStub->method('isGet')\n\t\t\t->willReturn(false);\n\t\t\t\n\t\t$this->getRequestStub->method('isPost')\n\t\t\t->willReturn(false);\n\t\t\n\t\t$exception = new \\Exception('TestMessage123');\n\t\t$this->prepareMocksForRunMethod($exception);\n\t\t\n\t\t$this->expectOutputRegex('/TestMessage123/');\n\t\t$responseResult = $this->kernelStub->run($this->getRequestStub);\n\t\t$this->assertInstanceOf('Simovative\\Framework\\Http\\Response\\HttpResponseInterface', $responseResult);\n\t}", "title": "" }, { "docid": "9d3daf589b2841c764968de2e19f11b5", "score": "0.511782", "text": "public function testNormaliseThrows(): void\n {\n $inner = new CircularReferenceException();\n $normaliser = new NormaliserStub($inner, true);\n $serialiser = new ResponseSerialiser([], $normaliser);\n\n try {\n $serialiser->normalise(new SerialisableResponse(204));\n } catch (ResponseNormaliserException $exception) {\n static::assertSame($inner, $exception->getPrevious());\n static::assertSame('An exception occurred while trying to serialise a response.', $exception->getMessage());\n\n return;\n }\n\n self::fail('Exception was not caught.');\n }", "title": "" } ]
9a9287f46fe9aae3652b1a787f7eaa41
filter jadwal guru berdasarkan sekolah dan kelas
[ { "docid": "7d03c0fa07cf2c13888d37108e14a61d", "score": "0.0", "text": "public function SelectJadwalGuru(Request $request){\n $id =Auth::user()->ugrId;\n $skl=decrypt_url($request->skl);\n $kelas=decrypt_url($request->kelas);\n\n if (Cache::has('SelectJadwalGuru'.$id.$skl.$kelas)){ $data = Cache::get('SelectJadwalGuru'.$id.$skl.$kelas); }\n else{ \n if(empty($id)){\n\n }\n else{\n if($skl == 'ALL'){\n $data = Master_mapel_jadwal::where('majdUgrId',$id)\n ->where('majdKlsKode',$kelas)\n ->select('majdMapelKode','majdNama')\n ->groupby('majdMapelKode')\n ->get();\n }\n else{\n $data = Master_mapel_jadwal::where('majdUgrId',$id)\n ->where('majdSklId',$skl)\n ->where('majdKlsKode',$kelas)\n ->select('majdMapelKode','majdNama')\n ->groupby('majdMapelKode')\n ->get();\n }\n \n }\n Cache::put('SelectJadwalGuru'.$id.$skl.$kelas, $data, ChaceJam());\n }\n return $data;\n \n }", "title": "" } ]
[ { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.71109", "text": "public function filter();", "title": "" }, { "docid": "5f818ee7bb2d11f44cbf5753e1933c47", "score": "0.6807388", "text": "public function filteri(){\n $_SESSION['datum_od'] = null;\n $_SESSION['datum_do'] = null;\n $_SESSION['mesto'] = null;\n $_SESSION['vreme_od'] = null;\n $_SESSION['vreme_do'] = null;\n \n $this->prikaz('filteri', []);\n }", "title": "" }, { "docid": "dc1d930584858634be84cd21483ae9a7", "score": "0.67932034", "text": "public static function filter() {\n $res = Produit::getDB()->getPDO()->\n query('SELECT DISTINCT marque,type \n\t\t\t\tFROM produit ORDER BY type,marque');\n $file = fopen('static/js/filter.js', 'w');\n fclose($file);\n //liste des tyepes filtrés\n $list = [];\n //filtrage des type\n while ($row = $res->fetch(PDO::FETCH_ASSOC)) {\n $list[$row['type']][] = $row['marque'];\n }\n\n $file = fopen('static/js/filter.js', 'w+');\n\n $chaine = '';\n $type = '';\n $chaine_type = '';\n\n fwrite($file, \"function getMarque(type){\\r\\n\");\n fwrite($file, \"\\r\\n\\tvar chaine_type = '';\\n\\r\");\n fwrite($file, \"\\r\\n\\tswitch(type){\\n\\r\");\n foreach ($list as $key => $value) {\n fwrite($file, \"\\t\\tcase'$key':\\n\\r\");\n fwrite($file, \"\\t\\t\\tchaine_type = '\" . implode('|', $value) . \"';\\n\\r\");\n fwrite($file, \"\\t\\t\\tbreak;\\n\\r\");\n }\n fwrite($file, \"\\t}\\r\\n\");\n fwrite($file, \"\\treturn chaine_type;\\n\\r\");\n fwrite($file, \"}\\r\\n\");\n\n\n $res = Produit::getDB()->getPDO()->\n query('SELECT DISTINCT model,marque FROM produit ORDER BY marque,model');\n //liste des marques triées\n $list1 = [];\n while ($row = $res->fetch(PDO::FETCH_ASSOC)) {\n $list1[$row['marque']][] = $row['model'];\n }\n\n fwrite($file, \"function getModel(marque){\\r\\n\");\n fwrite($file, \"\\r\\n\\tvar chaine_marque = '';\\n\\r\");\n fwrite($file, \"\\r\\n\\tswitch(marque){\\n\\r\");\n foreach ($list1 as $key => $value) {\n fwrite($file, \"\\t\\tcase'$key':\\n\\r\");\n fwrite($file, \"\\t\\t\\tchaine_marque = '\" . implode('|', $value) . \"';\\n\\r\");\n fwrite($file, \"\\t\\t\\tbreak;\\n\\r\");\n }\n fwrite($file, \"\\t}\\r\\n\");\n fwrite($file, \"\\treturn chaine_marque;\\n\\r\");\n fwrite($file, \"}\\r\\n\");\n fclose($file);\n\n $res = Produit::getDB()->getPDO()->\n query('SELECT DISTINCT model FROM produit');\n //liste des model triés\n $list3 = [];\n //filtrage des des models\n while ($row = $res->fetch(PDO::FETCH_ASSOC)) {\n $list3[] = $row['model'];\n }\n\n return ['filtreType' => $list, 'filtreMarque' => $list1, 'filtreModel' => $list3];\n }", "title": "" }, { "docid": "16d26e6007523f5e28824048f2b7b313", "score": "0.67638415", "text": "protected function filter()\n {\n //\n }", "title": "" }, { "docid": "9df51d479de0ccacdcc83d4fe8781414", "score": "0.6728267", "text": "public function filter($data);", "title": "" }, { "docid": "17e1867e5fa48b53d74e7916cf37063a", "score": "0.6606822", "text": "protected function filter() {\n\t}", "title": "" }, { "docid": "103bf7e523b4093e496e4c57e4997307", "score": "0.6584119", "text": "abstract public function filter();", "title": "" }, { "docid": "103bf7e523b4093e496e4c57e4997307", "score": "0.6584119", "text": "abstract public function filter();", "title": "" }, { "docid": "69cd2767f765efd93e28ba11c3b2447b", "score": "0.6535758", "text": "function getArrayListFilterCol() {\n\t\t\t$data['unit'] = 'm.kodeunit';\n\t\t\t$data['tahunlulus'] = 'substring(m.periodelulus,1,4)';\n\t\t\t\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "262cd666b413f752a66f5e81c1484b96", "score": "0.6504867", "text": "function getListFilter($col,$key,$tahun='',$bulan='') {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': \n\t\t\t\t\treturn \"datepart(year,tglpengajuan) = '$tahun' and datepart(month,tglpengajuan) = '$bulan' \"; \n\t\t\t\tbreak;\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "41e803c863491e48720752f85fbe657d", "score": "0.65039754", "text": "public function filtroInicial() {\n parent::filtroInicial();\n $this->Persistencia->adicionaFiltro('data',Util::getPrimeiroDiaMes(), Persistencia::LIGACAO_AND, Persistencia::ENTRE,Util::getDataAtual());\n \n }", "title": "" }, { "docid": "f7dc17a61e78632f6fe1cb4fdef62012", "score": "0.6467764", "text": "public function getAllFilter()\r\n {\r\n $and = \" and T1.data_criado between '\" . $this->function->data_br_banco($this->data_inicio) . \"' and '\" . $this->function->data_br_banco($this->data_fim) . \"' \";\r\n\r\n $and = ($this->data_inicio && $this->data_fim) ? $and : \"\";\r\n\r\n $sql = \"SELECT T1.*,T3.servico,T4.nome,T4.fantasia as fantasia_f,T6.nome as nome_f,T6.fantasia,T5.cor,T5.status as descricao_status FROM \" . $this->table . \" T1 \r\n left join servicos_areas T2\r\n on T1.id_servico_cliente = T2.id\r\n left join servicos T3\r\n on T2.id_servico = T3.id\r\n left join clientes T4\r\n\t\t\t\t\ton T2.id_area = T4.id and T1.id_chamado = 0\r\n left join funcionarios T6\r\n\t\t\t\t\ton T2.id_area = T6.id and T1.id_chamado = 0\r\n left join status T5\r\n\t\t\t\t\ton T1.status = T5.id where T1.id_chamado = 0\r\n\t\t\t\t\t \" . $and;\r\n\r\n $query = $this->dbh->prepare($sql);\r\n\r\n $result = Database::executa($query);\r\n\r\n\r\n if ($result['status'] && $result['count']) {\r\n for ($i = 0; $linha = $query->fetch(PDO::FETCH_ASSOC); $i++) {\r\n $array[$i]['id'] = $linha['id'];\r\n $array[$i]['servico'] = $linha['servico'];\r\n $array[$i]['id_usuario'] = $linha['id_usuario'];\r\n $array[$i]['id_servico_cliente'] = $linha['id_servico_cliente'];\r\n $array[$i]['assunto'] = $linha['assunto'];\r\n $array[$i]['identifica'] = $linha['nome'] . $linha['fantasia'] . $linha['nome_f'] . $linha['fantasia_f'];\r\n $array[$i]['descricao'] = $linha['descricao'];\r\n $array[$i]['descricao_status'] = $linha['descricao_status'];\r\n $array[$i]['cor'] = $linha['cor'];\r\n $array[$i]['status'] = $linha['status'];\r\n $array[$i]['data_criado'] = $this->function->data_banco_br($linha['data_criado']);\r\n $array[$i]['hora_criado'] = $linha['hora_criado'];\r\n }\r\n\r\n $result['result'] = $array;\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "ca184360d171abf1d209b5f2b571af6f", "score": "0.64457226", "text": "public function filter_json(){\n\n $Ciudad = $_REQUEST['ciudad'];\n $Tipo = $_REQUEST['tipo'];\n\n $data = $this->model->Index();\n $json2 = $this->list();\n $ciudades = $this->unique($json2, 'Ciudad');\n $tipos = $this->unique($json2, 'Tipo');\n\n $json = $this->searchCiudadTipo($Ciudad, $Tipo, $json2);\n\n require_once 'views/index.php';\n }", "title": "" }, { "docid": "43c9c1da52eaed8c1cb5567c218887a7", "score": "0.6405402", "text": "public function filterWhere(){\n $model = ShopOrder::find()\n ->select('shop_order.*')\n ->filterWhere([\n 'contact_name' => 'salah333',\n 'user_id' => 1,\n ])\n ->all();\n vd($model);\n\n }", "title": "" }, { "docid": "1dfa1bf46b7504753ccb50a3a0bde09c", "score": "0.63794345", "text": "function filter($data,$filter)\n {\n $aData=$data;\n $aFilter=$filter;\n\n if (!is_array($aData)) {\n $aData=$this->modx->fromJSON($aData);\n }\n if (!is_array($aFilter)) {\n $aFilter=$this->modx->fromJSON($aFilter);\n }\n\n if (!is_array($aData) || !is_array($aFilter)) {\n return $data;\n }\n\n $aRet=array();\n\n foreach ($aData as $key_element => $element) {\n \n $bIncludi=true;\n\n foreach ($aFilter as $key => $sTest) {\n \n @list($sCampo,$sOperatore) = explode(':', $key);\n if (empty($sOperatore)){$sOperatore=\"=\";}\n $sValore = $element[$sCampo];\n $bTest = $this->test($sTest,$sOperatore,$sValore,true);\n\n if (!$bTest) {\n $bIncludi=false;\n break;\n }\n\n }\n\n if ($bIncludi) {\n $aRet[]=$element;\n }\n\n } \n\n return $aRet;\n\n }", "title": "" }, { "docid": "53ec60538efd47c5755858cd68fc86f3", "score": "0.6298484", "text": "function filterGetList($filtr=NULL) {\n\t\tglobal $_gTables; //Debug($filtr);\n\n\t\t$sql = '';\n\n\t\tif (isset($filtr) && is_array($filtr)) {\n\t\t\tif (isset($filtr['nazwa_aukcji']) && $filtr['nazwa_aukcji'] != '')\n\t\t\t\t$sql.= \" AND a.nazwa_aukcji LIKE '%\" . Common::clean_input($filtr['nazwa_aukcji']) . \"%' \";\n\n\t\t\tif (isset($filtr['id_serwisu']) && $filtr['id_serwisu'] > 0 && is_numeric($filtr['id_serwisu'])) {\n\t\t\t\t$sql .= \" AND a.id_serwisu = '\" . $filtr['id_serwisu'] . \"' \";\n\t\t\t}\n\n\t\t\tif (isset($filtr['website_ids']) && is_array($filtr['website_ids']))\n\t\t\t\t$sql.= \" AND a.id_serwisu IN (\" . implode(',', $filtr['website_ids']) . \") \";\n\n\t\t\tif (isset($filtr['typ']) && (int) $filtr['typ'] > 0) {\n\t\t\t\tswitch ($filtr['typ']) {\n\t\t\t\t\tcase 3: //trwajace\n\t\t\t\t\t\t$sql.= \" AND ( a.data_zakonczenia > NOW() AND a.flaga_zakonczona=0 )\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4: //zakonczone\n\t\t\t\t\t\t$sql.= \" AND ( a.data_zakonczenia <= NOW() OR a.flaga_zakonczona=1 )\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($filtr['po_czasie_aktywne'])) {\n\t\t\t\t$sql.= \" AND data_zakonczenia < NOW() AND flaga_zakonczona = '0'\";\n\t\t\t}\n\n\t\t\tif (isset($filtr['sprzedano'])) {\n\t\t\t\tif ($filtr['sprzedano'] == 0) {\n\t\t\t\t\t//niesprzedano\n\t\t\t\t\t$sql.= \" AND a.sprzedano = 0 \";\n\t\t\t\t} elseif ($filtr['sprzedano'] == 1) {\n\t\t\t\t\t$sql.= \" AND a.sprzedano > 0 \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($filtr['brak_ofert'])) {\n\t\t\t\tif ($filtr['brak_ofert'] == 0) {\n\t\t\t\t\t//niesprzedano\n\t\t\t\t\t$sql.= \" AND a.sprzedano > 0 AND a.flaga_zakonczona = 1\";\n\t\t\t\t} elseif ($filtr['brak_ofert'] == 1) {\n\t\t\t\t\t$sql.= \" AND a.sprzedano = 0 AND a.flaga_zakonczona = 1\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($filtr['oczekujace'])\n\t\t\t\t$sql.= \" AND a.data_cron > NOW() \";\n\t\t\tif (isset($filtr['cron']) && $filtr['cron']==0) {\n\t\t\t\t$sql.= \" AND a.id_aukcji > 0\";\n\t\t\t}\n\n\t\t\tif ($filtr['wystawione'])\n\t\t\t\t$sql.= \" AND a.data_wystawienia < NOW() \";\n\t\t\t\n\n\t\t\tif (isset($filtr['id_kategoria']) && is_numeric($filtr['id_kategoria']) && (int) $filtr['id_kategoria'] > 0) {\n\t\t\t\t$kat = new Kategoria();\n\t\t\t\t$drzewko = $kat->getAllChildren($filtr['id_kategoria']);\n\t\t\t\t$drzewko[] = $filtr['id_kategoria'];\n\t\t\t\t$drzewko = implode(',', $drzewko);\n\t\t\t\tif (substr($drzewko, strlen($drzewko) - 1, 1) == ',')\n\t\t\t\t\t$drzewko = substr($drzewko, 0, strlen($drzewko) - 1);\n\t\t\t\t$sql.= \" AND p.id_kategoria IN (\" . $drzewko . \") \";\n\t\t\t}\n\n\t\t\tif (isset($filtr['id_kategoria']) && is_array($filtr['id_kategoria']) && count($filtr['id_kategoria']) > 0) {\n\t\t\t\t$kat = new Kategoria();\n\t\t\t\tforeach ($filtr['id_kategoria'] as $tmp) {\n\t\t\t\t\t$drzewko = $kat->getAllChildren($tmp);\n\t\t\t\t\t$drzewko[] = $tmp;\n\t\t\t\t}\n\t\t\t\t$drzewko = implode(',', $drzewko);\n\t\t\t\tif (substr($drzewko, strlen($drzewko) - 1, 1) == ',')\n\t\t\t\t\t$drzewko = substr($drzewko, 0, strlen($drzewko) - 1);\n\t\t\t\t$sql.= \" AND p.id_kategoria IN (\" . $drzewko . \") \";\n\t\t\t}\n\n\t\t\tif (isset($filtr['admin']) && !empty($filtr['admin'])) {\n\t\t\t\t$admin = explode(' ', trim($filtr['admin']));\n\t\t\t\tif (count($admin) > 0) {\n\t\t\t\t\tif (count($admin) > 1) {//wiecej niz jedno slowo to musi byc imie i nazwisko\n\t\t\t\t\t\t$sql.= \" AND ( ad.first_name LIKE '%\" . implode(\"%' OR ad.first_name LIKE '%\", $admin) . \"%' ) AND ( ad.last_name LIKE '%\" . implode(\"%' OR ad.last_name LIKE '%\", $admin) . \"%' )\";\n\t\t\t\t\t} else { //tylko jedno slowo to albo imie albo nazwisko\n\t\t\t\t\t\t$sql.= \" AND ( ad.first_name LIKE '%\" . implode(\"%' OR ad.first_name LIKE '%\", $admin) . \"%' OR ad.last_name LIKE '%\" . implode(\"%' OR ad.last_name LIKE '%\", $admin) . \"%' )\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($filtr['ids']) && is_array($filtr['ids']) && !empty($filtr['ids'])) {\n\t\t\t\t$sql.= \" AND (a.id = '\" . implode(\"' OR a.id='\", $filtr['ids']) . \"')\";\n\t\t\t}\n\t\t\t\n\t\t\tif ($filtr['id_aukcji'] && (int) $filtr['id_aukcji'] > 0 && !is_array($filtr['id_aukcji']))\n\t\t\t\t$sql.= \" AND a.id_aukcji=\" . (int)$filtr['id_aukcji'];\n\t\t\t\n\t\t\tif (isset($filtr['id_aukcji']) && is_array($filtr['id_aukcji']) && !empty($filtr['id_aukcji'])) {\n\t\t\t\t$sql.= \" AND (a.id_aukcji = '\" . implode(\"' OR a.id_aukcji='\", $filtr['id_aukcji']) . \"')\";\n\t\t\t}\n\t\t\t\n\t\t\tif( isset($filtr['format_sprzedazy']) && is_numeric($filtr['format_sprzedazy']) ) {\n\t\t\t\t$filtr['format_sprzedazy'] = (int)$filtr['format_sprzedazy'];\n\t\t\t\t$sql.= \" AND id_rodzaju=\" . $filtr['format_sprzedazy'];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "26deda0e3c6729cd08250eb98a36dd68", "score": "0.6258678", "text": "public function filter(Request $request)\n\t\t{\n\t\t\t$input = $request -> all();\n\t\t\t$aktif = \\Siakad\\Tapel::whereAktif('y') -> first();\n\t\t\t\n\t\t\t$status = $this -> getGolongan('status');\n\t\t\t$prodi = $this -> getGolongan('prodi', true, true);\n\t\t\t$program = $this -> getGolongan('program');\n\t\t\t$semester = $this -> getGolongan('semester');\n\t\t\t$angkatan = $this -> getGolongan('angkatan');\n\t\t\t\n\t\t\t$mahasiswa = Mahasiswa::with('prodi', 'kelas', 'authInfo', 'krs') \n\t\t\t-> where('NIM', '<>', '');\n\t\t\tif(isset($input['angkatan']) && $input['angkatan'] !== '-') $mahasiswa = $mahasiswa -> where('angkatan', $input['angkatan']);\n\t\t\tif(isset($input['semester']) && $input['semester'] !== '-') $mahasiswa = $mahasiswa -> where('semesterMhs', $input['semester']);\n\t\t\tif(isset($input['status']) && $input['status'] !== '-') $mahasiswa = $mahasiswa -> where('statusMhs', $input['status']);\n\t\t\tif(isset($input['program']) && $input['program'] !== '-') $mahasiswa = $mahasiswa -> where('kelasMhs', $input['program']);\n\t\t\t\n\t\t\tif(\\Auth::user() -> role -> name == 'Prodi')\n\t\t\t{\n\t\t\t\t$prodi_id = \\Siakad\\Prodi::where('singkatan', \\Auth::user() -> role -> sub) -> pluck('id');\n\t\t\t\t$mahasiswa = $mahasiswa -> where('prodi_id', $prodi_id);\n\t\t\t\t$prodi = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(isset($input['prodi']) && $input['prodi'] !== '-') $mahasiswa = $mahasiswa -> where('prodi_id', $input['prodi']);\n\t\t\t}\n\t\t\t\n\t\t\t$perpage = intval($request -> get('perpage')) > 0 ? $request -> get('perpage') : 200;\n\t\t\t$mahasiswa = $mahasiswa \n\t\t\t-> orderBy('angkatan', 'desc') \n\t\t\t->orderBy('NIM', 'desc') \n\t\t\t-> paginate($perpage);\n\t\t\t\n\t\t\treturn view('mahasiswa.index', compact('mahasiswa', 'semester', 'status', 'prodi', 'program', 'angkatan', 'aktif', 'request'));\n\t\t}", "title": "" }, { "docid": "1f944ad2ec776748cd06f6b31b6dc89b", "score": "0.62495905", "text": "public function andFilterWhere(){\n $model = ShopOrder::find()\n ->select('shop_order.*')\n ->filterWhere([\n 'contact_name' => 'salah333',])\n ->andFilterWhere(['user_id' => '1'])\n ->all();\n vd($model);\n\n }", "title": "" }, { "docid": "d496cc29691a9035493171fa7068d45e", "score": "0.6249024", "text": "function filtrar($filtros){\r\n\t\t$i=0;\r\n\t\t$eliminados=0;\r\n\t\twhile($i<$this->tope){\r\n\t\t\tif($this->cumple_filtro($this->renglones[$i],$filtros)){\r\n\t\t\t\t$this->renglones[$i]=$this->renglones[$this->tope-1];\r\n\t\t\t\t$this->tope--;\r\n\t\t\t\tunset($this->renglones[$this->tope]);\r\n\t\t\t}else{\r\n\t\t\t\t$i++;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5c80b20013112c19b02c3f5b517fdc3c", "score": "0.62470573", "text": "public function get_realisasi_fa_global_filter($filter) {\r\n Session::get('id_user');\r\n $sql = \"select a.satker\r\n\t\t\t\t, substr(a.program,1,3) BA\r\n\t\t\t\t, a.kppn\r\n\t\t\t\t, b.nmsatker\r\n\t\t\t\t, sum(a.budget_amt) Pagu\r\n\t\t\t\t, sum(a.actual_amt) Total_realisasi\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'51',a.budget_amt,0)) pagu_51\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'52',a.budget_amt,0)) pagu_52\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'53',a.budget_amt,0)) pagu_53\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'54',a.budget_amt,0)) pagu_54\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'55',a.budget_amt,0)) pagu_55\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'56',a.budget_amt,0)) pagu_56\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'57',a.budget_amt,0)) pagu_57\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'58',a.budget_amt,0)) pagu_58\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'59',a.budget_amt,0)) pagu_59\r\n\t\t\t\t, sum(decode(substr(a.akun,1,1),'6',a.budget_amt,0)) pagu_61\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'51',a.actual_amt,0)) belanja_51\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'52',a.actual_amt,0)) belanja_52\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'53',a.actual_amt,0)) belanja_53\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'54',a.actual_amt,0)) belanja_54\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'55',a.actual_amt,0)) belanja_55\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'56',a.actual_amt,0)) belanja_56\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'57',a.actual_amt,0)) belanja_57\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'58',a.actual_amt,0)) belanja_58\r\n\t\t\t\t, sum(decode(substr(a.akun,1,2),'59',a.actual_amt,0)) belanja_59\r\n\t\t\t\t, sum(decode(substr(a.akun,1,1),'6',a.actual_amt,0)) belanja_61\r\n\t\t\t\t, sum(ENCUMBRANCE_AMT) encumbrance \r\n\t\t\t\tFROM \"\r\n . $this->_table1 . \" a,\"\r\n . $this->_table2 . \" b \r\n\t\t\t\twhere 1=1\r\n\t\t\t\tand a.budget_type = '2' \r\n\t\t\t\tand a.satker=b.kdsatker \r\n\t\t\t\tand a.kppn=b.kppn\r\n\t\t\t\tAND SUBSTR(a.akun,1,1) in ('5','6')\r\n\t\t\t\tand nvl(a.budget_amt,0) + nvl(a.actual_amt,0) + nvl(a.encumbrance_amt,0) > 0\r\n\t\t\t\t\r\n\t\t\t\t\"\r\n ;\r\n $no = 0;\r\n foreach ($filter as $filter) {\r\n $sql .= \" AND \" . $filter;\r\n }\r\n\r\n $sql .= \" group by a.satker ,b.nmsatker, a.kppn, substr(a.program,1,3) \";\r\n $sql .= \" ORDER by a.satker \";\r\n\r\n //var_dump ($sql);\r\n $result = $this->db->select($sql);\r\n $data = array();\r\n foreach ($result as $val) {\r\n $d_data = new $this($this->registry);\r\n $d_data->set_satker($val['SATKER']);\r\n $d_data->set_kppn($val['KPPN']);\r\n $d_data->set_ba($val['BA']);\r\n $d_data->set_pagu($val['PAGU']);\r\n $d_data->set_dipa($val['NMSATKER']);\r\n $d_data->set_encumbrance($val['ENCUMBRANCE']);\r\n\t\t\t$d_data->set_pagu_51($val['PAGU_51']);\r\n $d_data->set_pagu_52($val['PAGU_52']);\r\n $d_data->set_pagu_53($val['PAGU_53']);\r\n $d_data->set_pagu_54($val['PAGU_54']);\r\n $d_data->set_pagu_55($val['PAGU_55']);\r\n $d_data->set_pagu_56($val['PAGU_56']);\r\n $d_data->set_pagu_57($val['PAGU_57']);\r\n $d_data->set_pagu_58($val['PAGU_58']);\r\n $d_data->set_pagu_59($val['PAGU_59']);\r\n\t\t\t$d_data->set_pagu_61($val['PAGU_61']);\r\n $d_data->set_belanja_51($val['BELANJA_51']);\r\n $d_data->set_belanja_52($val['BELANJA_52']);\r\n $d_data->set_belanja_53($val['BELANJA_53']);\r\n $d_data->set_belanja_54($val['BELANJA_54']);\r\n $d_data->set_belanja_55($val['BELANJA_55']);\r\n $d_data->set_belanja_56($val['BELANJA_56']);\r\n $d_data->set_belanja_57($val['BELANJA_57']);\r\n $d_data->set_belanja_58($val['BELANJA_58']);\r\n $d_data->set_belanja_59($val['BELANJA_59']);\r\n\t\t\t$d_data->set_belanja_61($val['BELANJA_61']);\r\n\t\t\t$d_data->set_realisasi($val['TOTAL_REALISASI']);\r\n $data[] = $d_data;\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "536e750a7cef359c0ea61ddfe3022a67", "score": "0.6246683", "text": "public function retrieve_harga_barang_filter($parameter)\n {\n \n \n /* Begin POST */\n $tahun = $parameter['param']['shb_thn'];\n $njb = $parameter['param']['kelompok_id'];\n $ket = $parameter['param']['shb_ket'];\n /* End POST */\n\t\t\t\n /* Begin Filter */\n\t\t\t\n\t\t\t//filter jenis barang\n\t\tif($njb!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tGolongan,Bidang,Kelompok,Sub,SubSub\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tKelompok_ID='$njb'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$golongan = $data->Golongan;\n $bidang = $data->Bidang;\n\t\t\t$kelompok = $data->Kelompok;\n\t\t\t$sub = $data->Sub;\n\t\t\t$subsub = $data->SubSub;\n }\n\t\t\n\t\tif($bidang == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($bidang!= null && $kelompok == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($kelompok!= null && $sub == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang' AND Kelompok = '$kelompok'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($sub!= null && $subsub == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang' AND Kelompok = '$kelompok' AND Sub = '$sub'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($sub!= null && $subsub != null)\n\t\t{\n\t\t$datakelompok = $njb;\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t}\n\t\t\t$query_njb=\"\";\n\t\t\tif ($njb !=\"\") $query_njb = \"Kelompok_ID IN ($datakelompok)\";\n\t\t\t\n if ($tahun!=\"\") $query_tahun=\"Tahun ='\".$tahun.\"' \";\n if ($ket!=\"\") $query_ket =\"Keterangan LIKE '%\".$ket.\"%' \";\n \n \n $parameter_sql=\"\";\n \n if($tahun!=\"\") $parameter_sql=$query_tahun;\n \n if($njb!=\"\" && $parameter_sql!=\"\") $parameter_sql=$parameter_sql.\" AND \".$query_njb;\n if($njb!=\"\" && $parameter_sql==\"\") $parameter_sql=$query_njb;\n \n if($ket!=\"\" && $parameter_sql!=\"\") $parameter_sql=$parameter_sql.\" AND \".$query_ket;\n if ($ket!=\"\" && $parameter_sql==\"\") $parameter_sql=$query_ket;\n \n if($parameter_sql!=\"\" ) $parameter_sql=\"WHERE $parameter_sql AND\";\n /* End Filter*/\n \n $_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$this->UserSes['ses_uid']] = $parameter_sql;\n\t\t\t\n \n \n switch ($parameter['menuID'])\n {\n case '2':\n {\n // Standar harga barang\n $query_condition = \" StatusPemeliharaan IS NOT NULL \";\n }\n break;\n\t\t\tcase '3':\n {\n // Standar harga barang\n $query_condition = \" StatusPemeliharaan=1 \";\n }\n break;\n \n }\n \n \n if ($_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$this->UserSes['ses_uid']] !='')\n {\n $sql_param = \" $query_condition\";\n }\n else\n {\n $sql_param = \" WHERE $query_condition\";\n }\n \n $query = \"SELECT * FROM StandarHarga \".$_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$this->UserSes['ses_uid']].\" $sql_param ORDER BY StandarHarga_ID ASC LIMIT $parameter[paging], 10\";\n //print_r($query);\n $result = $this->query($query) or die ('error retrieve_shb_data');\n if ($result)\n {\n while ($data = $this->fetch_object($result))\n {\n $dataArr[] = $data;\n }\n \n return $dataArr;\n }\n else\n {\n return false;\n }\n \n \n }", "title": "" }, { "docid": "c818a40ba296bf32d2c43581f2133a57", "score": "0.6219718", "text": "function filterGetList($filtr=NULL)\n\t{\n\n\t\t$sql = '';\n\n\t\tif( isset($filtr) && is_array($filtr) )\n\t\t{\n\n\t\t\tif( isset($filtr['widoczny']) && is_numeric($filtr['widoczny']) )\n\t\t\t\t$sql.= \" AND b.widoczny = '\".(int)$filtr['widoczny'].\"'\";\n\t\t\t\n\t\t\tif( isset($filtr['paybynet']) && is_numeric($filtr['paybynet']) )\n\t\t\t\t$sql.= \" AND b.id_paybynet > 0 \";\n\n\t\t}\n\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "7c68eb847247e5917df7de0b21610f03", "score": "0.6208919", "text": "public function filtre_fiche_delevery_livreur($id){\n\n \n\n\n \n\n $DataUsers = Fiche::whereNull('closed_at')->where('valid_fiche','=',true)->where('cloture','=',0)->pluck('id_liv')->toArray();\n\n //$DataUsers = Fiche::whereNull('closed_at')->where('valid_fiche','=',true)->pluck('id_fiche')->toArray();\n\n $DatauserUnique = array_unique($DataUsers);\n\n \n\n if (in_array($id, $DatauserUnique)) {\n\n $DataLivr = User::withCount(['deliv','montant as prix' => function($query) {\n $query->select(DB::raw('sum(price)'));\n }])->where('id','=',$id)->paginate(8);\n return response()->json($DataLivr);\n\n }else {\n\nreturn true ;\n\n }\n\n \n //dd($DataLivr);\n\n\n\n\n}", "title": "" }, { "docid": "b0a6e05a2ae8dd45ed8bb16dda1917f9", "score": "0.6201101", "text": "function filter(){\n\t\t//pr($this->data['Newsletter']);\n\t\tif(!empty($this->data['Newsletter'])){\t\t\t\n\t\t\t/*if(!empty($this->data['Newsletter']['user_id']))\n\t\t\t\t$this->data['Newsletter']['Newsletter.user_id'] = \t$this->data['Newsletter']['user_id'];\n\t\t\tunset($this->data['Newsletter']['user_id']);*/\n\t\t\tif(!empty($this->data['Newsletter']['subject']))\n\t\t\t\t$this->data['Newsletter']['Newsletter.subject LIKE'] = \t\"%\".$this->data['Newsletter']['subject'].\"%\";\t\t\t\t\t\t\t\n\t\t\t//ex: $this->Session->write('conditions', array('Newsletter.section_id' => 1));\n\t\t\t$this->Session->write('conditions', empty($this->data['Newsletter'])?true:$this->data['Newsletter']);\n\t\t}\n\t\t$this->redirect(array('action'=>'index'));\n\t}", "title": "" }, { "docid": "eed71b2089d0a12353107e053d540905", "score": "0.6137264", "text": "public function filter($row);", "title": "" }, { "docid": "06fcd5c0dc75bb35a30f0dd6984face3", "score": "0.6136415", "text": "function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t\t//ew_AddFilter($filter, \"TGLREG <= CURDATE() AND TGLREG >= (CURDATE() - interval 3 day) AND KDCARABAYAR != 1 AND KDCARABAYAR != 9 AND KDCARABAYAR != 7 \"); \n\n\t\tew_AddFilter($filter, \"ISNULL(keluarrs) OR (keluarrs = NULL)\"); \n\t}", "title": "" }, { "docid": "a3d7470e3a51f33f1a6106653a33b8e2", "score": "0.612808", "text": "function andWhere_filter()\n {\n $arr_andWhereFilter = null;\n\n $conf = $this->pObj->conf;\n $mode = $this->pObj->piVar_mode;\n $view = $this->pObj->view;\n\n $viewWiDot = $view . '.';\n $conf_view = $conf[ 'views.' ][ $viewWiDot ][ $mode . '.' ];\n\n\n\n /////////////////////////////////////////////////////////////////\n //\n // Set the global $arr_conf_tableFields\n\n $bool_noTableFields = $this->get_tableFields();\n // Return, if we don't have any filter array\n if ( $bool_noTableFields )\n {\n return false;\n }\n // Return, if we don't have any filter array\n // Set the global $arr_conf_tableFields\n /////////////////////////////////////////////////////////////////\n //\n // Init area\n // dwildt, 101211, #11402\n $this->pObj->objCal->area_init();\n $conf = $this->pObj->conf;\n $conf_view = $conf[ 'views.' ][ $viewWiDot ][ $mode . '.' ];\n // Init area\n /////////////////////////////////////////////////////////////////\n //\n // LOOP: filter tableFields\n\n $bool_manual = $this->pObj->b_sql_manual;\n $str_andWhere = null;\n\n foreach ( $this->arr_conf_tableFields as $tableField )\n {\n // Process nice_piVar\n list ($table, $field) = explode( '.', $tableField );\n // #8337, 101011, dwildt\n $obj_ts = $conf_view[ 'filter.' ][ $table . '.' ][ $field ];\n $arr_ts = $conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n $arr_result = $this->get_nice_piVar( $obj_ts, $arr_ts, $tableField );\n $key_piVar = $arr_result[ 'data' ][ 'key_piVar' ];\n $arr_piVar = $arr_result[ 'data' ][ 'arr_piVar' ];\n $str_nice_piVar = $arr_result[ 'data' ][ 'nice_piVar' ];\n unset( $arr_result );\n // Process nice_piVar\n // #48859, 130528, dwildt: make SQL query safe, 4+\n foreach ( ( array ) $arr_piVar as $key => $value )\n {\n $arr_piVar[ $key ] = ( int ) $value;\n }\n // #48859, 130528, dwildt: make SQL query safe, 4+\n // #t0607, dwildt, 4+\n if ( !is_array( $arr_piVar ) )\n {\n $arr_piVar = ( int ) $value;\n }\n // Current piVar isn't set\n $bool_handleCurrPiVar = true;\n if ( count( $arr_piVar ) < 1 )\n {\n $bool_handleCurrPiVar = false;\n }\n // Current piVar isn't set\n // Build the andWhere statement\n if ( $bool_handleCurrPiVar )\n {\n // SQL automatic mode\n if ( !$bool_manual )\n {\n // dwildt, 101211, #11401\n // andWhere for the localTable\n if ( $table == $this->pObj->localTable )\n {\n $str_andWhere = $this->andWhere_localTable( $obj_ts, $arr_ts, $arr_piVar, $tableField );\n }\n // andWhere for the localTable\n // andWhere for a foreignTable\n if ( $table != $this->pObj->localTable )\n {\n $str_andWhere = $this->andWhere_foreignTable( $obj_ts, $arr_ts, $arr_piVar, $tableField );\n }\n // andWhere for a foreignTable\n }\n // SQL automatic mode\n // SQL manual mode\n if ( $bool_manual )\n {\n $str_andWhere = null;\n $str_uidList = implode( ', ', $arr_piVar );\n $lArr_tableAliases = $conf_view[ 'aliases.' ][ 'tables.' ];\n $lArr_tableAliases = array_flip( $lArr_tableAliases );\n $lTable = $lArr_tableAliases[ $table ]; // locations\n if ( !$lTable )\n {\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql )\n {\n t3lib_div :: devlog( '[ERROR/FILTER+SQL] There is no alias for table \\'' . $table . '\\'', $this->pObj->extKey, 3 );\n t3lib_div :: devlog( '[INFO/FILTER+SQL] Browser is in SQL manual mode.', $this->pObj->extKey, 0 );\n t3lib_div :: devlog( '[HELP/FILTER+SQL] Please configure aliases.tables of this view.', $this->pObj->extKey, 1 );\n echo '<h1>ERROR</h1>\n <h2>There is no table alias</h2>\n <p>Please see the logs in the DRS - Development Reporting System.</p>';\n exit;\n }\n }\n // dwildt, 101223\n //$str_andWhere .= \" AND \" . $lTable . \".uid IN (\" . $str_uidList . \")\\n\";\n // #48859, 130528, dwildt: make SQL query safe, 4+\n foreach ( ( array ) $arr_piVar as $key => $value )\n {\n $arr_piVar[ $key ] = ( int ) $value;\n }\n // #48859, 130528, dwildt: make SQL query safe, 4+\n // #t0607, dwildt, 4+\n if ( !is_array( $arr_piVar ) )\n {\n $arr_piVar = ( int ) $value;\n }\n $str_andWhere = $lTable . \".uid IN (\" . $str_uidList . \")\\n\";\n }\n // SQL manual mode\n }\n // Build the andWhere statement\n // Set arr_andWhereFilter\n if ( $bool_handleCurrPiVar )\n {\n if ( !empty( $str_andWhere ) )\n {\n $arr_andWhereFilter[ $table . '.' . $field ] = $str_andWhere;\n }\n }\n // Set arr_andWhereFilter\n }\n // LOOP: filter tableFields\n\n\n if ( $this->pObj->b_drs_filter || $this->pObj->b_drs_sql )\n {\n if ( is_array( $arr_andWhereFilter ) )\n {\n $prompt = implode( ' AND ', $arr_andWhereFilter );\n t3lib_div :: devlog( '[INFO/FILTER+SQL] andWhere statement:<br /><br />' . $prompt, $this->pObj->extKey, 0 );\n }\n }\n\n return $arr_andWhereFilter;\n }", "title": "" }, { "docid": "3b67054e8795d58d2c622640fc0e7fb8", "score": "0.6124139", "text": "public function filtro() {\n\n // prepara os dados\n $this->db->from( $this->table )\n ->select( 'CodLoja as Valor, Nome as Label' );\n\n // faz a busca\n $busca = $this->db->get();\n\n // verifica se existe resultados\n if ( $busca->num_rows() > 0 ) {\n\n // seta o array de retorna\n $ret = [];\n\n // percorre todos os dados\n foreach( $busca->result_array() as $item ) {\n $ret[$item['Valor']] = $item['Label'];\n }\n\n // retorna os dados\n return $ret;\n\n } else return [];\n }", "title": "" }, { "docid": "ee06e623070e76eca870e866b71ed1e8", "score": "0.61079454", "text": "public function getDataPrediksi($filter)\n {\n $this->db->select('*');\n $this->db->from('ppdb');\n $this->db->join('panitia', 'ppdb.id_panitia = panitia.id_panitia');\n $this->db->join('sekolah', 'ppdb.id_sekolah = sekolah.id_sekolah');\n $this->db->where(['status_verifikasi' => 1, 'tahun_akademik' => $filter]);\n return $this->db->get()->result_array();\n }", "title": "" }, { "docid": "6264847b468e56c34cccb29f34d80190", "score": "0.6102969", "text": "public function filterSekretaris()\r\n {\r\n $title['title'] = \"Dokumen Dewan Pimpinan\";\r\n $data['user'] = $this->db->get_where('user', ['nik' =>\r\n $this->session->userdata('nik')])->row_array();\r\n $data['dsekretaris'] = $this->adminModel->dokumenfilterSekretaris();\r\n $data['dketua'] = $this->adminModel->dokumenfilterKetua();\r\n $this->load->view('templates/header', $title);\r\n $this->load->view('DewanPimpinan/temp_KetuaDP/sidebar');\r\n $this->load->view('templates/navbar', $data);\r\n $this->load->view('DewanPimpinan/dokKetua/doc2', $data);\r\n $this->load->view('templates/footer');\r\n }", "title": "" }, { "docid": "2078891d35bac4b35592cb564ee023ed", "score": "0.6093785", "text": "function filter_ausgabe_spalte()\n\t{\n\t\t// Ausgabe rausholen\n\t\t$ausgabe = $this->content->template['right_data'];\n\t\tif (is_array($ausgabe)) {\n\t\t\tforeach ($ausgabe as $data) {\n\t\t\t\t$inhalt = $data['inhalt_right'];\n\t\t\t\t//Link rausholen\n\t\t\t\t$link = $this->get_link_data($inhalt);\n\t\t\t\tif (!empty($link)) {\n\t\t\t\t\t//Link aufexploden\n\t\t\t\t\t$check = $this->get_link_content($link);\n\t\t\t\t\t// An checked Objekt �bergeben\n\t\t\t\t\t$this->give_checked($check);\n\t\t\t\t\t// Suche durchf�hren\n\t\t\t\t\t$insert = $this->show_search_mv();\n\t\t\t\t\t// Ergebnis eintragen\n\t\t\t\t\t$text = $this->make_text($insert);\n\t\t\t\t\t// An Template �bergeben\n\t\t\t\t\t$this->content->template['right_data'][$i]['inhalt_right'] = \"nobr:\" . $text;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5f49f34df40cbfb129ef0183e802b697", "score": "0.6060419", "text": "abstract protected function applyFilter();", "title": "" }, { "docid": "857a755b11b7f87e65630d7d61740c2d", "score": "0.6055104", "text": "function evt__filtro__limpiar (){\n $this->s__datos_filtrados=array();\n }", "title": "" }, { "docid": "3014b7ce8834af26be19817eb7b39556", "score": "0.6045861", "text": "public function getFilter2()\n {\n \t$query = DB::table('ac_facturas')\n \t->where('ac_facturas.codigo_estatus','=','3') // Pago aprobado\n \t->join('ac_proveedores_extranet', 'ac_proveedores_extranet.codigo_proveedor',\"=\", 'ac_facturas.codigo_proveedor_creador')\n \t->join('ac_estatus', 'ac_estatus.id',\"=\", 'ac_facturas.codigo_estatus')\n \t->select('ac_facturas.id as id',\n \t\t\t'ac_facturas.codigo_proveedor_creador as idProveedor',\n \t\t\t'ac_facturas.numero_factura as numero_factura',\n \t\t\t'ac_facturas.numero_control as numero_control',\n \t\t\t'ac_facturas.fecha_factura as fecha_factura',\n \t\t\t'ac_facturas.monto as monto',\n \t\t\t'ac_proveedores_extranet.nombre as proveedor',\n \t\t\t'ac_estatus.nombre as nombre_estatus')->get();\n \treturn view('pagos.progpago',compact('query'));\n\n\n }", "title": "" }, { "docid": "6bd6cb8a445312da52c9763f48569343", "score": "0.6042072", "text": "public function search_filter(array $data) {\n\n $query = $this->model;\n \n if (isset($data['customer']) ) {\n\n $query = $query->Where('first_name','like', '%'. $data['customer'].'%')\n\n ->orWhere('last_name' ,'like', '%'.$data['customer'].'%');\n\n }\n\n if (isset($data['company_name']) ) {\n\n $query = $query->Where('company_name' ,'like', '%'.$data['company_name'].'%');\n \n }\n if(isset($data['bloque'])){\n \n $query = $query->Where(['bloque' => (int) $data['bloque']]);\n\n }\n if(isset($data['solde'])){\n \n $query = $query->Where('solde',$data['signe'],(float) $data['solde']);\n\n }\n if(isset($data['group'])){\n \n $query = $query->Where('group_id',$data['signe'],(float) $data['group']);\n\n }\n \n if (isset($data['sort'])) {\n return $query = $query->orderBy($data['sort'], $data['direction'])->paginate(13);\n }\n else\n {\n return $query->orderBy('id', 'desc')->paginate(13);\n } \n }", "title": "" }, { "docid": "d724b5db6917fda00f86edccc394c9ad", "score": "0.6039615", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'kategori' :\n\t\t\t\t\treturn \"idkategori='$key'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'periodebkd' :\n\t\t\t\t\treturn \"b.kodeperiodebd='$key'\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "fd47384aa1fda8bf41253af34f7ed189", "score": "0.60312074", "text": "public function filterReport(){\n\n $tipoId = $this->getTipo_id();\n $ciudadId = $this->getCiudad_id();\n\n $sql = \"SELECT b.*, c.nombre as ciudad, t.nombre as tipo FROM bienes as b, ciudades as c, tipos_casa as t WHERE \";\n $sql .= \"b.tipo_id = t.id AND b.ciudad_id = c.id\";\n\n if(!empty($tipoId) || !empty($ciudadId)){\n \n $sql .= ' AND ';\n \n if($tipoId && $ciudadId){\n \n $sql .= \"t.id = $tipoId AND c.id = $ciudadId\";\n \n }elseif($tipoId){\n \n $sql .= \"t.id = $tipoId\";\n \n }else{\n \n $sql .= \"c.id = $ciudadId\";\n \n }\n }\n\n\n $db = self::connect();\n\n $query = $db->prepare($sql);\n\n $query->execute();\n\n $arrayBienes = $query->fetchAll();\n\n return COUNT($arrayBienes) >= 1 ? $arrayBienes : false;\n\n }", "title": "" }, { "docid": "519c0228760a0b09d3e843b37f5a262c", "score": "0.6027665", "text": "public function filtrarUnidadNegocio($unidadNegocio) {\n//inner join riesgo_unidad_negocio on riesgo.id_riesgo=riesgo_unidad_negocio.id_riesgo\n//and riesgo_unidad_negocio.id_unidad_negocio=14 \n }", "title": "" }, { "docid": "c1abfde942a56dec1263370571211553", "score": "0.6020587", "text": "public function filter()\n\t{\n\t\t$where='';\n\t\t$flag=true;\n\t\t$colom=array('no_sppr', 'order_date', 'delivery_date', 'customer');\n\t\t$data=array();\n\t\tfor ($i=0; $i < count($colom) ; $i++) {\n\t\t\t// array_push($data, array(\n\t\t\t// \t$colom[$i]=>$this->input->post($colom[$i])\n\t\t\t// ));\n\t\t\tif($flag && $this->input->post($colom[$i])!=''){\n\t\t\t\t$where.=' where (m.'.$colom[$i].'=\"'.$this->input->post($colom[$i]).'\")';\n\t\t\t\t$flag=false;\n\t\t\t}\n\t\t\telseif (!$flag && $this->input->post($colom[$i])!='') {\n\t\t\t\t$where.=' and (m.'.$colom[$i].'=\"'.$this->input->post($colom[$i]).'\")';\n\t\t\t}\n\t\t}\n\t\t// echo $where;\n\t\t// exit;\n\t\t$sql='SELECT m.id_sppr, m.no_sppr, c.name_customer, cm.order_id, cm.no_po, m.order_date, m.delivery_date , m.status, s.name_project, s.satuan, s.quantity FROM sppr_master m\n\t\tJOIN sppr_spesification s on s.sppr_id=m.id_sppr\n\t\tjoin customer_master cm on cm.id_order=m.po_no\n\t\tjoin customer_name c on c.id_customer=m.customer'.$where;\n\t\t$arr_sppr=$this->general_model->select($sql);\n\t\t$table=array(); // for dataTables\n\t\tforeach ($arr_sppr as $key) {\n\t\t\tif($key['status']=='open'){\n\t\t\t\t$stat='<span class=\"label label-sm label-success\">Open</span>';\n\t\t\t\t$button='<a class=\"btn btn-sm btn-primary\" title=\"Cancel\" onclick=\"cancel('.$key['id_sppr'].')\"><i class=\"fa fa-close\"></i> Cancel</a>\n\t\t\t\t<a class=\"btn btn-sm btn-warning\" title=\"Edit\" onclick=\"edit('.$key['id_sppr'].')\"><i class=\"glyphicon glyphicon-pencil\"></i> Edit</a>\n\t\t\t\t<a class=\"btn btn-sm btn-success\" title=\"Edit\" onclick=\"done('.$key['id_sppr'].')\"><i class=\"fa fa-stop\"></i> Done</a>\n\t\t\t\t<a class=\"btn btn-sm green-jungle\" title=\"Edit\" onclick=\"hold('.$key['id_sppr'].')\"><i class=\"fa fa-hand-stop-o\"></i> Hold</a>';\n\n\t\t\t}\n\t\t\telseif ($key['status']=='hold') {\n\t\t\t\t$stat='<span class=\"label label-sm label-warning\">Hold</span>';\n\t\t\t\t$button='<a class=\"btn btn-sm green-jungle\" title=\"Edit\" onclick=\"unhold('.$key['id_sppr'].')\"><i class=\"fa fa-hand-peace-o\"></i> Unhold</a>';\n\t\t\t}\n\t\t\telseif ($key['status']=='done') {\n\t\t\t\t$stat='<span class=\"label label-sm label-success\">'.$key['status'].'</span>';\n\t\t\t\t$button='';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$stat='<span class=\"label label-sm label-danger\">Cancel</span>';\n\t\t\t\t$button='';\n\t\t\t}\n\t\t\tarray_push($table,array(\n\t\t\t\t'<a onclick=\"show_detail('.$key['id_sppr'].')\">'.$key['no_sppr'].'</a>',\n\t\t\t\t$key['name_customer'],\n\t\t\t\t$key['order_id'],\n\t\t\t\t$key['no_po'],\n\t\t\t\t$key['order_date'],\n\t\t\t\t$key['delivery_date'],\n\t\t\t\t$stat,\n\t\t\t\t$key['name_project'].' - '.$key['quantity'].' '.$key['satuan'],\n\t\t\t\t$button,\n\t\t\t));\n\t\t}\n\t\techo json_encode(array('isi'=>$table));\n\t}", "title": "" }, { "docid": "095d996c969e09ff5a948888b902a9c3", "score": "0.60173094", "text": "public function get_data_kelas_filter($id)\n {\n \t$query = $this->db->query('SELECT DISTINCT kelas_code, kelas_nama FROM raport_siswa\nLEFT JOIN raport_kelas ON raport_kelas.kelas_code = raport_siswa.siswa_kelas\nWHERE siswa_status != 1 AND kelas_code=\"'.$this->db->escape_str($id).'\" ORDER BY kelas_code desc ');\n\t\n\t\t$daftarkelas = $query->num_rows();\n\t\n\t\t// Return key => value pair array\n\t\t$array = array();\n\t\tif (count($daftarkelas )) {\n\t\t\tforeach ($query->result() as $munculkelas) {\n\t\t\t\t$array[''] = '';\n\t\t\t\t$array[$munculkelas->kelas_code] = $munculkelas->kelas_nama;\n\t\t\t}\n\t\t}\n\t\n\t\treturn $array;\n }", "title": "" }, { "docid": "f0ea10a0509e248855f50bcc1941d376", "score": "0.60152334", "text": "public function return_all_except_admin(){\n return $this->db->join('sk','kr_sk_id=sk_id','Left')->join('jabatan','kr_jabatan_id=jabatan_id','Left')->join('st','kr_st_id=st_id','Left')->where('kr_jabatan_id >', '1')->order_by(\"kr_nama_depan\", \"ASC\")->get('kr')->result_array();\n }", "title": "" }, { "docid": "33d046f64b86be82b51f742cb050ef8c", "score": "0.5995802", "text": "function get_sql_filter($data) {\n if ($data['value'] === 0) {\n return array('TRUE', array());\n }\n \n return parent::get_sql_filter($data);\n }", "title": "" }, { "docid": "4fcf4c485778d34f8c59f15a257ae8bb", "score": "0.59875983", "text": "public function listado_membresia_filtro($id_membresia,$id_jornadas){\n $listado = [];\n $horas_jornadas = \"0\";\n $precio = \"0,00\"; \n $id = new MongoDB\\BSON\\ObjectId($id_membresia);\n $resultados = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,'_id'=>$id))->get(\"membresia\");\n //var_dump($resultados);die('');\n foreach ($resultados as $clave => $valor) {\n \n $valores = $valor;\n \n $valores[\"id_membresia\"] = (string)$valor[\"_id\"]->{'$id'};\n /*\n * Obtengo los datos del cliente\n */\n $valores[\"identificador_prospecto_cliente\"] = $valor[\"identificador_prospecto_cliente\"];\n\n $rfc = $valor[\"identificador_prospecto_cliente\"];\n\n $res_dt = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,\"rfc_datos_personales\"=>$rfc))->get(\"datos_personales\");\n\n $valores[\"nombre_datos_personales_cliente\"] = $res_dt[0][\"nombre_datos_personales\"];\n\n $valores[\"solo_nombre\"] = $res_dt[0][\"nombre_datos_personales\"];\n\n if(isset($res_dt[0][\"apellido_p_datos_personales\"])){\n $valores[\"nombre_datos_personales_cliente\"].=\" \".$res_dt[0][\"apellido_p_datos_personales\"];\n $valores[\"solo_apellidos_paternos\"] = $res_dt[0][\"apellido_p_datos_personales\"];\n }else{\n $valores[\"solo_apellidos_paternos\"] = \"\";\n }\n\n if(isset($res_dt[0][\"apellido_m_datos_personales\"])){\n $valores[\"nombre_datos_personales_cliente\"].=\" \".$res_dt[0][\"apellido_m_datos_personales\"];\n $valores[\"solo_apellidos_maternos\"] = $res_dt[0][\"apellido_m_datos_personales\"];\n }else{\n $valores[\"solo_apellidos_maternos\"] = \"\";\n }\n //Consultando al cliente pagador para obtener su imagen\n $valores[\"id_datos_personales\"] = (string)$res_dt[0][\"_id\"]->{'$id'};\n $res_cliente_pagador = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false,'id_datos_personales'=>$valores[\"id_datos_personales\"]))->get($this->tabla_clientePagador);\n #Obtengo la imagen del cliente \n (isset($res_cliente_pagador[0][\"imagenCliente\"]))? $valores[\"imagenCliente\"] = $res_cliente_pagador[0][\"imagenCliente\"]:$valores[\"imagenCliente\"] = \"default-img.png\";\n //---\n /*\n *\n */\n #Consulto planes\n $id_planes = new MongoDB\\BSON\\ObjectId($valor[\"plan\"]);\n //'eliminado'=>false,\n $res_planes = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array(\"_id\"=>$id_planes))->get(\"planes\");\n \n $valores[\"planes\"] = $res_planes[0][\"titulo\"].\" \".$res_planes[0][\"descripcion\"];\n \n if($res_planes[0][\"jornadas_limitadas\"]==true){\n $horas_jornadas = \"Jornadas ilimitadas\";\n }/*else{\n var_dump($res_planes[0]);die('');\n $horas_jornadas = $res_planes[0][\"horas_jornadas\"]; \n }*/\n //---\n /*\n * Nota importante: En vista a que segun documentación entregada por el sr Abrahans marzo 2019, se decidió modificar el funcionamiento del submodulo de membresia por segunda vez, la unica forma de obtener las horas pertenecientes al servicio HORAS DE COWORKING es a través de su campo descripción. Anteriormente que según mi criterio es como deberia funcionar la app, el campo de horas provenia del plan y no de un servicio... en la documentación no se explica de forma clara como relacionar una membresia con las horas de servicio por lo que decidi hacerlo a través de la descripción...\n */\n /*\n Nota importante. Como muestra de las deficiencias presentes en los requerimientos, abril 2019 se define agregar a la colección de servicios el campo tipo_servicios, y se usara el mismo como filtro para consultar las horas de coworking, a través del tipo de servicio horas de coworking\n */\n #Consulto el tipo de servicio horas de coworking\n $res_tipo_serv = $this->mongo_db->where(array('eliminado'=>false,'titulo'=>\"HORAS DE COWORKING\"))->get('tipo_servicios');\n $id_horas_coworking = $res_tipo_serv[0][\"_id\"]->{'$id'};\n $res_serv = $this->mongo_db->where(array('eliminado'=>false,'tipo_servicio'=>$id_horas_coworking))->get('servicios');\n /*---------------------------------------------------------------------------*/\n $id_paquete = $valor[\"paquete\"];\n $id_paq = new MongoDB\\BSON\\ObjectId($id_paquete);\n $res_paquetes = $this->mongo_db->where(array('eliminado'=>false,'_id'=>$id_paq))->get('paquetes');\n //$precio = $res_paquetes[0][\"precio\"];\n $precio = number_format($res_paquetes[0][\"precio\"],2);\n \n $servicios = $res_paquetes[0][\"servicios\"];\n #Recorro c/u de los servicios \n foreach ($servicios as $clave_serv => $valor_serv) {\n\n /*$id_servicios = new MongoDB\\BSON\\ObjectId($valor_serv->id_servicios);\n $res_serv = $this->mongo_db->where(array('eliminado'=>false,'_id'=>$id_servicios,'descripcion'=>\"HORAS DE COWORKING\"))->get('servicios');\n if(count($res_serv)>0){\n $horas_jornadas = $valor_serv->valor;\n }*/\n if($valor_serv->id_servicios==$res_serv[0][\"_id\"]->{'$id'}){\n $horas_jornadas = $valor_serv->valor;\n }else if($valor_serv->id_servicios==$res_serv[1][\"_id\"]->{'$id'}){\n $horas_jornadas = $valor_serv->valor;\n }\n /*----*/\n }\n //---\n /*$valores[\"plan_horas_jornadas\"] = $horas_jornadas;\n \n $valores[\"plan_valor\"] = $res_planes[0][\"precio\"];*/\n \n /*\n * Cambiar horas y valor!\n */\n $valores[\"plan_horas_jornadas\"] = $horas_jornadas;\n \n $valores[\"plan_valor\"] = $precio;\n /*\n *\n */\n $valores[\"fecha_inicio\"] = $valor[\"fecha_inicio\"]->toDateTime();\n\n $valores[\"fecha_fin\"] = $valor[\"fecha_fin\"]->toDateTime();\n\n \n /*\n * Consulto todas las jornadas asociadas a esa membresia\n */\n $horas_transcurridas = $this->calcular_horas_jornadas($id_membresia);\n if($id_jornadas!=\"\"){\n $horas_transcurridas_individual = $this->calcular_horas_jornadas_individual($id_jornadas);\n }else{\n $horas_transcurridas_individual = \"00:00:00\";\n }\n \n //$horas_transcurridas = \"00:00:00\";\n /*\n * Se debe cambiar esto ya que se debe calcular de otra forma segun cambio alcance señalado pro el Sr Abrahans Mayo-2013\n */\n if($horas_jornadas!=\"Jornadas ilimitadas\"){\n /*$horas_disponibles_prev = strtotime ( '-'.$horas_jornadas.' hour' , strtotime ($horas_transcurridas) ); \n $horas_disponibles = strftime(\"%H:%M:%S:\", $horas_disponibles_prev);*/\n //------------------------------------------------------------------\n /*$fecha = new DateTime($horas_jornadas.\":00:00\");\n $fecha->modify('-'.$horas_transcurridas);\n $horas_disponibles = $fecha->format('H:i:s');*/\n\n if($horas_transcurridas==\"00:00:00\"){\n $horas_disponibles = $horas_jornadas;\n }else{\n /*$f1 = new DateTime($horas_jornadas.\":00:00\");\n $f2 = new DateTime($horas_transcurridas);\n $d = $f1->diff($f2);\n $horas_disponibles = $d->format('%H:%I:%S');*/\n //---\n /*$horas_disp = date_create($horas_transcurridas);\n date_sub($horas_disp, date_interval_create_from_date_string($horas_jornadas.'hours'));\n $horas_disponibles = date_format($horas_disp, 'H:i:s');*/\n //---\n /*$f1 = new DateTime($horas_transcurridas);\n $horas_disp = $f1->modify(\"-\".$horas_jornadas.' hours');\n $horas_disponibles = $horas_disp->format('H:i:s');*/\n //---\n /*$vector_horas = explode(\":\",$horas_transcurridas);\n $hora_sola_disp = (integer)$horas_jornadas-(integer)$vector_horas[0];\n $horas_disponibles = $hora_sola_disp.\":\".$vector_horas[1].\":\".$vector_horas[2];*/\n //--Restar fechas sin date time\n $vector_horas = explode(\":\",$horas_transcurridas);\n $horas_trans_segundos = $vector_horas[0]*3600;\n $minutos_trans_segundos = $vector_horas[1]*60;\n $segundos_trans = $vector_horas[2]+$minutos_trans_segundos+$horas_trans_segundos;\n $segundos_disponibles= (integer)$horas_jornadas*3600;\n $segundos_totales = $segundos_disponibles - $segundos_trans;\n $horas_disponibles_prev = round($segundos_totales/3600,1);\n $minutos_disp_en_horas = explode(\".\",$horas_disponibles_prev);\n //var_dump($minutos_disp_en_horas);die('');\n if(count($minutos_disp_en_horas)>1){\n $super_min = \"0.\".$minutos_disp_en_horas[1];\n }else{\n $super_min = \"0\";\n }\n $min = (float)$super_min;\n $minutos_disponibles = $min*60;\n \n if($minutos_disp_en_horas[0]<0){\n $positivo = -1*($minutos_disp_en_horas[0]);\n $horas_disponibles = \"<label style='danger'>00:00:00</label> Se excedió en:\".$positivo.\"Hrs \".$minutos_disponibles.\" Min\";\n }else{\n $horas_disponibles = $minutos_disp_en_horas[0].\"Hrs \".$minutos_disponibles.\" Min\";\n }\n \n }\n\n //------------------------------------------------------------------\n }else{\n $horas_disponibles = \"Jornadas ilimitadas\";\n }\n /*\n * Obtengo del paquete los servicios relacionados\n */\n if($id_jornadas!=\"\"){\n //var_dump($valor[\"servicios\"]);die('');\n $valores[\"servicios\"] = $this->obtenerServicios($valor[\"servicios\"],$valores[\"id_membresia\"]);\n $valores[\"servicios_opcionales\"] = $this->obtenerServiciosOpcionales($id_jornadas);\n $valores[\"arreglo_montos\"] = $this->ObtenerMontosJornadas($id_jornadas); \n }\n /*\n *\n */\n $valores[\"horas_transcurridas\"]=$horas_transcurridas;\n //var_dump($valores[\"horas_transcurridas\"]);\n $valores[\"horas_disponibles\"]=$horas_disponibles;\n\n $valores[\"horas_transcurridas_x_jornada\"] = $horas_transcurridas_individual;\n \n $fecha = new MongoDB\\BSON\\UTCDateTime();\n $valores[\"actual\"]=$fecha->toDateTime();\n\n $listado[] = $valores;\n }\n //var_dump($listado);\n return $listado;\n }", "title": "" }, { "docid": "f25437b0a338c4227e380939c3f45445", "score": "0.598695", "text": "public function filtro() {\n\n // prepara os dados\n $this->db->from( $this->table )\n ->select( 'CodFuncionario as Valor, Nome as Label' );\n\n // faz a busca\n $busca = $this->db->get();\n\n // verifica se existe resultados\n if ( $busca->num_rows() > 0 ) {\n\n // seta o array de retorna\n $ret = [];\n\n // percorre todos os dados\n foreach( $busca->result_array() as $item ) {\n $ret[$item['Valor']] = $item['Label'];\n }\n\n // retorna os dados\n return $ret;\n\n } else return [];\n }", "title": "" }, { "docid": "67ba0419cb103faae69edcfbc5fe9cd8", "score": "0.59863275", "text": "function RestoreFilterList() {\n\n\t\t// Return if not reset filter\n\t\tif (@$_POST[\"cmd\"] <> \"resetfilter\")\n\t\t\treturn FALSE;\n\t\t$filter = json_decode(ew_StripSlashes(@$_POST[\"filter\"]), TRUE);\n\t\t$this->Command = \"search\";\n\n\t\t// Field tgl\n\t\t$this->tgl->AdvancedSearch->SearchValue = @$filter[\"x_tgl\"];\n\t\t$this->tgl->AdvancedSearch->SearchOperator = @$filter[\"z_tgl\"];\n\t\t$this->tgl->AdvancedSearch->SearchCondition = @$filter[\"v_tgl\"];\n\t\t$this->tgl->AdvancedSearch->SearchValue2 = @$filter[\"y_tgl\"];\n\t\t$this->tgl->AdvancedSearch->SearchOperator2 = @$filter[\"w_tgl\"];\n\t\t$this->tgl->AdvancedSearch->Save();\n\n\t\t// Field noper\n\t\t$this->noper->AdvancedSearch->SearchValue = @$filter[\"x_noper\"];\n\t\t$this->noper->AdvancedSearch->SearchOperator = @$filter[\"z_noper\"];\n\t\t$this->noper->AdvancedSearch->SearchCondition = @$filter[\"v_noper\"];\n\t\t$this->noper->AdvancedSearch->SearchValue2 = @$filter[\"y_noper\"];\n\t\t$this->noper->AdvancedSearch->SearchOperator2 = @$filter[\"w_noper\"];\n\t\t$this->noper->AdvancedSearch->Save();\n\n\t\t// Field nobuk\n\t\t$this->nobuk->AdvancedSearch->SearchValue = @$filter[\"x_nobuk\"];\n\t\t$this->nobuk->AdvancedSearch->SearchOperator = @$filter[\"z_nobuk\"];\n\t\t$this->nobuk->AdvancedSearch->SearchCondition = @$filter[\"v_nobuk\"];\n\t\t$this->nobuk->AdvancedSearch->SearchValue2 = @$filter[\"y_nobuk\"];\n\t\t$this->nobuk->AdvancedSearch->SearchOperator2 = @$filter[\"w_nobuk\"];\n\t\t$this->nobuk->AdvancedSearch->Save();\n\n\t\t// Field keg\n\t\t$this->keg->AdvancedSearch->SearchValue = @$filter[\"x_keg\"];\n\t\t$this->keg->AdvancedSearch->SearchOperator = @$filter[\"z_keg\"];\n\t\t$this->keg->AdvancedSearch->SearchCondition = @$filter[\"v_keg\"];\n\t\t$this->keg->AdvancedSearch->SearchValue2 = @$filter[\"y_keg\"];\n\t\t$this->keg->AdvancedSearch->SearchOperator2 = @$filter[\"w_keg\"];\n\t\t$this->keg->AdvancedSearch->Save();\n\n\t\t// Field bud\n\t\t$this->bud->AdvancedSearch->SearchValue = @$filter[\"x_bud\"];\n\t\t$this->bud->AdvancedSearch->SearchOperator = @$filter[\"z_bud\"];\n\t\t$this->bud->AdvancedSearch->SearchCondition = @$filter[\"v_bud\"];\n\t\t$this->bud->AdvancedSearch->SearchValue2 = @$filter[\"y_bud\"];\n\t\t$this->bud->AdvancedSearch->SearchOperator2 = @$filter[\"w_bud\"];\n\t\t$this->bud->AdvancedSearch->Save();\n\n\t\t// Field ket\n\t\t$this->ket->AdvancedSearch->SearchValue = @$filter[\"x_ket\"];\n\t\t$this->ket->AdvancedSearch->SearchOperator = @$filter[\"z_ket\"];\n\t\t$this->ket->AdvancedSearch->SearchCondition = @$filter[\"v_ket\"];\n\t\t$this->ket->AdvancedSearch->SearchValue2 = @$filter[\"y_ket\"];\n\t\t$this->ket->AdvancedSearch->SearchOperator2 = @$filter[\"w_ket\"];\n\t\t$this->ket->AdvancedSearch->Save();\n\n\t\t// Field jumlahd\n\t\t$this->jumlahd->AdvancedSearch->SearchValue = @$filter[\"x_jumlahd\"];\n\t\t$this->jumlahd->AdvancedSearch->SearchOperator = @$filter[\"z_jumlahd\"];\n\t\t$this->jumlahd->AdvancedSearch->SearchCondition = @$filter[\"v_jumlahd\"];\n\t\t$this->jumlahd->AdvancedSearch->SearchValue2 = @$filter[\"y_jumlahd\"];\n\t\t$this->jumlahd->AdvancedSearch->SearchOperator2 = @$filter[\"w_jumlahd\"];\n\t\t$this->jumlahd->AdvancedSearch->Save();\n\n\t\t// Field jumlahk\n\t\t$this->jumlahk->AdvancedSearch->SearchValue = @$filter[\"x_jumlahk\"];\n\t\t$this->jumlahk->AdvancedSearch->SearchOperator = @$filter[\"z_jumlahk\"];\n\t\t$this->jumlahk->AdvancedSearch->SearchCondition = @$filter[\"v_jumlahk\"];\n\t\t$this->jumlahk->AdvancedSearch->SearchValue2 = @$filter[\"y_jumlahk\"];\n\t\t$this->jumlahk->AdvancedSearch->SearchOperator2 = @$filter[\"w_jumlahk\"];\n\t\t$this->jumlahk->AdvancedSearch->Save();\n\n\t\t// Field chek\n\t\t$this->chek->AdvancedSearch->SearchValue = @$filter[\"x_chek\"];\n\t\t$this->chek->AdvancedSearch->SearchOperator = @$filter[\"z_chek\"];\n\t\t$this->chek->AdvancedSearch->SearchCondition = @$filter[\"v_chek\"];\n\t\t$this->chek->AdvancedSearch->SearchValue2 = @$filter[\"y_chek\"];\n\t\t$this->chek->AdvancedSearch->SearchOperator2 = @$filter[\"w_chek\"];\n\t\t$this->chek->AdvancedSearch->Save();\n\n\t\t// Field debkre\n\t\t$this->debkre->AdvancedSearch->SearchValue = @$filter[\"x_debkre\"];\n\t\t$this->debkre->AdvancedSearch->SearchOperator = @$filter[\"z_debkre\"];\n\t\t$this->debkre->AdvancedSearch->SearchCondition = @$filter[\"v_debkre\"];\n\t\t$this->debkre->AdvancedSearch->SearchValue2 = @$filter[\"y_debkre\"];\n\t\t$this->debkre->AdvancedSearch->SearchOperator2 = @$filter[\"w_debkre\"];\n\t\t$this->debkre->AdvancedSearch->Save();\n\n\t\t// Field post\n\t\t$this->post->AdvancedSearch->SearchValue = @$filter[\"x_post\"];\n\t\t$this->post->AdvancedSearch->SearchOperator = @$filter[\"z_post\"];\n\t\t$this->post->AdvancedSearch->SearchCondition = @$filter[\"v_post\"];\n\t\t$this->post->AdvancedSearch->SearchValue2 = @$filter[\"y_post\"];\n\t\t$this->post->AdvancedSearch->SearchOperator2 = @$filter[\"w_post\"];\n\t\t$this->post->AdvancedSearch->Save();\n\n\t\t// Field foll\n\t\t$this->foll->AdvancedSearch->SearchValue = @$filter[\"x_foll\"];\n\t\t$this->foll->AdvancedSearch->SearchOperator = @$filter[\"z_foll\"];\n\t\t$this->foll->AdvancedSearch->SearchCondition = @$filter[\"v_foll\"];\n\t\t$this->foll->AdvancedSearch->SearchValue2 = @$filter[\"y_foll\"];\n\t\t$this->foll->AdvancedSearch->SearchOperator2 = @$filter[\"w_foll\"];\n\t\t$this->foll->AdvancedSearch->Save();\n\n\t\t// Field jns\n\t\t$this->jns->AdvancedSearch->SearchValue = @$filter[\"x_jns\"];\n\t\t$this->jns->AdvancedSearch->SearchOperator = @$filter[\"z_jns\"];\n\t\t$this->jns->AdvancedSearch->SearchCondition = @$filter[\"v_jns\"];\n\t\t$this->jns->AdvancedSearch->SearchValue2 = @$filter[\"y_jns\"];\n\t\t$this->jns->AdvancedSearch->SearchOperator2 = @$filter[\"w_jns\"];\n\t\t$this->jns->AdvancedSearch->Save();\n\n\t\t// Field jp\n\t\t$this->jp->AdvancedSearch->SearchValue = @$filter[\"x_jp\"];\n\t\t$this->jp->AdvancedSearch->SearchOperator = @$filter[\"z_jp\"];\n\t\t$this->jp->AdvancedSearch->SearchCondition = @$filter[\"v_jp\"];\n\t\t$this->jp->AdvancedSearch->SearchValue2 = @$filter[\"y_jp\"];\n\t\t$this->jp->AdvancedSearch->SearchOperator2 = @$filter[\"w_jp\"];\n\t\t$this->jp->AdvancedSearch->Save();\n\n\t\t// Field spm\n\t\t$this->spm->AdvancedSearch->SearchValue = @$filter[\"x_spm\"];\n\t\t$this->spm->AdvancedSearch->SearchOperator = @$filter[\"z_spm\"];\n\t\t$this->spm->AdvancedSearch->SearchCondition = @$filter[\"v_spm\"];\n\t\t$this->spm->AdvancedSearch->SearchValue2 = @$filter[\"y_spm\"];\n\t\t$this->spm->AdvancedSearch->SearchOperator2 = @$filter[\"w_spm\"];\n\t\t$this->spm->AdvancedSearch->Save();\n\n\t\t// Field spm1\n\t\t$this->spm1->AdvancedSearch->SearchValue = @$filter[\"x_spm1\"];\n\t\t$this->spm1->AdvancedSearch->SearchOperator = @$filter[\"z_spm1\"];\n\t\t$this->spm1->AdvancedSearch->SearchCondition = @$filter[\"v_spm1\"];\n\t\t$this->spm1->AdvancedSearch->SearchValue2 = @$filter[\"y_spm1\"];\n\t\t$this->spm1->AdvancedSearch->SearchOperator2 = @$filter[\"w_spm1\"];\n\t\t$this->spm1->AdvancedSearch->Save();\n\n\t\t// Field ppn\n\t\t$this->ppn->AdvancedSearch->SearchValue = @$filter[\"x_ppn\"];\n\t\t$this->ppn->AdvancedSearch->SearchOperator = @$filter[\"z_ppn\"];\n\t\t$this->ppn->AdvancedSearch->SearchCondition = @$filter[\"v_ppn\"];\n\t\t$this->ppn->AdvancedSearch->SearchValue2 = @$filter[\"y_ppn\"];\n\t\t$this->ppn->AdvancedSearch->SearchOperator2 = @$filter[\"w_ppn\"];\n\t\t$this->ppn->AdvancedSearch->Save();\n\n\t\t// Field ps21\n\t\t$this->ps21->AdvancedSearch->SearchValue = @$filter[\"x_ps21\"];\n\t\t$this->ps21->AdvancedSearch->SearchOperator = @$filter[\"z_ps21\"];\n\t\t$this->ps21->AdvancedSearch->SearchCondition = @$filter[\"v_ps21\"];\n\t\t$this->ps21->AdvancedSearch->SearchValue2 = @$filter[\"y_ps21\"];\n\t\t$this->ps21->AdvancedSearch->SearchOperator2 = @$filter[\"w_ps21\"];\n\t\t$this->ps21->AdvancedSearch->Save();\n\n\t\t// Field ps22\n\t\t$this->ps22->AdvancedSearch->SearchValue = @$filter[\"x_ps22\"];\n\t\t$this->ps22->AdvancedSearch->SearchOperator = @$filter[\"z_ps22\"];\n\t\t$this->ps22->AdvancedSearch->SearchCondition = @$filter[\"v_ps22\"];\n\t\t$this->ps22->AdvancedSearch->SearchValue2 = @$filter[\"y_ps22\"];\n\t\t$this->ps22->AdvancedSearch->SearchOperator2 = @$filter[\"w_ps22\"];\n\t\t$this->ps22->AdvancedSearch->Save();\n\n\t\t// Field ps23\n\t\t$this->ps23->AdvancedSearch->SearchValue = @$filter[\"x_ps23\"];\n\t\t$this->ps23->AdvancedSearch->SearchOperator = @$filter[\"z_ps23\"];\n\t\t$this->ps23->AdvancedSearch->SearchCondition = @$filter[\"v_ps23\"];\n\t\t$this->ps23->AdvancedSearch->SearchValue2 = @$filter[\"y_ps23\"];\n\t\t$this->ps23->AdvancedSearch->SearchOperator2 = @$filter[\"w_ps23\"];\n\t\t$this->ps23->AdvancedSearch->Save();\n\n\t\t// Field ps24\n\t\t$this->ps24->AdvancedSearch->SearchValue = @$filter[\"x_ps24\"];\n\t\t$this->ps24->AdvancedSearch->SearchOperator = @$filter[\"z_ps24\"];\n\t\t$this->ps24->AdvancedSearch->SearchCondition = @$filter[\"v_ps24\"];\n\t\t$this->ps24->AdvancedSearch->SearchValue2 = @$filter[\"y_ps24\"];\n\t\t$this->ps24->AdvancedSearch->SearchOperator2 = @$filter[\"w_ps24\"];\n\t\t$this->ps24->AdvancedSearch->Save();\n\n\t\t// Field ps4\n\t\t$this->ps4->AdvancedSearch->SearchValue = @$filter[\"x_ps4\"];\n\t\t$this->ps4->AdvancedSearch->SearchOperator = @$filter[\"z_ps4\"];\n\t\t$this->ps4->AdvancedSearch->SearchCondition = @$filter[\"v_ps4\"];\n\t\t$this->ps4->AdvancedSearch->SearchValue2 = @$filter[\"y_ps4\"];\n\t\t$this->ps4->AdvancedSearch->SearchOperator2 = @$filter[\"w_ps4\"];\n\t\t$this->ps4->AdvancedSearch->Save();\n\t\t$this->BasicSearch->setKeyword(@$filter[EW_TABLE_BASIC_SEARCH]);\n\t\t$this->BasicSearch->setType(@$filter[EW_TABLE_BASIC_SEARCH_TYPE]);\n\t}", "title": "" }, { "docid": "ce4422f4f8f19a7de5993e43e0103113", "score": "0.59844863", "text": "public function get_fun_fail_filter($filter) {\r\n $sql = \"SELECT * \r\n\t\t\t\tFROM \"\r\n . $this->_table1 . \"\r\n\t\t\t\twhere 1=1 \r\n\t\t\t\tand nvl(realisasi,0) + nvl(BLOKIR_KONTRAK,0) > 0\r\n\t\t\t\tand description is not null\r\n\t\t\t\t\"\r\n ;\r\n $no = 0;\r\n foreach ($filter as $filter) {\r\n $sql .= \" AND \" . $filter;\r\n }\r\n\r\n $sql .= \" ORDER BY ERROR_DATE DESC, KPPN_CODE, KDSATKER \";\r\n\r\n //var_dump ($sql);\r\n $result = $this->db->select($sql);\r\n $data = array();\r\n foreach ($result as $val) {\r\n $d_data = new $this($this->registry);\r\n $d_data->set_error_date($val['ERROR_DATE']);\r\n $d_data->set_satker_code($val['KDSATKER']);\r\n $d_data->set_kppn_code($val['KPPN_CODE']);\r\n $d_data->set_account_code($val['ACCOUNT_CODE']);\r\n $d_data->set_program_code($val['PROGRAM_CODE']);\r\n $d_data->set_output_code($val['OUTPUT_CODE']);\r\n $d_data->set_dana_code($val['DANA_CODE']);\r\n $d_data->set_description($val['DESCRIPTION']);\r\n $d_data->set_blokir_kontrak($val['BLOKIR_KONTRAK']);\r\n $d_data->set_blokir_realisasi($val['REALISASI']);\r\n $data[] = $d_data;\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "b58ac1d97dfc756c92d4ee72edb300c8", "score": "0.5976334", "text": "private function _filter($data) {\r\n\t\t\t$data['user_id'] \t\t\t= Zend_Filter::filterStatic($data['user_id'], 'StringTrim');\r\n\t\t\t\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "8bd4cac7fb4d8eb1b11b82f7501759e4", "score": "0.5968817", "text": "function getListBuku($filter){\n\n\t\textract($filter);\n\t\t$this->query =\" SELECT SQL_CALC_FOUND_ROWS * FROM \".$this->table;\n\t\t$this->query .=\" LEFT JOIN sp_golongan on (sp_golongan.golId=sp_buku.bkGolId) \";\n\t\t$this->query .=\" LEFT JOIN sp_buku_eksemplar ON (sp_buku_eksemplar.bkexBkId=sp_buku.bkId)\";\n\t\t$this->query .=\" LEFT JOIN sp_golongan_kategori on (sp_golongan_kategori.katId=sp_golongan.golKategoriId) \";\n\t\t$this->query .=\" LEFT JOIN sp_seksi on (sp_seksi.seksiId=sp_buku.bkSeksiId) \";\n\t\t$this->query .=\" LEFT JOIN sp_tingkat on (sp_tingkat.tingkatId=sp_buku.bkTingkatId) \";\n\t\t$this->query .=\" LEFT JOIN sp_penerbit on (sp_penerbit.penerbitId=sp_buku.bkPenerbit) \";\n\t\t$this->query .= \" WHERE 1=1\";\n\t\t$this->query .=\" AND bkId NOT IN (SELECT bklogBkId FROM _sp_buku_log)\";\n\t\t$this->query .=(isset($title) && $title !='') ? \" AND bkJudul LIKE '%\".$title.\"%'\" : \"\";\n\t\t$this->query .=(isset($penerbit) && $penerbit !='') ? \" AND penerbitNama LIKE '%\".$penerbit.\"%'\" : \"\";\n\t\t$this->query .=(isset($noInventaris) && $noInventaris !='') ? \" AND bkexNoInventaris LIKE '%\".$noInventaris.\"%'\" : \"\";\n\n\t\t\n\t\t$this->query .=\" ORDER BY bkJudul ASC\"; \n\t\t$this->query .=\" LIMIT \".$this->offset.','.$this->limit;\n\n\n\t\t\n\n\n\t\t$this->query = $this->db->query($this->query);\n\t\t$this->result = $this->query->result_array();\n\n\t\treturn $this->result;\n\t\n\n\t}", "title": "" }, { "docid": "31f13cb4b6b4f51483c2d8f8953be127", "score": "0.59603626", "text": "public function orFilterWhere(){\n $model = ShopOrder::find()\n ->select('shop_order.*')\n ->filterWhere([\n 'contact_name' => 'salah333',])\n ->orFilterWhere(['user_id' => '1'])\n ->all();\n vd($model);\n\n }", "title": "" }, { "docid": "784881f222fe20de9a9293e08419e48f", "score": "0.59583014", "text": "public function getFilters()\n {\n // get the search form data\n $data = $this->form->getData();\n\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->editora_id) AND ( (is_scalar($data->editora_id) AND $data->editora_id !== '') OR (is_array($data->editora_id) AND (!empty($data->editora_id)) )) )\n {\n\n $filters[] = new TFilter('editora_id', '=', $data->editora_id);// create the filter \n }\n if (isset($data->colecao_id) AND ( (is_scalar($data->colecao_id) AND $data->colecao_id !== '') OR (is_array($data->colecao_id) AND (!empty($data->colecao_id)) )) )\n {\n\n $filters[] = new TFilter('colecao_id', '=', $data->colecao_id);// create the filter \n }\n if (isset($data->classificacao_id) AND ( (is_scalar($data->classificacao_id) AND $data->classificacao_id !== '') OR (is_array($data->classificacao_id) AND (!empty($data->classificacao_id)) )) )\n {\n\n $filters[] = new TFilter('classificacao_id', '=', $data->classificacao_id);// create the filter \n }\n if (isset($data->numero) AND ( (is_scalar($data->numero) AND $data->numero !== '') OR (is_array($data->numero) AND (!empty($data->numero)) )) )\n {\n\n $filters[] = new TFilter('numero', '=', $data->numero);// create the filter \n }\n if (isset($data->autor_principal_id) AND ( (is_scalar($data->autor_principal_id) AND $data->autor_principal_id !== '') OR (is_array($data->autor_principal_id) AND (!empty($data->autor_principal_id)) )) )\n {\n\n $filters[] = new TFilter('autor_principal_id', '=', $data->autor_principal_id);// create the filter \n }\n if (isset($data->titulo) AND ( (is_scalar($data->titulo) AND $data->titulo !== '') OR (is_array($data->titulo) AND (!empty($data->titulo)) )) )\n {\n\n $filters[] = new TFilter('titulo', 'like', \"%{$data->titulo}%\");// create the filter \n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n\n return $filters;\n }", "title": "" }, { "docid": "473a56f059ccc072390f8e5f4e447eb5", "score": "0.59571964", "text": "abstract public function filters(): array;", "title": "" }, { "docid": "0d1c3d7f7d81745f14c51a28cdc0b249", "score": "0.59546214", "text": "public function filterHaving(){\n $model = ShopOrder::find()\n ->select('shop_order.contact_name')\n ->groupBy('id')\n ->filterHaving(['id' => 1750, 'id' => 1751])\n ->all();\n vd($model);\n }", "title": "" }, { "docid": "cd24f5bac6341a86586c7ec5f3cb4a2a", "score": "0.59502405", "text": "public function filter()\n {\n $session = $this->session->userdata('app_session');\n $kdcab = $session['kdcab'];\n $data = $this->Deliveryorder_model\n ->where(\"tgl_do between '\".$this->uri->segment(3).\"' AND '\".$this->uri->segment(4).\"' AND LEFT(trans_do_header.no_do,3)='\".$kdcab.\"'\")\n ->order_by('no_do','DESC')->find_all();\n\n if ($kdcab == \"100\") {\n $data = $this->Deliveryorder_model->where(\"tgl_do between '\".$this->uri->segment(3).\"' AND '\".$this->uri->segment(4).\"'\")->order_by('no_do','DESC')->find_all();\n }\n $this->template->set('results', $data);\n $this->template->title('Delivery Order');\n $this->template->render('list');\n }", "title": "" }, { "docid": "22cb8fa721d7397b1f0432638a05e99e", "score": "0.5934753", "text": "public function filter() \n {\n return TRUE;\n }", "title": "" }, { "docid": "0608b005686b808a3671bb23fdcf91e7", "score": "0.5927525", "text": "public function retrieve_pemindahtanganan_filter($parameter)\n {\n \n\t\t$viewTable = 'pemindahtanganan_'.$this->UserSes['ses_uoperatorid'];\n\t\t$paging = paging($_GET['pid'], 100);\n\t\tif (is_array($parameter['param'])){\n\t\t\n\t\t\t$POST['kd_idaset'] = $parameter['param']['kd_idaset'];\n\t\t\t$POST['kd_namaaset'] = $parameter['param']['kd_namaaset'];\n\t\t\t$POST['kd_nokontrak'] = $parameter['param']['kd_nokontrak'];\n\t\t\t$POST['kd_tahun'] = $parameter['param']['kd_tahun'];\n\t\t\t$POST['kelompok_id']= $parameter['param']['kelompok_id'];\n\t\t\t$POST['lokasi_id']= $parameter['param']['lokasi_id'];\n\t\t\t$POST['satker']= $parameter['param']['satker'];\n\t\t\t$POST['ngo_id']= $parameter['param']['ngo_id'];\n\t\t\t$POST['modul']= $parameter['param']['modul'];\n\t\t\t$POST['paging'] = $parameter['param']['paging'];\n\t\t\t$POST['sql_where'] = $parameter['param']['sql_where'];\n\t\t\t$POST['sql'] = $parameter['param']['sql'];\n\t\t\t\n\t\t\t$data = $this->filter->filter_module($POST);\n\t\t\t\n\t\t\t$param = $_SESSION['parameter_sql'];\n\t\t\t\n\t\t\t$query=\"$param ORDER BY Aset_ID ASC \";\n\t\t\t$dataArray = $this->_fetch_array($query, 1);\n\t\t\t\n\t\t\tif ($dataArray){\n\t\t\n\t\t\t\tforeach ($dataArray as $value){\n\t\t\t\t\t$hasil[] = $value['Aset_ID'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$dataImplode = implode(',',$hasil);\n\t\t\t\tif($dataImplode!=\"\"){\n\t\t\t\t\t\n\t\t\t\t\t$table = $this->is_table_exists($viewTable, 1);\n\t\t\t\t\t\n\t\t\t\t\tif (!$table){\n\t\t\t\t\t\t$sql=\"CREATE OR REPLACE VIEW $viewTable AS SELECT DISTINCT(a.Aset_ID), a.NamaAset, a.Kelompok_ID, a.LastSatker_ID,\n\t\t\t\t\t\t\t\ta.Lokasi_ID, a.LastKondisi_ID, a.Persediaan, \n\t\t\t\t\t\t\t\ta.Satuan, a.TglPerolehan, a.NilaiPerolehan,\n\t\t\t\t\t\t\t\ta.Alamat, a.RTRW, a.Pemilik, a.Tahun, a.NomorReg,\n\t\t\t\t\t\t\t\tc.Kelompok, c.Uraian, c.Kode,\n\t\t\t\t\t\t\t\td.NamaLokasi, d.KodePropPerMen, d.KodeKabPerMen,\n\t\t\t\t\t\t\t\te.KodeSatker, e.NamaSatker, e.KodeUnit,\n\t\t\t\t\t\t\t\tf.InfoKondisi,k.NoKontrak\n\t\t\t\t\t\t\t\tFROM Aset AS a \n\t\t\t\t\t\t\t\tINNER JOIN Kelompok AS c ON a.Kelompok_ID = c.Kelompok_ID\n\t\t\t\t\t\t\t\tINNER JOIN Lokasi AS d ON a.Lokasi_ID = d.Lokasi_ID \n\t\t\t\t\t\t\t\tINNER JOIN Satker AS e ON a.OrigSatker_ID = e.Satker_ID\n\t\t\t\t\t\t\t\tLEFT JOIN Kondisi AS f ON a.LastKondisi_ID = f.Kondisi_ID\n\t\t\t\t\t\t\t\tLEFT JOIN KontrakAset AS ka ON a.Aset_ID=ka.Aset_ID\n\t\t\t\t\t\t\t\tLEFT JOIN Kontrak AS k ON k.Kontrak_ID=ka.Kontrak_ID\n\t\t\t\t\t\t\t\tWHERE a.Aset_ID IN ({$dataImplode})\n\t\t\t\t\t\t\t\tORDER BY a.Aset_ID asc\";\n\t\t\t\t\t\t// pr($sql);\n\t\t\t\t\t\t$exec=$this->query($sql) or die($this->error());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$sql = \"SELECT * FROM $viewTable LIMIT $paging, 100 \";\n\t\t\t\t\t$row = $this->_fetch_object($sql, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}else{ \n\t\t\t$sql = \"SELECT * FROM $viewTable LIMIT $paging, 100 \";\n\t\t\t$row = $this->_fetch_object($sql, 1);\n\t\t}\n\t\t\n\t\t\n\t\t$dataAsetUser = $this->filter->getAsetUser(array('Aset_ID'=>$dataImplode));\n\t\t\n\t\t\n\t\t// if (isset($parameter['search'])){\n\t\t\t\n\t\t\t// $query=\"$param ORDER BY Aset_ID ASC \";\n\t\t// }else{\n\t\t\t\n\t\t\t\n\t\t// }\n\t\t\n\t\t\t\n // nilai kembalian dalam bentuk array\n\t\t\n // $parameter_sql_report_fix=$_SESSION['ses_report_filter_'.$parameter['menuID'].'_'.$this->UserSes['ses_uid']];\n return array('dataArr'=>$row, 'asetList'=>$dataAsetUser, 'parameter_report'=>$parameter_sql_report_fix);\n }", "title": "" }, { "docid": "49a7b19d177b976fb28a4d7b5d4a168f", "score": "0.59093076", "text": "public function filterAbunzi($query)\r\n\t {\r\n \t // sanatize, remove any space and make it lower \r\n \t $privilege = str_replace(' ', '', CRUDBooster::myPrivilegeName());\r\n \t $privilege = strtolower($privilege);\r\n \t \r\n\t //Your code here\r\n\t switch ($privilege) {\r\n\t \tcase 'abunzidistrict':\r\n\t \t\t$query->where('district',CRUDBooster::me()->district);\r\n\t \tbreak;\r\n\t }\r\n\r\n\t return $query;\r\n\r\n\t }", "title": "" }, { "docid": "3cb3724341d2046c0b7326d9ec87b771", "score": "0.589631", "text": "function RestoreFilterList() {\n\n\t\t// Return if not reset filter\n\t\tif (@$_POST[\"cmd\"] <> \"resetfilter\")\n\t\t\treturn FALSE;\n\t\t$filter = json_decode(ew_StripSlashes(@$_POST[\"filter\"]), TRUE);\n\t\t$this->Command = \"search\";\n\n\t\t// Field origen_dem\n\t\t$this->origen_dem->AdvancedSearch->SearchValue = @$filter[\"x_origen_dem\"];\n\t\t$this->origen_dem->AdvancedSearch->SearchOperator = @$filter[\"z_origen_dem\"];\n\t\t$this->origen_dem->AdvancedSearch->SearchCondition = @$filter[\"v_origen_dem\"];\n\t\t$this->origen_dem->AdvancedSearch->SearchValue2 = @$filter[\"y_origen_dem\"];\n\t\t$this->origen_dem->AdvancedSearch->SearchOperator2 = @$filter[\"w_origen_dem\"];\n\t\t$this->origen_dem->AdvancedSearch->Save();\n\n\t\t// Field tipo_cliente_dem\n\t\t$this->tipo_cliente_dem->AdvancedSearch->SearchValue = @$filter[\"x_tipo_cliente_dem\"];\n\t\t$this->tipo_cliente_dem->AdvancedSearch->SearchOperator = @$filter[\"z_tipo_cliente_dem\"];\n\t\t$this->tipo_cliente_dem->AdvancedSearch->SearchCondition = @$filter[\"v_tipo_cliente_dem\"];\n\t\t$this->tipo_cliente_dem->AdvancedSearch->SearchValue2 = @$filter[\"y_tipo_cliente_dem\"];\n\t\t$this->tipo_cliente_dem->AdvancedSearch->SearchOperator2 = @$filter[\"w_tipo_cliente_dem\"];\n\t\t$this->tipo_cliente_dem->AdvancedSearch->Save();\n\n\t\t// Field fecha_llamada\n\t\t$this->fecha_llamada->AdvancedSearch->SearchValue = @$filter[\"x_fecha_llamada\"];\n\t\t$this->fecha_llamada->AdvancedSearch->SearchOperator = @$filter[\"z_fecha_llamada\"];\n\t\t$this->fecha_llamada->AdvancedSearch->SearchCondition = @$filter[\"v_fecha_llamada\"];\n\t\t$this->fecha_llamada->AdvancedSearch->SearchValue2 = @$filter[\"y_fecha_llamada\"];\n\t\t$this->fecha_llamada->AdvancedSearch->SearchOperator2 = @$filter[\"w_fecha_llamada\"];\n\t\t$this->fecha_llamada->AdvancedSearch->Save();\n\n\t\t// Field cod_dem\n\t\t$this->cod_dem->AdvancedSearch->SearchValue = @$filter[\"x_cod_dem\"];\n\t\t$this->cod_dem->AdvancedSearch->SearchOperator = @$filter[\"z_cod_dem\"];\n\t\t$this->cod_dem->AdvancedSearch->SearchCondition = @$filter[\"v_cod_dem\"];\n\t\t$this->cod_dem->AdvancedSearch->SearchValue2 = @$filter[\"y_cod_dem\"];\n\t\t$this->cod_dem->AdvancedSearch->SearchOperator2 = @$filter[\"w_cod_dem\"];\n\t\t$this->cod_dem->AdvancedSearch->Save();\n\n\t\t// Field poliza_dem\n\t\t$this->poliza_dem->AdvancedSearch->SearchValue = @$filter[\"x_poliza_dem\"];\n\t\t$this->poliza_dem->AdvancedSearch->SearchOperator = @$filter[\"z_poliza_dem\"];\n\t\t$this->poliza_dem->AdvancedSearch->SearchCondition = @$filter[\"v_poliza_dem\"];\n\t\t$this->poliza_dem->AdvancedSearch->SearchValue2 = @$filter[\"y_poliza_dem\"];\n\t\t$this->poliza_dem->AdvancedSearch->SearchOperator2 = @$filter[\"w_poliza_dem\"];\n\t\t$this->poliza_dem->AdvancedSearch->Save();\n\n\t\t// Field usuario_captura\n\t\t$this->usuario_captura->AdvancedSearch->SearchValue = @$filter[\"x_usuario_captura\"];\n\t\t$this->usuario_captura->AdvancedSearch->SearchOperator = @$filter[\"z_usuario_captura\"];\n\t\t$this->usuario_captura->AdvancedSearch->SearchCondition = @$filter[\"v_usuario_captura\"];\n\t\t$this->usuario_captura->AdvancedSearch->SearchValue2 = @$filter[\"y_usuario_captura\"];\n\t\t$this->usuario_captura->AdvancedSearch->SearchOperator2 = @$filter[\"w_usuario_captura\"];\n\t\t$this->usuario_captura->AdvancedSearch->Save();\n\n\t\t// Field campana_demanda\n\t\t$this->campana_demanda->AdvancedSearch->SearchValue = @$filter[\"x_campana_demanda\"];\n\t\t$this->campana_demanda->AdvancedSearch->SearchOperator = @$filter[\"z_campana_demanda\"];\n\t\t$this->campana_demanda->AdvancedSearch->SearchCondition = @$filter[\"v_campana_demanda\"];\n\t\t$this->campana_demanda->AdvancedSearch->SearchValue2 = @$filter[\"y_campana_demanda\"];\n\t\t$this->campana_demanda->AdvancedSearch->SearchOperator2 = @$filter[\"w_campana_demanda\"];\n\t\t$this->campana_demanda->AdvancedSearch->Save();\n\n\t\t// Field chip_natural\n\t\t$this->chip_natural->AdvancedSearch->SearchValue = @$filter[\"x_chip_natural\"];\n\t\t$this->chip_natural->AdvancedSearch->SearchOperator = @$filter[\"z_chip_natural\"];\n\t\t$this->chip_natural->AdvancedSearch->SearchCondition = @$filter[\"v_chip_natural\"];\n\t\t$this->chip_natural->AdvancedSearch->SearchValue2 = @$filter[\"y_chip_natural\"];\n\t\t$this->chip_natural->AdvancedSearch->SearchOperator2 = @$filter[\"w_chip_natural\"];\n\t\t$this->chip_natural->AdvancedSearch->Save();\n\n\t\t// Field estado_predio\n\t\t$this->estado_predio->AdvancedSearch->SearchValue = @$filter[\"x_estado_predio\"];\n\t\t$this->estado_predio->AdvancedSearch->SearchOperator = @$filter[\"z_estado_predio\"];\n\t\t$this->estado_predio->AdvancedSearch->SearchCondition = @$filter[\"v_estado_predio\"];\n\t\t$this->estado_predio->AdvancedSearch->SearchValue2 = @$filter[\"y_estado_predio\"];\n\t\t$this->estado_predio->AdvancedSearch->SearchOperator2 = @$filter[\"w_estado_predio\"];\n\t\t$this->estado_predio->AdvancedSearch->Save();\n\n\t\t// Field tipo_predio\n\t\t$this->tipo_predio->AdvancedSearch->SearchValue = @$filter[\"x_tipo_predio\"];\n\t\t$this->tipo_predio->AdvancedSearch->SearchOperator = @$filter[\"z_tipo_predio\"];\n\t\t$this->tipo_predio->AdvancedSearch->SearchCondition = @$filter[\"v_tipo_predio\"];\n\t\t$this->tipo_predio->AdvancedSearch->SearchValue2 = @$filter[\"y_tipo_predio\"];\n\t\t$this->tipo_predio->AdvancedSearch->SearchOperator2 = @$filter[\"w_tipo_predio\"];\n\t\t$this->tipo_predio->AdvancedSearch->Save();\n\n\t\t// Field uso\n\t\t$this->uso->AdvancedSearch->SearchValue = @$filter[\"x_uso\"];\n\t\t$this->uso->AdvancedSearch->SearchOperator = @$filter[\"z_uso\"];\n\t\t$this->uso->AdvancedSearch->SearchCondition = @$filter[\"v_uso\"];\n\t\t$this->uso->AdvancedSearch->SearchValue2 = @$filter[\"y_uso\"];\n\t\t$this->uso->AdvancedSearch->SearchOperator2 = @$filter[\"w_uso\"];\n\t\t$this->uso->AdvancedSearch->Save();\n\n\t\t// Field mecado\n\t\t$this->mecado->AdvancedSearch->SearchValue = @$filter[\"x_mecado\"];\n\t\t$this->mecado->AdvancedSearch->SearchOperator = @$filter[\"z_mecado\"];\n\t\t$this->mecado->AdvancedSearch->SearchCondition = @$filter[\"v_mecado\"];\n\t\t$this->mecado->AdvancedSearch->SearchValue2 = @$filter[\"y_mecado\"];\n\t\t$this->mecado->AdvancedSearch->SearchOperator2 = @$filter[\"w_mecado\"];\n\t\t$this->mecado->AdvancedSearch->Save();\n\n\t\t// Field nombre_cliente\n\t\t$this->nombre_cliente->AdvancedSearch->SearchValue = @$filter[\"x_nombre_cliente\"];\n\t\t$this->nombre_cliente->AdvancedSearch->SearchOperator = @$filter[\"z_nombre_cliente\"];\n\t\t$this->nombre_cliente->AdvancedSearch->SearchCondition = @$filter[\"v_nombre_cliente\"];\n\t\t$this->nombre_cliente->AdvancedSearch->SearchValue2 = @$filter[\"y_nombre_cliente\"];\n\t\t$this->nombre_cliente->AdvancedSearch->SearchOperator2 = @$filter[\"w_nombre_cliente\"];\n\t\t$this->nombre_cliente->AdvancedSearch->Save();\n\n\t\t// Field num_doc\n\t\t$this->num_doc->AdvancedSearch->SearchValue = @$filter[\"x_num_doc\"];\n\t\t$this->num_doc->AdvancedSearch->SearchOperator = @$filter[\"z_num_doc\"];\n\t\t$this->num_doc->AdvancedSearch->SearchCondition = @$filter[\"v_num_doc\"];\n\t\t$this->num_doc->AdvancedSearch->SearchValue2 = @$filter[\"y_num_doc\"];\n\t\t$this->num_doc->AdvancedSearch->SearchOperator2 = @$filter[\"w_num_doc\"];\n\t\t$this->num_doc->AdvancedSearch->Save();\n\n\t\t// Field direccion\n\t\t$this->direccion->AdvancedSearch->SearchValue = @$filter[\"x_direccion\"];\n\t\t$this->direccion->AdvancedSearch->SearchOperator = @$filter[\"z_direccion\"];\n\t\t$this->direccion->AdvancedSearch->SearchCondition = @$filter[\"v_direccion\"];\n\t\t$this->direccion->AdvancedSearch->SearchValue2 = @$filter[\"y_direccion\"];\n\t\t$this->direccion->AdvancedSearch->SearchOperator2 = @$filter[\"w_direccion\"];\n\t\t$this->direccion->AdvancedSearch->Save();\n\n\t\t// Field municipio\n\t\t$this->municipio->AdvancedSearch->SearchValue = @$filter[\"x_municipio\"];\n\t\t$this->municipio->AdvancedSearch->SearchOperator = @$filter[\"z_municipio\"];\n\t\t$this->municipio->AdvancedSearch->SearchCondition = @$filter[\"v_municipio\"];\n\t\t$this->municipio->AdvancedSearch->SearchValue2 = @$filter[\"y_municipio\"];\n\t\t$this->municipio->AdvancedSearch->SearchOperator2 = @$filter[\"w_municipio\"];\n\t\t$this->municipio->AdvancedSearch->Save();\n\n\t\t// Field telefono\n\t\t$this->telefono->AdvancedSearch->SearchValue = @$filter[\"x_telefono\"];\n\t\t$this->telefono->AdvancedSearch->SearchOperator = @$filter[\"z_telefono\"];\n\t\t$this->telefono->AdvancedSearch->SearchCondition = @$filter[\"v_telefono\"];\n\t\t$this->telefono->AdvancedSearch->SearchValue2 = @$filter[\"y_telefono\"];\n\t\t$this->telefono->AdvancedSearch->SearchOperator2 = @$filter[\"w_telefono\"];\n\t\t$this->telefono->AdvancedSearch->Save();\n\n\t\t// Field cod_trabajo_original\n\t\t$this->cod_trabajo_original->AdvancedSearch->SearchValue = @$filter[\"x_cod_trabajo_original\"];\n\t\t$this->cod_trabajo_original->AdvancedSearch->SearchOperator = @$filter[\"z_cod_trabajo_original\"];\n\t\t$this->cod_trabajo_original->AdvancedSearch->SearchCondition = @$filter[\"v_cod_trabajo_original\"];\n\t\t$this->cod_trabajo_original->AdvancedSearch->SearchValue2 = @$filter[\"y_cod_trabajo_original\"];\n\t\t$this->cod_trabajo_original->AdvancedSearch->SearchOperator2 = @$filter[\"w_cod_trabajo_original\"];\n\t\t$this->cod_trabajo_original->AdvancedSearch->Save();\n\n\t\t// Field fecha_trab_dem\n\t\t$this->fecha_trab_dem->AdvancedSearch->SearchValue = @$filter[\"x_fecha_trab_dem\"];\n\t\t$this->fecha_trab_dem->AdvancedSearch->SearchOperator = @$filter[\"z_fecha_trab_dem\"];\n\t\t$this->fecha_trab_dem->AdvancedSearch->SearchCondition = @$filter[\"v_fecha_trab_dem\"];\n\t\t$this->fecha_trab_dem->AdvancedSearch->SearchValue2 = @$filter[\"y_fecha_trab_dem\"];\n\t\t$this->fecha_trab_dem->AdvancedSearch->SearchOperator2 = @$filter[\"w_fecha_trab_dem\"];\n\t\t$this->fecha_trab_dem->AdvancedSearch->Save();\n\n\t\t// Field cod_ult_visit\n\t\t$this->cod_ult_visit->AdvancedSearch->SearchValue = @$filter[\"x_cod_ult_visit\"];\n\t\t$this->cod_ult_visit->AdvancedSearch->SearchOperator = @$filter[\"z_cod_ult_visit\"];\n\t\t$this->cod_ult_visit->AdvancedSearch->SearchCondition = @$filter[\"v_cod_ult_visit\"];\n\t\t$this->cod_ult_visit->AdvancedSearch->SearchValue2 = @$filter[\"y_cod_ult_visit\"];\n\t\t$this->cod_ult_visit->AdvancedSearch->SearchOperator2 = @$filter[\"w_cod_ult_visit\"];\n\t\t$this->cod_ult_visit->AdvancedSearch->Save();\n\n\t\t// Field res_ult_vis\n\t\t$this->res_ult_vis->AdvancedSearch->SearchValue = @$filter[\"x_res_ult_vis\"];\n\t\t$this->res_ult_vis->AdvancedSearch->SearchOperator = @$filter[\"z_res_ult_vis\"];\n\t\t$this->res_ult_vis->AdvancedSearch->SearchCondition = @$filter[\"v_res_ult_vis\"];\n\t\t$this->res_ult_vis->AdvancedSearch->SearchValue2 = @$filter[\"y_res_ult_vis\"];\n\t\t$this->res_ult_vis->AdvancedSearch->SearchOperator2 = @$filter[\"w_res_ult_vis\"];\n\t\t$this->res_ult_vis->AdvancedSearch->Save();\n\n\t\t// Field fecha_ult_visita\n\t\t$this->fecha_ult_visita->AdvancedSearch->SearchValue = @$filter[\"x_fecha_ult_visita\"];\n\t\t$this->fecha_ult_visita->AdvancedSearch->SearchOperator = @$filter[\"z_fecha_ult_visita\"];\n\t\t$this->fecha_ult_visita->AdvancedSearch->SearchCondition = @$filter[\"v_fecha_ult_visita\"];\n\t\t$this->fecha_ult_visita->AdvancedSearch->SearchValue2 = @$filter[\"y_fecha_ult_visita\"];\n\t\t$this->fecha_ult_visita->AdvancedSearch->SearchOperator2 = @$filter[\"w_fecha_ult_visita\"];\n\t\t$this->fecha_ult_visita->AdvancedSearch->Save();\n\n\t\t// Field usu_asig_primer_trab\n\t\t$this->usu_asig_primer_trab->AdvancedSearch->SearchValue = @$filter[\"x_usu_asig_primer_trab\"];\n\t\t$this->usu_asig_primer_trab->AdvancedSearch->SearchOperator = @$filter[\"z_usu_asig_primer_trab\"];\n\t\t$this->usu_asig_primer_trab->AdvancedSearch->SearchCondition = @$filter[\"v_usu_asig_primer_trab\"];\n\t\t$this->usu_asig_primer_trab->AdvancedSearch->SearchValue2 = @$filter[\"y_usu_asig_primer_trab\"];\n\t\t$this->usu_asig_primer_trab->AdvancedSearch->SearchOperator2 = @$filter[\"w_usu_asig_primer_trab\"];\n\t\t$this->usu_asig_primer_trab->AdvancedSearch->Save();\n\n\t\t// Field fecha_prim_visit\n\t\t$this->fecha_prim_visit->AdvancedSearch->SearchValue = @$filter[\"x_fecha_prim_visit\"];\n\t\t$this->fecha_prim_visit->AdvancedSearch->SearchOperator = @$filter[\"z_fecha_prim_visit\"];\n\t\t$this->fecha_prim_visit->AdvancedSearch->SearchCondition = @$filter[\"v_fecha_prim_visit\"];\n\t\t$this->fecha_prim_visit->AdvancedSearch->SearchValue2 = @$filter[\"y_fecha_prim_visit\"];\n\t\t$this->fecha_prim_visit->AdvancedSearch->SearchOperator2 = @$filter[\"w_fecha_prim_visit\"];\n\t\t$this->fecha_prim_visit->AdvancedSearch->Save();\n\n\t\t// Field respuesta_pv\n\t\t$this->respuesta_pv->AdvancedSearch->SearchValue = @$filter[\"x_respuesta_pv\"];\n\t\t$this->respuesta_pv->AdvancedSearch->SearchOperator = @$filter[\"z_respuesta_pv\"];\n\t\t$this->respuesta_pv->AdvancedSearch->SearchCondition = @$filter[\"v_respuesta_pv\"];\n\t\t$this->respuesta_pv->AdvancedSearch->SearchValue2 = @$filter[\"y_respuesta_pv\"];\n\t\t$this->respuesta_pv->AdvancedSearch->SearchOperator2 = @$filter[\"w_respuesta_pv\"];\n\t\t$this->respuesta_pv->AdvancedSearch->Save();\n\n\t\t// Field fecha_cap_primera_visita\n\t\t$this->fecha_cap_primera_visita->AdvancedSearch->SearchValue = @$filter[\"x_fecha_cap_primera_visita\"];\n\t\t$this->fecha_cap_primera_visita->AdvancedSearch->SearchOperator = @$filter[\"z_fecha_cap_primera_visita\"];\n\t\t$this->fecha_cap_primera_visita->AdvancedSearch->SearchCondition = @$filter[\"v_fecha_cap_primera_visita\"];\n\t\t$this->fecha_cap_primera_visita->AdvancedSearch->SearchValue2 = @$filter[\"y_fecha_cap_primera_visita\"];\n\t\t$this->fecha_cap_primera_visita->AdvancedSearch->SearchOperator2 = @$filter[\"w_fecha_cap_primera_visita\"];\n\t\t$this->fecha_cap_primera_visita->AdvancedSearch->Save();\n\n\t\t// Field cod_contratista\n\t\t$this->cod_contratista->AdvancedSearch->SearchValue = @$filter[\"x_cod_contratista\"];\n\t\t$this->cod_contratista->AdvancedSearch->SearchOperator = @$filter[\"z_cod_contratista\"];\n\t\t$this->cod_contratista->AdvancedSearch->SearchCondition = @$filter[\"v_cod_contratista\"];\n\t\t$this->cod_contratista->AdvancedSearch->SearchValue2 = @$filter[\"y_cod_contratista\"];\n\t\t$this->cod_contratista->AdvancedSearch->SearchOperator2 = @$filter[\"w_cod_contratista\"];\n\t\t$this->cod_contratista->AdvancedSearch->Save();\n\n\t\t// Field nom_cont\n\t\t$this->nom_cont->AdvancedSearch->SearchValue = @$filter[\"x_nom_cont\"];\n\t\t$this->nom_cont->AdvancedSearch->SearchOperator = @$filter[\"z_nom_cont\"];\n\t\t$this->nom_cont->AdvancedSearch->SearchCondition = @$filter[\"v_nom_cont\"];\n\t\t$this->nom_cont->AdvancedSearch->SearchValue2 = @$filter[\"y_nom_cont\"];\n\t\t$this->nom_cont->AdvancedSearch->SearchOperator2 = @$filter[\"w_nom_cont\"];\n\t\t$this->nom_cont->AdvancedSearch->Save();\n\n\t\t// Field distrito\n\t\t$this->distrito->AdvancedSearch->SearchValue = @$filter[\"x_distrito\"];\n\t\t$this->distrito->AdvancedSearch->SearchOperator = @$filter[\"z_distrito\"];\n\t\t$this->distrito->AdvancedSearch->SearchCondition = @$filter[\"v_distrito\"];\n\t\t$this->distrito->AdvancedSearch->SearchValue2 = @$filter[\"y_distrito\"];\n\t\t$this->distrito->AdvancedSearch->SearchOperator2 = @$filter[\"w_distrito\"];\n\t\t$this->distrito->AdvancedSearch->Save();\n\n\t\t// Field malla\n\t\t$this->malla->AdvancedSearch->SearchValue = @$filter[\"x_malla\"];\n\t\t$this->malla->AdvancedSearch->SearchOperator = @$filter[\"z_malla\"];\n\t\t$this->malla->AdvancedSearch->SearchCondition = @$filter[\"v_malla\"];\n\t\t$this->malla->AdvancedSearch->SearchValue2 = @$filter[\"y_malla\"];\n\t\t$this->malla->AdvancedSearch->SearchOperator2 = @$filter[\"w_malla\"];\n\t\t$this->malla->AdvancedSearch->Save();\n\n\t\t// Field sector\n\t\t$this->sector->AdvancedSearch->SearchValue = @$filter[\"x_sector\"];\n\t\t$this->sector->AdvancedSearch->SearchOperator = @$filter[\"z_sector\"];\n\t\t$this->sector->AdvancedSearch->SearchCondition = @$filter[\"v_sector\"];\n\t\t$this->sector->AdvancedSearch->SearchValue2 = @$filter[\"y_sector\"];\n\t\t$this->sector->AdvancedSearch->SearchOperator2 = @$filter[\"w_sector\"];\n\t\t$this->sector->AdvancedSearch->Save();\n\n\t\t// Field descr_estado_dem\n\t\t$this->descr_estado_dem->AdvancedSearch->SearchValue = @$filter[\"x_descr_estado_dem\"];\n\t\t$this->descr_estado_dem->AdvancedSearch->SearchOperator = @$filter[\"z_descr_estado_dem\"];\n\t\t$this->descr_estado_dem->AdvancedSearch->SearchCondition = @$filter[\"v_descr_estado_dem\"];\n\t\t$this->descr_estado_dem->AdvancedSearch->SearchValue2 = @$filter[\"y_descr_estado_dem\"];\n\t\t$this->descr_estado_dem->AdvancedSearch->SearchOperator2 = @$filter[\"w_descr_estado_dem\"];\n\t\t$this->descr_estado_dem->AdvancedSearch->Save();\n\n\t\t// Field estrato\n\t\t$this->estrato->AdvancedSearch->SearchValue = @$filter[\"x_estrato\"];\n\t\t$this->estrato->AdvancedSearch->SearchOperator = @$filter[\"z_estrato\"];\n\t\t$this->estrato->AdvancedSearch->SearchCondition = @$filter[\"v_estrato\"];\n\t\t$this->estrato->AdvancedSearch->SearchValue2 = @$filter[\"y_estrato\"];\n\t\t$this->estrato->AdvancedSearch->SearchOperator2 = @$filter[\"w_estrato\"];\n\t\t$this->estrato->AdvancedSearch->Save();\n\n\t\t// Field clase_dem\n\t\t$this->clase_dem->AdvancedSearch->SearchValue = @$filter[\"x_clase_dem\"];\n\t\t$this->clase_dem->AdvancedSearch->SearchOperator = @$filter[\"z_clase_dem\"];\n\t\t$this->clase_dem->AdvancedSearch->SearchCondition = @$filter[\"v_clase_dem\"];\n\t\t$this->clase_dem->AdvancedSearch->SearchValue2 = @$filter[\"y_clase_dem\"];\n\t\t$this->clase_dem->AdvancedSearch->SearchOperator2 = @$filter[\"w_clase_dem\"];\n\t\t$this->clase_dem->AdvancedSearch->Save();\n\t\t$this->BasicSearch->setKeyword(@$filter[EW_TABLE_BASIC_SEARCH]);\n\t\t$this->BasicSearch->setType(@$filter[EW_TABLE_BASIC_SEARCH_TYPE]);\n\t}", "title": "" }, { "docid": "98a429c159c4db865c0cd898fdf23534", "score": "0.5894269", "text": "public static function bb_filtres($table)\n\t{\n\t\t$filtres_additionels = '';\n\t\t$club_id = \\Session::get('club_id',null);\n\t\t$group_id = \\Session::get('gid' ,null);\n\t\t$joueur_id = \\Session::get('uid' ,null);\n\t\tswitch ($group_id)\n {\n case 1:\n case 2:\n\t\t\t\t// Admins : peuvent tout voir, pas de filtres particuliers\n // Club_id peut être renseigné ou non\n\t\t\t\tbreak;\n case 10:\n // Admin club : tout le club, rien que le club\n // Club_id doit être renseigné\n if (is_null($club_id))\n dd(\"Admin club:Club_id doit être renseigné\");\n else\n {\n // Ajoute filtre sur club courant\n $filtres_additionels .= \" AND {$table}.club_id = $club_id \";\n }\n break;\n case 12:\n case 14:\n\t\t\t\t// Directeur technique, Entraineur : tout le club, rien que le club\n // Club_id doit être renseigné\n if (is_null($club_id))\n dd(\"Directeur technique, Entraineur: Club_id doit être renseigné\");\n else\n {\n // Ajoute filtre sur club courant\n $filtres_additionels .= \" AND {$table}.club_id = $club_id \";\n }\n break;\n case 20:\n // Staff : Ses propres donnée = Session de mesures et activites\n // Club_id doit être renseigné\n if (is_null($club_id))\n dd(\"Staff: Club_id doit être renseigné\");\n else\n {\n // Ajoute filtre sur club courant\n $filtres_additionels .= \" AND {$table}.club_id = $club_id \";\n }\n break;\n case 30:\n\t\t\t\t// Joueur : Ses propres donnée = Session de mesures et activites\n // Club_id et joureur_id doivent être renseignés\n if (is_null($club_id)\n || is_null($joueur_id))\n dd(\"Joueur: Club_id et joueur_id doit être renseigné\");\n else\n {\n // Ajoute filtre sur club courant\n $filtres_additionels .= \" AND {$table}.club_id = $club_id \";\n // Ajoute filtre sur joueur courant\n $filtres_additionels .= \" AND {$table}.id = $joueur_id \";\n }\n\n\t\t\t\tbreak;\n } // end switch role\n\n dump(\"filtres_additionels : $filtres_additionels\");\n\t\treturn $filtres_additionels;\n\t}", "title": "" }, { "docid": "b25a2ba5a77c38a5d33dd61459370e03", "score": "0.588993", "text": "public function filter_riwayat($tgl_awal, $tgl_akhir)\n\t{\n\t\t$this->db->select('permohonan_surat.*, warga.nama, nama_surat.nama_surat');\n\t\t$this->db->from('warga');\n\t\t$this->db->join('permohonan_surat', 'warga.id_warga = permohonan_surat.id_warga', 'INNER');\n\t\t$this->db->join('nama_surat', 'permohonan_surat.id_nama_surat = nama_surat.id_nama_surat', 'INNER');\n\t\t$this->db->where('permohonan_surat.tgl_permohonan_surat >=', $tgl_awal);\n\t\t$this->db->where('permohonan_surat.tgl_permohonan_surat <=', $tgl_akhir);\n\t\t$this->db->where('permohonan_surat.status_delete', 0);\n\t\t$this->db->order_by('permohonan_surat.id_permohonan_surat', 'asc');\n\n\t\t$hasil = $this->db->get();\n\n\t\treturn $hasil;\n\t}", "title": "" }, { "docid": "36cb56b0487ffa7af4ee9a06ffa21781", "score": "0.5873208", "text": "public function find_filter(Request $request){\n //var_dump ($request->input ('provinsi'));\n $data = DB::table('tempat_wisatas')\n ->where([\n ['provinsi', '=', $request->input ('provinsi')],\n ['tipeWisata', '=', $request->input ('tipeWisata')],\n ['tipeAktivitas', '=', $request->input ('tipeAktivitas')],\n ['partnerWisata', '=', $request->input ('partnerWisata')]\n ]) \n ->get();\n //return $data;\n return view('tempat_wisata', ['data' => $data]);\n }", "title": "" }, { "docid": "f3e4be6a6e317872d4aaf5a8e793e46e", "score": "0.5869328", "text": "public function filter( $data ) {\n Trace::add_trace('filter DB data',__METHOD__);\n if( !is_array( $data ) )\n {\n $data = $this->link->real_escape_string( $data );\n }\n else\n {\n $data = array_map(array('DB','filter'),$data);\n }\n \treturn $data;\n }", "title": "" }, { "docid": "5e51efa2b317f5a167c30ba4735e96bd", "score": "0.586755", "text": "public function applyFilters();", "title": "" }, { "docid": "9e9573191819aaf770d485a08cca69e5", "score": "0.5864166", "text": "public function filtrar(&$filtro) {\n parent::filtrar($filtro);\n $filtro_sql = ' ';\n if ($filtro->filtro('id'))\n $filtro_sql .= \" AND {$this->getTableName()}.id like '%{$filtro->filtro('id')}%' \";\n if ($filtro->filtro('nombre_evento'))\n $filtro_sql .= \" AND {$this->getTableName()}.nombre_evento like '%{$filtro->filtro('nombre_evento')}%' \";\n if ($filtro->filtro('detalle_evento'))\n $filtro_sql .= \" AND {$this->getTableName()}.detalle_evento like '%{$filtro->filtro('detalle_evento')}%' \";\n if ($filtro->filtro('fecha_evento'))\n $filtro_sql .= \" AND {$this->getTableName()}.fecha_evento like '%{$filtro->filtro('fecha_evento')}%' \";\n return $filtro_sql;\n }", "title": "" }, { "docid": "0af99ac731dd89cf350ac15038de0010", "score": "0.5861086", "text": "public function filtroView()\n {\n\n // obtengo, del cache, las peliculas con todos sus datos, incluidos los actores\n $peliculas = collect(json_decode(Cache::get('pelisEnRedis')[0]));\n\n // ordeno las peliculas por votacion y que estas sean mayores a 8\n $peliculas = $peliculas->sortByDesc('vote_average')->where('vote_average', '>', 8);\n\n // ejecuto la funcion filter para obtener SOLO las peliculas en las que no actura\n // Keanu Reeves (KR)\n // id de KR = 6384\n $peliculasSinKR = $peliculas->filter(function ($peli) {\n // si en los actores de la pelicula no se encuentra el id de KR, devuelvo la pelicula\n if (collect(json_decode($peli->cast))->where('id', '=', 6384)->isEmpty()) {\n return $peli;\n }\n });\n $peliculasSinKR->all();\n\n // forma para paginar un array\n $currentPage = LengthAwarePaginator::resolveCurrentPage();\n $itemCollection = collect($peliculasSinKR);\n $perPage = 20;\n $currentPageItems = $itemCollection->slice(($currentPage * $perPage) - $perPage, $perPage)->all();\n $paginatedItems= new LengthAwarePaginator($currentPageItems , count($itemCollection), $perPage);\n $paginatedItems->setPath(request()->url());\n // fin\n\n return view('filtradas', ['peliculas' => $paginatedItems]);\n }", "title": "" }, { "docid": "8888b332ddbe5073f16a63d5c44e41e0", "score": "0.58190304", "text": "public function orFilterHaving(){\n $model = ShopOrder::find()\n ->select('shop_order.id')\n ->groupBy('id')\n ->filterHaving([\n 'contact_name' => 'salah333',])\n ->orFilterHaving(['user_id' => '1'])\n ->all();\n vd($model);\n\n\n }", "title": "" }, { "docid": "0045163551bfa6028a3d9be34a5f0517", "score": "0.58041894", "text": "private function calculer_filtres() {\n\t\t// [todo] externaliser...\n\t\t//\n\t\t// retirer les criteres vides:\n\t\t// {X ?} avec X absent de l'URL\n\t\t// {par #ENV{X}} avec X absent de l'URL\n\t\t// IN sur collection vide (ce dernier devrait pouvoir etre fait a la compil)\n\t\tif ($where = &$this->command['where']) {\n\t\t\t$menage = false;\n\t\t\tforeach($where as $k => $v) { \n\t\t\t\tif (is_array($v)){\n\t\t\t\t\tif ((count($v)>=2) && ($v[0]=='REGEXP') && ($v[2]==\"'.*'\")) $op= false;\n\t\t\t\t\telseif ((count($v)>=2) && ($v[0]=='LIKE') && ($v[2]==\"'%'\")) $op= false;\n\t\t\t\t\telse $op = $v[0] ? $v[0] : $v;\n\t\t\t\t} else $op = $v;\n\t\t\t\tif ((!$op) OR ($op==1) OR ($op=='0=0')) {\n\t\t\t\t\tunset($where[$k]);\n\t\t\t\t\t$menage = true;\n\t\t\t\t}\n\t\t\t\t// traiter {cle IN a,b} ou {valeur !IN a,b}\t\t\t\t\n\t\t\t\t// prendre en compte le cas particulier de sous-requetes\n\t\t\t\t// produites par sql_in quand plus de 255 valeurs passees a IN\n\t\t\t\tif (preg_match_all(',\\s+IN\\s+(\\(.*\\)),', $op, $s_req)) {\n\t\t\t\t\t$req = '';\n\t\t\t\t\tforeach($s_req[1] as $key => $val) {\n\t\t\t\t\t\t$req .= trim($val, '(,)').',';\n\t\t\t\t\t}\n\t\t\t\t\t$req = '(' . rtrim($req, ',') . ')';\n\t\t\t\t}\n\t\t\t\tif (preg_match(',^\\(\\(([\\w/]+)(\\s+NOT)?\\s+IN\\s+(\\(.*\\))\\)(?:\\s+(AND|OR)\\s+\\(([\\w/]+)(\\s+NOT)?\\s+IN\\s+(\\(.*\\))\\))*\\)$,', $op, $regs)) {\n\t\t\t\t\t$this->ajouter_filtre($regs[1], 'IN', strlen($req) ? $req : $regs[3], $regs[2]);\n\t\t\t\t\tunset($op);\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach($where as $k => $v) {\n\t\t\t\t// 3 possibilites : count($v) =\n\t\t\t\t// * 1 : {x y} ; on recoit $v[0] = y\n\t\t\t\t// * 2 : {x !op y} ; on recoit $v[0] = 'NOT', $v[1] = array() // array du type {x op y}\n\t\t\t\t// * 3 : {x op y} ; on recoit $v[0] = 'op', $v[1] = x, $v[2] = y\n\n\t\t\t\t// 1 : forcement traite par un critere, on passe\n\t\t\t\tif (count($v) == 1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (count($v) == 2) {\n\t\t\t\t\t$this->ajouter_filtre($v[1][1], $v[1][0], $v[1][2], 'NOT');\n\t\t\t\t}\n\t\t\t\tif (count($v) == 3) {\n\t\t\t\t\t$this->ajouter_filtre($v[1], $v[0], $v[2]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// critere {2,7}\n\t\tif ($this->command['limit']) {\n\t\t\t$limit = explode(',',$this->command['limit']);\n\t\t\t$this->offset = $limit[0];\n\t\t\t$this->limit = $limit[1];\n\t\t}\n\n\t\t// Creer la fonction de filtrage sur $this\n\t\tif ($this->filtre) {\n\t\t\t$this->func_filtre = create_function('$me', $b = 'return ('.join(') AND (', $this->filtre).');');\n\t\t}\n\t}", "title": "" }, { "docid": "d21e5230e1bb5d20e4138156783635d7", "score": "0.57951874", "text": "public function filter($query);", "title": "" }, { "docid": "d767936740b8030b07da7928590e16b6", "score": "0.57900363", "text": "static function showSiswa(){\n \t\t\t$query = DB::table('tb_siswa')->select('*')->whereRaw('status_peminjaman <> 0')->get();\n\n \t\t\treturn $query->toArray();\n \t\t}", "title": "" }, { "docid": "d1029e3a712e6bfbb5559f285f589686", "score": "0.5788779", "text": "public function filter()\r\n {\r\n\r\n $filter = isset($_GET['filter']) ? $_GET['filter'] : false;\r\n $params = explode(';', $filter);\r\n\r\n if ($filter && $params) {\r\n\r\n $params = array_map(function($el) {\r\n\r\n $v = explode(':', $el);\r\n $param = ['field' => $v[0]];\r\n\r\n if (strpos($v[1], '|') !== false) {\r\n\r\n $param['type'] = 'OR';\r\n $param['values'] = explode('|', $v[1]);\r\n\r\n } elseif (strpos($v[1], ',') !== false) {\r\n\r\n $param['type'] = 'AND';\r\n $param['values'] = explode(',', $v[1]);\r\n\r\n } elseif (strpos($v[1], '>') !== false) {\r\n\r\n $param['type'] = '>';\r\n $param['values'] = str_replace('>', '', $v[1]);\r\n\r\n } elseif (strpos($v[1], '<') !== false) {\r\n\r\n $param['type'] = '<';\r\n $param['values'] = str_replace('<', '', $v[1]);\r\n\r\n } else {\r\n\r\n $param['type'] = 'AND';\r\n $param['values'] = [$v[1]];\r\n\r\n }\r\n\r\n $fieldset = Fieldset::get(Collection::whereHandle('store_products')->get('fieldset'));\r\n $fieldset_data = $fieldset->toArray();\r\n\r\n if (isset($fieldset_data['sections'])) {\r\n\r\n $fieldset_data_replace = [];\r\n\r\n foreach ($fieldset_data['sections'] as $section) {\r\n $fieldset_data_replace = array_merge($fieldset_data_replace, $section['fields']);\r\n }\r\n\r\n $fieldset_data['fields'] = $fieldset_data_replace;\r\n\r\n }\r\n\r\n $param['field'] = str_replace(['store_types', 'store_vendors', 'store_categories'], ['type', 'vendor', 'categories'], $param['field']);\r\n $key = array_search($param['field'], array_column($fieldset_data['fields'], 'name'));\r\n\r\n if (!is_bool($key) && $fieldset_data['fields'][$key]['type'] == 'collection') {\r\n\r\n $collection = reset($fieldset_data['fields'][$key]['collection']);\r\n\r\n $param['values'] = array_map(function($value) use ($collection) {\r\n\r\n $entry = Entry::whereSlug($value, $collection);\r\n\r\n return $entry ? $entry->get('id') : $value;\r\n\r\n }, $param['values']);\r\n\r\n }\r\n\r\n $param['field'] = str_replace(['store_types', 'store_vendors', 'store_categories'], ['type', 'vendor', 'categories'], $param['field']);\r\n\r\n return $param;\r\n\r\n }, $params);\r\n\r\n return $this->collection->filter(function($entry) use ($params) {\r\n\r\n $meet = true;\r\n\r\n foreach ($params as $param) {\r\n\r\n $entry_field = $entry->in(site_locale())->get($param['field'], $entry->in(default_locale())->get($param['field']));\r\n \r\n if (is_array($entry_field)) {\r\n\r\n switch ($param['type']) {\r\n case 'AND':\r\n if (array_diff($param['values'], $entry_field)) { $meet = false; }\r\n break;\r\n\r\n case 'OR':\r\n if (!array_intersect($param['values'], $entry_field)) { $meet = false; }\r\n break;\r\n \r\n default:\r\n $meet = false;\r\n break;\r\n }\r\n\r\n } else {\r\n\r\n switch ($param['type']) {\r\n case 'AND':\r\n if (reset($param['values']) != $entry_field) { $meet = false; }\r\n break;\r\n\r\n case 'OR':\r\n if (!in_array($entry_field, $param['values'])) { $meet = false; }\r\n break;\r\n\r\n case '>':\r\n if ($param['values'] > $entry_field) { $meet = false; }\r\n break;\r\n\r\n case '<':\r\n if ($param['values'] < $entry_field) { $meet = false; }\r\n break;\r\n \r\n default:\r\n $meet = false;\r\n break;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n return $meet;\r\n\r\n });\r\n\r\n } else {\r\n\r\n return $this->collection;\r\n\r\n }\r\n }", "title": "" }, { "docid": "85e2d566cf039ef35d355d642c2d886b", "score": "0.57779366", "text": "public function retrieve_rkb_filter($parameter)\n {\n\t\t$rkb_tahun\t= $parameter['param']['rkb_thn'];\n\t\t$rkb_skpd\t= $parameter['param']['skpd_id'];\n\t\t$rkb_lokasi\t= $parameter['param']['lokasi_id'];\n\t\t$rkb_njb\t= $parameter['param']['kelompok_id'];\n\t\t\n\t\t\n\t\t//filter jenis barang\n\t\tif($rkb_njb!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tGolongan,Bidang,Kelompok,Sub,SubSub\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tKelompok_ID='$rkb_njb'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$golongan = $data->Golongan;\n $bidang = $data->Bidang;\n\t\t\t$kelompok = $data->Kelompok;\n\t\t\t$sub = $data->Sub;\n\t\t\t$subsub = $data->SubSub;\n }\n\t\t\n\t\tif($bidang == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($bidang!= null && $kelompok == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($kelompok!= null && $sub == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang' AND Kelompok = '$kelompok'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($sub!= null && $subsub == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang' AND Kelompok = '$kelompok' AND Sub = '$sub'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($sub!= null && $subsub != null)\n\t\t{\n\t\t$datakelompok = $rkb_njb;\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t}\n\t\n\n\t\t//filter Satker\n\t\tif($rkb_skpd!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tKodeSektor,KodeSatker,KodeUnit\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND Satker_ID='$rkb_skpd'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$kodesektor = $data->KodeSektor;\n $kodesatker = $data->KodeSatker;\n\t\t\t$kodeunit = $data->KodeUnit;\n }\n\t\t\n\t\tif($kodesatker == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tSatker_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND KodeSektor = '$kodesektor'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Satker_ID [] = $data->Satker_ID;\n }\n\t\t\n\t\t$datasatker = implode(',',$Satker_ID);\n\t\t\n\t\t//print_r($datasatker);\n\t\t}\n\t\telseif($kodesatker!= null && $kodeunit == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tSatker_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND KodeSatker = '$kodesatker'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Satker_ID [] = $data->Satker_ID;\n }\n\t\t\n\t\t$datasatker = implode(',',$Satker_ID);\n\t\t\n\t\t//print_r($datasatker);\n\t\t}\n\t\telseif($kodesatker!= null && $kodeunit != null)\n\t\t{\n\t\t$datasatker=$rkb_skpd;\n\t\t\n\t\t//print_r($datasatker);\n\t\t}\n\t}\n\t\n\t\t\n\t\t//filter lokasi\n\t\tif($rkb_lokasi!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tKodeLokasi,IndukLokasi\n\t\t\t\t\tFROM\n\t\t\t\t\t\tLokasi\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tLokasi_ID='$rkb_lokasi'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$kodelokasi = $data->KodeLokasi;\n $induklokasi = $data->IndukLokasi;\n\t\t\t\n }\n\t\t\n\t\t\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tLokasi_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tLokasi\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tIndukLokasi LIKE '$kodelokasi%\t'\";\n\t\t$result = $this->query($sql) or die($this->error());\n\t\t$cek = $this->num_rows($result);\n\t\tif($cek != 0)\n\t\t{\n\t\t\twhile ($data = $this->fetch_object($result))\n\t\t\t{\n\t\t\t\t$Lokasi_ID [] = $data->Lokasi_ID;\n\t\t\t}\n\t\t\t\n\t\t\t$datalokasi = implode(',',$Lokasi_ID);\n\t\t} else \n\t\t{\n\t\t\t$datalokasi = $rkb_lokasi;\n\t\t}\n\t\t//print_r($datalokasi);\n\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\tif ($rkb_tahun!=\"\"){\n\t\t\t\t$query_rkb_tahun=\"Tahun LIKE '%\".$rkb_tahun.\"%' \";\n\t\t}\n\t\tif ($rkb_skpd!=\"\"){\n\t\t\t\t$query_rkb_skpd =\"Satker_ID IN ($datasatker) \";\n\t\t}\n\t\tif ($rkb_lokasi!=\"\"){\n\t\t\t\t$query_rkb_lokasi =\"Lokasi_ID IN ($datalokasi) \";\n\t\t}\n\t\tif ($rkb_njb!=\"\"){\n\t\t\t\t$query_rkb_njb =\"Kelompok_ID IN ($datakelompok) \";\n\t\t}\n\n\t\t$parameter_sql=\"\";\n\n\t\t//tahun \n\t\tif($rkb_tahun!=\"\"){\n\t\t\t\t\t$parameter_sql=$query_rkb_tahun;\n\t\t}\n\t\t//skpd\n\t\tif($rkb_skpd!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rkb_skpd;\n\t\t}\n\t\tif($rkb_skpd!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rkb_skpd;\n\t\t}\n\t\t//lokasi\n\t\tif($rkb_lokasi!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rkb_lokasi;\n\t\t}\n\t\tif($rkb_lokasi!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rkb_lokasi;\n\t\t}\n\t\t//kelompok\n\t\tif($rkb_njb!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rkb_njb;\n\t\t}\n\t\tif($rkb_njb!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rkb_njb;\n\t\t}\n\t\t\t\t\t\n\t\tif($parameter_sql!=\"\" ) {\n\t\t$parameter_sql=\" WHERE \".$parameter_sql.\" AND \";\n\t\t}\n\t\telse\n\t\t{\n\t\t$parameter_sql=\" WHERE \";\n\t\t}\n\t\t$_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$SessionUser->UserSes['ses_uid']] = $parameter_sql;\t\n\n\n\t\t$query = \"SELECT * FROM Perencanaan \".$_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$SessionUser->UserSes['ses_uid']].\" StatusPemeliharaan IS NOT NULL limit $parameter[paging], 10\";\n //print_r($query);\n $result = $this->query($query) or die ('error retrieve_rkb_filter');\n if ($result)\n {\n while ($data = $this->fetch_object($result))\n {\n $dataArr[] = $data;\n }\n \n return $dataArr;\n }\n else\n {\n return false;\n }\n\t\t}", "title": "" }, { "docid": "31f80b6afcfc0eca326a633bc0536a5d", "score": "0.5769908", "text": "public function serachFilter($location,$categorie,$date, $premier,$parpage){\n //paramtes $pk - cles primaires\n //retour true si reusiit false sinon\n\n if($location and !$date and !$categorie){\n $sql = \"SELECT * FROM `{$this->table}` WHERE `location`=:location AND `online`=1 ORDER BY `id` DESC LIMIT $premier, $parpage;\";\n $param = [\":location\"=>$location];\n \n }elseif($location and $categorie and !$date){\n $sql = \"SELECT * FROM `{$this->table}` WHERE `location`=:location AND `categorie`=:categorie AND `online`=1 ORDER BY `id` DESC LIMIT $premier, $parpage;\";\n $param = [\":location\"=>$location,\":categorie\"=>$categorie];\n \n }elseif($location and $date and !$categorie){\n $sql = \"SELECT * FROM `{$this->table}` WHERE `date`=:date AND `location`=:location AND `online`=1 ORDER BY `id` DESC LIMIT $premier, $parpage;\";\n $param = [\":location\"=>$location,\":date\"=>$date];\n \n }else if($location and $categorie and $date){\n $sql = \"SELECT * FROM `{$this->table}` WHERE `date`=:date AND `location`=:location AND `categorie`=:categorie AND `online`=1 ORDER BY `id` DESC LIMIT $premier, $parpage;\";\n $param = [\":location\"=>$location,\":categorie\"=>$categorie, \":date\"=>$date];\n }elseif($categorie and !$date and !$location){\n $sql = \"SELECT * FROM `{$this->table}` WHERE `categorie`=:categorie AND `online`=1 ORDER BY `id` DESC LIMIT $premier, $parpage;\";\n $param = [\":categorie\"=>$categorie];\n }elseif($date and !$categorie and !$location){\n $sql = \"SELECT * FROM `{$this->table}`WHERE `date`=:date AND `online`=1 ORDER BY `id` DESC LIMIT $premier, $parpage;\";\n $param = [\":date\"=>$date];\n \n }elseif($categorie and $date and !$location){\n $sql = \"SELECT * FROM `{$this->table}` WHERE `date`=:date AND `categorie`=:categorie AND `online`=1 ORDER BY `id` DESC LIMIT $premier, $parpage;\";\n $param = [\":categorie\"=>$categorie,\":date\"=>$date];\n \n }\n \n \n $req = BDDselect($sql, $param);\n \n //tableu vide\n $result = [];\n while ($ligne = $req->fetch(PDO::FETCH_ASSOC)){\n $event = new events();\n $event->setFromTab($ligne);\n $result[$ligne[\"id\"]] = $event;\n }\n \n return $result;\n }", "title": "" }, { "docid": "42a975bae27fb76698870cbd78e8854f", "score": "0.57604486", "text": "public function filtriraj(){\n $objavaModel = new ObjavaModel();\n \n if(empty($_SESSION['datum_od']) && empty($_SESSION['datum_do']) && empty($_SESSION['mesto']) && empty($_SESSION['vreme_od']) && empty($_SESSION['vreme_do'])){\n $_SESSION['datum_od']= $this->request->getVar('datum_od');\n $_SESSION['datum_do'] =$this->request->getVar('datum_do');\n $_SESSION['mesto'] = $this->request->getVar('mesto');\n $_SESSION['vreme_od'] = $this->request->getVar('vreme_od');\n $_SESSION['vreme_do'] = $this->request->getVar('vreme_do');\n }\n \n $data = [\n 'filtrirano' => true,\n 'objave' => $objavaModel->dohvatiPoFilterima($_SESSION['datum_od'],$_SESSION['datum_do'],$_SESSION['mesto'],$_SESSION['vreme_od'],$_SESSION['vreme_do']),\n 'pager' => $objavaModel->pager,\n ];\n \n $this->prikaz('pregledSvihObjava', $data);\n }", "title": "" }, { "docid": "a1efa560d2a97009086986bdf6c874eb", "score": "0.57579005", "text": "public function retrieve_rkpb_filter($parameter)\n {\n\t\t$rpkb_tahun\t\t= $parameter['param']['rpkb_thn'];\n\t\t$rpkb_skpd\t\t= $parameter['param']['skpd_id'];\n\t\t$rpkb_lokasi\t= $parameter['param']['lokasi_id'];\n\t\t$rpkb_njb\t\t= $parameter['param']['kelompok_id'];\n\t\t\n\t\t\n\t\t//filter jenis barang\n\t\tif($rpkb_njb!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tGolongan,Bidang,Kelompok,Sub,SubSub\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tKelompok_ID='$rpkb_njb'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$golongan = $data->Golongan;\n $bidang = $data->Bidang;\n\t\t\t$kelompok = $data->Kelompok;\n\t\t\t$sub = $data->Sub;\n\t\t\t$subsub = $data->SubSub;\n }\n\t\t\n\t\tif($bidang == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($bidang!= null && $kelompok == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($kelompok!= null && $sub == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang' AND Kelompok = '$kelompok'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($sub!= null && $subsub == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang' AND Kelompok = '$kelompok' AND Sub = '$sub'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($sub!= null && $subsub != null)\n\t\t{\n\t\t$datakelompok = $rpkb_njb;\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t}\n\t\n\n\t\t//filter Satker\n\t\tif($rpkb_skpd!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tKodeSektor,KodeSatker,KodeUnit\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND Satker_ID='$rpkb_skpd'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$kodesektor = $data->KodeSektor;\n $kodesatker = $data->KodeSatker;\n\t\t\t$kodeunit = $data->KodeUnit;\n }\n\t\t\n\t\tif($kodesatker == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tSatker_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND KodeSektor = '$kodesektor'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Satker_ID [] = $data->Satker_ID;\n }\n\t\t\n\t\t$datasatker = implode(',',$Satker_ID);\n\t\t\n\t\t//print_r($datasatker);\n\t\t}\n\t\telseif($kodesatker!= null && $kodeunit == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tSatker_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND KodeSatker = '$kodesatker'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Satker_ID [] = $data->Satker_ID;\n }\n\t\t\n\t\t$datasatker = implode(',',$Satker_ID);\n\t\t\n\t\t//print_r($datasatker);\n\t\t}\n\t\telseif($kodesatker!= null && $kodeunit != null)\n\t\t{\n\t\t$datasatker=$rpkb_skpd;\n\t\t\n\t\t//print_r($datasatker);\n\t\t}\n\t}\n\t\n\t\t\n\t\t//filter lokasi\n\t\tif($rpkb_lokasi!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tKodeLokasi,IndukLokasi\n\t\t\t\t\tFROM\n\t\t\t\t\t\tLokasi\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tLokasi_ID='$rpkb_lokasi'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$kodelokasi = $data->KodeLokasi;\n $induklokasi = $data->IndukLokasi;\n\t\t\t\n }\n\t\t\n\t\t\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tLokasi_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tLokasi\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tIndukLokasi LIKE '$kodelokasi%\t'\";\n\t\t$result = $this->query($sql) or die($this->error());\n\t\t$cek = $this->num_rows($result);\n\t\tif($cek != 0)\n\t\t{\n\t\t\twhile ($data = $this->fetch_object($result))\n\t\t\t{\n\t\t\t\t$Lokasi_ID [] = $data->Lokasi_ID;\n\t\t\t}\n\t\t\t\n\t\t\t$datalokasi = implode(',',$Lokasi_ID);\n\t\t} else \n\t\t{\n\t\t\t$datalokasi = $rpkb_lokasi;\n\t\t}\n\t\t//print_r($datalokasi);\n\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\tif ($rkpb_tahun!=\"\"){\n\t\t$query_rkpb_tahun=\"Tahun LIKE '%\".$rkpb_tahun.\"%' \";\n\t\t}\n\t\tif ($rkpb_skpd!=\"\"){\n\t\t\t\t$query_rkpb_skpd =\"Satker_ID IN ($datasatker) \";\n\t\t}\n\t\tif ($rkpb_lokasi!=\"\"){\n\t\t\t\t$query_rkpb_lokasi =\"Lokasi_ID IN ($datalokasi) \";\n\t\t}\n\t\tif ($rkpb_njb!=\"\"){\n\t\t\t\t$query_rkpb_njb =\"Kelompok_ID IN ($datakelompok) \";\n\t\t}\n\n\t\t$parameter_sql=\"\";\n\n\t\t//tahun \n\t\tif($rkpb_tahun!=\"\"){\n\t\t\t\t\t$parameter_sql=$query_rkpb_tahun;\n\t\t}\n\t\t//skpd\n\t\tif($rkpb_skpd!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rkpb_skpd;\n\t\t}\n\t\tif($rkpb_skpd!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rkpb_skpd;\n\t\t}\n\t\t//lokasi\n\t\tif($rkpb_lokasi!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rkpb_lokasi;\n\t\t}\n\t\tif($rkpb_lokasi!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rkpb_lokasi;\n\t\t}\n\t\t//kelompok\n\t\tif($rkpb_njb!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rkpb_njb;\n\t\t}\n\t\tif($rkpb_njb!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rkpb_njb;\n\t\t}\n\t\t\t\t\t\n\t\tif($parameter_sql!=\"\" ) {\n\t\t$parameter_sql=\"WHERE \".$parameter_sql.\" AND \";\n\t\t}\n\t\telse\n\t\t{\n\t\t$parameter_sql=\" WHERE \";\n\t\t}\n\t\t$_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$SessionUser->UserSes['ses_uid']] = $parameter_sql;\t\n\n\n\t\t$query = \"SELECT * FROM Perencanaan \".$_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$SessionUser->UserSes['ses_uid']].\" StatusPemeliharaan= 1 limit $parameter[paging], 10\";\n //print_r($query);\n $result = $this->query($query) or die ('error retrieve_rkpb_filter');\n if ($result)\n {\n while ($data = $this->fetch_object($result))\n {\n $dataArr[] = $data;\n }\n \n return $dataArr;\n }\n else\n {\n return false;\n }\n\t\t}", "title": "" }, { "docid": "52985bd69ec8f749416b5b59cdb21db9", "score": "0.57527477", "text": "function filtrarVectorSQL(){\n\t\tforeach($this->arrayData as $variable => $valor){\n\t\t\t$filtrado=$this->filtroSQL($valor);\n\t\t\t$this->arrayData[$variable]=$filtrado;\n\t\t}\n\t}", "title": "" }, { "docid": "6e91f21a6f78cfbc2ba003fb5814a494", "score": "0.57478046", "text": "function GetData_Where($id_pembayaran)\n\t\t{\n\t\t\t//perintah get data where\n\t\t\treturn $this->Mpembayaran->GET_Where($id_pembayaran);\n\t\t}", "title": "" }, { "docid": "f24ef8f9b9df5d2fb5a1a3bf503d6639", "score": "0.5746499", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once(Route::getModelPath('unit'));\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\tcase 'periode':\n\t\t\t\t\treturn \" p.periode='$key'\";\n\t\t\t\tdefault:\n\t\t\t\t\treturn parent::getListFilter($col,$key);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9861ed3c339586c202bfc11eea5c1531", "score": "0.57393336", "text": "function get_filter_form(){\n $filter_form_list = [];\n\n $fields = $this->get_fields_list_full_info();\n foreach ($fields as $k=>$v){\n if ($v[\"numeric\"]) {//Truong dang so\n $filter_form = $v;\n $filter_form_list[] = $filter_form;\n } else {//Truong dang text\n $filter_form_list[] = $v;\n }\n }\n\n return $filter_form_list;\n }", "title": "" }, { "docid": "9fc37be7cc62655b1d696ce335ab5dc5", "score": "0.5738263", "text": "public function cleanWhere(){\n\t\t$this->filters = array();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9dc8ef87bf192c54ef6d903ccfc392fa", "score": "0.57278246", "text": "function evt__filtro__filtrar ($datos){\n $this->s__datos_filtrados=$this->s__filtro->filtrar($datos);\n }", "title": "" }, { "docid": "3f4f0144a97de2c034012c7c5fa90f15", "score": "0.5721425", "text": "function filterResultado($con, $tipoIndispo, $fechainicio, $fechafin)\n{\n $filter = [\n 'FECHA_RESULTADO' => ['$gte' => new \\MongoDB\\BSON\\UTCDateTime(new \\DateTime($fechainicio)), '$lt' => new \\MongoDB\\BSON\\UTCDateTime(new \\DateTime($fechafin))],\n 'TIPO_INDISPONIBILIDAD' => new MongoDB\\BSON\\Regex($tipoIndispo, 'i'),\n ];\n $Command = new MongoDB\\Driver\\Command([\"count\" => \"log_resultados\", \"query\" => $filter]);\n $result = $con->executeCommand($GLOBALS['dbname'], $Command);\n $respuesta = current($result->toArray());\n return $respuesta;\n\n}", "title": "" }, { "docid": "860475df4d9596f28815781b71969deb", "score": "0.5718542", "text": "function obtener_where_encuestados($filtro)\r\n\t{\r\n\t\t$where = $this->obtener_where($filtro); \r\n\t\tif (isset($filtro)) {\r\n\t\t\tif (isset($filtro['usuario'])) {\r\n\t\t\t\t$where = ($where == '') ? \" WHERE \" : $where.\" AND \";\r\n\t\t\t\t$where = $where.\" us.usuario = \".quote($filtro['usuario']);\r\n\t\t\t}\r\n\t\t\t//Los filtros que siguen se usaban, pero ahora no son necesarios\r\n\t\t\t//los saco por si se siguen usando desde otro lado.\r\n\t\t\t//Si se usan en otro lado y son necesarios, descomentar la excepcion.\r\n\t\t\tif (isset($filtro['numero'])) {\r\n\t\t\t\tthrow new toba_error(\"No se usa mas este filtro por eficiencia\");\r\n\t\t\t\t$where = ($where == '') ? \" WHERE \" : $where.\" AND \";\r\n\t\t\t\t$where = $where.\" rc.numero = \".quote($filtro['numero']);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (isset($filtro['componentes'])) {\r\n\t\t\t\tthrow new toba_error(\"No se usa mas este filtro por eficiencia\");\r\n\t\t\t\tif ($filtro['componentes']=='multiples') {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$where = ($where == '') ? \" WHERE \" : $where.\" AND \";\r\n\t\t\t\t\t$where = $where.\" (cp.componente = 'list' OR cp.componente='check')\";\r\n\t\t\t\t}\r\n\t\t\t\tif ($filtro['componentes']=='unicas') {\r\n\t\t\t\t\t$where = ($where == '') ? \" WHERE \" : $where.\" AND \";\r\n\t\t\t\t\t$where = $where.\" (cp.componente != 'list' AND cp.componente!='check')\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (isset($filtro['encuesta_encabezado'])) {\r\n\t\t\t\tthrow new toba_error(\"No se usa mas este filtro por eficiencia\");\r\n\t\t\t\t$where = ($where == '') ? \" WHERE \" : $where.\" AND \";\r\n\t\t\t\t$where = $where.\" rc.encuesta_encabezado = \".quote($filtro['encuesta_encabezado']);\r\n\t\t\t} \r\n\t\t}\r\n\t\treturn $where;\r\n\t}", "title": "" }, { "docid": "40f61ecbeafc5b387ead2d8561bc5ad8", "score": "0.5713687", "text": "function get_list_where(){\n\n $list_personnes_where=$this->mongo_db->where(array('nom' => 'TRAORE'))->get('personnes');\n return $list_personnes_where;\n\n}", "title": "" }, { "docid": "8c859a7bcef1dda25dd8885813c7ae11", "score": "0.5712819", "text": "function allFilterGiftcode($filter) {\n\t\t$sql = \"SELECT * FROM event_giftcode as a\";\n\t\t\n\t\t$where = array();\n\t\t\n\t\tif(isset($filter['code']) && $filter['code'] != '0') {\n\t\t\t$where[] = \"a.code LIKE '%\" . $filter['code'] . \"%'\";\n\t\t}\n\t\tif(isset($filter['type']) && $filter['type'] != '0') {\n\t\t\t$where[] = \"a.type='\" . $filter['type'] . \"'\";\n\t\t}\n if(isset($filter['sender']) && $filter['sender'] != '-1') {\n\t\t\t$where[] = \"a.sender=\" . $filter['sender'];\n\t\t}\n if(isset($filter['status']) && $filter['status'] != '-1') {\n\t\t\t$where[] = \"a.status=\" . $filter['status'];\n\t\t}\n\t\tif(isset($filter['create']) && $filter['create'] != '0') {\n $start = strtotime($filter['create'] . ' 00:00:01');\n $end = strtotime($filter['create'] . ' 23:59:59');\n\t\t\t$where[] = \"a.create_date >= $start AND a.create_date <= $end\";\n\t\t}\n if(isset($filter['use']) && $filter['use'] != '0') {\n $start = strtotime($filter['use'] . ' 00:00:01');\n $end = strtotime($filter['use'] . ' 23:59:59');\n\t\t\t$where[] = \"a.use_date >= $start AND a.use_date <= $end\";\n\t\t}\n if(isset($filter['expire']) && $filter['expire'] != '0') {\n $start = strtotime($filter['expire'] . ' 00:00:01');\n $end = strtotime($filter['expire'] . ' 23:59:59');\n\t\t\t$where[] = \"a.expire_date >= $start AND a.expire_date <= $end\";\n\t\t}\n\t\tif($where) {\n\t\t\t$sql .= \" WHERE \" . implode(\" AND \", $where);\n\t\t}\n\n\t\t$sort_array = array(\n\t\t\t'id',\n 'status',\n\t\t\t'create_date',\n 'use_date',\n \t\t'expire_date'\n \t);\n \tif(isset($filter['sortby']) && in_array($filter['sortby'], $sort_array)) {\n \t\t$sql .= \" ORDER BY a.\" . $filter['sortby'];\n \t} else {\n \t\t$sql .= \" ORDER BY a.id\";\n \t}\n \tif(isset($filter['order']) && $filter['order'] == 'ASC') {\n \t\t$sql .= \" ASC\";\n \t} else {\n \t\t$sql .= \" DESC\";\n \t}\n \tif(isset($filter['page']) || isset($filter['limit'])) {\n \t\tif($filter['start'] < 0) {\n \t\t\t$filter['start'] = 0;\n \t\t}\n \t\tif($filter['limit'] < 1) {\n \t\t\t$filter['limit'] = 50;\n \t\t}\n \t\t$sql .= \" LIMIT \" . (int)$filter['start'] . \",\" . (int)$filter['limit'];\n \t}\n \t$query = $this->dbuser->query($sql);\n \treturn $query->result();\t\t\n\t}", "title": "" }, { "docid": "59d89a3b02cbdd726769444d3dcede1d", "score": "0.5700342", "text": "function prepareFilters($filter) {\n \t\t$output = \"\";\n\t\tforeach ($filter as $name=>$value) {\n\t\t\tif ($name == \"custom\") {\n\t\t\t\tforeach ($value as $name=>$value) {\n\t\t\t\t\t$output .= $this->array2table(array($name=>$value), true, true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$output .= $this->array2table(array($name=>$value), true, true);\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "cade9166af95dcf5c6afcde6149b1fe0", "score": "0.56969994", "text": "public function filtercetak( Request $request)\n {\n // $penunggupasien = PenungguPasien::get()->whereBetween('tanggal', [$request->tglawal, $request->tglakhir]);\n // $penunggupasien = PenungguPasien::where('kecamatan', $request->kecamatan)->get();\n // $penunggupasien = PenungguPasien::whereBetween('tanggal', [$request->tglawal, $request->tglakhir])->where('kecamatan', $request->kecamatan)->get();\n // echo json_encode($penunggupasien);\n if ($request->kode) {\n $suratmasuk = Suratmasuk::where('kode', $request->kode)->get();\n } else if ($request->tglawal && $request->tglakhir) {\n $suratmasuk = Suratmasuk::get()->whereBetween('tgl_surat', [$request->tglawal, $request->tglakhir]);\n } else {\n $suratmasuk = Suratmasuk::whereBetween('tgl_surat', [$request->tglawal, $request->tglakhir])->where('kode', $request->kode)->get();\n }\n return view('SuratMasuk.cetak-laporan', compact('suratmasuk'));\n }", "title": "" }, { "docid": "83ac1d8741279c7210024533dea95d79", "score": "0.56961626", "text": "protected function filter($datum)\n {\n\n // days of the week and and dates not matching up, so lets strip off the days of the week\n $dateTimeStamp = strtotime(substr($datum['timestamp'], 4));\n\n //lets format the timestmap for mysql\n $mySQLFormattedTimeStamp = date( 'Y-m-d H:i:s', $dateTimeStamp );\n\n $datum['timestamp'] = $mySQLFormattedTimeStamp;\n\n return $datum;\n\n }", "title": "" }, { "docid": "c8017b7b26068d72d7861026a235f1c1", "score": "0.569464", "text": "public function retrieve_rtb_filter($parameter)\n {\n\t\t$rtb_tahun\t= $parameter['param']['rtb_thn'];\n\t\t$rtb_skpd\t= $parameter['param']['skpd_id'];\n\t\t$rtb_lokasi\t= $parameter['param']['lokasi_id'];\n\t\t$rtb_njb\t= $parameter['param']['kelompok_id'];\n\t\t$submit\t\t= $parameter['param']['submit'];\n\n\t\t\n\t\t//filter jenis barang\n\t\tif($rtb_njb!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tGolongan,Bidang,Kelompok,Sub,SubSub\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tKelompok_ID='$rtb_njb'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$golongan = $data->Golongan;\n $bidang = $data->Bidang;\n\t\t\t$kelompok = $data->Kelompok;\n\t\t\t$sub = $data->Sub;\n\t\t\t$subsub = $data->SubSub;\n }\n\t\t\n\t\tif($bidang == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($bidang!= null && $kelompok == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($kelompok!= null && $sub == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang' AND Kelompok = '$kelompok'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($sub!= null && $subsub == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tKelompok_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tKelompok\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tGolongan = '$golongan' AND Bidang = '$bidang' AND Kelompok = '$kelompok' AND Sub = '$sub'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Kelompok_ID [] = $data->Kelompok_ID;\n }\n\t\t\n\t\t$datakelompok = implode(',',$Kelompok_ID);\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t\telseif($sub!= null && $subsub != null)\n\t\t{\n\t\t$datakelompok = $rtb_njb;\n\t\t\n\t\t//print_r($datakelompok);\n\t\t}\n\t}\n\t\n\n\t\t//filter Satker\n\t\tif($rtb_skpd!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tKodeSektor,KodeSatker,KodeUnit\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND Satker_ID='$rtb_skpd'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$kodesektor = $data->KodeSektor;\n $kodesatker = $data->KodeSatker;\n\t\t\t$kodeunit = $data->KodeUnit;\n }\n\t\t\n\t\tif($kodesatker == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tSatker_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND KodeSektor = '$kodesektor'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Satker_ID [] = $data->Satker_ID;\n }\n\t\t\n\t\t$datasatker = implode(',',$Satker_ID);\n\t\t\n\t\tprint_r($datasatker);\n\t\t}\n\t\telseif($kodesatker!= null && $kodeunit == null)\n\t\t{\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tSatker_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tSatker\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tNGO='0' AND KodeSatker = '$kodesatker'\";\n\t\t$result = $this->query($sql) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$Satker_ID [] = $data->Satker_ID;\n }\n\t\t\n\t\t$datasatker = implode(',',$Satker_ID);\n\t\t\n\t\tprint_r($datasatker);\n\t\t}\n\t\telseif($kodesatker!= null && $kodeunit != null)\n\t\t{\n\t\t$datasatker=$rtb_skpd;\n\t\t\n\t\tprint_r($datasatker);\n\t\t}\n\t}\n\t\n\t\t\n\t\t//filter lokasi\n\t\tif($rtb_lokasi!=\"\")\n\t{\n\t\t$query_from=\"SELECT\n\t\t\t\t\t\tKodeLokasi,IndukLokasi\n\t\t\t\t\tFROM\n\t\t\t\t\t\tLokasi\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tLokasi_ID='$rtb_lokasi'\";\n\t\t\n\t\t$result = $this->query($query_from) or die($this->error());\n while ($data = $this->fetch_object($result))\n {\n\t\t\t$kodelokasi = $data->KodeLokasi;\n $induklokasi = $data->IndukLokasi;\n\t\t\t\n }\n\t\t\n\t\t\n\t\t$sql=\"\t\tSELECT\n\t\t\t\t\t\tLokasi_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tLokasi\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tIndukLokasi LIKE '$kodelokasi%\t'\";\n\t\t$result = $this->query($sql) or die($this->error());\n\t\t$cek = $this->num_rows($result);\n\t\tif($cek != 0)\n\t\t{\n\t\t\twhile ($data = $this->fetch_object($result))\n\t\t\t{\n\t\t\t\t$Lokasi_ID [] = $data->Lokasi_ID;\n\t\t\t}\n\t\t\t\n\t\t\t$datalokasi = implode(',',$Lokasi_ID);\n\t\t} else \n\t\t{\n\t\t\t$datalokasi = $rtb_lokasi;\n\t\t}\n\t\t//print_r($datalokasi);\n\t}\n\t\t\n\n\t\tif ($rtb_tahun!=\"\"){\n\t\t\t\t$query_rtb_tahun=\"Tahun LIKE '%\".$rtb_tahun.\"%' \";\n\t\t}\n\t\tif ($rtb_skpd!=\"\"){\n\t\t\t\t$query_rtb_skpd =\"Satker_ID IN ($datasatker) \";\n\t\t}\n\t\tif ($rtb_lokasi!=\"\"){\n\t\t\t\t$query_rtb_lokasi =\"Lokasi_ID IN ($datalokasi) \";\n\t\t}\n\t\tif ($rtb_njb!=\"\"){\n\t\t\t\t$query_rtb_njb =\"Kelompok_ID IN ($datakelompok) \";\n\t\t}\n\n\t\t$parameter_sql=\"\";\n\n\t\t//tahun \n\t\tif($rtb_tahun!=\"\"){\n\t\t\t\t\t$parameter_sql=$query_rtb_tahun;\n\t\t}\n\t\t//skpd\n\t\tif($rtb_skpd!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rtb_skpd;\n\t\t}\n\t\tif($rtb_skpd!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rtb_skpd;\n\t\t}\n\t\t//lokasi\n\t\tif($rtb_lokasi!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rtb_lokasi;\n\t\t}\n\t\tif($rtb_lokasi!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rtb_lokasi;\n\t\t}\n\t\t//kelompok\n\t\tif($rtb_njb!=\"\" && $parameter_sql!=\"\"){\n\t\t\t\t\t$parameter_sql=$parameter_sql.\" AND \".$query_rtb_njb;\n\t\t}\n\t\tif($rtb_njb!=\"\" && $parameter_sql==\"\"){\n\t\t\t\t\t$parameter_sql=$query_rtb_njb;\n\t\t}\n\t\t\t\t\t\n\t\tif($parameter_sql!=\"\" ) {\n\t\t$parameter_sql=\" WHERE \".$parameter_sql.\" AND \";\n\t\t}\n\t\telse\n\t\t{\n\t\t$parameter_sql=\" WHERE \";\n\t\t}\n\t\t$_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$SessionUser->UserSes['ses_uid']] = $parameter_sql;\n\t\t\n\t\t$query = \"SELECT * FROM Perencanaan \".$_SESSION['ses_retrieve_filter_'.$parameter['menuID'].'_'.$SessionUser->UserSes['ses_uid']].\" StatusPemeliharaan IS NOT NULL AND StatusValidasi= 11 or StatusValidasi= 12 limit $parameter[paging], 10\";\n //print_r($query);\n $result = $this->query($query) or die ('error retrieve_rtb_filter');\n if ($result)\n {\n while ($data = $this->fetch_object($result))\n {\n $dataArr[] = $data;\n }\n \n return $dataArr;\n }\n else\n {\n return false;\n }\n\t}", "title": "" }, { "docid": "cfbcbdb5eec402a7b74b52c410376abe", "score": "0.56933695", "text": "function filter($var, $sql = 0){\n\t$var = strip_tags($var); //usuwa znaczniki HTML zawarte w $var\n\t$var = addslashes ($var); //dodaje slashe '\\' do niepokojacych znakow\n\t$var = stripslashes ($var); //dodaje slashe '\\' do niepokojacych znakow\n\tif($sql == 1){ //jesli masz doczynienia z wszyknieciem sql\n\t\t$var = htmlspecialchars($var, ENT_QUOTES, 'UTF-8'); //ochrona przez sql\n\t}\n\treturn $var; //zwroc bezpieczna wartosc zmiennej\n}", "title": "" }, { "docid": "20dc18bb0d42e485c0b903910d87885d", "score": "0.5693125", "text": "function getApListByFilter($filter, $onlyCnt=0, $minPrice=0) /*2014_10_29 получение списка по фильтру*/\n\t\t{\n//\t\tprint_r($filter);\n\t\t$whereMinAdd = '';\n\t\tif($onlyCnt)\n\t\t\t$rows = 'COUNT(*)';\n\t\telseif($minPrice)\n\t\t\t{\n\t\t\t$whereMinAdd = ' AND ap_price >0 ';\n\t\t\t$rows = 'MIN(ap_price) as minPrice';\n\t\t\t}\n\t\telse\n\t\t\t$rows = '*, fs_apartment.firm_id as firmId';\n\n\t\t$filterSimple \t= array('roomStart', 'roomEnd', 'areaStart', 'areaEnd', 'priceStart', 'priceEnd', 'finish', 'update');\n//\t\t$filterExt \t\t= array('state', 'district');\n\t\t$filterAdd = '';\n//\t\t$queryExt = false;\n\t\t$filterAdd .= ($filter['roomStart']) ? '\t\tAND ap_roomNum >= '.$filter['roomStart'].' ' : '';\n\t\t$filterAdd .= ($filter['roomEnd']) ? '\t\tAND ap_roomNum <= '.$filter['roomEnd'].' ' : '';\n\t\tif($filter['room'])\n\t\t\t$filterAdd .= ($filter['room']==4) ? '\t\tAND ap_roomNum >= '.$filter['room'].' ' : '\t\tAND ap_roomNum = '.$filter['room'].' ';\n\t\t$filterAdd .= ($filter['areaStart'])?'\tAND ap_area >= '.$filter['areaStart'].' ' : '';\n\t\t$filterAdd .= ($filter['areaEnd'])?'\tAND ap_area <= '.$filter['areaEnd'].' ' : '';\n\t\t$filterAdd .= ($filter['finish'])?'\t\tAND ap_finish = '.$filter['finish'].' ' : '';\n\t\t$filterAdd .= ($filter['update'])?'\t\tAND ap_dateModify >= '.$filter['update'].' ' : '';\n\t\t$filterAdd .= ($filter['priceStart'])?'\tAND ap_price >= '.$filter['priceStart'].' ' : '';\n\t\t$filterAdd .= ($filter['priceEnd'])?'\tAND ap_price <= '.$filter['priceEnd'].' ' : '';\t\t\t\t\n\t\t$filterAdd .= ($filter['state']) ? '\tAND obj_state = '.$filter['state'].' ' : '';\n\t\t$filterAdd .= ($filter['district']) ? '\tAND obj_district = '.$filter['district'].' ' : '';\n/*************************************************************************************************/\n\t\t$filterAdd .= ($filter['sold']) ? '\t\t ' : ' AND (ap_sold != 1 OR ap_sold IS NULL) ';\n/*************************************************************************************************/\n/*\t\tif(($filter['state'])||($filter['district']))\n\t\t\t$queryExt = true;*/\n\t\t$query = 'SELECT '.$rows.' FROM fs_apartment, gd_object, gd_firm\n\t\t\t\t\tWHERE ap_objId = obj_id \n\t\t\t\t\tAND fs_apartment.firm_id = gd_firm.firm_id \n\t\t\t\t\tAND gd_object.city_id = '.$filter['city'].'\n\t\t\t\t\t'.$filterAdd.$whereMinAdd;\n\t\t$ret_arr = array(\t\n\t\t\t\t\t\t\t'ap_id', \n\t\t\t\t\t\t\t'ap_objId', \n\t\t\t\t\t\t\t'firmId', \n\t\t\t\t\t\t\t'ap_blockSection', \n\t\t\t\t\t\t\t'ap_roomNum', \n\t\t\t\t\t\t\t'ap_area', \n\t\t\t\t\t\t\t'ap_floor', \n\t\t\t\t\t\t\t'ap_finish', \n\t\t\t\t\t\t\t'ap_price', \n\t\t\t\t\t\t\t'ap_info', \n\t\t\t\t\t\t\t'ap_dateModify', \n\t\t\t\t\t\t\t'ap_sold',\n\t\t\t\t\t\t\t'obj_id', \n\t\t\t\t\t\t\t'obj_name', \n\t\t\t\t\t\t\t'obj_geoX', \n\t\t\t\t\t\t\t'obj_geoY', \n\t\t\t\t\t\t\t'obj_state', \n\t\t\t\t\t\t\t'obj_district', \n\t\t\t\t\t\t\t);\n\t\t$LNK= new DBLink;\t\t\n//\t\t$LNK->SetDebug(__FILE__, __FUNCTION__, __LINE__);\n\t\t$LNK->Query($query);\n\t\t$distrReplace = \tarray(1 => 'Правобережный', 2 => 'Октябрьский', 3 => 'Свердловский', 4 => 'Ленинский');\n\t\t$objStateReplace = \tarray(1 => 'В процессе', 2 => 'Готова', 3 => 'В планах', 4 => 'Заморожена');\n\t\t$finishReplace = \tarray(1 => 'черновая', 2 => 'получистовая', 3 => 'чистовая');\n\t\t$finishReplaceSmall = \tarray(1 => 'черн.', 2 => 'п-чист.', 3 => 'чист.');\n//\t\techo 'session: '; \n//\t\tprint_r($_SESSION['apCmp']);\n\t\tif($LNK->GetNumRows())\n\t\t\t{\n\t\t\t$curDate = new DateTime(\"now\");\n\t\t\tif($onlyCnt)\n\t\t\t\t$ret = $LNK->GetData('COUNT(*)', false);\n\t\t\telseif($minPrice)\n\t\t\t\t$ret = $LNK->GetData('minPrice', false);\t\t\t\t\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$ret = $LNK->GetData($ret_arr, true);\n\t\t\t\tfor($i=0; $i<sizeof($ret); $i++)\n\t\t\t\t\t{\t\t\t\n\t\t\t\t\t$dateUp = new DateTime($ret[$i]['ap_dateModify']);\n\t\t\t\t\t$interval = round(abs($dateUp->format('U') - $curDate->format('U')) / (60*60*24));\n\t\t\t\t\t$ret[$i]['days'] \t= \t$interval;\n\t\t\t\t\t$ret[$i]['weeks'] \t= \tround($interval/7);\n\t\t\t\t\tif($interval < 14)\n\t\t\t\t\t\t$ret[$i]['weeksClass'] \t= \t'week_green';\n\t\t\t\t\telseif($interval < 28)\n\t\t\t\t\t\t$ret[$i]['weeksClass'] \t= \t'week_yellow';\n\t\t\t\t\telseif($interval >= 28)\n\t\t\t\t\t\t$ret[$i]['weeksClass'] \t= \t'week_red';\n\t\t\t\t\t$ret[$i]['district'] = \t$distrReplace[$ret[$i]['obj_district']];\n\t\t\t\t\t$ret[$i]['state'] =\t \t$objStateReplace[$ret[$i]['obj_state']];\n\t\t\t\t\t$ret[$i]['finish'] =\t$finishReplaceSmall[$ret[$i]['ap_finish']];\n\t\t\t\t\t$ret[$i]['finishTitle'] =\t$finishReplace[$ret[$i]['ap_finish']];\n\t\t\t\t\t$ret[$i]['img'] = $this->getApFileList($ret[$i]['ap_id']);\n\t\t\t\t\tif($_SESSION['apCmp'])\n\t\t\t\t\t\t$ret[$i]['cmp'] = (in_array($ret[$i]['ap_id'], $_SESSION['apCmp'])) ? 1 : 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\telse \n\t\t\t$ret = 0;\n//\t\t$LNK->Close_link();\n\t\treturn $ret;\t\t\t\t\n\t\t}", "title": "" }, { "docid": "7cf95c979940aaafdb584ede7c467372", "score": "0.56887287", "text": "public function index()\n {\n // $this->matakuliahModel->select('*, sp_mata_kuliah.id ', FALSE );\n\n $table_filters = (object) [\"nama_mata_kuliah\" => null];\n\n foreach ($table_filters as $field => &$value) {\n $value = refine_var($this->request->getGet($field));\n };\n\n if ($table_filters->nama_mata_kuliah) {\n $this->matakuliahModel->like('nama_mata_kuliah', $table_filters->nama_mata_kuliah);\n };\n\n $this->matakuliahModel->orderBy('sp_mata_kuliah.id desc');\n\n $rows = $this->matakuliahModel->paginate(10);\n\n $filter_label = [\"nama_mata_kuliah\" => \"Nama Mata Kuliah\"];\n $filter_info = [];\n\n foreach ($filter_label as $fld => $label) {\n if (!$table_filters->$fld) {\n continue;\n }\n\n $filter_info[$fld] = '<span class=\"badge badge-primary\">' . $label . ' = ' . $table_filters->$fld . '</span>';\n\n }\n\n $data = [\n 'rows' => $rows,\n 'pager' => $this->matakuliahModel->pager,\n 'breadcrumb' => [\n 'title' => 'List of Mata Kuliah',\n ],\n 'per_page' => 10,\n 'filter_info' => implode(\"\\n\", $filter_info),\n 'table_filter' => $table_filters,\n ];\n\n echo view('Admin/Matakuliah/Index', $data);\n\n }", "title": "" }, { "docid": "3fa7a849bc5d459f34ed663548b2e05f", "score": "0.56752825", "text": "function RestoreFilterList() {\n\n\t\t// Return if not reset filter\n\t\tif (@$_POST[\"cmd\"] <> \"resetfilter\")\n\t\t\treturn FALSE;\n\t\t$filter = json_decode(@$_POST[\"filter\"], TRUE);\n\t\t$this->Command = \"search\";\n\n\t\t// Field id\n\t\t$this->id->AdvancedSearch->SearchValue = @$filter[\"x_id\"];\n\t\t$this->id->AdvancedSearch->SearchOperator = @$filter[\"z_id\"];\n\t\t$this->id->AdvancedSearch->SearchCondition = @$filter[\"v_id\"];\n\t\t$this->id->AdvancedSearch->SearchValue2 = @$filter[\"y_id\"];\n\t\t$this->id->AdvancedSearch->SearchOperator2 = @$filter[\"w_id\"];\n\t\t$this->id->AdvancedSearch->Save();\n\n\t\t// Field Departemen\n\t\t$this->Departemen->AdvancedSearch->SearchValue = @$filter[\"x_Departemen\"];\n\t\t$this->Departemen->AdvancedSearch->SearchOperator = @$filter[\"z_Departemen\"];\n\t\t$this->Departemen->AdvancedSearch->SearchCondition = @$filter[\"v_Departemen\"];\n\t\t$this->Departemen->AdvancedSearch->SearchValue2 = @$filter[\"y_Departemen\"];\n\t\t$this->Departemen->AdvancedSearch->SearchOperator2 = @$filter[\"w_Departemen\"];\n\t\t$this->Departemen->AdvancedSearch->Save();\n\n\t\t// Field HeadDetail\n\t\t$this->HeadDetail->AdvancedSearch->SearchValue = @$filter[\"x_HeadDetail\"];\n\t\t$this->HeadDetail->AdvancedSearch->SearchOperator = @$filter[\"z_HeadDetail\"];\n\t\t$this->HeadDetail->AdvancedSearch->SearchCondition = @$filter[\"v_HeadDetail\"];\n\t\t$this->HeadDetail->AdvancedSearch->SearchValue2 = @$filter[\"y_HeadDetail\"];\n\t\t$this->HeadDetail->AdvancedSearch->SearchOperator2 = @$filter[\"w_HeadDetail\"];\n\t\t$this->HeadDetail->AdvancedSearch->Save();\n\n\t\t// Field NomorHead\n\t\t$this->NomorHead->AdvancedSearch->SearchValue = @$filter[\"x_NomorHead\"];\n\t\t$this->NomorHead->AdvancedSearch->SearchOperator = @$filter[\"z_NomorHead\"];\n\t\t$this->NomorHead->AdvancedSearch->SearchCondition = @$filter[\"v_NomorHead\"];\n\t\t$this->NomorHead->AdvancedSearch->SearchValue2 = @$filter[\"y_NomorHead\"];\n\t\t$this->NomorHead->AdvancedSearch->SearchOperator2 = @$filter[\"w_NomorHead\"];\n\t\t$this->NomorHead->AdvancedSearch->Save();\n\n\t\t// Field SubTotalFlag\n\t\t$this->SubTotalFlag->AdvancedSearch->SearchValue = @$filter[\"x_SubTotalFlag\"];\n\t\t$this->SubTotalFlag->AdvancedSearch->SearchOperator = @$filter[\"z_SubTotalFlag\"];\n\t\t$this->SubTotalFlag->AdvancedSearch->SearchCondition = @$filter[\"v_SubTotalFlag\"];\n\t\t$this->SubTotalFlag->AdvancedSearch->SearchValue2 = @$filter[\"y_SubTotalFlag\"];\n\t\t$this->SubTotalFlag->AdvancedSearch->SearchOperator2 = @$filter[\"w_SubTotalFlag\"];\n\t\t$this->SubTotalFlag->AdvancedSearch->Save();\n\n\t\t// Field Urutan\n\t\t$this->Urutan->AdvancedSearch->SearchValue = @$filter[\"x_Urutan\"];\n\t\t$this->Urutan->AdvancedSearch->SearchOperator = @$filter[\"z_Urutan\"];\n\t\t$this->Urutan->AdvancedSearch->SearchCondition = @$filter[\"v_Urutan\"];\n\t\t$this->Urutan->AdvancedSearch->SearchValue2 = @$filter[\"y_Urutan\"];\n\t\t$this->Urutan->AdvancedSearch->SearchOperator2 = @$filter[\"w_Urutan\"];\n\t\t$this->Urutan->AdvancedSearch->Save();\n\n\t\t// Field Nomor\n\t\t$this->Nomor->AdvancedSearch->SearchValue = @$filter[\"x_Nomor\"];\n\t\t$this->Nomor->AdvancedSearch->SearchOperator = @$filter[\"z_Nomor\"];\n\t\t$this->Nomor->AdvancedSearch->SearchCondition = @$filter[\"v_Nomor\"];\n\t\t$this->Nomor->AdvancedSearch->SearchValue2 = @$filter[\"y_Nomor\"];\n\t\t$this->Nomor->AdvancedSearch->SearchOperator2 = @$filter[\"w_Nomor\"];\n\t\t$this->Nomor->AdvancedSearch->Save();\n\n\t\t// Field Pos\n\t\t$this->Pos->AdvancedSearch->SearchValue = @$filter[\"x_Pos\"];\n\t\t$this->Pos->AdvancedSearch->SearchOperator = @$filter[\"z_Pos\"];\n\t\t$this->Pos->AdvancedSearch->SearchCondition = @$filter[\"v_Pos\"];\n\t\t$this->Pos->AdvancedSearch->SearchValue2 = @$filter[\"y_Pos\"];\n\t\t$this->Pos->AdvancedSearch->SearchOperator2 = @$filter[\"w_Pos\"];\n\t\t$this->Pos->AdvancedSearch->Save();\n\n\t\t// Field Nominal\n\t\t$this->Nominal->AdvancedSearch->SearchValue = @$filter[\"x_Nominal\"];\n\t\t$this->Nominal->AdvancedSearch->SearchOperator = @$filter[\"z_Nominal\"];\n\t\t$this->Nominal->AdvancedSearch->SearchCondition = @$filter[\"v_Nominal\"];\n\t\t$this->Nominal->AdvancedSearch->SearchValue2 = @$filter[\"y_Nominal\"];\n\t\t$this->Nominal->AdvancedSearch->SearchOperator2 = @$filter[\"w_Nominal\"];\n\t\t$this->Nominal->AdvancedSearch->Save();\n\n\t\t// Field JumlahSiswa\n\t\t$this->JumlahSiswa->AdvancedSearch->SearchValue = @$filter[\"x_JumlahSiswa\"];\n\t\t$this->JumlahSiswa->AdvancedSearch->SearchOperator = @$filter[\"z_JumlahSiswa\"];\n\t\t$this->JumlahSiswa->AdvancedSearch->SearchCondition = @$filter[\"v_JumlahSiswa\"];\n\t\t$this->JumlahSiswa->AdvancedSearch->SearchValue2 = @$filter[\"y_JumlahSiswa\"];\n\t\t$this->JumlahSiswa->AdvancedSearch->SearchOperator2 = @$filter[\"w_JumlahSiswa\"];\n\t\t$this->JumlahSiswa->AdvancedSearch->Save();\n\n\t\t// Field Bulan\n\t\t$this->Bulan->AdvancedSearch->SearchValue = @$filter[\"x_Bulan\"];\n\t\t$this->Bulan->AdvancedSearch->SearchOperator = @$filter[\"z_Bulan\"];\n\t\t$this->Bulan->AdvancedSearch->SearchCondition = @$filter[\"v_Bulan\"];\n\t\t$this->Bulan->AdvancedSearch->SearchValue2 = @$filter[\"y_Bulan\"];\n\t\t$this->Bulan->AdvancedSearch->SearchOperator2 = @$filter[\"w_Bulan\"];\n\t\t$this->Bulan->AdvancedSearch->Save();\n\n\t\t// Field Jumlah\n\t\t$this->Jumlah->AdvancedSearch->SearchValue = @$filter[\"x_Jumlah\"];\n\t\t$this->Jumlah->AdvancedSearch->SearchOperator = @$filter[\"z_Jumlah\"];\n\t\t$this->Jumlah->AdvancedSearch->SearchCondition = @$filter[\"v_Jumlah\"];\n\t\t$this->Jumlah->AdvancedSearch->SearchValue2 = @$filter[\"y_Jumlah\"];\n\t\t$this->Jumlah->AdvancedSearch->SearchOperator2 = @$filter[\"w_Jumlah\"];\n\t\t$this->Jumlah->AdvancedSearch->Save();\n\n\t\t// Field Total\n\t\t$this->Total->AdvancedSearch->SearchValue = @$filter[\"x_Total\"];\n\t\t$this->Total->AdvancedSearch->SearchOperator = @$filter[\"z_Total\"];\n\t\t$this->Total->AdvancedSearch->SearchCondition = @$filter[\"v_Total\"];\n\t\t$this->Total->AdvancedSearch->SearchValue2 = @$filter[\"y_Total\"];\n\t\t$this->Total->AdvancedSearch->SearchOperator2 = @$filter[\"w_Total\"];\n\t\t$this->Total->AdvancedSearch->Save();\n\t}", "title": "" }, { "docid": "bb544a8c36f129afd2a16484e072a10c", "score": "0.5670776", "text": "public function getProductsFiltered($data=null){\n $sql= \"SELECT DISTINCT(descrip3) AS codigo,descripcion,count(descrip3) AS total FROM pedidos where descrip3 !='' \";\n\n if(isset($data['search']['value']) && $data['search']['value']!=''){\n $sql.= \" AND ( descrip3 LIKE '%\".$data['search']['value'].\"%' OR descripcion LIKE '%\".$data['search']['value'].\"%' )\" ;\n }\n \n $sql.=\" GROUP BY descrip3 \" ; //Filtra sin repetir codigo(descrip3) de producto \n\n switch($data['order'][0]['column']){\n case 0:{\n $sql.= \" order by codigo \".$data['order'][0]['dir'].\" \"; \n break;\n }\n case 1:{\n $sql.= \" order by descripcion \".$data['order'][0]['dir'].\" \"; \n break;\n }case 2:{\n $sql.= \" order by total \".$data['order'][0]['dir'].\" \"; \n break;\n } \n default:{\n $sql.= \" order by codigo \".$data['order'][0]['dir'].\" \"; \n break;\n } \n }\n\n if(isset($data['start']) && isset($data['length'])){\n $sql.= \" LIMIT \". $data['start'] .\",\". $data['length'].\" \" ;\n }\n\n //die($sql);\n $sql.=\" ; \";\n $result= R::getAll($sql);\n return $result;\n }", "title": "" }, { "docid": "9b7a66607a79e5245afdd78ca8ef40cb", "score": "0.56658477", "text": "public function andFilterCompare(){\n\n $model = ShopOrder::find()\n ->select('shop_order.*')\n ->andFilterCompare( 'id', '1750' )\n ->all();\n vd($model);\n\n }", "title": "" }, { "docid": "eb76b519f3a557bf3e07326efb68b10b", "score": "0.5663528", "text": "function get_capaian_old($params){\r\n\t\t$where = ' where 1=1 ';\r\n\t\tif (isset($params)){\r\n\t\t\tif (isset($params['kode_kl'])) $where .= \" and skl.kode_kl='\".$params['kode_kl'].\"'\";\r\n\t\t\tif (isset($params['kode_e1'])) $where .= \" and sasprog.kode_e1='\".$params['kode_e1'].\"'\";\r\n\t\t\tif (isset($params['kode_e2'])) $where .= \" and saskeg.kode_e2='\".$params['kode_e2'].\"'\";\r\n\t\t\tif (isset($params['kode_ss_kl'])) $where .= \" and ss.kode_ss_kl='\".$params['kode_ss_kl'].\"'\";\r\n\t\t\tif (isset($params['kode_sp_e1'])) $where .= \" and sasprog.kode_sp_e1='\".$params['kode_sp_e1'].\"'\";\r\n\t\t\tif (isset($params['kode_sk_e2'])) $where .= \" and saskeg.kode_sk_e2='\".$params['kode_sk_e2'].\"'\";\r\n\t\t\tif (isset($params['tahun_renstra'])) $where .= \" and skl.tahun_renstra = '\".$params['tahun_renstra'].\"'\";\r\n\t\t\t//if (isset($params['tahun_renstra'])) $where .= \" and skl.tahun between left('\".$params['tahun_renstra'].\"',4) and right('\".$params['tahun_renstra'].\"',4)\";\r\n\t\t}\r\n\t\t$sql =\"select distinct skl.tahun_renstra,skl.sasaran_kl,coalesce(iku.deskripsi,'') as deskripsi , sasprog.tahun, kinerja.realisasi,kinerja.target, iku.kode_ikk, saskeg.kode_sk_e2, skl.kode_sasaran_kl\r\nfrom anev_sasaran_kl skl left join anev_sasaran_strategis ss on ss.kode_sasaran_kl = skl.kode_sasaran_kl\r\nand ss.tahun between left(skl.tahun_renstra,4) and right(skl.tahun_renstra,4)\r\nleft join anev_sasaran_program sasprog on sasprog.kode_ss_kl= ss.kode_ss_kl and sasprog.tahun = ss.tahun\r\nleft join anev_sasaran_kegiatan saskeg on saskeg.kode_sp_e1= sasprog.kode_sp_e1 and sasprog.tahun = saskeg.tahun\r\nleft join anev_ikk iku on iku.tahun=ss.tahun and iku.kode_sk_e2 = saskeg.kode_sk_e2\r\nleft join anev_kinerja_eselon2 kinerja on kinerja.tahun = sasprog.tahun and kinerja.kode_sk_e2=saskeg.kode_sk_e2 and kinerja.kode_ikk = iku.kode_ikk \".$where;\r\n\t\t$sql .= 'order by iku.kode_ikk';\r\n\t\t\r\n\t\treturn $this->mgeneral->run_sql($sql);\r\n\t}", "title": "" }, { "docid": "832b829ba2dda6115d994a8202ae2867", "score": "0.56584394", "text": "public function buscarPorFiltros($filters) {\n// echo \"<pre>\";\n// print_r($filters);\n// echo \"</pre>\";\n// Yii::app()->end();\n\n $criteria = new CDbCriteria;\n \n $criteria->with = array();\n //$criteria->select = array();\n //$criteria->select[] = \"t.*\";\n \n $having = '';\n \n for ($i = 0; $i < count($filters['fields']); $i++) {\n \n $column = $filters['fields'][$i];\n $value = $filters['vals'][$i];\n $comparator = $filters['ops'][$i];\n \n if($i == 0){\n $logicOp = 'AND'; \n }else{ \n $logicOp = $filters['rels'][$i-1]; \n } \n \n \n if($column == 'personalS')\n { \n \n $comparator = ($comparator == '=') ? \"\": \" NOT\";\n \n $criteria->with['personalshoppers'] = array(\n 'select'=> false,\n //'joinType'=>'INNER JOIN',\n // 'condition'=> '',\n ); \n \n $criteria->addCondition('personalshoppers.campana_id '.$comparator.' IN(\n SELECT DISTINCT(campana_id)\n FROM tbl_campana_has_personal_shopper\n WHERE user_id = '.$value.')', $logicOp); \n \n if(!strpos($criteria->group, \"t.id\")){\n $criteria->group = 't.id';\n }\n \n continue;\n }\n if($column == 'looks_creados')\n { \n \n $criteria->addCondition('\n (select count(*) from tbl_look look\n where look.campana_id = t.id\n and\n look.status IN (0, 1)\n and\n look.deleted = 0)\n '\n .$comparator.' '.$value.'', $logicOp); \n \n continue;\n }\n \n if($column == 'looks_aprobados')\n { \n \n $criteria->addCondition('\n (select count(*) from tbl_look look\n where look.campana_id = t.id\n and\n look.status = 2\n and\n look.deleted = 0)\n '\n .$comparator.' '.$value.'', $logicOp); \n \n continue;\n }\n \n if($column == 'cantPS')\n { \n \n $criteria->addCondition('\n (select count(*) from tbl_campana_has_personal_shopper cps\n where cps.campana_id = t.id)\n '\n .$comparator.' '.$value.'', $logicOp); \n \n continue;\n }\n \n if($column == 'cantMarcas')\n { \n \n $criteria->addCondition('\n (SELECT COUNT(DISTINCT(m.nombre))\n FROM tbl_look l, tbl_look_has_producto lp, tbl_producto p, tbl_marca m\n WHERE l.campana_id = t.id\n AND l.id=lp.look_id \n AND lp.producto_id=p.id \n AND p.marca_id=m.id)\n '\n .$comparator.' '.$value.'', $logicOp); \n \n continue;\n }\n \n if($column == 'marca')\n { \n \n $comparator = ($comparator == '=') ? \"\": \" NOT\";\n \n \n $criteria->addCondition('t.id '.$comparator.' IN (\n SELECT distinct(l.campana_id)\n FROM tbl_look l, tbl_look_has_producto lp, tbl_producto p, tbl_marca m\n WHERE l.id=lp.look_id \n AND lp.producto_id=p.id \n AND p.marca_id=m.id\n AND m.id = '.$value.')', $logicOp); \n \n if(!strpos($criteria->group, \"t.id\")){\n $criteria->group = 't.id';\n }\n \n \n \n continue;\n }\n \n if($column == 'recepcion_inicio' || $column == 'recepcion_fin'\n || $column == 'ventas_inicio' || $column == 'ventas_fin')\n {\n $value = strtotime($value);\n $value = date('Y-m-d H:i:s', $value);\n }\n \n $criteria->compare(\"t.\".$column, $comparator.\" \".$value,\n false, $logicOp);\n \n }\n \n// $criteria->select = 't.*';\n $criteria->having .= $having;\n //$criteria->with = array('categorias', 'preciotallacolor', 'precios');\n $criteria->together = true;\n //$criteria->compare('t.status', '1'); //siempre los no eliminados\n \n// echo \"Criteria:\";\n// \n// echo \"<pre>\";\n// print_r($criteria->toArray());\n// echo \"</pre>\"; \n //exit();\n\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "178349c074e5095af1a1ca933318d86f", "score": "0.5657014", "text": "public function filter(Request $req){\n $customer = \\DB::table('customer')->get();\n $select_customer = [];\n foreach($customer as $dt ){\n $select_customer[$dt->id] = $dt->nama;\n }\n\n // get data by filter\n if ($req->filter_by == 'order_date'){\n // filter by order date\n // generate date\n $awal = $req->filter_date_start;\n $arr_tgl = explode('-',$awal);\n $awal = new \\DateTime();\n $awal->setDate($arr_tgl[2],$arr_tgl[1],$arr_tgl[0]);\n $awal_str = $arr_tgl[2].'-'.$arr_tgl[1].'-'.$arr_tgl[0];\n\n $akhir = $req->filter_date_end;\n $arr_tgl = explode('-',$akhir);\n $akhir = new \\DateTime();\n $akhir->setDate($arr_tgl[2],$arr_tgl[1],$arr_tgl[0]);\n $akhir_str = $arr_tgl[2].'-'.$arr_tgl[1].'-'.$arr_tgl[0];\n\n $data = \\DB::table('view_sales')\n ->whereBetween('tgl',[$awal_str,$akhir_str])\n // ->where('tgls','>=',$awal_str)\n // ->where('tgl','<=',$akhir)\n ->orderBy('tgl','desc')\n ->get();\n\n }else if($req->filter_by =='customer'){\n $data = \\DB::table('view_sales')\n ->where('customer_id',$req->filter_select_customer)\n ->orderBy('tgl','desc')\n ->get();\n }else if($req->filter_by =='open'){\n $data = \\DB::table('view_sales')\n ->whereStatus('O')\n ->orderBy('tgl','desc')\n ->get();\n }else if($req->filter_by =='validated'){\n $data = \\DB::table('view_sales')\n ->whereStatus('V')\n ->orderBy('tgl','desc')\n ->get();\n }\n\n return view('sales.order.filter', [\n 'data' => $data,\n 'select_customer' => $select_customer,\n ])->with($req->all());\n }", "title": "" }, { "docid": "7a722e347881d7c51ea8da9f68346ad2", "score": "0.56519246", "text": "function master_lunas_hutang_list($filter,$start,$end){\r\n\t\t\t/*$query = \"SELECT fhutang_id\r\n\t\t\t\t\t,fpiutang_nobukti\r\n\t\t\t\t\t,fhutang_cust\r\n\t\t\t\t\t,date_format(fhutang_tanggal,'%Y-%m-%d') AS fhutang_tanggal\r\n\t\t\t\t\t,fhutang_cara\r\n\t\t\t\t\t,fhutang_bayar\r\n\t\t\t\t\t,fpiutang_stat_dok\r\n\t\t\t\t\t,cust_id\r\n\t\t\t\t\t,cust_nama\r\n\t\t\t\t\t,cust_no\r\n\t\t\t\t\t,vu_piutang_total_bycust.lpiutang_total\r\n\t\t\t\t\t,vu_piutang_total_bycust.lpiutang_sisa\r\n\t\t\t\tFROM master_faktur_lunas_piutang\r\n\t\t\t\t\tLEFT JOIN customer ON(cust_id=fhutang_cust)\r\n\t\t\t\t\tLEFT JOIN vu_piutang_total_bycust ON(vu_piutang_total_bycust.lpiutang_cust=master_faktur_lunas_piutang.fhutang_cust)\";\r\n\t\t\t\t\t*/\r\n\t\t\t$query = \"SELECT master_lunas_hutang.* , supplier.supplier_nama, supplier.supplier_id, supplier.supplier_alamat ,\r\n\t\t\t\t\t\tvu_hutang_total_bycust.hutang_total , vu_hutang_total_bycust.hutang_sisa\r\n\t\t\t\t\tfrom master_lunas_hutang\r\n\t\t\t\t\tLEFT JOIN supplier ON (master_lunas_hutang.fhutang_cust = supplier.supplier_id)\r\n\t\t\t\t\tLEFT JOIN vu_hutang_total_bycust ON(vu_hutang_total_bycust.hutang_supplier=master_lunas_hutang.fhutang_cust)\r\n\t\t\t\";\r\n\t\t\t\r\n\t\t\t//$query = \"SELECT \";\r\n\t\t\t// For simple search\r\n\t\t\tif ($filter<>\"\"){\r\n\t\t\t\t$query .=eregi(\"WHERE\",$query)? \" AND \":\" WHERE \";\r\n\t\t\t\t$query .= \" (fpiutang_nobukti LIKE '%\".addslashes($filter).\"%' OR \r\n\t\t\t\t\t\t\t cust_nama LIKE '%\".addslashes($filter).\"%' )\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$query.=\" ORDER BY fhutang_tanggal DESC\";\r\n\t\t\t\r\n\t\t\t$result = $this->db->query($query);\r\n\t\t\t$nbrows = $result->num_rows();\r\n\t\t\t$limit = $query.\" LIMIT \".$start.\",\".$end;\t\t\r\n\t\t\t$result = $this->db->query($limit); \r\n\t\t\t\r\n\t\t\tif($nbrows>0){\r\n\t\t\t\tforeach($result->result() as $row){\r\n\t\t\t\t\t$arr[] = $row;\r\n\t\t\t\t}\r\n\t\t\t\t$jsonresult = json_encode($arr);\r\n\t\t\t\treturn '({\"total\":\"'.$nbrows.'\",\"results\":'.$jsonresult.'})';\r\n\t\t\t} else {\r\n\t\t\t\treturn '({\"total\":\"0\", \"results\":\"\"})';\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "78739f96b8a2c991e92073fa627f5326", "score": "0.56415504", "text": "public static function listar($filters, $isAPI = false){\n if(!array_key_exists('ano',$filters)) $filters['ano'] = Date('Y');\n $intervalo = [\n 'inicio' => $filters['ano'] . '-01-01',\n 'fim' => $filters['ano'] . '-12-31'\n ];\n \n \n # 2. Filter by codcur\n if(array_key_exists('codcur',$filters) && !empty($filters['codcur'])) {\n if($isAPI){\n $defesas = Defesa::whereYear('data_defesa',$filters['ano'])->where('codcur',$filters['codcur'])->get()->toArray();\n }else{\n $defesas = Defesa::whereYear('data_defesa',$filters['ano'])->where('codcur',$filters['codcur'])->paginate(15);\n\n }\n $mestrado = Defesa::whereYear('data_defesa',$filters['ano'])->where('codcur',$filters['codcur'])->where('nivpgm','ME')->count();\n $doutorado = Defesa::whereYear('data_defesa',$filters['ano'])->where('codcur',$filters['codcur'])->where('nivpgm','DO')->count();\n $doutorado_direto = Defesa::whereYear('data_defesa',$filters['ano'])->where('codcur',$filters['codcur'])->where('nivpgm','DD')->count();\n }else{\n if($isAPI){\n $defesas = Defesa::whereYear('data_defesa',$filters['ano'])->get()->toArray();\n }else{\n $defesas = Defesa::whereYear('data_defesa',$filters['ano'])->paginate(15);\n }\n $mestrado = Defesa::whereYear('data_defesa',$filters['ano'])->where('nivpgm','ME')->count();\n $doutorado = Defesa::whereYear('data_defesa',$filters['ano'])->where('nivpgm','DO')->count();\n $doutorado_direto = Defesa::whereYear('data_defesa',$filters['ano'])->where('nivpgm','DD')->count();\n }\n if($isAPI){\n $aux = [];\n foreach ($defesas as $defesa) {\n $data = Carbon::createFromFormat('Y-m-d', $defesa['data_defesa'])->format('d/m/Y');\n $aux[] = [\n 'discente_id' => $defesa['discente_id'],\n 'defesa_id' => $defesa['defesa_id'],\n 'nome' => $defesa['nompes'],\n 'nivel' => $defesa['nivpgm'],\n 'codare' => $defesa['codare'],\n 'codcur' => $defesa['codcur'],\n 'nomcur' => $defesa['nomcur'],\n 'nomare' => $defesa['nomare'],\n 'titulo_html' => html_entity_decode($defesa['titulo'], ENT_QUOTES, 'UTF-8'),\n 'titulo' => strip_tags(html_entity_decode($defesa['titulo'], ENT_QUOTES, 'UTF-8')),\n 'data' => $data\n ];\n }\n return $aux;\n }else{\n return [\n 'mestrado' => $mestrado,\n 'doutorado' => $doutorado,\n 'doutorado_direto' => $doutorado_direto,\n 'defesas' => $defesas,\n ];\n }\n\n }", "title": "" }, { "docid": "d33d2022eb527b1ee87c2941a98df3e7", "score": "0.56411904", "text": "function filterData(){\n \n $items = $this->data_array[\"channel\"][\"item\"];\n\n foreach($items as $item){\n $filtered_item = array(\n \"title\" => $item[\"title\"],\n \"link\" => $item[\"link\"],\n \"date\" => $item[\"pubDate\"],\n \"category\" => \"adding category detection soon\",\n );\n \n array_push($this->filtered_data,$filtered_item);\n }\n\n }", "title": "" }, { "docid": "d2cb168c01fcdfaeba7b773312500f24", "score": "0.5635139", "text": "public function filter($info,$data,$select){\n $filter = Visitor::leftJoin(\"users\",\"visitors.user_id\",\"=\",\"users.id\")\n ->join('rols',\"users.rol_id\",\"=\",\"rols.id\")\n ->join('handling_times',\"visitors.handling_time_id\",\"=\",\"handling_times.id\")\n ->join('direction_tickets',\"visitors.direction_ticket_id\",\"=\",\"direction_tickets.id\")\n ->join(\"tickets\",\"direction_tickets.ticket_id\",\"=\",\"tickets.id\")\n ->join('directions',\"direction_tickets.direction_id\",\"=\",\"directions.id\")\n ->join('floors','directions.floor_id',\"=\",'floors.id')\n ->join('zones','directions.zone_id',\"=\",'zones.id')\n ->join('sectors',\"directions.sector_id\",\"=\",\"sectors.id\")\n ->where([[$info,'LIKE',\"%$data%\"],['handling_times.output',\"=\",null]])\n ->select($select)\n ->orderBy('visitors.id','desc')\n ->paginate(30);\n return $filter;\n }", "title": "" }, { "docid": "7f600ea97598de506ec2fdfca41603cf", "score": "0.5634575", "text": "public function databarang($idlapak,$filter){\n\t\t$db = new database();\t\t\n\t\t$mysqli = $db->connect();\n\t\t$sql = \"SELECT\n\t\t( @NO_URUT := @NO_URUT + 1 ) NO_URUT,\n\t\tl.pro_name,l.pro_saleprice,l.pro_id,l.pro_image\n\t\tFROM Produk l ,\n\t\t(SELECT @NO_URUT := 0 ) VARIABLE_URUT\n\t\twhere l.lpk_id LIKE '$idlapak' AND l.pro_status LIKE '$filter' ORDER BY pro_id DESC LIMIT 0, 2 \";\n\t\t$cek =$mysqli->query($sql);\n\t\t$hasil = $cek->fetch_array();\n\t\tif($hasil[0] != NULL){\n\t\t\t$result = $mysqli->query($sql);\n\t\t\twhile($r = $result->fetch_array()): \n\t\t\t\t$id = $r['lpk_id'];\n\t\t\t$idp = $r['pro_id'];\n\t\t\t$nama = $r['pro_name'];\n\t\t\t$image =$r['pro_image'];\n\t\t\t$harga = $r['pro_saleprice'];\n\t\t\t?>\n\t\t\t<li class=\"list-content\">\n\t\t\t\t\n\t\t\t\t<div class=\"product-wish\" >\n\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t<ul class=\"rating\" style=\"float: left;margin: 125px 3px;\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a href=\"edit_product.php?id=<?php echo $idp?>\" style=\"background: #D91256;padding: 5px 10px 5px 10px;color: #fff;\">Ubah</a>\n\t\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<ul class=\"rating\" style=\"float: right;margin: 125px 3px;\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<li >\n\t\t\t\t\t\t\t\t<a href=\"../helper/produk.php?aksi=delete&idp=<?php echo $idp?>\" style=\"background: #4e4949;padding: 5px 10px 5px 10px;color: #fff;\">Hapus</a>\n\t\t\t\t\t\t\t</li> \n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\t\t\t\t<a href=\"p/<?php echo $idp.'-'.str_replace(' ', '-', strtolower($nama)) ?>\">\n\t\t\t\t\t<img class=\"lazy\" src=\"../assets/uploads/<?php echo $image?>\" >\n\t\t\t\t\t<div class=\"caption product-name\">\n\t\t\t\t\t\t<?php echo $nama ?> \n\t\t\t\t\t</div> \n\t\t\t\t\t<div class=\"caption product-seller\">\n\t\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t\t<span class=\"fa \">Rp</span>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$angka = $harga;\n\t\t\t\t\t\t\t$jumlah_desimal =\"0\";\n\t\t\t\t\t\t\t$pemisah_desimal =\",\";\n\t\t\t\t\t\t\t$pemisah_ribuan =\".\";\n\t\t\t\t\t\t\techo \"\".number_format($angka, $jumlah_desimal, $pemisah_desimal, $pemisah_ribuan);\n\t\t\t\t\t\t\t?> \n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div> \n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<?php\n\t\t\tendwhile;\n\t\t\t?>\n\t\t\t<div class=\"facebook_style\" id=\"facebook_style\">\n\t\t\t\t<a id=\"2\" name=\"<?php echo $idlapak.\"|\".$filter?>\" href=\"#\" class=\"load_barang\" >\n\t\t\t\t\t&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n\t\t\t\t\tLihat Lainnya\n\t\t\t\t\t&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n\t\t\t\t\t<img src=\"../assets/img/arrow1.png\" />\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}else{\n\t\t\t?>\n\t\t\t<div class=\"panel panel-default\">\n\t\t\t\t<div class=\"panel-body\"> \n\t\t\t\t\t<div class=\"row\"> \n\t\t\t\t\t\t<div class=\"column-12\">\n\t\t\t\t\t\t\t<img src=\"../assets/img/gaadaproduk.png\">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t} \n\t}", "title": "" } ]
e5aef6b21e55df9cff5aec4601ae294e
Boot the amountable trait for this model.
[ { "docid": "a8c3aab788731561f34176040f7eec7c", "score": "0.58733267", "text": "public static function bootAmountable()\n {\n static::extend(function ($model) {\n $model->rules = array_merge($model->rules, [\n 'amount_exact' => 'numeric|min:0',\n 'amount_percentage' => 'numeric|min:0|max:100',\n ]);\n\n $model->purgeable = array_merge($model->purgeable, [\n 'amount_exact',\n 'amount_percentage',\n ]);\n\n $model->attributes = array_merge($model->attributes, [\n 'amount_exact' => 0,\n 'amount_percentage' => 0,\n ]);\n\n $model->addFillable('amount_exact', 'amount_percentage');\n\n $model->bindEvent('model.beforeSave', function () use ($model) {\n $model->setAmount();\n });\n });\n }", "title": "" } ]
[ { "docid": "9dd1312663ac1fc9c73d7b6e2214e03b", "score": "0.6934198", "text": "protected static function boot()\n {\n static::bootTraits();\n }", "title": "" }, { "docid": "9dd1312663ac1fc9c73d7b6e2214e03b", "score": "0.6934198", "text": "protected static function boot()\n {\n static::bootTraits();\n }", "title": "" }, { "docid": "f08d8e4e61e74b47973d4b0cc5495fb3", "score": "0.69258183", "text": "public function boot()\n {\n $this->bootBootedTrait();\n }", "title": "" }, { "docid": "f43a852dd8430cc419f2c144be7b0fa5", "score": "0.6805684", "text": "protected static function bootTraits()\n {\n }", "title": "" }, { "docid": "dcace1790e96bae748938538091adb97", "score": "0.6477306", "text": "public static function bootTraits( ) : void {\n $class = static::class;\n $booted = [ ];\n static::$traitInitializers[ $class ] = [ ];\n foreach ( class_uses_recursive( $class ) as $trait ) {\n $method = 'boot' . class_basename( $trait );\n if ( method_exists( $class , $method ) && ! in_array( $method , $booted ) ) {\n forward_static_call( [ $class , $method ] );\n $booted[ ] = $method;\n }\n if ( method_exists( $class , $method = 'initialize' . class_basename( $trait ) ) ) {\n static::$traitInitializers[ $class ][ ] = $method;\n static::$traitInitializers[ $class ] = array_unique( static::$traitInitializers[ $class ] );\n }\n }\n }", "title": "" }, { "docid": "76b338af231d9dc5af3052b5888d7ed0", "score": "0.6214877", "text": "public static function bootAuditableTrait()\n {\n static::observe(new AuditableTraitObserver);\n }", "title": "" }, { "docid": "7dcace075115f1ecc42146d90b69266f", "score": "0.61772126", "text": "public static function bootSystemTrait()\n {\n static::creating(function ($model) {\n if (self::$set_uuid) {\n $model->uuid = Uuid::uuid1()->toString() . '-' . hexdec(uniqid());\n }\n\n if (self::$set_author && auth()->check()) {\n $model->author_id = auth()->user()->id;\n }\n });\n }", "title": "" }, { "docid": "d4f0b9e2886606b9d47b246effb9486e", "score": "0.614664", "text": "protected static function bootTraits()\n {\n $class = static::class;\n $booted = [];\n static::$traitInitializers[$class] = [];\n foreach (class_uses_recursive($class) as $trait) {\n $method = 'boot' . class_basename($trait);\n if (method_exists($class, $method) && !in_array($method, $booted)) {\n forward_static_call([$class, $method]);\n $booted[] = $method;\n }\n if (method_exists($class, $method = 'initialize' . class_basename($trait))) {\n static::$traitInitializers[$class][] = $method;\n static::$traitInitializers[$class] = array_unique(\n static::$traitInitializers[$class]\n );\n }\n }\n }", "title": "" }, { "docid": "14dd3bef125376cdb0c5af22f8dc568e", "score": "0.606489", "text": "protected static function bootTraits()\n {\n $class = static::class;\n\n $booted = [];\n\n static::$traitInitializers[$class] = [];\n\n foreach (class_uses_recursive($class) as $trait) {\n $method = 'boot'.class_basename($trait);\n\n if (method_exists($class, $method) && ! in_array($method, $booted)) {\n forward_static_call([$class, $method]);\n\n $booted[] = $method;\n }\n\n if (method_exists($class, $method = 'initialize'.class_basename($trait))) {\n static::$traitInitializers[$class][] = $method;\n\n static::$traitInitializers[$class] = array_unique(\n static::$traitInitializers[$class]\n );\n }\n }\n }", "title": "" }, { "docid": "14dd3bef125376cdb0c5af22f8dc568e", "score": "0.606489", "text": "protected static function bootTraits()\n {\n $class = static::class;\n\n $booted = [];\n\n static::$traitInitializers[$class] = [];\n\n foreach (class_uses_recursive($class) as $trait) {\n $method = 'boot'.class_basename($trait);\n\n if (method_exists($class, $method) && ! in_array($method, $booted)) {\n forward_static_call([$class, $method]);\n\n $booted[] = $method;\n }\n\n if (method_exists($class, $method = 'initialize'.class_basename($trait))) {\n static::$traitInitializers[$class][] = $method;\n\n static::$traitInitializers[$class] = array_unique(\n static::$traitInitializers[$class]\n );\n }\n }\n }", "title": "" }, { "docid": "6f7547fd3329518e8ec6c555dc794311", "score": "0.58609843", "text": "public static function bootBlameable()\n {\n static::creating(function ($model) {\n $createdBy = $model->getCreatedByColumn();\n if ($createdBy) {\n $createdByAttribute = $createdBy;\n $model->{$createdByAttribute} = \\Auth::id();\n }\n });\n\n static::updating(function ($model) {\n $updatedBy = $model->getUpdatedByColumn();\n if ($updatedBy) {\n $updatedByAttribute = $updatedBy;\n $model->{$updatedByAttribute} = \\Auth::id();\n }\n });\n }", "title": "" }, { "docid": "282cf5ba67f42319ec277324eda7a3bf", "score": "0.58171016", "text": "protected function boot()\n {\n $this->setModel();\n }", "title": "" }, { "docid": "ae154cc797a78d8e0540d38c09266635", "score": "0.57150155", "text": "public function __construct()\n {\n $this->bootIfNotBooted();\n\n $this->initializeTraits();\n }", "title": "" }, { "docid": "3e6d0c52c342f03acfb4f560e31f45da", "score": "0.56252086", "text": "public static function bootUserAccessTrait()\n {\n /*\n * Detach all the roles associated with the user when it's being deleted.\n */\n static::deleting(function ($user) {\n if (!method_exists($user, 'bootSoftDeletes')) {\n $user->roles()->detach();\n\n flush_model_cache($user);\n }\n });\n\n /*\n * Clear the roles cache when a model is saved.\n */\n static::saved(function ($user) {\n flush_model_cache($user);\n });\n }", "title": "" }, { "docid": "81f89328cfd3767da7141ef3917cde02", "score": "0.562336", "text": "public function initialize()\n {\n\n // $this->addBehavior(new Blameable());\n\n \n $this->hasMany('iduser', 'Application', 'iduser', array('alias' => 'Application', \n \"foreignKey\" => \n array(\"message\" => \"The part cannot be deleted because \n other Models are using it\",\n 'action' => Relation::ACTION_CASCADE\n )\n )\n );\n $this->hasMany('iduser', 'Attendance', 'iduser', array('alias' => 'Attendance'));\n $this->hasMany('iduser', 'Document', 'iduser', array('alias' => 'Document'));\n $this->hasMany('iduser', 'Education', 'iduser', array('alias' => 'Education'));\n $this->hasMany('iduser', 'Experience', 'iduser', array('alias' => 'Experience'));\n $this->hasMany('iduser', 'UserMeta', 'iduser', array('alias' => 'UserMeta'));\n\n\n // $this->addBehavior(new Blameable());\n\n $this->addBehavior(\n new Timestampable(\n array(\n 'beforeCreate' => array(\n 'field' => 'created_on',\n 'format' => 'Y-m-d H:i:sP'\n \n )\n )\n )\n );\n\n\n $this->addBehavior(\n new Timestampable(\n array(\n 'beforeCreate' => array(\n 'field' => 'updated_on',\n 'format' => 'Y-m-d H:i:sP'\n )\n )\n )\n );\n\n $this->addBehavior(\n new Timestampable(\n array(\n 'beforeUpdate' => array(\n 'field' => 'updated_on',\n 'format' => 'Y-m-d H:i:sP'\n )\n )\n )\n );\n\n //$this->addBehavior(new Blameable());\n\n }", "title": "" }, { "docid": "b631736e599ce730853ce40fc8efb26e", "score": "0.5612313", "text": "protected static function boot()\n\t{\n\t\tparent::boot();\n\t\tModel::unguard();\n\t}", "title": "" }, { "docid": "ef64c2e0d0ab4e896c17992419ce106c", "score": "0.55904084", "text": "protected function bootIfNotBooted()\n {\n if (! isset(static::$booted[static::class])) {\n static::$booted[static::class] = true;\n\n // $this->fireModelEvent('booting', false);\n\n static::booting();\n static::boot();\n static::booted();\n\n // $this->fireModelEvent('booted', false);\n }\n }", "title": "" }, { "docid": "65a6feea83cda97d11ab4647ccec97c3", "score": "0.5583846", "text": "protected function bootIfNotBooted()\n {\n if (! isset(static::$booted[static::class])) {\n static::$booted[static::class] = true;\n\n $this->fireModelEvent('booting', false);\n\n static::booting();\n static::boot();\n static::booted();\n\n $this->fireModelEvent('booted', false);\n }\n }", "title": "" }, { "docid": "8629f28514315c0d16f8a4ee53cbd54d", "score": "0.55702764", "text": "protected static function bootAutoSortingModelTrait()\n {\n static::addGlobalScope('auto-sorting-model', function (Builder $builder) {\n $sortColumn = request(\n config('autosortingmodel.sortColumnKey', 'sortColumn'),\n 'id'\n );\n\n $sortDirection = request(\n config('autosortingmodel.sortDirectionKey', 'sortDirection'),\n 'asc'\n );\n\n $columnNames = Schema::getColumnListing(\n $builder->getModel()->getTable()\n );\n\n if (in_array($sortColumn, $columnNames)) {\n $builder->orderBy($sortColumn, $sortDirection);\n }\n });\n }", "title": "" }, { "docid": "c44f71ffdccac11d111b97a630398265", "score": "0.5550972", "text": "public function boot()\n {\n $this->bootEloquentMorphs();\n }", "title": "" }, { "docid": "edf8f294a4a36b2ffcd77d646042a2a7", "score": "0.55432886", "text": "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->uuid = (string) Uuid::generate(4);\n });\n// static::addGlobalScope(new IsactiveScope());\n }", "title": "" }, { "docid": "229c15f3960e692c5827f87eb29a1f34", "score": "0.55314523", "text": "public static function boot()\n {\n parent::boot();\n static::deleting(function ($permission) {\n if (!method_exists(Config::get('entrust.permission'), 'bootSoftDeletingTrait')) {\n // Repeat role->sync code attached from EntrustPermissionTrait::boot() as this boot()\n // function overwrites it.\n $permission->roles()->sync([]);\n $permission->users()->sync([]);\n }\n return true;\n });\n }", "title": "" }, { "docid": "747a5de06ba6511ac1443f008b2e8824", "score": "0.55278534", "text": "public function boot()\n {\n parent::boot($this->name);\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "e487ac65958e2155d61f6b917f185d2c", "score": "0.5491239", "text": "public function boot()\n {\n //\n\n parent::boot();\n }", "title": "" }, { "docid": "490a75a2450575a3c0fbe4bb85e0aeb4", "score": "0.54907024", "text": "public static function boot()\n {\n // Call default functionality (required)\n parent::boot();\n\n // Check the translate plugin is installed\n if (!class_exists('RainLab\\Translate\\Behaviors\\TranslatableModel')) {\n return;\n }\n\n // Extend the constructor of the model\n self::extend(function ($model) {\n // Implement the translatable behavior\n $model->implement[] = 'RainLab.Translate.Behaviors.TranslatableModel';\n\n });\n }", "title": "" }, { "docid": "f9af4720fdfd0f757da2598ba70fa31c", "score": "0.5457104", "text": "public function boot(): void\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "a65a1f6353a94032ede3cc74a67734ae", "score": "0.54562235", "text": "public function boot()\r\n {\r\n parent::boot();\r\n\r\n //\r\n }", "title": "" }, { "docid": "fd91469e182b7761d6ff915dd6dd2702", "score": "0.54536855", "text": "public static function boot()\n {\n // Call default functionality (required)\n parent::boot();\n\n // Check the translate plugin is installed\n if (!class_exists('RainLab\\Translate\\Behaviors\\TranslatableModel'))\n return;\n\n // Extend the constructor of the model\n self::extend(function($model){\n\n // Implement the translatable behavior\n $model->implement[] = 'RainLab.Translate.Behaviors.TranslatableModel';\n\n });\n }", "title": "" }, { "docid": "f28fcee14550d2bcdb947b627c15c70a", "score": "0.54529655", "text": "public function boot()\n {\n parent::boot();\n\n // ...\n }", "title": "" }, { "docid": "1efa7dc81f275061971345b43dcf2276", "score": "0.5448277", "text": "public static function bootImageableTrait()\n {\n /* morphMap for Image model */\n Relation::morphMap([\n static::getImagableMorphKey() => static::class,\n ]);\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "b8d9401bd050245a8c6b056842e2f3a9", "score": "0.544761", "text": "public function boot()\n {\n parent::boot();\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" }, { "docid": "2ef8fa7752e393dd08d81c56e61bf77b", "score": "0.54440683", "text": "public function boot()\n {\n parent::boot();\n\n //\n }", "title": "" } ]
03ec3e98c4802b34e5432e2ef114f91d
Get wind weather for a given zip code
[ { "docid": "526ff702f081f59056df73a05d8025b1", "score": "0.6833316", "text": "public function show(string $zipCode): Response\n {\n /** @var array $wind */\n $wind = $this->weatherService\n ->forZip($zipCode)\n ->wind();\n\n return new Response($wind);\n }", "title": "" } ]
[ { "docid": "eabd1f5d1bfece16af030b5b29bd7ffb", "score": "0.7241024", "text": "public function getWeatherForZipCode($zip, $countryCode)\n {\n $zip .= ',' . $countryCode;\n\n $query = ['q' => $zip];\n\n return $this->request(self::ENDPOINT_WEATHER, ['query' => $query]);\n }", "title": "" }, { "docid": "c555327beee07cfbde975f7a87244420", "score": "0.6594254", "text": "private function callApiByZipCode($zipCode)\n {\n $appid = config('weather.api_key');\n $api = sprintf(config('weather.end_point'), $zipCode, $appid);\n return $this->call('get', $api);\n }", "title": "" }, { "docid": "5c700bb222cdcb2425b3061fd2f0f398", "score": "0.6464826", "text": "private function get_zipcode_location_data($zipcode = null){\n if(!empty($zipcode)){\n //Prepare $url Parameter\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\".$zipcode;\n //Query Google Maps API\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = json_decode(curl_exec($curl), true);\n //Pause if Query Limit Reached\n if($response[status] == \"OVER_QUERY_LIMIT\"){\n sleep(1);\n //Query Google Maps API\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = json_decode(curl_exec($curl), true); \n }\n if($response[status] == \"ZERO_RESULTS\"){return array(\"success\"=>true, \"message\"=>\"No Results\", \"results\"=>null);} \n elseif(!empty($response[results])){\n $results = array_pop($response[results]);\n if(in_array(\"postal_code\", $results[types])){return array(\"success\"=>true, \"message\"=>\"Retreived Zip Code Data\", \"results\"=>$results);}\n else{return array(\"success\"=>true, \"message\"=>\"Could Not Locate Zip Code\", \"results\"=>null);}\n }else{return array(\"success\"=>true, \"message\"=>\"Could Not Locate Zip Code\", \"results\"=>null);}\n }else{return array(\"success\"=>false, \"error\"=>\"Missing Required Arguments\");} \n }", "title": "" }, { "docid": "9b686f05d9adee7d6ec8987d8fb7c6fc", "score": "0.6369627", "text": "private function lookup() {\n\t\t$response_obj = \\Mojavi\\Util\\Ajax::sendAjax('/webservices/zipinfo.php', array('key' => self::API_KEY, 'zip' => $this->getZipcode(), 'format' => 'json'), \\Mojavi\\Request\\Request::GET, 'https://www.zipwise.com/');\n\t\tif (isset($response_obj['results'])) {\n\t\t\tif (isset($response_obj['results']['cities']) && is_array($response_obj['results']['cities'])) {\n\t\t\t\t$primary_city = array_shift($response_obj['results']['cities']);\n\t\t\t\t$this->setCity($primary_city['city']);\n\t\t\t}\n\t\t\tif (isset($response_obj['results']['state'])) {\n\t\t\t\t$this->setState($response_obj['results']['state']);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d08698c2690afee04d75ba6838223571", "score": "0.62634444", "text": "function getZipcode($zipcode)\n {\n \n }", "title": "" }, { "docid": "56bd2d1cb6f932723fb2d440bcdb5596", "score": "0.6146814", "text": "public function admin_zip_search(){\n\t\t$zip = preg_replace('/[^0-9]/', '', ( $this->input->get('zip') ?: '' ));\n\t\tif( !preg_match('/^[0-9]{3,7}$/', $zip) || !($address = $this->model->search_from_zip($zip)) ){\n\t\t\twp_send_json(array());\n\t\t}\n\t\t$json = array(\n\t\t\t'prefecture' => $address->prefecture,\n\t\t);\n\t\t$city = get_term_by('name', $address->city, $this->model->taxonomy);\n\t\tif( $city ){\n\t\t\t$json['city'] = array(\n\t\t\t\t'id' => (int) $city->term_id,\n\t\t\t\t'name' => sprintf(\"%s(%s)\", $city->name, $city->description),\n\t\t\t);\n\t\t}\n\t\tif( false === strpos($address->town, '以下に掲載') ){\n\t\t\t$json['street'] = $address->town;\n\t\t}\n\t\twp_send_json($json);\n\t}", "title": "" }, { "docid": "20ad875b23e2b2a5d46b44c3ae38c88d", "score": "0.6102448", "text": "public function getWeather( $city, $state, $options ) {\n\n // Geoplugin Init\n $geoplugin = new geoPlugin();\n $geoplugin->locate();\n\n if( $options['use_geolocation'] ) {\n $city = $geoplugin->city;\n $state = $geoplugin->region; \n }\n $json_string = file_get_contents( \"http://api.wunderground.com/api/69c787ef5a1caa11/geolookup/conditions/q/$state/$city.json\" );\n $parsed_json = json_decode( $json_string );\n $location = $parsed_json->{'location'}->{'city'} . ', ' . $parsed_json->{'location'}->{'country'};\n $weather = $parsed_json->{'current_observation'}->{'weather'};\n $icon_url = $parsed_json->{'current_observation'}->{'icon_url'};\n $temp_f = $parsed_json->{'current_observation'}->{'temp_f'};\n $temp_c = $parsed_json->{'current_observation'}->{'temp_c'};\n $relative_humidity = $parsed_json->{'current_observation'}->{'relative_humidity'};\n ?>\n <div class=\"city-weather\">\n <h3><?php echo ${location}; ?></h3>\n <?php if( $options['temp_type'] == 'Fahrenheit' ) : ?> \n <h1><?php echo ${temp_f}; ?> °F</h1>\n <?php elseif( $options['temp_type'] == 'Celsius' ) : ?>\n <h1><?php echo ${temp_c}; ?> °C</h1>\n <?php else: ?>\n <h1><?php echo ${temp_f}; ?> °F (<?php echo ${temp_c}; ?> °C)</h1>\n <?php endif; ?>\n <?php echo $weather; ?>\n <img src=\"<?php echo ${icon_url};?>\" />\n <?php\n if( $options['show_humidity'] == true ) {\n ?>\n <div> \n <strong>Relative Humidity <?php echo ${relative_humidity};?></strong> \n </div>\n <?php\n }\n ?> \n </div>\n <?php\n }", "title": "" }, { "docid": "9d3303a4c223b451ef736798969d525a", "score": "0.6081818", "text": "public function weather($city, $county_code, $units, $lan)\n {\n $todayWeatherUrl = 'https://api.openweathermap.org/data/2.5/weather?q='.$city.','.$county_code.'&appid=b752d7a3f9ecdba97feecc9cf4000ff0&units='.$units.'&lang'.$lan;\n\n //Get today's weather from https://openweathermap.org/current\n $todayWeather = Http::get($todayWeatherUrl)->json();\n\n return $todayWeather;\n }", "title": "" }, { "docid": "75c30314923f0556e2f3b4315df80518", "score": "0.6067098", "text": "public function getZipcode();", "title": "" }, { "docid": "d96091f4cd97eb34897236f4e49bfa06", "score": "0.602735", "text": "function getaddress($zip,$address=null)\t{\n\t\t\n\t\t$curl_handle=curl_init();\n\t\t$address=urlencode($zip);\n\t\t$url=\"http://maps.googleapis.com/maps/api/geocode/json?address=\".$address.\"&sensor=false\";\n\t\tcurl_setopt($curl_handle,CURLOPT_URL,$url);\n\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\n\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\n\t\t$data = curl_exec($curl_handle);\n\t\tcurl_close($curl_handle);\n\t\t$data = json_decode($data);\n\t\tif(!empty($data) && $data->status == 'OK' )\n\t\t{\n\t\t\t$lat= $data->results[0]->geometry->location->lat;\n\t\t\t$long = $data->results[0]->geometry->location->lng;\n\t\t}\n\t\ttry {\n\t\t\tif(isset($data->results[0]->formatted_address)) {\n\t\t\t\t$address = $data->results[0]->formatted_address;\n\t\t\t} else {\n\t\t\t\t$address = '';\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$address = 1;\n\t\t}\n\t\treturn $address;\n\t}", "title": "" }, { "docid": "0c503c068073f6e2bb44ecdb8d7063d7", "score": "0.5995976", "text": "public function show($zip, WeatherRepositoryInterface $weather)\n {\n return response()->json($weather->getByZip($zip));\n }", "title": "" }, { "docid": "a16220180effe308bfa587c9c413e285", "score": "0.59758794", "text": "static function get_location_weather()\n {\n\n $location = self::get_location();\n if (!$location) return;\n $c = self::get_location_temp();\n $text = \"\";\n $text .= '<span>' . get_the_title($location) . '</span>\n <span class=\"loc-info-weather-num\">' . $c['temp'] . '</span>\n ' . $c['icon'] . ' </p>';\n\n return $text;\n }", "title": "" }, { "docid": "ad57e275319c5dc0aa3253ce1d7abb4b", "score": "0.59722406", "text": "public function getWeather($address, $unit)\n {\n if(!$address || (!$country = $address->country) || (!$address->city && !$address->zip)) return false;\n $location = '';\n \n try {\n if($address->city) {\n $location = $address->city;\n }elseif($address->zip) {\n $location = $address->zip;\n }\n\n $weather = $this->weatherService->getWeather($location, $country->code, $unit);\n\n return $weather;\n } catch (Exception $e) {\n throw $e;\n //handle exception\n // Log::warning('Home Owner Page Weather: ' . getErrorDetail($e));\n }\n }", "title": "" }, { "docid": "0c3ec91e690df22c02c97cd8b724a063", "score": "0.59193224", "text": "public function get_by_zip( $zip ) {\n\t\t$zip = $this->normalize_zip( $zip );\n\t\tif ( 7 === strlen( $zip ) ) {\n\t\t\treturn $this->get_row( \"SELECT * FROM {$this->table} WHERE zip = %s\", $zip );\n\t\t} else {\n\t\t\treturn $this->get_row( \"SELECT * FROM {$this->table} WHERE zip LIKE %s\", '%' . $zip );\n\t\t}\n\t}", "title": "" }, { "docid": "dff18b118a3f80a958bd8689738fd005", "score": "0.5894491", "text": "private function getNearbyZips($zipcode){\n $radius = 50;\n if($zipcode==''){\n $str_arr_ipdat = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\" . $_SERVER['REMOTE_ADDR']));\n $latitude = $str_arr_ipdat->geoplugin_latitude;\n $longitude = $str_arr_ipdat->geoplugin_longitude;\n }else{\n $sql = \"select * from tbl_zipcodes where zipcode='$zipcode'\";\n $qry = mysqli_query($this->cn, $sql);\n $data = mysqli_fetch_array($qry);\n $latitude = $data['latitude'];\n $longitude = $data['longitude'];\n }\n $sql = 'SELECT zipcode FROM tbl_zipcodes WHERE (POW((69.1*(longitude-\"' . $longitude. '\")*cos(' . $longitude .'/57.3)),\"2\")+POW((69.1*(latitude-\"' . $latitude. '\")),\"2\"))<(' . $radius . '*' . $radius . ')';\n $qry = mysqli_query($this->cn, $sql);\n $zips = \"\";\n while($row = mysqli_fetch_assoc($qry)) $zips .= \"'\".$row['zipcode'].\"',\";\n return trim($zips, \",\");\n }", "title": "" }, { "docid": "4e169d064bb844ee91f36aa2c504cd1b", "score": "0.5852475", "text": "function get_uc_schools_by_zip_code( $zip, $post_status = 'publish' ) {\n\t$wp_posts = get_posts(array(\n\t\t'post_type' => 'uc_school',\n\t\t'post_status' => $post_status,\n\t\t'posts_per_page' => -1,\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => 'zip',\n\t\t\t\t'value' => $zip,\n\t\t\t),\n\t\t),\n\t));\n\n\t$result = array();\n\tforeach ($wp_posts as $post) {\n\t\t$result[] = array('value' => $post->ID, 'label' => $post->post_title);\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "eb6c25f508ec7dc6e8081e510848b277", "score": "0.58474153", "text": "public function getByZip($zip)\n {\n $params = array('zip' => (string)$zip);\n return $this->get($params);\n }", "title": "" }, { "docid": "427aaa399d8e128473dfa79a0f6fb491", "score": "0.5811224", "text": "function live_weather_pred($city) {\n $jsonurl = \"http://api.openweathermap.org/data/2.5/weather?q=\" . $city . \"&appid=3188f906a781b8e7a1312bc5b2a0a59f\";\n $json = file_get_contents($jsonurl);\n $cweather = json_decode($json);\n $kelvin = $cweather->main->temp;\n $fheat = ($kelvin - 273.15) * 1.8 + 32;\n $humidity = $cweather->main->humidity;\n $weather_cond = \"\";\n foreach($cweather->weather as $weath) {\n $weather_cond = $weath->main;\n return $weather_cond;\n }\n return \"sunny\";\n }", "title": "" }, { "docid": "960a27a87ce1486b4e88866cf3bb7d12", "score": "0.57582796", "text": "function windSpeed()\n{\n\n if (isset($_POST['valider'])) {\n $ville = $_POST['ville'];\n\n }\n $lien = 'http://api.openweathermap.org/data/2.5/weather?q=' . $ville . '&APPID=77191f7030ac008b2be985e20afe4c01';\n\n $request = $lien;\n $response = file_get_contents($request);\n $jsonobj = json_decode($response, true);\n $windSpeed = round((($jsonobj['wind']['speed']*36)/10), 1);\n return $windSpeed;\n}", "title": "" }, { "docid": "31816ac83828a7affacef9d83a9318d5", "score": "0.575612", "text": "private function get_zipcode_radius_data($zipcode = null){\n if(!empty($zipcode)){\n //Prepare CURL Request\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, \"http://www.zipcodeapi.com/rest/\".ZIPCODEAPI_KEY.\"/radius.json/\".$zipcode.\"/50/miles\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n //Query ZipCodeAPI\n $response = json_decode(curl_exec($curl), true);\n //Return Results\n if(!empty($response[zip_codes])){\n foreach($response[zip_codes] as $key=>$item){$zipcode_results[] = $item[zip_code];}\n return array(\"success\"=>true, \"results\"=>$zipcode_results);\n }else{return array(\"success\"=>true, \"results\"=>null);}\n }else{return array(\"success\"=>false, \"error\"=>\"Missing Required Arguments\");}\n }", "title": "" }, { "docid": "5bb4f5d7d596152e9dd3aea52d457b11", "score": "0.5750429", "text": "private function _getWeather($apikey)\r\n\t{\r\n\t\t$json = $this->_loadContent(\"http://api.wunderground.com/api/\".$apikey.\"/geolookup/conditions/q/UA/Kiev.json\");\r\n\t\tif($json) {\r\n\t\t\t$parsed_json = json_decode($json);\r\n\t\t\treturn (int)$parsed_json->{'current_observation'}->{'temp_c'};\r\n\t\t} else {\r\n\t\t\treturn \"Error\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "07548665f1eab74124637d36a3f5da6b", "score": "0.57409734", "text": "public function getWeatherData()\n { \n try\n {\n $endpoint = 'https://api.weatherbit.io/v2.0/current';\n\n $client = new \\GuzzleHttp\\Client(['verify' => false]);\n\n $response = $client->request('GET', $endpoint, ['query' => [\n 'lat' => $this->latitude , \n 'lon' => $this->longitude ,\n 'key' => config('apiKeys.weatherbitKey')\n ]]);\n\n $statusCode = $response->getStatusCode();\n $content = json_decode($response->getBody(), false);\n \n return $content->data['0']; \n }\n catch(RequestException $ex)\n {\n throw new APIException();\n }\n }", "title": "" }, { "docid": "661d2e16442880003632f02b4a4e2994", "score": "0.5734803", "text": "public function getWeather()\n {\n if ($this->debug) {\n $this->storageInterface->removeItem('weather');\n }\n if (!$this->storageInterface->hasItem('weather')) {\n $this->updateWeather();\n }\n\n return $this->storageInterface->getItem('weather');\n }", "title": "" }, { "docid": "3985b8d8bd1bb5777ba647a85e83016a", "score": "0.57329816", "text": "public function getByZip($zipcode)\n {\n $items = DB::table('uszips')->where('zip', $zipcode)->first();\n return response()->json(compact('items'));\n }", "title": "" }, { "docid": "a806a49a95c0f2499c6467605774c45e", "score": "0.5627432", "text": "function DistanceZipCodes ($zip, $distance)\r{\r\tglobal $debugging;\r\r\t$sql = \"SELECT * FROM `zip_codes`\r\t\t\tWHERE `zip` = '$zip' LIMIT 1\";\r\t$result = mysql_query ($sql) or exit (\"<code>$sql;</code><br>\" . mysql_error());\r\t$center = mysql_fetch_assoc ($result);\r\tmysql_free_result ($result);\r\r\tif ($debugging) echo \"<p>Centered at: {$center[\"zip\"]}, {$center[\"city\"]}, {$center[\"state\"]} ({$center[\"latitude\"]},{$center[\"longitude\"]})</p>\";\r\r\t$rect = DistanceRectangle ($center[\"latitude\"], $center[\"longitude\"], $distance);\r\t$sql = \"SELECT * FROM `zip_codes`\r\t\t\tWHERE `longitude` >= {$rect[\"west\"]} AND\r\t\t\t\t `longitude` <= {$rect[\"east\"]} AND\r\t\t\t\t `latitude` >= {$rect[\"south\"]} AND\r\t\t\t\t `latitude` <= {$rect[\"north\"]}\r\t\t\tGROUP BY `zip`\r\t\t\tORDER BY `zip` ASC, `state` ASC, `city` ASC\";\r\t$result = mysql_query ($sql) or exit (\"<code>$sql;</code><br>\" . mysql_error());\r\r\tif ($debugging) echo \"<p>\" . mysql_num_rows ($result) . \" possible matches.</p>\";\r\r\t$zips = array();\r\t$i = 0;\r\twhile ($row = mysql_fetch_assoc ($result))\r\t{\r\t\tif (Distance ($center[\"latitude\"], $center[\"longitude\"], $row[\"latitude\"], $row[\"longitude\"]) <= $distance)\r\t\t{\r\t\t\t$zips[$i++] = $row;\r\t\t\tif ($debugging) echo \"<p>\" . Distance ($center[\"latitude\"], $center[\"longitude\"], $row[\"latitude\"], $row[\"longitude\"]) . \" from {$center[\"zip\"]} to {$row[\"zip\"]}, it will be included.</p>\";\r\t\t}\r\t\telse if ($debugging)\r\t\t{\r\t\t\techo \"<p>\" . Distance ($center[\"latitude\"], $center[\"longitude\"], $row[\"latitude\"], $row[\"longitude\"]) . \" from {$center[\"zip\"]} to {$row[\"zip\"]}, it will not be included.</p>\";\r\t\t}\r\t}\r\tmysql_free_result ($result);\r\r\tif ($debugging) echo \"<p>\" . sizeof ($zips) . \" actual matches.</p>\";\r\r\treturn $zips;\r}", "title": "" }, { "docid": "fdf04bc38aaf094ae4b1f074b1a8755a", "score": "0.56194204", "text": "public function custGetZipData($params)\r\n {\r\n $dbh = $this->ant->dbh;\r\n \r\n if ($params['zipcode'])\r\n {\r\n $ret = array();\r\n if (strpos($params['zipcode'], \"-\")!==false)\r\n {\r\n $parts = explode(\"-\", $params['zipcode']);\r\n $params['zipcode'] = $parts[0];\r\n }\r\n\r\n if (is_numeric($params['zipcode']))\r\n {\r\n $query = \"select city, state from app_us_zipcodes where zipcode='\".$params['zipcode'].\"'\";\r\n $result = $dbh->Query($query);\r\n if ($dbh->GetNumberRows($result))\r\n {\r\n $row = $dbh->GetNextRow($result, 0); \r\n $ret = array(\"state\" => stripslashes($row['state']), \"city\" => stripslashes($row['city']));\r\n }\r\n else\r\n $ret = array(\"error\" => \"No records found.\");\r\n }\r\n }\r\n else\r\n $ret = array(\"error\"=>\"zipcode is a required param\");\r\n\r\n $this->sendOutputJson($ret);\r\n return $ret;\r\n }", "title": "" }, { "docid": "901808482dca51896ae4c6dcf5a525a5", "score": "0.55929303", "text": "public function setZip($var)\n {\n GPBUtil::checkString($var, True);\n $this->zip = $var;\n }", "title": "" }, { "docid": "d30ccb1741824a90f05934728ac7b648", "score": "0.5583128", "text": "function ww_ajax_get_current_weather() {\n\n\t$location = $_REQUEST['location'];\n\tif (empty($location)) {\n\t\twp_send_json_error(\"No location set!\");\n\t}\n\n\t// get current weather\n\t$weather_response = owm_get_current_weather($location);\n\n\t// did we get current weather?\n\tif (!$weather_response['success']) {\n\t\t$msg = sprintf(\n\t\t\t/* translators: Location */\n\t\t\t__('Could not get current weather for location %s', 'wcm20-weather'),\n\t\t\t$location\n\t\t);\n\n\t\twp_send_json_error($msg);\n\t}\n\n\t// respond with current weather\n\twp_send_json_success($weather_response['data']);\n}", "title": "" }, { "docid": "fbcbd82df7d912b833712c683bc832db", "score": "0.5580773", "text": "public function getWeather($latitude,$longitude)\n {\n\n $apiret = $this->open_weather_current($latitude, $longitude);\n $forecast_data = $this->open_weather_forecast($latitude, $longitude);\n\n\n $city = $apiret['name'];\n $tempInK = $apiret['main']['temp'] - 273;\n $temp = (int)$tempInK;\n $feel = $apiret['main']['feels_like'] - 273;\n $feels_like = (int)$feel;\n $main = $apiret['weather'][0]['main'];\n $description = $apiret['weather'][0]['description'];\n $icon = $apiret['weather'][0]['icon'];\n\n $current_weather_data[] = array(\n \"city\" => $city,\n \"temp\" => $temp,\n \"feels_like\" => $feels_like,\n \"main\" => $main,\n \"description\" => $description,\n \"icon\" => $icon,\n );\n for ($i = 1; $i <= 7; $i++) {\n $unixTimestamp = $forecast_data->daily[$i]->dt;\n $datetime = new DateTime(\"@$unixTimestamp\");\n $date = $datetime->format('l');\n $tempInK = $forecast_data->daily[$i]->temp->day - 273;\n $temp = (int)$tempInK;\n $feel = $forecast_data->daily[$i]->feels_like->day - 273;\n $feels_like = (int)$feel;\n $main = $forecast_data->daily[$i]->weather[0]->main;\n $description = $forecast_data->daily[$i]->weather[0]->description;\n $icon = $forecast_data->daily[$i]->weather[0]->icon;\n\n $forecast_weather_data[] = array(\n \"date\" => $date,\n \"temp\" => $temp,\n \"feels_like\" => $feels_like,\n \"main\" => $main,\n \"description\" => $description,\n \"icon\" => $icon,\n );\n }\n $final_weather_data = array_merge($current_weather_data,$forecast_weather_data);\n return new WeatherResource($final_weather_data);\n }", "title": "" }, { "docid": "d432b9c59a4275f737a5f83840055e30", "score": "0.5575119", "text": "public function getZip()\n {\n return $this->zip;\n }", "title": "" }, { "docid": "b3cb23bee2bccfe03ac2d3f029afd0b0", "score": "0.55731374", "text": "private static function getLocalNewsFrom($source, $zipcode){\n\n\t}", "title": "" }, { "docid": "1e645c318ca41ae57d319c00c636e0c5", "score": "0.55494094", "text": "function updateWeather() {\n if ($this->fileExists(\"/data/key\")) {\n $this->key = $this->readFile(\"/data/key\");\n }\n if ($this->fileExists(\"/data/key\") and $this->fileExists(\"/data/coords\")) {\n // Prepare the query\n $api_key = $this->readFile(\"/data/key\");\n\n $coords = $this->getRoot() . \"/data/coords\";\n $coords = file($coords);\n\n $lat = trim($coords[0]);\n $lon = trim($coords[1]);\n // Set the API backend to send the requests to\n $current = \"https://api.openweathermap.org/data/2.5/weather\";\n $fivedays = \"https://api.openweathermap.org/data/2.5/forecast\";\n // Make the necessary requests\n $conditions = file_get_contents(\"$current?lat=$lat&lon=$lon&APPID=$api_key\");\n $forecast = file_get_contents(\"$fivedays?lat=$lat&lon=$lon&APPID=$api_key\");\n // Decode parsed weather data\n $conditions = json_decode($conditions, true);\n $forecast = json_decode($forecast, true);\n\n $temperature = $conditions['main']['temp'];\n\n if ($this->celsius) {\n $temperature = $temperature - 273.15;\n }\n else {\n $temperature = $temperature * 9/5 - 459.67;\n }\n // Prepare the data\n $data = array(\n \"temperature\" => round($temperature, 0, PHP_ROUND_HALF_UP),\n \"icon\" => $conditions['weather'][0]['icon'],\n \"location\" => $conditions['name'] . \", \" . $conditions['sys']['country'],\n \"humidity\" => $conditions['main']['humidity'],\n \"day1\" => $this->calculateWeather(0, $forecast),\n \"day2\" => $this->calculateWeather(1, $forecast),\n \"sunrise\" => $conditions['sys']['sunrise'],\n \"sunset\" => $conditions['sys']['sunset'],\n \"last-updated\" => date(\"U\")\n );\n // Save the data\n $this->saveFile($data, \"/data/weather/conditions.json\", true);\n return $data;\n }\n }", "title": "" }, { "docid": "3f54f1c0619fd658d39d92e374e9d5ad", "score": "0.554315", "text": "public function getZip()\n {\n return $this->zip;\n }", "title": "" }, { "docid": "3f54f1c0619fd658d39d92e374e9d5ad", "score": "0.554315", "text": "public function getZip()\n {\n return $this->zip;\n }", "title": "" }, { "docid": "3f54f1c0619fd658d39d92e374e9d5ad", "score": "0.554315", "text": "public function getZip()\n {\n return $this->zip;\n }", "title": "" }, { "docid": "3f54f1c0619fd658d39d92e374e9d5ad", "score": "0.554315", "text": "public function getZip()\n {\n return $this->zip;\n }", "title": "" }, { "docid": "94f2dda7d916ab59b4f3d5653d9810b0", "score": "0.5536512", "text": "function getWoeid($location,$type,$unit){\n\t$appid=\"orLEgLbV34GEZZiDf2LGGDtGXUkG5WydwgC27XkVkmN6kn9n6JKYAyhRUU1v0abYGjM4nmrIPirf8eLLyFTNu_uQn1vi0ho-\";\n\tif($type==\"zip\")//ZIP Code\n\t{\n\t\t//$cityname=$location;\n\t\t$url=\"http://where.yahooapis.com/v1/concordance/usps/\".$location.\"?appid=\".$appid;\n\t\t//echo $url;\n\t\t//$buf = file_get_contents($url);\n //$xml = simplexml_load_string($buf);\n $xml=simplexml_load_file($url);\n \n /*if($xml->getName()==\"error\")\n \techo \"Zero results found!\";*/\n if(!is_object($xml))\n\t\t\techo \"<h1><center>Zero results found!</center></h1>\";\n\t\t\t//echo '<script language=\"javascript\">hwin= window.open(\"\",\"\",\"height=400,width=800,scrollbars=1,titlebar=1,toolbar=1\");hwin.document.write(\"<html><h1><center>Zero results found!</center></h1></html>\");</script>';\n else\n {\n \t$id=array();\n \t$count=count($xml->woeid);\n \tfor($i=0;$i<$count;$i++)\n \t{\n\t \t//echo $xml->place[$i]->woeid;\n\t \t$id[$i]=$xml->woeid; \n\t }\n\t \tgetWeather($id,$count,$unit,$location);\n\t }\n\t\t\n\t}\n\telse//$type==\"city\"\n\t{\n\t\t$cityname=$location;\n\t\t$location=preg_replace('/\\s+/','+',$location);\n\t\t//echo $location.\"</br>\";\n\t\t$url=\"http://where.yahooapis.com/v1/places\\$and(.q('\".$location.\"'),.type(7));start=0;count=5?appid=\".$appid;\n\t\t/*if(!file_exists($url))\n\t\t\techo \"No result\";\n\t\telse{*/\n\t\t//echo $url.\"<br />\";\n\t\t//$buf = file_get_contents($url);\n //$xml = simplexml_load_string($buf);\n $xml=simplexml_load_file($url);\n //echo count($xml->place).\"<br />\";\n //echo $xml->place[0]->woeid;\n $count=count($xml->place);\n if($count==0)//no woeid found\n \techo \"<h1><center>Zero results found!</center></h1>\";\n \t//echo '<script language=\"javascript\">hwin= window.open(\"\",\"\",\"height=400,width=800,scrollbars=1,titlebar=1,toolbar=1\");hwin.document.write(\"<html><h1><center>Zero results found!</center></h1></html>\");</script>';\n else\n {\n \t$id=array();\n \tfor($i=0;$i<$count;$i++)\n \t{\n\t \t//echo $xml->place[$i]->woeid;\n\t \t$id[$i]=$xml->place[$i]->woeid; \n\t }\n\t getWeather($id,$count,$unit,$cityname);\n\t }\n\t }\n}", "title": "" }, { "docid": "0013908d2c4d4cde4835d6ed734f6ce3", "score": "0.55302316", "text": "public function getZip()\n {\n return $this->zip;\n }", "title": "" }, { "docid": "e0efa738f5de354ed083ba5b8090aeff", "score": "0.55263567", "text": "public function getWeatherForCityId($id)\n {\n $query = ['id' => $id];\n\n return $this->request(self::ENDPOINT_WEATHER, ['query' => $query]);\n }", "title": "" }, { "docid": "fd65ad0c3306b7ab3bc0c22e735a8b8c", "score": "0.55036426", "text": "public function setZip(&$var)\n {\n GPBUtil::checkMessage($var, \\Google\\Appengine\\V1\\ZipInfo::class);\n $this->zip = $var;\n }", "title": "" }, { "docid": "ffe947b81c2aace2a0d143552b818982", "score": "0.5499399", "text": "public function getWeather(){\n $ch = curl_init(); \n curl_setopt($ch, CURLOPT_URL, \"https://api.hgbrasil.com/weather/?format=json&city_name=Rio%20de%20Janeiro&key=223bb351\"); \n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); \n \n $response = curl_exec($ch); \n curl_close($ch);\n\n $return = json_decode($response);\n\n return response()->json($return->results);\n }", "title": "" }, { "docid": "50bd4d679ea813123cc17918ff56212e", "score": "0.5491213", "text": "function Get_NOAA_Weather_File_With_HTTP( $code ) {\r\n\t// Get current conditions\r\n\t$result = wp_remote_get ( \"http://w1.weather.gov/xml/current_obs/{$code}.xml\" );\r\n\t$fp = fopen(dirname( __FILE__) . \"/weather-current-{$code}.xml\", \"w\" );\r\n\tfwrite($fp, $result[\"body\"]);\r\n\tfclose($fp);\r\n}", "title": "" }, { "docid": "8a6c3afea8425a7e6e67d4fdb42431e0", "score": "0.5478138", "text": "public function getZipCode()\n {\n return $this->zip_code;\n }", "title": "" }, { "docid": "7e8c52cd9b5b13af1a8fced104ac6cd5", "score": "0.54721", "text": "public function getZipcode()\n\t{\n\t\treturn $this->zipcode;\n\t}", "title": "" }, { "docid": "43ca3a65b138b05d253aa80a9c107fff", "score": "0.5466434", "text": "public function getZip()\n {\n return $this->_zip;\n }", "title": "" }, { "docid": "35ed2e700e53e0ac46c47b51c1b8a782", "score": "0.54572433", "text": "public function getData($in, $zip)\n {\n try {\n $gateway = $this->payerApi->setupClient();\n $getAddress = new apiGetAddress($gateway);\n $challenge = new Challenge($gateway);\n $challenge = (array)$challenge->create();\n\n if (!isset($challenge['challenge_token'])) {\n\n return [\n 'errorMessage' => 'Could not get access token.',\n 'httpStatusCode' => 401\n ];\n }\n\n $data = [\n 'identity_number' => (string)$in,\n 'zip_code' => (string)$zip,\n 'challenge_token' => (string)$challenge['challenge_token'],\n ];\n\n $getAddressResponse = (array)$getAddress->create($data);\n\n return $getAddressResponse;\n } catch (PayerException $e) {\n $this->logger->error($e->getMessage());\n\n return [\n 'errorMessage' => $e->getMessage(),\n 'httpStatusCode' => 401\n ];\n }\n }", "title": "" }, { "docid": "1a2664413e61759634041d7643d25ed8", "score": "0.5447918", "text": "function get_uc_schools_by_zip_code_and_country( $zip, $country, $post_status = 'publish' ) {\n\t$wp_posts = get_posts(array(\n\t\t'post_type' => 'uc_school',\n\t\t'post_status' => $post_status,\n\t\t'posts_per_page' => -1,\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => 'zip',\n\t\t\t\t'value' => $zip,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'country',\n\t\t\t\t'value' => $country,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'school_verified',\n\t\t\t\t'value' => 1,\n\t\t\t),\n\t\t),\n\t));\n\n\t$result = array();\n\tforeach ($wp_posts as $post) {\n\t\t$result[] = array('value' => $post->ID, 'label' => $post->post_title);\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "e24516cb6fffa170752797974b8a8158", "score": "0.543111", "text": "function zipcode($code) {\n return json_decode(AdaCurl::get(\"http://vicopo.selfbuild.fr/code/$code\"));\n }", "title": "" }, { "docid": "47bfb33611c31613545469bceb6f7dc1", "score": "0.54308033", "text": "function zip_read ($zip) {}", "title": "" }, { "docid": "deeea426e7aaf3672b9ac943dc1b1f8a", "score": "0.543068", "text": "public function getZipcode()\n {\n return $this->zipcode;\n }", "title": "" }, { "docid": "deeea426e7aaf3672b9ac943dc1b1f8a", "score": "0.543068", "text": "public function getZipcode()\n {\n return $this->zipcode;\n }", "title": "" }, { "docid": "deeea426e7aaf3672b9ac943dc1b1f8a", "score": "0.543068", "text": "public function getZipcode()\n {\n return $this->zipcode;\n }", "title": "" }, { "docid": "deeea426e7aaf3672b9ac943dc1b1f8a", "score": "0.543068", "text": "public function getZipcode()\n {\n return $this->zipcode;\n }", "title": "" }, { "docid": "deeea426e7aaf3672b9ac943dc1b1f8a", "score": "0.543068", "text": "public function getZipcode()\n {\n return $this->zipcode;\n }", "title": "" }, { "docid": "ada2b15b809eeccb8c77154542c05b34", "score": "0.54198265", "text": "public function getZip(): string\n {\n return $this->zip;\n }", "title": "" }, { "docid": "b98cfa98efb01cc8768cd64b2cb21d25", "score": "0.54129857", "text": "public function getZipCode()\n {\n return $this->zipCode;\n }", "title": "" }, { "docid": "b98cfa98efb01cc8768cd64b2cb21d25", "score": "0.54129857", "text": "public function getZipCode()\n {\n return $this->zipCode;\n }", "title": "" }, { "docid": "b98cfa98efb01cc8768cd64b2cb21d25", "score": "0.54129857", "text": "public function getZipCode()\n {\n return $this->zipCode;\n }", "title": "" }, { "docid": "b98cfa98efb01cc8768cd64b2cb21d25", "score": "0.54129857", "text": "public function getZipCode()\n {\n return $this->zipCode;\n }", "title": "" }, { "docid": "b98cfa98efb01cc8768cd64b2cb21d25", "score": "0.54129857", "text": "public function getZipCode()\n {\n return $this->zipCode;\n }", "title": "" }, { "docid": "a7acfb5c37d76dbaa994ee3fb239dff6", "score": "0.5405862", "text": "public function getZipcode()\n {\n return $this->zipcode;\n }", "title": "" }, { "docid": "1af15cd64b56e2777f3e5bffe8322c94", "score": "0.5391487", "text": "function zip_read($zip)\n{\n}", "title": "" }, { "docid": "2c984813d7fbda01e92b669b4216b396", "score": "0.5375311", "text": "public function weatherString($code)\n {\n switch ($code) {\n case \"TS\":\n return \"Thunderstorms\";\n break;\n \n case \"RA\":\n return \"Rain\";\n break;\n \n case \"MC\":\n return \"Mostly cloudy\";\n break;\n \n case \"SU\":\n return \"Sunny\";\n break;\n \n case \"MO\":\n return \"Mostly clear\";\n break;\n \n case \"PC\":\n return \"Partly cloudy\";\n break;\n \n case \"SN\":\n return \"Snow\";\n break;\n \n case \"CL\":\n return \"Overcast\";\n break;\n \n case \"FG\":\n return \"Fog\";\n break;\n }\n return null;\n }", "title": "" }, { "docid": "8bafe5708dc059b9581f138e1d1e9e2e", "score": "0.53482616", "text": "public function getSocialZipCode() {\n return $this->socialZipCode;\n }", "title": "" }, { "docid": "229ff631adc61b90c5320a286c183719", "score": "0.5335602", "text": "function parseAllDistancesByZip( $zip, $radius, $units=null, $limit=null ) {\n\n\t\tif(!empty($units) && $units != 'M')\n\t\t\t$radius = $this->convertFromUnit('M',$units * (int)$radius);\n\n\t\tif(!empty($limit))\n\t\t\t$limit = \"LIMIT \" . (int)$limit;\n\n $query ='SELECT * FROM '.sql_table('zipcode'). ' WHERE zzip=\"'.(int)$zip.'\"';\n $result = sql_query($query,'get zipcode '.(int)$zip.' info');\n\n if(mysql_num_rows($result) > 0) {\n\n\t\t\t$obj = mysql_fetch_object($result);\n\n\t\t\t$query = 'SELECT zzip FROM '. sql_table('zipcode') .\n\t\t\t\t' WHERE (POW((69.1*(zlongitude-\"' .\n\t\t\t\t$obj->zlongitude . '\")*cos(' . $obj->zlatitude .\n\t\t\t\t'/57.3)),\"2\")+POW((69.1*(zlatitude-\"' .\n\t\t\t\t$obj->zlatitude . '\")),\"2\"))<(' . (int)$radius .\n\t\t\t\t'*' . (int)$radius . ') ' . $limit;\n\n $result = sql_query( $query, 'get zipcodes within radius of ' . $zip );\n\n\t\t\tif(mysql_num_rows($result) > 0) {\n while( $obj = mysql_fetch_object( $result ) ) {\n $zip_array[] = $obj->zzip;\n }\n }\n }\n\n\t\treturn $zip_array;\n }", "title": "" }, { "docid": "47375a9c70f469af3a10aa5089e1c56a", "score": "0.533547", "text": "public function getWeatherForCity($city, $countryCode = null)\n {\n if (null !== $countryCode) {\n $city .= ',' . $countryCode;\n }\n\n $query = ['q' => $city];\n\n return $this->request(self::ENDPOINT_WEATHER, ['query' => $query]);\n }", "title": "" }, { "docid": "d0cce398e84313eed61032909c5f9011", "score": "0.5332826", "text": "function getCurrentData($region, $country_name, $access_key)\n{\n $location = $region . \",\" . $country_name . \"&units=metric\";\n $array_json = \"http://api.openweathermap.org/data/2.5/weather?q=\" . $location . $access_key;\n $json = file_get_contents($array_json);\n $obj = json_decode($json);\n return $obj;\n}", "title": "" }, { "docid": "f881666404583ad7c7962adf6c05980b", "score": "0.53315246", "text": "public function zipConverter($zip_code) {\n\t \t$zip_code = Input::;\n\t\t$last_frost_date;\n\t\t\n\t\t\n\t\t\n\t \t\n\t }", "title": "" }, { "docid": "05873e4d6016a52493f1299e7e37fdf7", "score": "0.5322755", "text": "protected function getWeather($location) {\n $url = $this->url.urlencode($location);\n $response = $this->http->get($url);\n $content = $response->getContent();\n\n preg_match_all(\"#<div><span class=\\\"small\\\">(.*?)<\\/span><\\/div>#im\",\n $content, $matches);\n $location = $matches[1][0];\n\n if (!empty($location)){\n preg_match_all(\"#<div class=\\\"large\\\" >(.*?)<br \\/>#im\",\n $content, $matches);\n $temp_numb = $matches[1][0];\n\n preg_match_all(\"#<br \\/>(.*?)<\\/div><div id=\\\"remark\\\"><br \\/>#im\",\n $content, $matches);\n $temp_desc = $matches[1][0];\n\n preg_match_all(\"#<div id=\\\"remark\\\"><br \\/>\\n<span>(.*?)<\\/span><\\/div>#im\",\n $content, $matches);\n $remark = $matches[1][0];\n\n $result = \"{$location}: {$temp_numb} {$temp_desc} ({$remark})\";\n $result = preg_replace('/</',' <', $result);\n $result = strip_tags($result);\n return html_entity_decode($result);\n }else{\n return \"I have no idea where is this fucking location!\";\n }\n }", "title": "" }, { "docid": "d168e3f1aee2a78dfbc66878713284c7", "score": "0.5320034", "text": "public function getWeather($connectionID) {\n\t\t\n\t\tif (!$this->database || $this->database->connect_errno)\n\t\t\treturn $this->DB_ERROR;\n\t\t\n\t\tif ($result = $this->database->query(\"SELECT `\".$this->DB_TABLE.\"`.* FROM `\".$this->DB_TABLE.\"` WHERE `\".$this->DB_TABLE.\"`.`connection_id`='\".$connectionID.\"';\")) {\n\t\t\tif ($res = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$dto = new WeatherDTO;\n\t\t\t\t\t\n\t\t\t\t$dto->id = $res['connection_id'];\n\t\t\t\t$dto->sunPower = $res['sun_power'];\n\t\t\t\t$dto->windSpeed = $res['wind_speed'];\n\t\t\t\t\n\t\t\t\treturn new Response($this->SUCCESS->status, $dto);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->NOT_FOUND;\n\t\t\n\t}", "title": "" }, { "docid": "59edc1655a5d6436f87d9ced625c73fb", "score": "0.53090215", "text": "public function findAddressByZipCode($zipCode);", "title": "" }, { "docid": "f4d5abe6d01c184b2bfe4036de16cd19", "score": "0.5300682", "text": "function getLocations($zipcode) {\r\n\r\n\t$cityzip = urlencode($zipcode);\r\n\t$ippool = array(\"69.63.195.114\",\"69.63.195.115\",\"69.63.195.116\",\"69.63.195.117\",\"69.63.195.118\",\"69.63.195.119\",\"69.63.195.120\",\"69.63.195.121\",\"69.63.195.122\",\"69.63.195.123\",\"69.63.195.124\",\"69.63.195.125\");\r\n\r\n\t$ip = $ippool[mt_rand(0, count($ippool)-1)]; // Get random IP address\r\n\r\n\t// Set up the CURL object\r\n\r\n\t$url = \"http://search.earth911.com/?what=oil&where=$cityzip&max_distance=100\";\r\n\t\t\r\n\t$str = file_get_contents($url);\r\n\t\r\n\t/*\r\n$ch = curl_init();\r\n\tcurl_setopt($ch, CURLOPT_URL, $url); // Tell CURL which URL to get\r\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Tell CURL to return the results as a string return value from curl_exec()\r\n\tcurl_setopt($ch, CURLOPT_INTERFACE, $ip);\t\t\t\t\t\t\t // Assign random IP address to use\r\n\tcurl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );\t // Pass user agent\t\r\n\r\n\t$str = curl_exec($ch); \r\n\tcurl_close( $ch );\r\n*/\r\n\r\n\tpreg_match( \"/\\<ul class=\\\"result-list\\\"\\>(.*?)\\<\\/ul\\>/is\",$str, $byname1 );\r\n\t\t\r\n // Extract fields\r\n\r\n\t$file = $byname1[0];\r\n\t$name = get_name($file);\r\n\t$address1 = get_address1($file);\r\n\t$address3 = get_address3($file);\r\n\t$phone = get_phone($file);\r\n\r\n\tmysql_connect('localhost', 'root', 'rTrapok)1')\r\n\t\tOR die(fail('Could not connect to database.'));\r\n\t\t\r\n\tmysql_select_db('oilfiltersonline');\r\n\t$i = 0;\r\n\t$points = array();\r\n\tforeach($phone[0] as $value) {\r\n\t\t\r\n\t\t$loc = preg_replace( \"/<(.*?)>/\", \"\", $name[0][$i]);\r\n\t\t$loc = preg_replace(\"/Program Information/\",\"\",$loc);\r\n\t\t$phn = trim(preg_replace( \"/<(.*?)>/\", \"\", $value));\r\n\t\t$addr1 = trim(preg_replace( \"/<(.*?)>/\", \"\", $address1[0][$i]));\r\n\t\t$addr3 = trim(preg_replace( \"/<(.*?)>/\", \"\", $address3[0][$i]));\r\n\t\tif ($addr1 != null) {\r\n\t\t\t$addr1 = preg_replace(\"/[^a-zA-Z0-9\\s]/\", \"\", $addr1);\r\n\t\t}\r\n\t\t$addr3= trim(html_entity_decode($addr3));\r\n\t\t$pieces = explode(\",\", $addr3);\r\n\t\t$city = trim($pieces[0]);\r\n\t\t$pieces = explode(\" \", trim($pieces[1]));\r\n\t\t$state = trim($pieces[0]);\r\n\t\t$zip = trim($pieces[1]);\r\n\r\n\t\tarray_push($points, array('name' => $loc, 'address' => $addr1, 'city' => $city, 'state' => $state, 'zip' => $zip, 'phone' => $phn));\t\r\n\t\t\r\n\t\tmysql_query(sprintf(\"insert into locations (name, phone, address1, city, state, zip) VALUES('%s','%s','%s','%s','%s','%s') ON DUPLICATE KEY UPDATE name = '%s'\", $loc, $phn, $addr1, $city, $state, $zip, $loc));\r\n\t\t$i++ ;\r\n\t}\r\n\t\r\n\t$points = array_slice($points, 0, 10);\r\n\techo json_encode(array(\"Locations\" => $points));\r\n}", "title": "" }, { "docid": "8e316a21f417c053db1f04b3043d053f", "score": "0.52775586", "text": "public function getZipcode()\n {\n\n return $this->zipcode;\n }", "title": "" }, { "docid": "e74c7427e10cd3b1b65abe35da4229b7", "score": "0.52770096", "text": "public function getZipCode(): string\n {\n return $this->zipCode;\n }", "title": "" }, { "docid": "fa39ff38196627e54c8d3b24c8260e1d", "score": "0.5276975", "text": "public function search_from_zip( $zip, $multiple = false ) {\n\t\t$query = <<<SQL\n\t\t\tSELECT * FROM {$this->table}\n\t\t\tWHERE zip LIKE %s\nSQL;\n\t\tif ( $multiple ) {\n\t\t\treturn $this->get_results( $query, \"{$zip}%\" );\n\t\t} else {\n\t\t\treturn $this->get_row( $query, \"{$zip}%\" );\n\t\t}\n\t}", "title": "" }, { "docid": "38a300ef0d23a9c3666d9af8275250b3", "score": "0.5273009", "text": "function get_zip_code()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_ZIP_CODE);\r\n }", "title": "" }, { "docid": "857b067ce715cecfdc403a18e6945803", "score": "0.5268545", "text": "public function getInfo(Request $request, string $zip)\n {\n $this->zipCodeValidator->setZip($zip);\n $city = $this->zipCodeValidator->getCity();\n $state = $this->zipCodeValidator->getState();\n $is_serviceable = $this->zipCodeValidator->isServiceable($state);\n $practitioners = License::where('state', $state)->count();\n $is_regulated = $this->zipCodeValidator->isRegulated($state);\n\n return response()->json(compact('city', 'practitioners', 'is_regulated', 'is_serviceable', 'state', 'zip'));\n }", "title": "" }, { "docid": "dda73e143d8321a24ea7cc2fab3604f0", "score": "0.52330434", "text": "public function getAddressByZipCode(string $zipCode)\n {\n if (strlen($zipCode) == 0) \n {\n throw new Exception('$zipCode cannot be an empty string!');\n }\n\n $zipCode = preg_replace('/[^0-9]/im', '', $zipCode);\n\n return (array) json_decode(file_get_contents($this->url . $zipCode . '/json'));\n }", "title": "" }, { "docid": "00afda4bd63b57daf34ece93c8fcf882", "score": "0.5219711", "text": "public function getWeatherObject($city);", "title": "" }, { "docid": "0d23520170b25bffc22b492eec56cfe7", "score": "0.5203207", "text": "public static function locatedAt($zip, $street)\n {\n $street=str_replace('-', ' ', $street);\n \n return static::where(compact('zip', 'street'))->firstorFail();\n }", "title": "" }, { "docid": "ef79ce75d6145ef1f58091e185689bdb", "score": "0.52009326", "text": "public function weather($id)\n {\n $tide_location = TideLocation::where('id',$id)->first();\n $weather = WeatherInformation::where('location',$tide_location->location)->get();\n return response()->json(\n $weather\n );\n }", "title": "" }, { "docid": "257ec9043d7a6d71a55354fc14829693", "score": "0.51981264", "text": "public function getFactZipCode() {\n return $this->factZipCode;\n }", "title": "" }, { "docid": "3152a71a427ef25dacbc2678cb3d8c8e", "score": "0.5194486", "text": "function requestWeather($query, $start, $end, $place)\n\t{\t\t\n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_RETURNTRANSFER => 1,\n\t\t\tCURLOPT_URL => 'http://data.fmi.fi/fmi-apikey/0b1ff19b-f688-4511-8893-1472e0978fa5/wfs' . \n\t\t\t\t\t\t\t'?request=getFeature&storedquery_id=' . $query . '&starttime=' . $start .\n\t\t\t\t\t\t\t'&endtime=' . $end . '&timestep=1&place=' . $place\n\t\t));\n\n\t\t$resp = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\n\t\techo $resp;\n\t}", "title": "" }, { "docid": "65912018da8f7c28564ab42e5ee92ed2", "score": "0.5180808", "text": "function calculateWeather($day = 0, $data) {\n // Calculate remaining measurements for this day\n $offset = (24 - intval(date(\"H\")))/3%8;\n // Get the remaining today's measurements and the 8 of the next day\n $days[0] = array_slice($data['list'], 0, $offset);\n $days[1] = array_slice($data['list'], $offset, 8);\n // Initialize arrays\n $ids = array();\n $names = array();\n // Loop all the measurements to find the conditions\n foreach ($days[$day] as $current) {\n // Calculate severity\n $id = $current['weather'][0]['id'];\n if ($id == 800) {\n $ids[] = $this->severity[0];\n }\n else {\n $ids[] = $this->severity[intval($id/100)];\n }\n $names[] = $current['weather'][0]['description'];\n }\n // Return worst conditions\n $max = array_keys($ids, max($ids));\n return $names[$max[0]];\n }", "title": "" }, { "docid": "fa9641e98106acbbc2f16dfe20dced0f", "score": "0.5176428", "text": "public function getByZipCode ($zip, $countryCode = null)\n\t{\n\t\treturn $this->fetch(['zip' => $zip . ($countryCode !== null ? ',' . $countryCode : '')])->getResponseArray();\n\t}", "title": "" }, { "docid": "6187b5d5243a243c792e541047afc53c", "score": "0.51666474", "text": "function get_forecast() {\n\n global $api_key;\n global $latitude; \n global $longitude;\n \n include('forecast.io-php-api/lib/forecast.io.php');\n\n $forecast = new ForecastIO($api_key);\n\n // With their API the only way to get max temp is to get the weekly forecast.\n $conditions_week = $forecast->getForecastWeek($latitude, $longitude);\n\n // Grab the first result from the array which will be for today.\n $high_temp = round($conditions_week[0]->getMaxTemperature());\n\n // Assign a color to each temperature range\n if($high_temp < 29) {$temp_color = \"white\";}\n elseif($high_temp >= 30 && $high_temp <= 39) {$temp_color = 'violet'; }\n elseif($high_temp >= 40 && $high_temp <= 49) {$temp_color = 'lt_blue'; }\n elseif($high_temp >= 50 && $high_temp <= 59) {$temp_color = 'blue'; }\n elseif($high_temp >= 60 && $high_temp <= 69) {$temp_color = 'green'; }\n elseif($high_temp >= 70 && $high_temp <= 79) {$temp_color = 'lt_green';}\n elseif($high_temp >= 80 && $high_temp <= 89) {$temp_color = 'yellow'; }\n elseif($high_temp >= 90 && $high_temp <= 99) {$temp_color = 'orange'; }\n elseif($high_temp >= 100) {$temp_color = 'red'; }\n\n // This seems to be the easiest way to get a summary of sky conditions.\n // Options: clear-day, clear-night, rain, snow, sleet, wind, fog, \n // cloudy, partly-cloudy-day, or partly-cloudy-night\n $atmo = $conditions_week[1]->getIcon();\n\n // Assign a color to each atmospheric condition \n if($atmo == 'clear') {$atmo_color = \"yellow\"; }\n elseif($atmo == 'clear-day') {$atmo_color = \"yellow\"; }\n elseif($atmo == 'clear-night') {$atmo_color = \"yellow\"; }\n elseif($atmo == 'wind') {$atmo_color = \"white\"; }\n elseif($atmo == 'fog') {$atmo_color = \"white\"; }\n elseif($atmo == 'cloudy') {$atmo_color = \"white\"; }\n elseif($atmo == 'partly-cloudy') {$atmo_color = \"white\"; }\n elseif($atmo == 'partly-cloudy-day') {$atmo_color = \"white\"; }\n elseif($atmo == 'partly-cloudy-night') {$atmo_color = \"white\"; }\n elseif($atmo == 'rain') {$atmo_color = \"blue\"; }\n elseif($atmo == 'snow') {$atmo_color = \"blue\"; }\n elseif($atmo == 'sleet') {$atmo_color = \"blue\"; }\n\n $results = array('temp_color' => $temp_color, 'atmo_color' => $atmo_color);\n return $results;\n\n}", "title": "" }, { "docid": "6566cfdeb6075d2ff71a9ee219a46b78", "score": "0.5158853", "text": "public function process_zipcode_update($zipcode = null){\n if(!empty($zipcode)){\n //Get List of Surrounding Zip Codes\n $zipcodes = $this->get_zipcode_radius_data($zipcode);\n //Process Through the Zipcodes\n if(!empty($zipcodes[results])){\n //Validate the Zip Codes\n $zipcode_list = $this->verify_zipcodes($zipcodes[results]);\n //Process Validated Zip Code List\n if(!empty($zipcode_list[results])){\n foreach($zipcode_list[results] as $key=>$item){\n //Get the Last Update Date\n $query = \"SELECT updated FROM zipData WHERE zipcode = '{$item[zipcode]}'\";\n $zipcode_updated = $this->DAO->queryOne($query);\n if($item[result] == \"valid\"){\n if(empty($zipcode_updated)){\n //Insert New Zip Code Record\n //error_log(print_r(\"INSERT: \".$item[zipcode],1));\n $this->insert_zipcode_data($item); \n }elseif((mktime() - strtotime($zipcode_updated)) >= $this->zipcode_data_stale_offset){\n //Update Existing Zip Code Record\n //error_log(print_r(\"UPDATE: \".$item[zipcode],1));\n $this->update_zipcode_data($item);\n }\n }elseif($item[result] == \"invalid\" && !empty($zipcode_updated)){\n //Delete Zip Code Record\n //error_log(print_r(\"DELETE: \".$item[zipcode],1));\n $this->delete_zipcode_data($item);\n }\n }\n return array(\"code\"=>\"200\", \"success\"=>true, \"message\"=>\"Zip Code Update Process Complete\");\n }else{return array(\"code\"=>\"402\", \"success\"=>false, \"error\"=>\"USPS Address API Error\");}\n }else{return array(\"code\"=>\"403\", \"success\"=>false, \"error\"=>\"ZipCodeAPI Error\");}\n }else{return array(\"code\"=>\"401\", \"success\"=>false, \"error\"=>\"Missing Required Arguments\");}\n }", "title": "" }, { "docid": "57dd8f04208a9e20038c5e7b2c8487ea", "score": "0.5155851", "text": "private function extractZip()\n {\n $zip = new \\ZipArchive;\n if ($zip->open($this->zipPath)) {\n // $i starts with 1 because the first entry is just the directory containing everything\n for ($i = 1; $i < $zip->numFiles; $i++) {\n //$zip->extractTo(ELAB_ROOT, array(substr($zip->getNameIndex($i), strpos($zip->getNameIndex($i), '/') + 1)));\n }\n $zip->close();\n }\n }", "title": "" }, { "docid": "f2b2c8ac9898f3ed4f2e81d8c248020b", "score": "0.5153091", "text": "function owmFetch($city_data)\n{\n global $owm_api_key;\n //Create curl request\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_TIMEOUT => 5,\n CURLOPT_URL => 'http://api.openweathermap.org/data/2.5/weather?id='.$city_data['api_id'].'&APPID='.$owm_api_key,\n CURLOPT_USERAGENT => 'Weatherbound'\n ));\n\n //Make request to API\n $response = curl_exec($curl);\n curl_close($curl);\n\n //Parse response\n if ($response)\n {\n $json_data = json_decode($response, true);\n\n if ($json_data && isset($json_data['dt']))\n {\n //Create reading\n $reading = new CurrentReading();\n\n //Read information\n $reading->city_id = $city_data['id'];\n $reading->reading_time = date('Y-m-d H:i:s', $json_data['dt']);\n $reading->temperature = floatval($json_data['main']['temp']) - 273.15;\n $reading->pressure = floatval($json_data['main']['pressure']);\n $reading->humidity = floatval($json_data['main']['humidity']);\n $reading->wind_speed = floatval($json_data['wind']['speed']);\n $reading->wind_direction = intval($json_data['wind']['deg']);\n $reading->cloudiness = intval($json_data['clouds']['all']);\n $reading->sunrise = date('Y-m-d H:i:s', $json_data['sys']['sunrise']);\n $reading->sunset = date('Y-m-d H:i:s', $json_data['sys']['sunset']);\n\n //Read all weather conditions\n $weather_conditions_read = array();\n $day = true;\n foreach ($json_data['weather'] as $weather)\n {\n $day = substr($weather['icon'], 2, 1) == 'd'? '1' : '0';\n array_push($weather_conditions_read, substr($weather['icon'], 0, 2));\n }\n\n //Save day information\n $reading->day = $day;\n\n //Pick only the topmost\n global $weather_conditions;\n foreach ($weather_conditions as $condition_key => $condition_value)\n {\n if (is_integer(array_search($condition_key, $weather_conditions_read)))\n {\n $reading->weather_condition = $condition_value;\n break;\n }\n }\n return $reading;\n }\n else return null;\n }\n else return null;\n}", "title": "" }, { "docid": "43998370f7a994f10df66dd2f8df8b53", "score": "0.51517445", "text": "protected function getWeatherCondition( )\n {\n $weather = new WeatherApi();\n $this->weatherString = $weather->getWeatherStringEmmen();\n\n $weatherParts = explode( ' ', trim( $this->weatherString ));\n $weatherString = implode( array_slice($weatherParts, 3), ' ');\n $weatherString = ( new Translate() )->translate( $weatherString );\n \n return [\n 'weather_location' => $weatherParts[0],\n 'weather_farhenheit' => round( $weatherParts[1], 2),\n 'weather_celcius' => TemperatureConverter::fahrenheitToCelsius( (float)$weatherParts[1], 2 ),\n 'weather_kelvin' => TemperatureConverter::FahrenheitToKelvin( (float)$weatherParts[1], 2 ),\n 'weather_code' => $weatherParts[2],\n 'weather_type' => $weatherString,\n ];\n }", "title": "" }, { "docid": "fa524e25879da9024c7ad9eb93dc6ec2", "score": "0.5135509", "text": "function getWeatherUtc($time) {\n // Send to the OSM-Api\n /*$fp = @fsockopen($_url, 80, $errno, $errstr);\n if (!$fp) {\n return \"$errstr ($errno)\\n\";\n } else {\n fputs($fp, \"GET /tiles/actual/wind_vector/\" .$time .\"/time.txt HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: \" .$_url .\"\\r\\n\");\n fputs($fp, \"Content-type: text/xml; charset=utf-8\\r\\n\");\n fputs($fp, \"Connection: Keep-Alive\\r\\n\\r\\n\");\n\n $header = \"not yet\";\n while (!feof($fp)) {\n $line = fgets($fp, 1024);\n if( $line == \"\\r\\n\" && $header == \"not yet\" ) {\n $header = \"passed\";\n }\n if( $header == \"passed\" ) {\n $_response .= $line;\n }\n }\n }\n fclose($fp);\n //$_response = $response;*/\n\n echo trim($_response);\n }", "title": "" }, { "docid": "6118c66e90179d5ce2f718272af1e720", "score": "0.5114371", "text": "function Get_NOAA_Weather_File() {\r\n\t//Look in options for all codes to retrieve weather for, disregarding duplicates\r\n\t$options = get_option( \"widget_noaa_weather\" );\r\n\t$codes = array(); // holder for codes to check for duplicates\r\n\tforeach ( $options as $key => $value ) {\r\n\t\tif ( is_array($value) ) {\r\n\t\t\t$code = $options[$key][\"noaa_code\"];\r\n\t\t\tif ( $code <> null ) {\r\n\t\t\t\tif ( !in_array($code,$codes) ) {\r\n\t\t\t\t\t$codes[] = $code;\r\n\t\t\t\t\tGet_NOAA_Weather_File_With_HTTP( $code );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "099a1ac84bba5f1332425d24fa5908ea", "score": "0.5085786", "text": "protected function fetchWeatherData($query)\n {\n $query = urlencode($query);\n $url = \"http://api.openweathermap.org/data/2.5/weather?q=$query&units=metric\";\n\n $data = file_get_contents($url);\n if ($data === false) {\n throw new \\Exception(\"Failed loading data from api.openweathermap.org\");\n }\n\n $data = json_decode($data);\n if ($data === false) {\n throw new \\Exception (\"Failed decoding data from api.openweathermap.org\");\n }\n\n if ($data->cod == 404) {\n throw new \\Exception(\"Place \\\"$query\\\" not found\");\n }\n\n return $data;\n }", "title": "" }, { "docid": "0a2c413497bd9e4db70b5dd71bf3712e", "score": "0.5072388", "text": "public function setZipcode($zipcode);", "title": "" }, { "docid": "98432696f97b8bd7042066885b926262", "score": "0.50723463", "text": "public function getFactZipCode(): ?string {\n return $this->factZipCode;\n }", "title": "" }, { "docid": "219be97bc40d2416950fcf96e1af12a8", "score": "0.5060028", "text": "public function getWeatherForecast($country, $city, $lang = 'en', $units = 'metric')\n {\n try {\n $this->client = new Client([\n 'base_uri' => 'http://api.openweathermap.org/data/2.5/',\n 'timeout' => 5.0,\n ]);\n\n $response = $this->client->request('GET', 'forecast', [\n 'query' => [\n 'q' => $city . ',' . $country,\n 'units' => $units,\n 'lang' => $lang,\n 'APPID' => $this->apiKey\n ],\n ]);\n\n } catch (RequestException $exception) {\n $response = json_decode($exception->getResponse()->getBody(), true);\n abort($response['cod'], $response['message']);\n }\n\n if (!$response || $response->getStatusCode() !== 200) throw new Exception('It was not possible to get wather information.');\n\n try {\n $dataArr = json_decode($response->getBody()->getContents());\n $weather = $this->parseWeather($dataArr); \n } catch (Exception $exception) {\n abort(500, $exception->getMessage());\n }\n\n return $weather;\n }", "title": "" }, { "docid": "f61d0025de481359f475617bc3a337f1", "score": "0.50575644", "text": "public function getWeather($city)\n {\n $mainMetrics = $this->firstWeatherApi->getMainMetrics($city);\n\n return new Adapter\\Weather(\n (float) $mainMetrics['temp'],\n (float) $mainMetrics['humidity'],\n (float) $mainMetrics['pressure']\n );\n }", "title": "" }, { "docid": "131823e0f518b71ba2476e244c36d894", "score": "0.5053134", "text": "public function weather()\n {\n $user_id = Auth::id();\n $user = User::find($user_id);\n\n $weather = app(WeatherController::class)->local($user->coor);\n $html = View::make('layouts.weatherwidget', compact('weather'))->render();\n\n return Response::json(['html' => $html]);\n }", "title": "" }, { "docid": "86bbd60f763a94bbbf3e410e0da4861c", "score": "0.5051065", "text": "function zip_search($userZip){\n\n $args = array(\n 'posts_per_page' => -1,\n\t'post_type' => 'Location',\n\t'post_status' => ('publish')\n\t\n );\n\n\n$wp_query = new WP_Query($args); \n//var_dump($wp_query);\nif( $wp_query->have_posts() ): while( $wp_query->have_posts() ) : $wp_query->the_post();\n $zipField=get_field('zip_codes_services');\n \n $zipString = $zipField . ', ';\t\t\n \n $array = explode(', ' , $zipString); //split string into array seperated by ', '\n\t\t \n foreach($array as $value) //loop over values\n {\n\t\t\t$cityField=get_field('city');\n\t\t\t$stateField=get_field('state');\n \t\t\t \n if($value==$userZip){\n\t\t\t\t\t\t \n return ($cityField . '<br>' . $stateField); //print \n }\t\n \n }\n endwhile; \n wp_reset_postdata(); \nendif;\n}", "title": "" }, { "docid": "365f2f78cf75188062aa002e25bfe7d4", "score": "0.50478476", "text": "function getLatandLongZip($Zip)\n{ \n\tglobal $lat;\n\tglobal $lng;\n \n $doc = new DOMDocument();\n $doc->load(\"http://maps.google.com/maps/api/geocode/xml?address=\".$Zip.\"&sensor=false\"); //input address\n \n //traverse the nodes to get to latitude and longitude\n $results = $doc->getElementsByTagName(\"result\");\n $results = $results->item(0);\n $results = $results->getElementsByTagName(\"geometry\");\n $results = $results->item(0);\n $results = $results->getElementsByTagName(\"location\");\n \n foreach($results as $result)\n\t\t{\n\t\t$lats = $result->getElementsByTagName(\"lat\");\n\t\t$lat = $lats->item(0)->nodeValue;\n \n\t\t$lngs = $result->getElementsByTagName(\"lng\");\n\t\t$lng = $lngs->item(0)->nodeValue;\n\t\t} \n $location = array($lat,$lng);\n return $location;\n}", "title": "" } ]
1f15c439e44ed23c2b3eb2546bf56a05
Returns the currently resolved layout or null if no layout was resolved.
[ { "docid": "f7bb5794cb8f73ef7e8d09f2956a61ed", "score": "0.73433167", "text": "public function getLayout(): ?Layout\n {\n $layoutView = $this->getLayoutView();\n if (!$layoutView instanceof LayoutViewInterface) {\n return null;\n }\n\n return $layoutView->getLayout();\n }", "title": "" } ]
[ { "docid": "e08af59cf686ab0bc382fc33b9693997", "score": "0.76948726", "text": "public function getLayout(): ?string\n {\n return $this->_layout;\n }", "title": "" }, { "docid": "2598af2bd090728f1f61e737d37a22c3", "score": "0.7184735", "text": "public function get_layout()\n\t\t{\n\t\t\treturn $this->layout;\n\t\t}", "title": "" }, { "docid": "d33b7ce6844a5f1b55fe95d14f70e53e", "score": "0.70913047", "text": "public function getLayout() {\n return $this->_layout;\n }", "title": "" }, { "docid": "f905b9f6d6901ba35b1d4e9c9453591f", "score": "0.70870054", "text": "public function getLayout()\n {\n return $this->layout;\n }", "title": "" }, { "docid": "7636139cf876c1dc653f1d00470d317d", "score": "0.7065449", "text": "public function getLayout()\r\n {\r\n return $this->layout;\r\n }", "title": "" }, { "docid": "7636139cf876c1dc653f1d00470d317d", "score": "0.7065449", "text": "public function getLayout()\r\n {\r\n return $this->layout;\r\n }", "title": "" }, { "docid": "306b3fd4eca0a00665aae9ddb5068673", "score": "0.7039453", "text": "function reqLayout() {\n is_scalar($this->layout) and $this->layout = $this->layout();\n\n if (is_object($this->layout)) {\n return $this->layout;\n } else {\n $name = $this->name.'@'.$this->currentAction;\n throw new EPlarx(\"No default layout specified for [$name].\");\n }\n }", "title": "" }, { "docid": "2b8a0d9379d585f832014789376a9e9e", "score": "0.7023739", "text": "public function getLayout() {\r\n\t\treturn $this->layout;\t\t\r\n\t}", "title": "" }, { "docid": "cce8e8a61d2a6117d9926f68551fdb0b", "score": "0.70062876", "text": "public function getLayoutPath(): ?string\n {\n return $this->_layoutPath;\n }", "title": "" }, { "docid": "2196e884a205627233694b2f4cf23a44", "score": "0.70052093", "text": "public function getLayout()\r\n\t{\r\n\t\treturn $this->layout;\r\n\t}", "title": "" }, { "docid": "8883d357d7861d3ff0fbaaa3d8f9c284", "score": "0.69984514", "text": "public function getLayout()\n {\n return $this->_getValue('layout');\n }", "title": "" }, { "docid": "f19f01cdee72986d8183daf21ca0880d", "score": "0.6966736", "text": "public function getLayout()\n\t\t{\n\t\t\treturn $this->layout;\n\t\t}", "title": "" }, { "docid": "18b596e73867dca1c94dea66239c67da", "score": "0.69188344", "text": "final public function getLayout() {\n\t\treturn $this->_baseView->layout;\n\t}", "title": "" }, { "docid": "baf32cf363fc9c36fdddb2ba794d6b55", "score": "0.67702156", "text": "public function getLayout(){\n\n return $this->layout;\n\n }", "title": "" }, { "docid": "9eb17dfd9be6888fbacdc260cb4c03de", "score": "0.6763069", "text": "public function getLayout() {\n\t\tif (!$this->layout) {\n\t\t\t// get the view definition. We give it the raw component hierarchy and let\n\t\t\t// the factory component sort out what classes are actually required.\n\t\t\t$this->layout = NLComponent::factory($this->rawComponents, $this);\n\t\t}\n\t\treturn $this->layout;\n\t}", "title": "" }, { "docid": "7bd67da046bc4917e2caadda16ea40ff", "score": "0.6739309", "text": "function return_layout(){\n return $this->layout;\n }", "title": "" }, { "docid": "060c08176590ef073c185b68be6616cc", "score": "0.67316777", "text": "public function getLayoutView()\n {\n $currentRequest = $this->requestStack->getCurrentRequest();\n $masterRequest = $this->requestStack->getMasterRequest();\n\n if (!$currentRequest instanceof Request || !$masterRequest instanceof Request) {\n return null;\n }\n\n if ($masterRequest->attributes->has('ngbmExceptionLayoutView')) {\n if ($currentRequest !== $masterRequest || !$masterRequest->attributes->has('ngbmLayoutView')) {\n return $masterRequest->attributes->get('ngbmExceptionLayoutView');\n }\n }\n\n return $masterRequest->attributes->get('ngbmLayoutView');\n }", "title": "" }, { "docid": "e579c81fe33cb49ae9845f474eaa6ed9", "score": "0.66195196", "text": "public function getLayout(): Layout;", "title": "" }, { "docid": "725435eacd4c20b2a873fa4f8b4a387d", "score": "0.6604101", "text": "public function getPageLayoutTemplate(): ?string\n {\n return $this->pageLayoutTemplate;\n }", "title": "" }, { "docid": "4f2e0207e03f7012ae3bd6b2124c3eac", "score": "0.6486644", "text": "public function getLayout();", "title": "" }, { "docid": "4f2e0207e03f7012ae3bd6b2124c3eac", "score": "0.6486644", "text": "public function getLayout();", "title": "" }, { "docid": "4f2e0207e03f7012ae3bd6b2124c3eac", "score": "0.6486644", "text": "public function getLayout();", "title": "" }, { "docid": "4e6bf01eb4ca25523f1ed2290d20d992", "score": "0.64743084", "text": "protected function getStaticLayout() {\r\n\t\treturn self::$_layout;\r\n\t}", "title": "" }, { "docid": "a0fc6e0206b7b36300e25a40a5b39389", "score": "0.6412823", "text": "public static function getActiveLayout()\n\t{\n\t\tif (Session::has('layout')) {\n\t\t\treturn Session::get('layout');\n\t\t}\n\t\treturn \\App\\Config::main('defaultLayout');\n\t}", "title": "" }, { "docid": "a0fa166b16470c4d0aecd272483737db", "score": "0.6392992", "text": "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "title": "" }, { "docid": "a0fa166b16470c4d0aecd272483737db", "score": "0.6392992", "text": "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "title": "" }, { "docid": "a0fa166b16470c4d0aecd272483737db", "score": "0.6392992", "text": "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "title": "" }, { "docid": "a0fa166b16470c4d0aecd272483737db", "score": "0.6392992", "text": "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "title": "" }, { "docid": "a0fa166b16470c4d0aecd272483737db", "score": "0.6392992", "text": "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "title": "" }, { "docid": "7eb4209eba6524b757ba4d9100600166", "score": "0.63820934", "text": "public function getLayout()\n {\n if (array_key_exists(\"layout\", $this->_propDict)) {\n if (is_a($this->_propDict[\"layout\"], \"\\Beta\\Microsoft\\Graph\\Model\\HorizontalSectionLayoutType\") || is_null($this->_propDict[\"layout\"])) {\n return $this->_propDict[\"layout\"];\n } else {\n $this->_propDict[\"layout\"] = new HorizontalSectionLayoutType($this->_propDict[\"layout\"]);\n return $this->_propDict[\"layout\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "1fb6862539d3cc44b3cf0ee47620858c", "score": "0.6374938", "text": "function wfc_get_get_layout( $id ) {\r\n\r\n\t$page_layout = genesis_get_layout( $id );\r\n\r\n\tif ( is_null( $page_layout ) ) {\r\n\t\t$page_layout = genesis_get_default_layout();\r\n\t}\r\n\r\n\treturn $page_layout;\r\n}", "title": "" }, { "docid": "0099703b22500ebbd56c164df9a0f380", "score": "0.63698804", "text": "function get_layout_settings()\r\n {\r\n if (is_null($this->layout))\r\n $this->set_layout($this->get_data_manager()->retrieve_course_type_layout($this->get_id()));\r\n return $this->layout;\r\n }", "title": "" }, { "docid": "0b218fa16c2bfcff4f0b1f9b86a605da", "score": "0.6314027", "text": "protected function getStaticLayout() {\r\n return self::$_layout;\r\n }", "title": "" }, { "docid": "de4b496e6a340fe7d2526c93c607621b", "score": "0.6310743", "text": "public function getPageLayout()\n {\n if (array_key_exists(\"pageLayout\", $this->_propDict)) {\n if (is_a($this->_propDict[\"pageLayout\"], \"\\Beta\\Microsoft\\Graph\\Model\\PageLayoutType\") || is_null($this->_propDict[\"pageLayout\"])) {\n return $this->_propDict[\"pageLayout\"];\n } else {\n $this->_propDict[\"pageLayout\"] = new PageLayoutType($this->_propDict[\"pageLayout\"]);\n return $this->_propDict[\"pageLayout\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "0d9bae36932d2de9841d30c48cbb6683", "score": "0.6213283", "text": "public function getLayout()\n {\n }", "title": "" }, { "docid": "5b73d987442373919ce58c037e4b7255", "score": "0.61777", "text": "public function getLayout()\r\n\t{\r\n\t\t$model = ContentMetadata::model()->findByAttributes(array('content_id' => $this->id, 'key' => 'layout'));\r\n\t\treturn $model === NULL ? 'blog' : $model->value;\r\n\t}", "title": "" }, { "docid": "ecd13a3a5e94ad42cf27b4951ef474dd", "score": "0.61359495", "text": "public function layout()\n {\n $layout = (string) $this->layout;\n return (0 === strpos($layout, 'name: ')) ? View::of(substr($layout, 6)) : View::make($layout);\n }", "title": "" }, { "docid": "ad2cf3f787d88e7aa79715d3fe3a8274", "score": "0.6115898", "text": "function determine_layout ($full_path = true) {\n\t\tif ( isset($this->layout) && is_null($this->layout) ) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// if _determine_layout() is defined in controller, call it to get layout name\n\t\tif ( method_exists($this, Znap::$protected_method_prefix.'determine_layout') ) {\n\t\t\t$determine_layout_method = Znap::$protected_method_prefix.'determine_layout';\n\t\t\t$layout = $this->$determine_layout_method();\n\t\t} else {\n\t\t\t$layout = ( isset($this->layout) && $this->layout != '' ) ? $this->layout : $this->controller ;\n\t\t}\n\t\t\n\t\t// defaults\n\t\t$layouts_base_path = Znap::$layouts_path;\n\t\t$default_layout_file = $layouts_base_path.'/application.'.Znap::$views_extension;\n\t\t\n\t\tif ( !$full_path && $layout ) {\n\t\t\t$layout_file = $layout;\n\t\t} elseif ( strstr($layout, '/') && is_file($layouts_base_path.'/'.$layout.'.'.Znap::$views_extension) ) {\n\t\t\t$layout_file = $layouts_base_path.'/'.$layout.'.'.Znap::$views_extension;\n\t\t} elseif ( is_file($this->layouts_path.'/'.$layout.'.'.Znap::$views_extension) ) {\n\t\t\t$layout_file = $this->layouts_path.'/'.$layout.'.'.Znap::$views_extension;\n\t\t} elseif ( is_file($layouts_base_path.'/'.$layout.'.'.Znap::$views_extension) ) {\n\t\t\t$layout_file = $layouts_base_path.'/'.$layout.'.'.Znap::$views_extension;\n\t\t} else {\n\t\t\t$layout_file = $default_layout_file;\n\t\t}\n\t\t\n\t\treturn $layout_file;\n\t}", "title": "" }, { "docid": "3a099cfaf98aba1f633a6a1ec53cf75d", "score": "0.61155015", "text": "public function __get($name) {\n return (isset($this->_layout->$name)) ? $this->_layout->$name : null;\n }", "title": "" }, { "docid": "2178d6853c4d175be5b08be2a6919fbe", "score": "0.61143196", "text": "public function getLayoutId()\n {\n return $this->layoutId;\n }", "title": "" }, { "docid": "0208725b441a9076ae796ffe5d50abb0", "score": "0.6106056", "text": "public function get_layout_data() {\r\n return $this->layout_data;\r\n }", "title": "" }, { "docid": "c6a79e9499534dd5d59599a94b81adc1", "score": "0.609327", "text": "public function getCanvasLayout()\n {\n if (array_key_exists(\"canvasLayout\", $this->_propDict)) {\n if (is_a($this->_propDict[\"canvasLayout\"], \"\\Beta\\Microsoft\\Graph\\Model\\CanvasLayout\") || is_null($this->_propDict[\"canvasLayout\"])) {\n return $this->_propDict[\"canvasLayout\"];\n } else {\n $this->_propDict[\"canvasLayout\"] = new CanvasLayout($this->_propDict[\"canvasLayout\"]);\n return $this->_propDict[\"canvasLayout\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "f5629949a4a904f693c21926b02ca896", "score": "0.6071642", "text": "public function getLayoutPath()\r\n {\r\n return $this->layoutPath;\r\n }", "title": "" }, { "docid": "18ea27a32ae9e31a63a752c22be40ebf", "score": "0.60598713", "text": "public function inputLayout()\n {\n if ($this->inputLayout === null) {\n return $this->defaultInputLayout();\n }\n\n return $this->inputLayout;\n }", "title": "" }, { "docid": "b26b0100385b5ea0c72b38544539e937", "score": "0.6041489", "text": "public function getTarget(): LayoutInterface\n {\n return $this->target;\n }", "title": "" }, { "docid": "cce00791d734a211f7946119cb164d39", "score": "0.60224724", "text": "public function getAmpLayout()\n {\n return $this->get(self::AMP_LAYOUT);\n }", "title": "" }, { "docid": "87159c9041e2d7a892248a54d9d2172e", "score": "0.59585243", "text": "public function getLayout()\r\n {\r\n return $this->belongsToLayout;\r\n }", "title": "" }, { "docid": "2f1ef77b088fa586b92d35c54eb4dec5", "score": "0.5946071", "text": "public function getThemeLayout();", "title": "" }, { "docid": "9bbfd17636aa21d0a5169047ad936a25", "score": "0.59261304", "text": "function getLayoutTemplate() {\n if ($this->layout) {\n return $this->layout;\n }\n else {\n $this->theme_type = isset($this->theme_type) ? $this->theme_type : 'public';\n $setting = 'theme.' . $this->theme_type;\n $this->layout = mm_getConfigValue('filepaths.themes') . '/' .\n mm_getSetting($setting, mm_getConfigValue($setting)) .\n '/layout';\n return $this->layout;\n }\n }", "title": "" }, { "docid": "00d570ca3879127adf5b351a8f3d3645", "score": "0.58849317", "text": "function getLayout($id);", "title": "" }, { "docid": "65df5effe5ab4e40441db150586e2a7e", "score": "0.585868", "text": "public function getRule(): ?Rule\n {\n $layoutView = $this->getLayoutView();\n if (!$layoutView instanceof LayoutViewInterface) {\n return null;\n }\n\n return $layoutView->getParameter('rule');\n }", "title": "" }, { "docid": "b06ca7658a7bcafa4ddbbecafd08e63b", "score": "0.5857133", "text": "protected function getLayoutCore(){\n\t\treturn $this->_layout;\n\t}", "title": "" }, { "docid": "5d83e77a8331182766c32764723a2629", "score": "0.5856465", "text": "public function getLayoutFile()\n {\n $this->_lazyLoadBookXml();\n if ($this->_bookXml->theme && $this->_bookXml->theme->template) {\n $file = $this->_bookDataPath . (string) $this->_bookXml->theme->template[\"file\"];\n return preg_replace('/\\.phtml$/', '', $file); // Strip out suffix\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "c123d08e76abf09b0bd8c1c0a5f49e5a", "score": "0.58321816", "text": "public function getLayoutId();", "title": "" }, { "docid": "607406550014a3080b9a241395d39e4a", "score": "0.5831712", "text": "public function getLayout()\n\t\t\t{\n\t\t\t\t$layout[100]\t= \"common/v_layout\";\n\t\t\t\t$layout[101]\t= \"common/v_layout_header\";\n\t\t\t\t$layout[102]\t= \"common/v_layout_menu_admin_lsp\";\n\t\t\t\t$layout[103]\t= \"common/v_layout_title\";\n\t\t\t\t$layout[104]\t= \"common/v_layout_footer\";\n\t\t\t\t$layout[105]\t= \"common/v_layout_menu_asesi\";\n\t\t\t\t$layout[106]\t= \"common/v_layout_menu_asesor\";\n\t\t\t\treturn $layout;\n\t\t\t}", "title": "" }, { "docid": "b3fd510679a3f70a0d4aee3af4bc68dd", "score": "0.5830812", "text": "private function getLayoutService()\n {\n if (null === $this->layoutService) {\n $this->layoutService = $this->getServiceManager()->get('playgroundcms_layout_service');\n }\n\n return $this->layoutService;\n }", "title": "" }, { "docid": "cf384de6eddf3a3d107a5bf288ec2f13", "score": "0.5761901", "text": "public function getLayoutXml() {\n Varien_Profiler::start( 'turpentine::helper::esi::getLayoutXml' );\n if( is_null( $this->_layoutXml ) ) {\n if( $useCache = Mage::app()->useCache( 'layout' ) ) {\n $cacheKey = $this->getFileLayoutUpdatesXmlCacheKey();\n $this->_layoutXml = simplexml_load_string(\n Mage::app()->loadCache( $cacheKey ) );\n }\n // this check is redundant if the layout cache is disabled\n if( !$this->_layoutXml ) {\n $this->_layoutXml = $this->_loadLayoutXml();\n if( $useCache ) {\n Mage::app()->saveCache( $this->_layoutXml->asXML(),\n $cacheKey, array( 'LAYOUT_GENERAL_CACHE_TAG' ) );\n }\n }\n }\n Varien_Profiler::stop( 'turpentine::helper::esi::getLayoutXml' );\n return $this->_layoutXml;\n }", "title": "" }, { "docid": "d25cf97b65671e486de485b778a394c6", "score": "0.57145655", "text": "public function getLayoutTemplate() {\n\t\treturn $this->layoutTemplate;\n\t}", "title": "" }, { "docid": "cff0aca22fdd7d3a2132eb841664074c", "score": "0.57112455", "text": "public static function getLayout()\r\n\t{\r\n\t\treturn Vi_Layout::getMvcInstance();\r\n\t}", "title": "" }, { "docid": "db7581fc2dc89c0760f51753b2b27051", "score": "0.5694347", "text": "public function findLayoutTemplateFile()\n\t{\n\t\tif ($this->layout === FALSE) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif($this->staticLayout === FALSE) {\n\t\t\t$files = $this->formatLayoutTemplateFiles();\n\t\t\t\n\t\t\tforeach ($files as $file) {\n\t\t\t\tif (is_file($file)) {\n\t\t\t\t\treturn $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (is_file($this->layout)) {\n\t\t\t\treturn $this->layout;\n\t\t\t}\t\n\t\t}\n\n\t\tif ($this->layout) {\n\t\t\t$file = preg_replace('#^.*([/\\\\\\\\].{1,70})\\z#U', \"\\xE2\\x80\\xA6\\$1\", reset($files));\n\t\t\t$file = strtr($file, '/', DIRECTORY_SEPARATOR);\n\t\t\tthrow new Nette\\FileNotFoundException(\"Layout not found. Missing template '$file'.\");\n\t\t}\n\t}", "title": "" }, { "docid": "e27bc66dd503e5c475f6a683ae6acbd1", "score": "0.5692492", "text": "protected function getLayoutMapper()\n {\n if (empty($this->layoutMapper)) {\n $this->setLayoutMapper($this->getServiceManager()->get('playgroundcms_layout_mapper'));\n }\n\n return $this->layoutMapper;\n }", "title": "" }, { "docid": "9eee5cf472519e2b4e691ff6cb1a0dc4", "score": "0.56898683", "text": "public function getLayout($template);", "title": "" }, { "docid": "88368b38e35e20c59bcc4e713d05f940", "score": "0.5687088", "text": "public function getLayoutTemplate(string $context = ViewInterface::CONTEXT_DEFAULT): ?string\n {\n $layoutView = $this->buildLayoutView($context);\n if (!$layoutView instanceof LayoutViewInterface) {\n return $this->getPageLayoutTemplate();\n }\n\n return $layoutView->getTemplate();\n }", "title": "" }, { "docid": "467953262efeb92a89575423edf5ac67", "score": "0.5670215", "text": "public function getLayoutPath()\n {\n $config = \\Yaf\\Application::app()->getConfig()->get('application');\n return $this->layout_path . \"/\" . $this->layout . \".{$config->view->ext}\";\n }", "title": "" }, { "docid": "c82e91794b978e84c6e7729bcd4fe909", "score": "0.56586593", "text": "protected function _defaultLayout()\n {\n $layout = new Phtml($this->_container->getResource('LayoutPath') . DIRECTORY_SEPARATOR . 'layout.phtml');\n\n $layout->setRouter($this->_container->getResource('Router'));\n $layout->setViewHelperBroker($this->_container->getResource('ViewHelperBroker'));\n $layout->setCache($this->_container->getResource('Cache'));\n\n return $layout;\n }", "title": "" }, { "docid": "15afe4a7dfbbd69c6e7de7b885fec47b", "score": "0.56540054", "text": "function get_layout_path() {\n\t\tif (substr($this->layout, 0, 1) == '/') {\n\t\t\treturn $this->layout;\t\t\t\n\t\t} else {\n\t\t\treturn TEMPLATE_PATH.'layouts/'.$this->layout.'.php';\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "712be02ea9338985cdba9826c1eead13", "score": "0.564833", "text": "public function getPageLayoutTemplate(): string\n {\n $this->pageLayoutTemplate = $this->pageLayoutTemplate ?? $this->pageLayoutResolver->resolvePageLayout();\n\n return $this->pageLayoutTemplate;\n }", "title": "" }, { "docid": "545b675ea4fe3046618d94d6630cac4f", "score": "0.5575752", "text": "public function getLayoutTemplate()\n {\n if (isset($this->config['layout'])) {\n $layout = $this->config['layout'];\n } else {\n $layout = sprintf('layout-%s', Pi::engine()->section());\n }\n return $layout;\n }", "title": "" }, { "docid": "3a95e26df3df194fb287278c5a4b94be", "score": "0.55671537", "text": "private function buildLayoutView(string $context = ViewInterface::CONTEXT_DEFAULT)\n {\n $currentRequest = $this->requestStack->getCurrentRequest();\n $masterRequest = $this->requestStack->getMasterRequest();\n\n if (!$currentRequest instanceof Request || !$masterRequest instanceof Request) {\n return null;\n }\n\n if ($masterRequest->attributes->has('ngbmExceptionLayoutView')) {\n // After an exception layout is resolved, this case either means that\n // the main layout does not exist at all (because the error\n // happened before the rendering) or that it is already resolved\n // (if the error happened in subrequest), so this is a subsequent\n // call where we can safely return null in all cases.\n return null;\n }\n\n if (\n !$currentRequest->attributes->has('exception') &&\n $masterRequest->attributes->has('ngbmLayoutView')\n ) {\n // This is the case where we request the main layout more than once\n // within the regular page display, without the exception, so again\n // we return null.\n return null;\n }\n\n // Once we're here, we either request the main layout when there's no\n // exception, or the exception layout (both of those for the first time).\n\n $layoutView = false;\n\n $resolvedRule = $this->layoutResolver->resolveRule();\n if ($resolvedRule instanceof Rule) {\n $layoutView = $this->viewBuilder->buildView(\n $resolvedRule->getLayout(),\n $context,\n [\n 'rule' => $resolvedRule,\n ]\n );\n }\n\n $masterRequest->attributes->set(\n $currentRequest->attributes->has('exception') ?\n 'ngbmExceptionLayoutView' :\n 'ngbmLayoutView',\n $layoutView\n );\n\n return $layoutView;\n }", "title": "" }, { "docid": "96055d6985f3c4b7303facf84b3be179", "score": "0.5558867", "text": "function thb_get_theme_layout() {\n\t\t$thb_theme_layout = thb_get_option( 'theme_layout' );\n\n\t\tif( empty( $thb_theme_layout ) ) {\n\t\t\t$thb_theme_layout = 'thb-theme-layout-a';\n\t\t}\n\n\t\t$thb_theme_layout = apply_filters( 'thb_theme_layout', $thb_theme_layout );\n\t\treturn $thb_theme_layout;\n\t}", "title": "" }, { "docid": "4548559fdacf64d90625b96fa6057c7d", "score": "0.55416846", "text": "private static function getStandardLayout() {\n\t\tstatic::new();\n\n try {\n\t\t\t$apiResponse=static::$module_instance->getAllLayouts();\n\n } catch (\\Exception $e) {\n // return [];\n\t\t\techo 'Caught exception: ', $e->getMessage(), \"\\n\";\n\t\t\treturn [];\n\t\t}\n\n\t\t$layouts=$apiResponse->getData();\n\t\tif (count($layouts) < 1) return [];\n\n\t\treturn $layouts[0];\n\t}", "title": "" }, { "docid": "cb049cf1c3a6f05d41c6b3750173e749", "score": "0.5535907", "text": "public static function get_layout($layout, moodle_page $page = null) {\n global $PAGE;\n\n if (is_null($page)) {\n $page = $PAGE;\n }\n if (!self::layout_exists($page, $layout)) {\n throw new coding_exception(\"Layout does not exist in current theme: $layout\");\n }\n return $page->theme->layouts[$layout];\n }", "title": "" }, { "docid": "8990c83112f2a98a04d26fb64bc9ed32", "score": "0.5512062", "text": "protected function _loadLayoutXml() {\n Varien_Profiler::start( 'turpentine::helper::esi::_loadLayoutXml' );\n $design = Mage::getDesign();\n $layoutXml = Mage::getSingleton( 'core/layout' )\n ->getUpdate()\n ->getFileLayoutUpdatesXml(\n $design->getArea(),\n $design->getPackageName(),\n $design->getTheme( 'layout' ),\n Mage::app()->getStore()->getId() );\n Varien_Profiler::stop( 'turpentine::helper::esi::_loadLayoutXml' );\n return $layoutXml;\n }", "title": "" }, { "docid": "58a59193f2077689d076b3e98fc8e0ae", "score": "0.5505599", "text": "protected function _defaultLayoutPath()\n {\n $applicationConfig = $this->_container->getResource('ApplicationConfig');\n $config = $this->_container->getResource('Config');\n\n if (isset($config->mvc->layoutPath)) return $config->mvc->layoutPath;\n\n if (isset($applicationConfig->layoutPath)) return $applicationConfig->layoutPath;\n\n return ('application/packages/main/layouts/default');\n }", "title": "" }, { "docid": "e64a5f78e7fe84ad7993f7a20cea1126", "score": "0.55024135", "text": "public function prepare_layout($layout_script = NULL)\n {\n $layout = parent::prepare_layout($layout_script);\n return $layout;\n }", "title": "" }, { "docid": "e64a5f78e7fe84ad7993f7a20cea1126", "score": "0.55024135", "text": "public function prepare_layout($layout_script = NULL)\n {\n $layout = parent::prepare_layout($layout_script);\n return $layout;\n }", "title": "" }, { "docid": "8607c6fa1a563a6efb9252600009fdfc", "score": "0.54767525", "text": "function x_get_site_layout() {\n return x_get_option( 'x_layout_site' );\n}", "title": "" }, { "docid": "4123df8682df1450e805938731fa9846", "score": "0.5471756", "text": "public static function layout($tag, $default = 'blog.layouts.index'){\n $layout = static::whereTag($tag)->pluck('layout');\n //pluck('key') retrive all values for a given key from a collection\n //Sometime a collection has multile records, in this case only one\n\n return $layout ?: $default;\n }", "title": "" }, { "docid": "3bdec8f6a1b075a0a8cbf5f938311966", "score": "0.54642844", "text": "public function getLayoutName(): string {\r\n return $this->getFrontController()->getLayoutName();\r\n }", "title": "" }, { "docid": "9a947c3206f87592bd8ab9b59e1e1adf", "score": "0.54522103", "text": "public function getCurrentLayoutTemplate(){\n $theme_schema = $this->builder->getCurrentThemeSchema();\n if(array_key_exists('theme',$theme_schema)){\n $currentThemePath = $this->container->get('layout.layout_theme.helper')->getThemeBundle().'::themes/'.$theme_schema['theme'].'/';\n return $currentThemePath.$theme_schema['template'];\n }\n return '';\n }", "title": "" }, { "docid": "451b4d116169f5d65cc3e7f68cc1a4b3", "score": "0.5401465", "text": "public function finalizeDispatch() {\n\t\t$layout = $this->router->getLayout();\n\t\tif ( $layout ) {\n\t\t\treturn $layout->render();\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "14371bb7be1125a8c5419ae8407c4dd3", "score": "0.54002386", "text": "function getLayout()\n{\n $layout = 'layouts.student.studentlayout';\n if (Is_Owner()) {\n $layout = 'layouts.admin.adminlayout';\n }\n if (is_parent()) {\n $layout = 'layouts.parent.parentlayout';\n }\n\n if (is_teacher()) {\n $layout = 'layouts.staff.stafflayout';\n }\n\n if (is_student_guide()) {\n $layout = 'layouts.student_guide.studentGuidelayout';\n }\n\n if (Is_Librarian()) {\n $layout = 'layouts.librarian.librarianlayout';\n }\n if (Is_Secondary_parent()) {\n $layout = 'users.secondary-parent.dashboard';\n }\n return $layout;\n}", "title": "" }, { "docid": "9f2adbde30346659d74bd0e302361a47", "score": "0.53996056", "text": "public function getLayoutType(): LayoutTypeInterface\n {\n return $this->layoutType;\n }", "title": "" }, { "docid": "5e7d638178b3b87acdf51b37329388a1", "score": "0.539914", "text": "static private function LoadLayout ()\n {\n /// What about loading layout from cache?\n if ( self::$Config['UseCaching'] && self::IsCacheOk(self::$Config['LayoutListXML']) )\n {\n self::$LayoutList = require(self::GetCacheName(self::$Config['LayoutListXML']));\n }\n else\n {\n /// Load DOM, parse it and cache it if needed\n self::LoadDOM(self::$Config['LayoutListXML'], self::$LayoutListDOM);\n self::ParseLayoutListDOM();\n\n /// Cache it to get a perfomance bonus in future\n if ( self::$Config['UseCaching'] )\n {\n self::DumpArrayToCache(self::$LayoutList, self::GetCacheName(self::$Config['LayoutListXML']));\n }\n }\n\n /// Load requested layout if possible, load default one otherwise\n if ( !array_key_exists($_GET['a'], self::$LayoutList) )\n {\n if ( array_key_exists(self::$Config['DefaultLayout'], self::$LayoutList) )\n {\n self::$Layout = self::$LayoutList[self::$Config['DefaultLayout']];\n trigger_error(\"Requested layout not found, default layout '\".self::$Config['DefaultLayout'].\"' loaded!\", E_USER_WARNING);\n }\n else\n {\n trigger_error(\"Default layout '\".self::$Config['DefaultLayout'].\"' not found in layout list!\", E_USER_ERROR);\n }\n }\n else\n {\n self::$Layout = self::$LayoutList[$_GET['a']];\n }\n \n /// Layout loaded!\n }", "title": "" }, { "docid": "cc2af8cc4523faa8df56c25ea30e7ce3", "score": "0.5396882", "text": "public function findLayoutByFile($file)\n {\n $layouts = $this->getCachedLayouts();\n $file = (string) $file;\n\n if (empty($layouts[$file])) {\n return '';\n }\n\n return $layouts[$file];\n }", "title": "" }, { "docid": "9f55bf424eaf7790689259356a9faa45", "score": "0.53945845", "text": "function getDefaultLayout()\n {\n return 'flow';\n }", "title": "" }, { "docid": "9396fd7a249dab33386a516cc043f72a", "score": "0.5387356", "text": "public function getSource()\n {\n return 'theme_layout';\n }", "title": "" }, { "docid": "ecb23637bc23769ca9b097ace4b100ee", "score": "0.53799856", "text": "protected function layout($layout = NULL)\n\t{\n\t\tif($layout === NULL)\n\t\t{\n\t\t\treturn $this->_layout;\n\t\t}\n\t\t$this->_layout = (string) $layout;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "115492739567689a1f23071881c3501e", "score": "0.53730965", "text": "public function getLayoutError()\n {\n if (isset($this->config['layout_error'])) {\n $layout = $this->config['layout_error'];\n } else {\n $layout = 'layout-error';\n }\n return $layout;\n }", "title": "" }, { "docid": "f3aaf4b4f902a57b66f140326cc2869a", "score": "0.53619856", "text": "public static function getDefaultArticleLayout() {\n return Engine::getConfig('modules', 'Cms', 'defaults', 'articleLayout');\n }", "title": "" }, { "docid": "b3558c5c502adf9bdfb3706e98321ffb", "score": "0.5330332", "text": "public function getLayoutTemplatePath() {\n\t\treturn $this->layoutTemplatePath;\n\t}", "title": "" }, { "docid": "abed1340d1ca5459db36d9f2bea5c2c3", "score": "0.53006107", "text": "private function getHandle()\n {\n $request = Core_Model_Request::getInstance();\n $layoutHandle = strtolower($request->getModule() . '_' . $request->getController() . '_' . substr($request->getAction(), 0, -6));\n return $layoutHandle;\n }", "title": "" }, { "docid": "c79fc1d6f9e48b5b381126a355f791e0", "score": "0.52936536", "text": "public abstract function getLayoutData ();", "title": "" }, { "docid": "2e38d83daab16d482cb062310fc72042", "score": "0.52905864", "text": "function wmb_get_post_layout($post_id = null) {\n\tif (!$post_id) {\n\t\tglobal $post;\n\t\t$post_id = $post->ID;\n\t}\n\n\t$layout = '';\n\n\t$layouts = get_the_terms($post_id, 'featured_layout');\n\tif ($layouts) {\n\t\t$layout = $layouts[0]->slug;\n\t}\n\n\treturn $layout;\n}", "title": "" }, { "docid": "b1bdfec13be1bfacb48af75db98d5e59", "score": "0.52486384", "text": "public function getFolder()\n {\n return (! $this->isExtension) ? ($this->theme->getFolder() . '/layouts/' . $this->layoutSlug) : $this->layoutSlug;\n }", "title": "" }, { "docid": "f6994785399ef299273771472829587b", "score": "0.5243541", "text": "private function getSitemapView()\n {\n if (! isset($this->viewsData['sitemapView']) || ! @$this->viewsData['sitemapView']) {\n return null;\n }\n\n if (! $this->viewFactory->exists($this->viewsData['sitemapView'])) {\n throw new \\Exception(sprintf('The \"%s\" view is not found. Make sure the rssFeedView configuration key is correct.', $this->viewsData['rssFeedView']));\n }\n\n return $this->viewsData['sitemapView'];\n }", "title": "" }, { "docid": "2bd3f9b534462164b1e744ee24884200", "score": "0.5240119", "text": "public function getLayoutById($layoutId)\n\t{\n\t\tif (!isset($this->_layoutsById) || !array_key_exists($layoutId, $this->_layoutsById))\n\t\t{\n\t\t\t$result = $this->_createLayoutQuery()\n\t\t\t\t->where('id = :id', array(':id' => $layoutId))\n\t\t\t\t->queryRow();\n\n\t\t\tif ($result)\n\t\t\t{\n\t\t\t\t$layout = new FieldLayoutModel($result);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$layout = null;\n\t\t\t}\n\n\t\t\t$this->_layoutsById[$layoutId] = $layout;\n\t\t}\n\n\t\treturn $this->_layoutsById[$layoutId];\n\t}", "title": "" }, { "docid": "6bb4b3c2da5bc7360fb5d0d51cace196", "score": "0.5212306", "text": "public function hasLayout()\n {\n return isset($this->layout);\n }", "title": "" }, { "docid": "51c950d84a6acac77c12ca8c812ec9da", "score": "0.5208575", "text": "function pi_get_sidebar_layout()\n{\n return piBlogCustomize::pi_refresh_in_customize('pi_options[sidebar_layout]') ? piBlogCustomize::pi_refresh_in_customize('pi_options[sidebar_layout]') : piBlogFramework::$piOptions['sidebar_layout'];\n}", "title": "" }, { "docid": "dc4fa4c43da31904ad95329e04c9a5cd", "score": "0.52060777", "text": "public function layout(): Layout\n {\n return new Layout($this);\n }", "title": "" } ]
81e0237f62b1822fb442851763f4fd54
Returns an array of events this subscriber wants to listen to.
[ { "docid": "01708e04575fd942c3c4f106217486c9", "score": "0.0", "text": "function getSubscribedEvents()\n {\n return array(Events::postLoad);\n }", "title": "" } ]
[ { "docid": "d08ad6768332caba3c46278b88a4fe55", "score": "0.83220315", "text": "public static function getSubscribedEvents()\n {\n return array();\n }", "title": "" }, { "docid": "20cf3874ff28211c98329e9913cb271b", "score": "0.81721705", "text": "public static function getSubscribedEvents()\n {\n return array();\n\n }", "title": "" }, { "docid": "876133c8019a499a2d9f1c5caf21d631", "score": "0.8067574", "text": "public static function getSubscribedEvents(): array\n {\n return ['foo' => 'bar'];\n }", "title": "" }, { "docid": "855d8007c0b8ee7b7a24dbef8c56ab58", "score": "0.78826815", "text": "public static function getSubscribedEvents()\n {\n return array(TestworkEventDispatcher::BEFORE_ALL_EVENTS => 'listenEvent');\n }", "title": "" }, { "docid": "9bb739c502d4dfd59be246e8988d2e43", "score": "0.77447027", "text": "public function getEvents(): array\n {\n if ($this->app->eventsAreCached()) {\n $cache = require $this->app->getCachedEventsPath();\n\n return $cache[get_class($this)] ?? [];\n }\n\n return array_merge_recursive(\n $this->discoveredEvents(),\n $this->listens()\n );\n }", "title": "" }, { "docid": "bf5b5e978dce44e8214f3a3c91e93228", "score": "0.7730568", "text": "public function dataProviderGetSubscribedEvents()\n {\n return [\n [\n [\n 'channels' => '#channel1',\n ],\n [\n 'irc.received.part' => 'onPartChannels',\n 'irc.received.kick' => 'onKickChannels',\n ],\n ],\n ];\n }", "title": "" }, { "docid": "0dc92afb9342ac69b7df6626bb6aa7fd", "score": "0.77015305", "text": "protected static function getEventSubscribers(): array\n {\n return [];\n }", "title": "" }, { "docid": "2c33a3aa4fa13b379bdf14a00acdb8e9", "score": "0.76213455", "text": "public static function getSubscribedEvents(): array\n\t{\n\t\t// Only subscribe events if the component is installed and enabled\n\t\tif (!ComponentHelper::isEnabled('com_ars'))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t'onContentPrepare' => 'onContentPrepare',\n\t\t];\n\t}", "title": "" }, { "docid": "743eb2e34e845058dfbfe4c3ebdb0ac2", "score": "0.76186496", "text": "public function getEventSubscribers(): array\n {\n return [$this];\n }", "title": "" }, { "docid": "58efe877f9c80f1092b6995500a54243", "score": "0.75713956", "text": "public function getSubscriptions(): array\n {\n return $this->hooks->getEvents();\n }", "title": "" }, { "docid": "ad0a54652ca11fe2b3f21a2a77f9c5f9", "score": "0.75600326", "text": "public static function getSubscribedEvents(): array\n\t{\n\t\t// Only subscribe events if the component is installed and enabled\n\t\tif (!ComponentHelper::isEnabled('com_akeebabackup'))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t'onGetIcons' => 'getAkeebaBackupStatus',\n\t\t];\n\t}", "title": "" }, { "docid": "56ba512f1d100b27a3332e24f0dc7254", "score": "0.7525101", "text": "public function getSubscribedEvents(): array\n {\n return [\n Events::preFlush,\n Events::postFlush,\n ];\n }", "title": "" }, { "docid": "c2d1684626324ea3f4c8a0f6ef638c43", "score": "0.7480794", "text": "public function getEvents()\n {\n return [];\n }", "title": "" }, { "docid": "cd5d19d23fd59042e8b3435689691eb1", "score": "0.74487436", "text": "public function getSubscribedEvents()\n {\n return array(\n 'irc.sent.user' => 'setEventQueue',\n );\n }", "title": "" }, { "docid": "d835cd9f85b3dc247c87efc39145c653", "score": "0.74384487", "text": "public static function getSubscribedEvents();", "title": "" }, { "docid": "d835cd9f85b3dc247c87efc39145c653", "score": "0.74384487", "text": "public static function getSubscribedEvents();", "title": "" }, { "docid": "e2d115b8de0fdf27ceb79c35d270f085", "score": "0.7431611", "text": "public static function getSubscribedEvents()\n {\n /**\n * There is a priority flag to manage execution order.\n * If we need more controll over this, we can use this flag or add\n * pre/post Methods like described here:\n * http://symfony.com/doc/current/components/event_dispatcher/introduction.html (StoreSubscriber)\n */\n\n return array(\n 'kernel.request' => array(\"onKernelRequest\", 0),\n 'kernel.response' => array(\"onKernelResponse\", 0)\n );\n }", "title": "" }, { "docid": "3388a750c45346625a0f21f81bf34091", "score": "0.7418938", "text": "public static function getSubscribedEvents()\n {\n return [\n AccessControlEvents::LOGIN_SUCCESS => ['onEcho', 100],\n AccessControlEvents::LOGIN_FAILURE => ['onEcho', 100],\n AccessControlEvents::LOGOUT_SUCCESS => ['onEcho', 100],\n AccessControlEvents::RESET_REQUEST => ['onEcho', 100],\n AccessControlEvents::RESET_SUCCESS => ['onEcho', 100],\n AccessControlEvents::RESET_FAILURE => ['onEcho', 100],\n AccessControlEvents::ACCESS_CHECK_REQUEST => ['onEcho', 100],\n AccessControlEvents::ACCESS_CHECK_SUCCESS => ['onEcho', 100],\n AccessControlEvents::ACCESS_CHECK_FAILURE => ['onEcho', 100],\n ];\n }", "title": "" }, { "docid": "bb1c98d16668ffaeac74a0330501220e", "score": "0.7406793", "text": "protected function discoveredEvents(): array\n {\n return $this->shouldDiscoverEvents()\n ? $this->discoverEvents()\n : [];\n }", "title": "" }, { "docid": "e21bd12f94db2f92f6f99c67562753d8", "score": "0.740175", "text": "public function getSubscribedEvents()\n {\n return array(\n Events::postLoad,\n Events::onFlush,\n Events::postFlush,\n );\n }", "title": "" }, { "docid": "b686f888f328cb353054871238e8a5ad", "score": "0.73985726", "text": "public static function getSubscribedEvents()\n {\n return array(\n ApplicationCreatedEvent::NAME => array(\n array('logApplication', 1),\n array('sendConfirmationMail', 0),\n array('addFlashMessage', -1),\n ),\n );\n }", "title": "" }, { "docid": "2c564ae7302efaee5f840497adf480fd", "score": "0.73612666", "text": "public static function getSubscribedEvents()\n {\n return array(\n BootstrapEvents::GET_CONFIGURATION => array('onBootstrapEvent', self::NATIVE),\n BootstrapEvents::GET_PAGE_CACHE => array('onBootstrapEvent', self::NATIVE),\n BootstrapEvents::GET_DATABASE => array('onBootstrapEvent', self::NATIVE),\n BootstrapEvents::GET_VARIABLES => array('onBootstrapEvent', self::NATIVE),\n BootstrapEvents::GET_SESSION => array('onBootstrapEvent', self::NATIVE),\n BootstrapEvents::GET_PAGE_HEADER => array('onBootstrapEvent', self::NATIVE),\n BootstrapEvents::GET_LANGUAGE => array('onBootstrapEvent', self::NATIVE),\n BootstrapEvents::GET_FULL => array('onBootstrapEvent', self::NATIVE),\n );\n }", "title": "" }, { "docid": "65000855386b08e813ee2614bc648aba", "score": "0.7358736", "text": "public static function getSubscribedEvents()\n {\n return array(\n ListPluginsEvent::NAME => array('handler', 0),\n );\n }", "title": "" }, { "docid": "1b1ac65dd2dab60fb9e6cc3ab0a2a534", "score": "0.7357952", "text": "public function getSubscribedEvents()\n {\n return [\n Events::postLoad,\n Events::preFlush,\n Events::postFlush,\n Events::onFlush\n ];\n }", "title": "" }, { "docid": "13a6eff4d3b53ff09a8ab31f96714254", "score": "0.73506206", "text": "public static function getSubscribedEvents()\n {\n return array(\n CoreEvents::MODULE_INSTALL => array('moduleInstalled', 5),\n CoreEvents::MODULE_UPGRADE => array('moduleUpgraded', 5),\n CoreEvents::MODULE_ENABLE => array('moduleEnabled', 5),\n CoreEvents::MODULE_DISABLE => array('moduleDisabled', 5),\n CoreEvents::MODULE_REMOVE => array('moduleRemoved', 5),\n 'installer.subscriberarea.uninstalled' => array('subscriberAreaUninstalled', 5)\n );\n }", "title": "" }, { "docid": "9dfc6de2e68d779d647da49a06e1492b", "score": "0.7340416", "text": "static public function getSubscribedEvents()\n {\n return array(\n TagEventsMap::LOOKUP => array('logLookupEvent'),\n TagEventsMap::REMOVE => array('logRemoveEvent'),\n TagEventsMap::STORE => array('logStoreEvent'),\n );\n }", "title": "" }, { "docid": "1c932e5b7d7c290291b4bd2cf7ef14c1", "score": "0.73237354", "text": "protected function discoverEventsWithin(): array\n {\n return [\n $this->app->path('Listeners'),\n ];\n }", "title": "" }, { "docid": "54d6f1da0b233efcaff177b5c80ae269", "score": "0.7305904", "text": "public function getSubscribedEvents()\n {\n return array(\n Events::prePersist,\n Events::preUpdate,\n );\n }", "title": "" }, { "docid": "54d6f1da0b233efcaff177b5c80ae269", "score": "0.7305904", "text": "public function getSubscribedEvents()\n {\n return array(\n Events::prePersist,\n Events::preUpdate,\n );\n }", "title": "" }, { "docid": "7115727ca7c6e16fb77a1c1f6f44bb1a", "score": "0.7303214", "text": "public function events()\n {\n return $this->events;\n }", "title": "" }, { "docid": "941d5437f74810fef2864022b429053a", "score": "0.7302285", "text": "public static function getSubscribedEvents() {\n return [\n 'response.send' => ['publishEvent' => -100000],\n ];\n }", "title": "" }, { "docid": "d87903404dc8928d6a0d13369d026dbd", "score": "0.7278342", "text": "function getListeners() \n {\n if (func_num_args() > 0) \n {\n $event = func_get_arg(0);\n return array_key_exists($event, $this->_listeners) ? $this->_listeners[$event] : array();\n } \n else \n {\n return $this->_listeners;\n }\n }", "title": "" }, { "docid": "e942880516e7c44310b172faef383d9e", "score": "0.7272228", "text": "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "e942880516e7c44310b172faef383d9e", "score": "0.7272228", "text": "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "e942880516e7c44310b172faef383d9e", "score": "0.7272228", "text": "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "3106ee68cca3db5a1a39a51be059fc57", "score": "0.7271435", "text": "public function getSubscribedEvents()\n {\n return [\n Events::preRemove,\n Events::postRemove,\n Events::prePersist,\n Events::postPersist,\n Events::preUpdate,\n Events::postUpdate,\n Events::postLoad\n ];\n }", "title": "" }, { "docid": "80b1e1899e1400a8165d142b60a2661f", "score": "0.7267312", "text": "public static function events() {\n return self::$events;\n }", "title": "" }, { "docid": "fca6ef4c728261a6b52092905e92fd55", "score": "0.72612375", "text": "public static function getSubscribedEvents()\n {\n return [\n Events\\PayStarting::class => ['writePayStartingLog', 256],\n Events\\PayStarted::class => ['writePayStartedLog', 256],\n Events\\ApiRequesting::class => ['writeApiRequestingLog', 256],\n Events\\ApiRequested::class => ['writeApiRequestedLog', 256],\n Events\\SignFailed::class => ['writeSignFailedLog', 256],\n Events\\NotifyReceived::class => ['writeNotifyReceivedLog', 256],\n Events\\MethodCalled::class => ['writeMethodCalledLog', 256],\n ];\n }", "title": "" }, { "docid": "5057170c66e30fab656cbd35efcafa7b", "score": "0.725081", "text": "protected function getEvents()\n {\n return (array) $this->config('events', []);\n }", "title": "" }, { "docid": "d15296a9d91c9f5ba4a60ef8e90b27bf", "score": "0.7241987", "text": "public function getSubscribedEvents()\n {\n return [\n Events::preFlush,\n Events::postLoad,\n ];\n }", "title": "" }, { "docid": "1619a6edbc8571bf68783c6450dba0ef", "score": "0.72402596", "text": "public static function getSubscribedEvents(): array\n\t{\n\t\treturn [\n\t\t\tKernelEvents::CONTROLLER => 'onKernelController',\n\t\t\tKernelEvents::EXCEPTION => 'onKernelException',\n\t\t];\n\t}", "title": "" }, { "docid": "5545e10191caf9f4d5d730d94d338fc2", "score": "0.72287077", "text": "public static function getSubscribedEvents()\n {\n return [\n KernelEvents::EXCEPTION => [\n ['processException', 10],\n ['logException', 0],\n ['notifyException', -10],\n ],\n ];\n }", "title": "" }, { "docid": "aa19810581635821919f8a3d950c93fa", "score": "0.7216538", "text": "public function getSubscribedEvents(): array\n {\n return [\n 'prePersist',\n 'preUpdate',\n 'preRemove',\n 'preFlush',\n 'postFlush',\n ];\n }", "title": "" }, { "docid": "12da64142bb0860793f3948f211c5b72", "score": "0.72105217", "text": "public static function getSubscribedEvents()\n {\n return [\n 'workflow.guard' => ['onGuard', 5],\n 'workflow.leave' => ['onLeave', 5],\n 'workflow.transition' => ['onTransition', 5],\n 'workflow.enter' => ['onEnter', 5]\n ];\n }", "title": "" }, { "docid": "e25e8d9df5d5da5fcf60316fe7676626", "score": "0.7206689", "text": "public function getSubscribedEvents()\n {\n return array(\n Events::postLoad,\n Events::postPersist,\n Events::onFlush,\n Events::loadClassMetadata\n );\n }", "title": "" }, { "docid": "bbc2f7aa72b64e250cd1fe68daed4ebe", "score": "0.720467", "text": "public static function getSubscribedEvents()\n {\n return [\n KernelEvents::REQUEST => 'onRequest',\n KernelEvents::EXCEPTION => ['onKernelException', -7],\n ];\n }", "title": "" }, { "docid": "b0dee8bb154e409ec462624bfa5ab5ca", "score": "0.7198533", "text": "public static function getEvents();", "title": "" }, { "docid": "893797a11a66b83e50eaef1c5cbb20e3", "score": "0.7192252", "text": "public function getEvents()\n {\n return $this->events;\n }", "title": "" }, { "docid": "893797a11a66b83e50eaef1c5cbb20e3", "score": "0.7192252", "text": "public function getEvents()\n {\n return $this->events;\n }", "title": "" }, { "docid": "893797a11a66b83e50eaef1c5cbb20e3", "score": "0.7192252", "text": "public function getEvents()\n {\n return $this->events;\n }", "title": "" }, { "docid": "893797a11a66b83e50eaef1c5cbb20e3", "score": "0.7192252", "text": "public function getEvents()\n {\n return $this->events;\n }", "title": "" }, { "docid": "893797a11a66b83e50eaef1c5cbb20e3", "score": "0.7192252", "text": "public function getEvents()\n {\n return $this->events;\n }", "title": "" }, { "docid": "70a765b34cc9a95bc801d5cb0ba386f5", "score": "0.71916276", "text": "public static function getSubscribedEvents()\n {\n return [\n CoreEvents::MODULE_INSTALL => ['moduleInstalled', 5],\n CoreEvents::MODULE_POSTINSTALL => ['modulePostInstalled', 5],\n CoreEvents::MODULE_UPGRADE => ['moduleUpgraded', 5],\n CoreEvents::MODULE_ENABLE => ['moduleEnabled', 5],\n CoreEvents::MODULE_DISABLE => ['moduleDisabled', 5],\n CoreEvents::MODULE_REMOVE => ['moduleRemoved', 5]\n ];\n }", "title": "" }, { "docid": "aea39014fd965901ae83db01866fbae2", "score": "0.71900564", "text": "public function getEvents()\n {\n return array_keys($this->events);\n }", "title": "" }, { "docid": "59703bcf2b250bca8db7153f8ae85b9e", "score": "0.7189931", "text": "public function getEvents()\n {\n return $this->_events;\n }", "title": "" }, { "docid": "ee3f1272b3cf75ff723f3c423685fc9b", "score": "0.71850586", "text": "public function getEvents()\n\t\t{\n\t\t\treturn $this->events;\n\t\t}", "title": "" }, { "docid": "ae59c05d5897c54b3db7241c02effc33", "score": "0.7182704", "text": "public function getSubscribedEvents() {\r\n return array(\r\n Events::prePersist,\r\n Events::preUpdate\r\n );\r\n }", "title": "" }, { "docid": "3ca8b2ca1c1f48b11cdb0326b6d873e7", "score": "0.7180002", "text": "public static function getSubscribedEvents()\n {\n return array(\n ServiceEvents::SERVICE_REQUESTED => array(\n array('onServiceRequest', 10),\n ),\n ServiceEvents::SERVICE_CANCELED => array(\n array('checkServiceStatusPreCancel', 150),\n array('onServiceCanceled', 10),\n ),\n ServiceEvents::SERVICE_ACCEPTED => array(\n array('checkServiceStatusPreAccept', 150),\n array('onServiceAccept', 10),\n ),\n ServiceEvents::SERVICE_REJECTED => array(\n array('checkServiceStatusPreReject', 150),\n array('onServiceReject', 10),\n ),\n ServiceEvents::SERVICE_READY => array(\n array('checkServiceStatusPreReady', 150),\n array('onServiceReady', 10),\n ),\n ServiceEvents::SERVICE_START => array(\n array('checkServiceStatusPreStart', 150),\n array('onServiceStart', 10),\n ),\n ServiceEvents::SERVICE_FINISH => array(\n array('checkServiceStatusPreFinish', 150),\n array('onServiceFinish', 10),\n array('setPrice', 9),\n array('autoPay', 5),\n ),\n ServiceEvents::SERVICE_UPDATE => array(\n array('onServiceUpdate', 255),\n array('setPrice', 254),\n ),\n CarEvents::CAR_MOVE => array(\n array('onService', 10),\n ),\n FinancialEvents::PAYMENT_EVENT => array(\n// array('calculateRealPrice', 80),\n array('onServicePayed', 10),\n ),\n );\n }", "title": "" }, { "docid": "04a5dba27a72a7931c714507afd5cebf", "score": "0.7175519", "text": "public static function getSubscribedEvents()\n {\n return [\n KernelEvents::RESPONSE => 'onResponse',\n ];\n }", "title": "" }, { "docid": "b4b2fda9ae84deebf3ed7b8526dbda7a", "score": "0.7170918", "text": "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::REQUEST => array(\n 'TranslationAddLoaders_Reponse'\n ),\n ConsoleEvents::COMMAND => array(\n 'TranslationAddLoaders_Console'\n )\n );\n }", "title": "" }, { "docid": "04ae6eda69efa23b5a6d154adebc1d6c", "score": "0.7164681", "text": "public static function getSubscribedEvents()\n {\n return [\n GameStartEvent::class => 'onGameStart',\n GameEndEvent::class => 'onGameEnd',\n ];\n }", "title": "" }, { "docid": "b36dfac8154d48d210975c0e4abdabba", "score": "0.7162757", "text": "public static function getSubscribedEvents()\n {\n return [\n UserEvents::CREATE_ACCOUNT => ['create', 5],\n UserEvents::UPDATE_ACCOUNT => ['update', 5],\n UserEvents::DELETE_ACCOUNT => ['delete', 5]\n ];\n }", "title": "" }, { "docid": "bdf34dd4a6f90a2ed50583277a3d6604", "score": "0.7153524", "text": "public function getSubscribedEvents()\n {\n return [\n Events::prePersist,\n Events::preUpdate,\n ];\n }", "title": "" }, { "docid": "bdf34dd4a6f90a2ed50583277a3d6604", "score": "0.7153524", "text": "public function getSubscribedEvents()\n {\n return [\n Events::prePersist,\n Events::preUpdate,\n ];\n }", "title": "" }, { "docid": "d11fb3c1f51e0909550dc0d2a9ce6041", "score": "0.7153446", "text": "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::REQUEST => array(\"onKernelRequest\", 0),\n KernelEvents::FINISH_REQUEST => array(\"onKernelFinishRequest\", 0),\n KernelEvents::EXCEPTION => array(\"onKernelException\", 0),\n KernelEvents::RESPONSE => array(\"onKernelResponse\", 0),\n KernelEvents::TERMINATE => array(\"onKernelTerminate\", 0),\n KernelEvents::VIEW => array(\"onKernelView\", 0)\n );\n\n // TODO: Implement getSubscribedEvents() method.\n }", "title": "" }, { "docid": "4fa472bb162ae97d3f8658d3c41f5f54", "score": "0.7153224", "text": "public function getEvents ()\n {\n return $this->events;\n }", "title": "" }, { "docid": "64dc97ff752d197aae1f85e8d8bd6bbe", "score": "0.7152191", "text": "public static function getSubscribedEvents()\n {\n return [\n 'onPluginsInitialized' => ['onPluginsInitialized', 0],\n // 'onBlueprintCreated' => ['onBlueprintCreated', 0]\n ];\n }", "title": "" }, { "docid": "228ad3f8712527f311187534c2402a1d", "score": "0.71351606", "text": "public static function getSubscribedEvents(): array\n {\n return [\n EncryptEvents::ENCRYPT => 'encrypt',\n EncryptEvents::DECRYPT => 'decrypt',\n ];\n }", "title": "" }, { "docid": "ebb4d59fe3e6b1ed475175f91f664019", "score": "0.7119919", "text": "public static function getSubscribedEvents(): array\n {\n return [\n KernelEvents::REQUEST => [\n 'onKernelRequest',\n '35',\n ],\n ];\n\n }", "title": "" }, { "docid": "ba7d45a746fa20304e65b3846c4bd7f6", "score": "0.7111113", "text": "static public function getSubscribedEvents()\n {\n return array(\n MonitoringEventsMap::MONITOR_QUERY => array('onMonitorQuery'),\n MonitoringEventsMap::MONITOR_RUN => array('onMonitorRun'),\n MonitoringEventsMap::MONITOR_LOCK => array('onMonitorLock'),\n MonitoringEventsMap::MONITOR_COMMIT => array('onMonitorCommit')\n );\n }", "title": "" }, { "docid": "d39c5a746e757dd241cf845909a9ae63", "score": "0.7109175", "text": "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::REQUEST => array(\n array('checkAndRedirect', 10),\n )\n );\n }", "title": "" }, { "docid": "3c254876afcf77f1dd389ccf90d73aff", "score": "0.71077174", "text": "static function getSubscribedEvents() {\n $events[EntityEvents::insert('par_data_deviation_request')][] = ['onEvent', 800];\n\n return $events;\n }", "title": "" }, { "docid": "ddb587a703d15c6b744030363efbb744", "score": "0.70984936", "text": "public static function getSubscribedEvents(): array\n {\n return [\n BulkActionEvent::NAME => [\n ['flashBulkEvent', self::FLASH_MESSAGE_PRIORITY],\n ]\n ];\n }", "title": "" }, { "docid": "0d6d48c46deb55e799a5ee34585ac735", "score": "0.7087949", "text": "public static function initialAcceptedEvents() : array\n {\n return static::EVENTS[0];\n }", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.70771694", "text": "public function getEvents();", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.70771694", "text": "public function getEvents();", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.70771694", "text": "public function getEvents();", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.70771694", "text": "public function getEvents();", "title": "" }, { "docid": "22650caeeb37b9a178fa62ed1f9fcd59", "score": "0.7066606", "text": "public static function getSubscribedEvents()\n {\n // TODO: Implement getSubscribedEvents() method.\n return array(\n FormEvents::PRE_SET_DATA => 'preSetData',\n );\n }", "title": "" }, { "docid": "937c5bbfd75020dea53d1b23ae000711", "score": "0.70646083", "text": "public static function getSubscribedEvents() {\n\t\treturn [\n\t\t\tPackageEvents::PRE_PACKAGE_INSTALL => [\n\t\t\t\t[ 'checkAvailability' ],\n\t\t\t],\n\t\t\tPackageEvents::PRE_PACKAGE_UPDATE => [\n\t\t\t\t[ 'checkAvailability' ],\n\t\t\t\t[ 'checkMaintenanceStatus', 1 ],\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "4ed57e8f4246d1e0e925069c9eb4198a", "score": "0.70641536", "text": "public static function getSubscribedEvents(): array\n {\n return [\n JWTCreatedEvent::class => 'onJWTCreated',\n ];\n }", "title": "" }, { "docid": "11eca34657ac2cb578d1c8dd9d80bd03", "score": "0.70613134", "text": "public function getSubscribedEvents()\n {\n return [\n// Events::prePersist, //TODO:\n Events::preUpdate,\n ];\n }", "title": "" }, { "docid": "738d98f8e8022013351a25ee59fa8e6d", "score": "0.70600784", "text": "public function getSubscribedEvents()\n {\n return [\n Events::loadClassMetadata,\n // Create\n Events::postPersist,\n // Read\n Events::postLoad,\n // Update\n Events::postUpdate,\n // Delete\n Events::preRemove,\n ];\n }", "title": "" }, { "docid": "179b99b0eb530e6ad8720600c9224275", "score": "0.7053544", "text": "public static function getSubscribedEvents()\n {\n return array(\n 'request.before_send' => array('onBeforeSend', -1000),\n 'request.success' => array('onRequestSuccess', -1000),\n );\n }", "title": "" }, { "docid": "b0cf4cf566941b690240bd32508a84ed", "score": "0.70495063", "text": "public function getListeners(string $eventName = null): array;", "title": "" }, { "docid": "cfb555329beb61bedff01eb2390c86ba", "score": "0.70427614", "text": "public function events()\n {\n if ($this->events === null) {\n $this->setEventManager(new EventManager(array(\n __CLASS__,\n get_called_class(),\n )));\n }\n return $this->events;\n }", "title": "" }, { "docid": "db3c1aa9996736136e703946d93c8444", "score": "0.70345587", "text": "public static function getSubscribedEvents()\n {\n return array(\n AssistantHistoryCreatedEvent::NAME => array(\n array('sendActivationMail', 0),\n array('addFlashMessage', -1),\n ),\n );\n }", "title": "" }, { "docid": "cea4d7904ef3d68986bd62e6a19f3ad7", "score": "0.7028399", "text": "public function getEvents()\n {\n if ($this->events === null) {\n $this->events = array();\n\n foreach ($this->getTimers() as $timerName => $timer) {\n if (strpos($timerName, 'DISPATCH EVENT:') === 0) {\n $this->events[str_replace('DISPATCH EVENT:', '', $timerName)] = array(\n 'name' => str_replace('DISPATCH EVENT:', '', $timerName),\n 'count' => $timer['count'],\n 'sum' => round($timer['sum'] * 1000, 2), // ms\n 'mem_diff' => $timer['realmem'] / pow(1024, 2), // mb\n );\n }\n }\n }\n\n return $this->events;\n }", "title": "" }, { "docid": "f63ce2af5699c7976be6fbe878e16f52", "score": "0.70251274", "text": "public function events(): array;", "title": "" }, { "docid": "00c511ee8bc595430c8c70cd22837e44", "score": "0.7022741", "text": "public function getEventListeners()\n {\n return $this->eventListeners;\n }", "title": "" }, { "docid": "71b0f68a07917e5477970c45c6f2c1be", "score": "0.7017075", "text": "public static function getSubscribedEvents()\n {\n return [\n 'Enlight_Controller_Front_StartDispatch' => 'onStartDispatch',\n 'Shopware_Console_Add_Command' => 'onStartDispatch',\n ];\n }", "title": "" }, { "docid": "893ff082c3248d07da7fcc62e16d3225", "score": "0.70024824", "text": "private function getEventListeners(): array\n {\n $eventListeners = [];\n $eventListeners[\"CONSOLE\"][\"Error\"] = \"APPLICATION\";\n if ($this->features->sqlServer) {\n $eventListeners[\"HTTP\"][\"SQLDataSource\"] = \"APPLICATION\";\n $eventListeners[\"CONSOLE\"][\"SQLDataSource\"] = \"APPLICATION\";\n }\n if ($this->features->nosqlServer) {\n $eventListeners[\"HTTP\"][\"NoSQLDataSource\"] = \"APPLICATION\";\n $eventListeners[\"CONSOLE\"][\"NoSQLDataSource\"] = \"APPLICATION\";\n }\n $eventListeners[\"HTTP\"][\"Error\"] = \"REQUEST\";\n if ($this->features->logging) {\n $eventListeners[\"HTTP\"][\"Logging\"] = \"REQUEST\";\n $eventListeners[\"CONSOLE\"][\"Logging\"] = \"REQUEST\";\n }\n if ($this->features->security) {\n $eventListeners[\"HTTP\"][\"Security\"] = \"REQUEST\";\n }\n if ($this->features->internationalization) {\n $eventListeners[\"HTTP\"][\"Localization\"] = \"REQUEST\";\n }\n if ($this->features->headers) {\n $eventListeners[\"HTTP\"][\"HttpHeaders\"] = \"REQUEST\";\n if ($this->features->headers->cors) {\n $eventListeners[\"HTTP\"][\"HttpCors\"] = \"REQUEST\";\n }\n if ($this->features->headers->caching) {\n $eventListeners[\"HTTP\"][\"HttpCaching\"] = \"RESPONSE\";\n }\n }\n return $eventListeners;\n }", "title": "" }, { "docid": "86bf9aaba07ed9a782dd0e425c4195a6", "score": "0.6995501", "text": "public function getSubscribedEvents(): array\n {\n return [\n Events::RECONNECT_TO_DATABASE,\n ];\n }", "title": "" }, { "docid": "b8ca2f97f4f32c3e3f9c64ccd046027b", "score": "0.6992199", "text": "public function getEvents()\n {\n $list = array();\n for ($i = Config\\Config::$forIndex; $i < $this->getEventNumber() + Config\\Config::$forIndex; $i++) {\n $list[] = $this->getEvent($i);\n }\n return $list;\n }", "title": "" }, { "docid": "30ff4e811014a5ecd2cbb16cb9b7ee53", "score": "0.6975898", "text": "public static function getSubscribedEvents(): array\n {\n return array(\n KernelEvents::REQUEST => array(array('onKernelRequest', 7))\n );\n }", "title": "" }, { "docid": "1c4c37ef1c49c19beffcc2e556cab4e8", "score": "0.6973656", "text": "public static function getSubscribedEvents()\n {\n return array(\n DcGeneralEvents::ACTION => array(\n array('migrateRecipients'),\n ),\n\n GetOptionsEvent::NAME => array(\n array('bypassCreateMailingListOptions'),\n ),\n );\n }", "title": "" }, { "docid": "9074f126e4e0e60dd70a18a128f6a124", "score": "0.6969838", "text": "public static function getSubscribedEvents()\n {\n return array(\n SearchAlertEvent::SEARCH_ALERT_CREATE => array('searchAlertCreation', 128)\n );\n }", "title": "" }, { "docid": "c4f59bd57b68dc67f61824a912d9ee86", "score": "0.6969327", "text": "public static function getSubscribedEvents()\n {\n return [\n Events::JWT_AUTHENTICATED => [\n ['onUpdateClassroomList', 0],\n ],\n ];\n }", "title": "" }, { "docid": "63e25064166a5388bc23692d2ac481de", "score": "0.6966637", "text": "public function getSubscribedEvents()\n {\n return array(\n Events::prePersist,\n );\n }", "title": "" }, { "docid": "41f3e32b9229c48848a947acd9e55e77", "score": "0.6963118", "text": "public function listeners(): array\n {\n return $this->listeners;\n }", "title": "" }, { "docid": "5d4ce2aa1132f9a0e60a3807d04e6a81", "score": "0.69625914", "text": "function getSubscribedEvents();", "title": "" } ]
a7e7cd389d7d3d10a259fdcce10c7959
Create the new consumer if not exists and return the ID
[ { "docid": "200f03eace879135d923f2d6c433a92a", "score": "0.66944164", "text": "private function getRestConsumerId()\n {\n $consumer = Mage::getModel('oauth/consumer')\n ->getCollection()\n ->addFieldToFilter('name', self::TITLE)\n ->getFirstItem();\n if (!$consumer->isEmpty())\n return $consumer->getId();\n\n $model = Mage::getModel('oauth/consumer');\n $helper = Mage::helper('oauth');\n $model->setName(self::TITLE);\n $model->setKey($helper->generateConsumerKey());\n $model->setSecret($helper->generateConsumerSecret());\n $model->save();\n return $model->getId();\n }", "title": "" } ]
[ { "docid": "4661742779c053932334acd7bc36749a", "score": "0.6405012", "text": "public function getConsumerId(): ?string {\n return $this->consumer;\n }", "title": "" }, { "docid": "3afc217696af703ace027708b3dc35e5", "score": "0.62689614", "text": "public function getConsumerInstance();", "title": "" }, { "docid": "e4c7b35a7b5780bc1660978a21d2bba8", "score": "0.59013444", "text": "public function getConsumerKey ();", "title": "" }, { "docid": "3b703a4590ba9e79fe7e59f73c4984de", "score": "0.5889348", "text": "public function getConsumerTag();", "title": "" }, { "docid": "5b7437485fb6dfe012371417ed9d6b93", "score": "0.55835366", "text": "function insert()\n\t{\n\t\t$query = \"INSERT INTO yacrs_lticonsumer(keyHash, consumer_key, name, secret) VALUES(\";\n\t\t$query .= \"'\".dataConnection::safe($this->keyHash).\"', \";\n\t\t$query .= \"'\".dataConnection::safe($this->consumer_key).\"', \";\n\t\t$query .= \"'\".dataConnection::safe($this->name).\"', \";\n\t\t$query .= \"'\".dataConnection::safe($this->secret).\"');\";\n\t\tdataConnection::runQuery(\"BEGIN;\");\n\t\t$result = dataConnection::runQuery($query);\n\t\t$result2 = dataConnection::runQuery(\"SELECT LAST_INSERT_ID() AS id;\");\n\t\tdataConnection::runQuery(\"COMMIT;\");\n\t\t$this->id = $result2[0]['id'];\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "cea72d91798718663574c162d7109e63", "score": "0.5550777", "text": "public function getConsumerByKey($consumerKey);", "title": "" }, { "docid": "2a6eee1cf510e3319da25e14f3b062b5", "score": "0.5464864", "text": "public function getConsumerKey()\n {\n return $this->consumerKey;\n }", "title": "" }, { "docid": "a1f25dc767e003897ab333a3703e50c3", "score": "0.5447851", "text": "public function create(){\n $new_id = $this->database->insert(\"INSERT INTO client VALUES ()\");\n return $new_id;\n }", "title": "" }, { "docid": "189b81909bac7227ce03e09b173a19f2", "score": "0.54470354", "text": "public function create($data): ConsumerAutoOrderResource\n {\n return $this->repository->add($data);\n }", "title": "" }, { "docid": "e3d3bb4dec415385aa15b243df571b71", "score": "0.5396881", "text": "function testConsumerDeletion() {\n // Create a user with permissions to manage its own consumers.\n $permissions = array('access own consumers');\n $account = $this->drupalCreateUser($permissions);\n\n // Initiate user session.\n $this->drupalLogin($account);\n\n // Generate a set of consumer keys.\n $this->drupalPostForm('oauth/consumer/add', array(), 'Add');\n\n // Delete the user.\n $uid = $account->id();\n $account->delete();\n // Check that its consumers were deleted.\n $consumer = db_query('select cid FROM {oauth_consumer} WHERE uid = :uid', array(':uid' => $uid))->fetchField();\n $this->assertFalse($consumer, t('Consumer keys were deleted on user deletion.'));\n }", "title": "" }, { "docid": "431cde65b81560911970bfccf3136269", "score": "0.5385914", "text": "public function getConsumer() : Consumer\n\t{\n\t\tif (!$this->consumer)\n\t\t{\n\t\t\t$this->consumer = $this->context->createConsumer($this->usedQueue);\n\t\t}\n\n\t\treturn $this->consumer;\n\t}", "title": "" }, { "docid": "4adc8feda7d01ab73a6e16493656a091", "score": "0.53719425", "text": "function testConsumers() {\n // Create a user with permissions to manage its own consumers.\n $permissions = array('access own consumers');\n $account = $this->drupalCreateUser($permissions);\n\n // Initiate user session.\n $this->drupalLogin($account);\n\n // Check that OAuth menu tab is visible at user profile.\n $this->drupalGet('user/' . $account->id() . '/oauth/consumer');\n $this->assertResponse(200);\n\n // Generate a set of consumer keys.\n $this->drupalPostForm('oauth/consumer/add', array(), 'Add');\n $this->assertText(t('Added a new consumer.'));\n\n // Delete the set of consumer keys.\n $consumer = db_query('select * from {oauth_consumer} where uid = :uid', array(':uid' => $account->id()))->fetchObject();\n $this->drupalPostForm('oauth/consumer/delete/' . $consumer->cid, array(), 'Delete');\n $this->assertText(t('OAuth consumer deleted.'));\n\n $this->drupalLogout();\n }", "title": "" }, { "docid": "ee7f85e435676dafe450ad96128c49e5", "score": "0.5358573", "text": "protected function handleConsumer()\n {\n //TODO suggest user info in front end\n\n //Insert customer\n $first_name = Input::get('first_name', '');\n $last_name = Input::get('last_name', '');\n $email = Input::get('email', '');\n $phone = Input::get('phone', '');\n $address = Input::get('address', '');\n $hash = Input::get('hash');\n\n //TODO handle consumer validation\n $data = [\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'phone' => $phone,\n 'address' => $address,\n 'hash' => $hash\n ];\n\n $consumer = Consumer::handleConsumer($data, $this->user);\n\n return $consumer;\n }", "title": "" }, { "docid": "02244debfd716ffed76a3032e6de6bb5", "score": "0.531369", "text": "public function getConsumer()\n {\n return $this->consumer;\n }", "title": "" }, { "docid": "824c4593eaaab6ec82db6a1a1349cee5", "score": "0.52954465", "text": "function getConsumerByTag ($t) {\n foreach ($this->consumers as $c) {\n if ($c[2] == 'READY' && $c[1] === $t) {\n return $c[0];\n }\n }\n }", "title": "" }, { "docid": "165b795110aecea5ed74de40173d7636", "score": "0.5259607", "text": "function addConsumer (Consumer $cons) {\n foreach ($this->consumers as $c) {\n if ($c === $cons) {\n throw new \\Exception(\"Consumer can only be added to channel once\", 9684);\n }\n }\n $this->consumers[] = array($cons, false, 'READY_WAIT');\n }", "title": "" }, { "docid": "67e306705d380c92fdc9d8836ea2cf08", "score": "0.5258424", "text": "public function getConsumer()\n {\n return $this->_consumer;\n }", "title": "" }, { "docid": "02e57eee0a3f7e865564261bc32efe18", "score": "0.5239012", "text": "public function create($curso_id)\n {\n\n }", "title": "" }, { "docid": "f1253aac55c95a0ac16201579fdae398", "score": "0.52132696", "text": "public function getConsumer()\n {\n return $this->type;\n }", "title": "" }, { "docid": "daee35fda2941a6951bc3f53fd7e1e83", "score": "0.52089316", "text": "public function create(){ // creating\n\t\t /**\n * Get the bean\n * @var $bean Model_User\n */\n $bean = $this->bean;\n\t\t$bean->Passphrase = $this->validatePassphrase(8);\n\t\t\n\t\t// validate the model\n $this->validate();\n\n // validate the creation\n $this->validateCreate();\n\t\t \n\t\t// save the bean to the database\n $eventId = R::store($this);\n\t\t\n\t\t//Return the id of new user\n\t\treturn $eventId;\n }", "title": "" }, { "docid": "4a70eb3eb60c01d3c7397f69e6b86983", "score": "0.51487166", "text": "public function createRequestToken($consumer);", "title": "" }, { "docid": "8308123977f8953563df05f7fc51887a", "score": "0.514602", "text": "private function getRestTokenIdByConsumerId($consumer_id)\n {\n $token = Mage::getModel('oauth/token')\n ->getCollection()\n ->addFieldToFilter('consumer_id', $consumer_id)\n ->getFirstItem();\n if (!$token->isEmpty())\n return $token->getId();\n\n // create oauth token\n $m = Mage::getModel('oauth/token');\n $m->createRequestToken($consumer_id, 'oob');\n $m->convertToAccess();\n\n $admin_id = Mage::getModel('admin/user')->getCollection()->getFirstItem()->getId();\n $m->authorize($admin_id, 'admin');\n\n $token_id = $m->getId();\n return $token_id;\n }", "title": "" }, { "docid": "1f6b27bf3af34a113aeeaea0b9acfbe6", "score": "0.513754", "text": "protected function getConsumer() {\n\n return new OAuthConsumer($this->getState('OAUTH_CONSUMER_KEY'), $this->getState('OAUTH_CONSUMER_SECRET'));\n \n }", "title": "" }, { "docid": "b0f5da46cf4e7e25f0c73fd0afeb2dc6", "score": "0.5119296", "text": "protected function setupConsumer()\n {\n }", "title": "" }, { "docid": "bc4e66370fb0f51e5eaf3325f5521a22", "score": "0.5106971", "text": "protected function generateId()\n {\n return \\Yii::app()->redis->incr($this->prefix.':counter');\n }", "title": "" }, { "docid": "ce083994bda1821f82e23c789f59056c", "score": "0.5103989", "text": "public function create()\n {\n return $this->topicService->create();\n }", "title": "" }, { "docid": "f3701f93543e3f401ba59e05f5106ec5", "score": "0.50867116", "text": "public function postRegister(Request $request)\n {\n $consumer = new Consumer;\n $consumer->sponsor = Auth::user()->id;\n \n return $this->validateAndSaveConsumer($request, $consumer);\n }", "title": "" }, { "docid": "a844d632d4badd13c79e3489b9c5cc45", "score": "0.50784403", "text": "public static function get_api_consumer_id($groupid = null) {\n return (is_null($groupid) ? '' : API_CONSUMER_ID . '_group_' . $groupid);\n }", "title": "" }, { "docid": "db3cd67fa28bff684e6a178196eaa0c7", "score": "0.5007524", "text": "function create_new_book_id(){\n\t$max_id = get(\"parcel_th\",\"MAX(book_id)\",\"\");\n\treturn $max_id++;\n}", "title": "" }, { "docid": "30966e7d547fa9fe36ac55993274995a", "score": "0.5006166", "text": "private static function NewSchedApptID () {\n\n\t\t//set UID generator with callback to verify SchedApptID will be unique\n\t\t( !self::$UID ) ? self::$UID = new UID( array('ScheduledAppointment', 'GetBySchedApptID') ) : null;\n\t\treturn self::$UID->GetUniqueID(); //return uniqure SchedApptID\n\t}", "title": "" }, { "docid": "6cd90e304f1e04baf5d554a9aee2ddfe", "score": "0.5002367", "text": "public function hasValidConsumer(): bool {\n if ($this->consumer_plugin_manager->getDefinition($this->getconsumerId(), FALSE)) {\n return TRUE;\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "f606c382c920a2248f4080e0d51771f6", "score": "0.4991449", "text": "public final function isConsumer(): bool {\n return 'consumer' == $this->role->name;\n }", "title": "" }, { "docid": "357c1b52c1aa70be6ed0d9468784db2e", "score": "0.49465188", "text": "public function getOrCreateFeed($topic_url){\n\n if($feed_id = $this->getFeedForUrl($topic_url)){\n return $feed_id;\n }\n\n //todo validate topic_url contains self link \n // also store the current data of the page so we have initial data\n \n $this->link->query(\n \" INSERT INTO \" . DB_DATABASE . \".feeds \" .\n \" SET url='\".$this->link->escape($topic_url).\"'\"\n );\n\n return $this->link->getLastId();\n\n //TODO: add field to know if we are being notified of the subscription or not (pull / push)\n\n }", "title": "" }, { "docid": "63b2b21623ac79e79ebfe6299bf89b8d", "score": "0.49381706", "text": "public function newComplaintId()\n {\n $id = '';\n do {\n $id = $this->randomInteger(10);\n }\n while (Complaint::find()->where(['complaint_id'=>$id])->exists());\n return $id;\n }", "title": "" }, { "docid": "8fdb7630a99313d37866afb5e7f3f00a", "score": "0.48939195", "text": "public function create($id, $connector = '+'): string;", "title": "" }, { "docid": "6d225faca364908b0c49e62da6fb2460", "score": "0.48926917", "text": "public function test_deliver_course_created() {\n\n\t\t$this->setup_hook( 'course.created' );\n\t\t$id = $this->factory->post->create( array( 'post_type' => 'course' ) );\n\t\t$this->assertEquals( $id, $this->res['body']['id'] );\n\n\t}", "title": "" }, { "docid": "11faf91af5ec70df36f707e36d37db62", "score": "0.48674747", "text": "public function getCreatorId() : int {\n return $this->creatorId;\n }", "title": "" }, { "docid": "e33484ab585a4c788d93c94b2809fcfd", "score": "0.48282012", "text": "public function getNewGuid();", "title": "" }, { "docid": "c64e9204cefc11b43073ff59c1445bdc", "score": "0.48231348", "text": "public final function getConsumer(int $consumerId): User {\n return $this->getUser($consumerId, Roles::CONSUMER);\n }", "title": "" }, { "docid": "eef00463a13c388ad7c8df8be1751105", "score": "0.48046666", "text": "public function getRequestMerchantConsumerId()\n {\n return $this->request_merchant_consumer_id;\n }", "title": "" }, { "docid": "f95adb531a8035bdb339cd511474f357", "score": "0.47959793", "text": "function order_create_offer_id() {\n\t$query = \"INSERT INTO id_offer VALUES (NULL)\";\n\tdb_query($query);\n\treturn mysql_insert_id();\n}", "title": "" }, { "docid": "2ec89ba13f8e1e43975bb4eef8223313", "score": "0.47887176", "text": "public function new_request_token( $consumer, $callback = null );", "title": "" }, { "docid": "75fce288b39f9aaf1fd123958bca429d", "score": "0.4784071", "text": "public function getConsumer(): ?ConsumerInterface {\n if (!$this->consumer_plugin || $this->getConsumerId() !== $this->consumer_plugin->getPluginId()) {\n $this->loadConsumerPlugin();\n }\n return $this->consumer_plugin;\n }", "title": "" }, { "docid": "6369f5621ba0e3e97f5b1b312d8bdfbc", "score": "0.47821873", "text": "private function loadConsumerPlugin(): void {\n $config = $this->getConsumerConfig();\n $config['profile'] = $this;\n try {\n $this->consumer_plugin = $this->consumer_plugin_manager->createInstance($this->getConsumerId(), $config);\n }\n catch (\\Exception $e) {\n $this->logger->critical('The consumer with ID \"@consumer\" could not be retrieved for profile %profile.', [\n '@provider' => $this->getProviderId(),\n '%profile' => $this->label(),\n ]\n );\n }\n }", "title": "" }, { "docid": "6acabfb0070761b796ceb3c880ac5eca", "score": "0.47685432", "text": "public function getByName(string $consumerName)\n {\n foreach ($this->_consumerList as $name=> $consumer)\n {\n if ($name == $consumerName)\n {\n return $consumer;\n }\n }\n\n throw new ConsumerClassNotFoundException('ConsumerClass: ' . $consumerName . ' does not exist.');\n }", "title": "" }, { "docid": "8f0f06babfd92e2b7febe6ed6fc8b7aa", "score": "0.47637138", "text": "private function get_consumer( $request ) {\n\t\t$consumer_key = $request instanceof OAuthRequest ? $request->get_parameter( 'oauth_consumer_key' ) : null;\n\n\t\tif ( ! $consumer_key )\n\t\t\tthrow new OAuthException( 'Invalid consumer key.' );\n\n\t\t$consumer = $this->data_store->lookup_consumer( $consumer_key );\n\n\t\tif ( ! $consumer )\n\t\t\tthrow new OAuthException( 'Invalid consumer' );\n\n\t\treturn $consumer;\n\t}", "title": "" }, { "docid": "916205fcab3f6e42ac2e4dad2eaf8a24", "score": "0.47622558", "text": "public function getCreatorId()\n {\n return $this->creator_id;\n }", "title": "" }, { "docid": "ddf4133179be8659add439ae36be8ce0", "score": "0.476115", "text": "public function create(){\r\n $new_id = $this->database->insert(\"INSERT INTO proposals VALUES ()\");\r\n $this->database->insert(\"INSERT INTO planing (planing_prop_id) VALUES ('$new_id')\" );\r\n $this->database->insert(\"INSERT INTO budget (budget_prop_id) VALUES ('$new_id')\" );\r\n return $new_id;\r\n }", "title": "" }, { "docid": "724929c1eab2140eb2432b8795bd9241", "score": "0.47361544", "text": "public function newRequestToken(ConsumerInterface $consumer, $callback = null);", "title": "" }, { "docid": "bda7f8d5c0ca2dfe97e4f6d0a80ab4b2", "score": "0.473113", "text": "private function get_consumer(&$request)\n {\n $consumer_key = @$request->get_parameter(\"oauth_consumer_key\");\n if (! $consumer_key) {\n throw new OAuthException(\"Invalid consumer key\");\n }\n \n $consumer = $this->data_store->lookup_consumer($consumer_key);\n if (! $consumer) {\n throw new OAuthException(\"Invalid consumer\");\n }\n \n return $consumer;\n }", "title": "" }, { "docid": "7612b46ba2ec488459f914410a37463c", "score": "0.47127643", "text": "private function create_api_key_pair() {\r\n \r\n $client_id = generateJomresRandomString( 15 );\r\n $client_secret = createNewAPIKey();\r\n\r\n $query = \"INSERT INTO #__jomres_oauth_clients\r\n (`client_id`,`client_secret`,`redirect_uri`,`grant_types`,`scope`,`user_id`)\r\n VALUES\r\n ('\".$client_id.\"','\".$client_secret.\"','\".$this->redirect_uri.\"',null,'\".$this->scopes.\"',\".$this->manager_uid.\")\";\r\n\r\n $result = doInsertSql($query , \"Created Bes24 client keypair\");\r\n if ( !$result ){\r\n throw new Exception(\"create_api_key_pair failed to insert key pair\");\r\n }\r\n \r\n $query = \"INSERT INTO #__jomres_beds24_rest_api_key_xref\r\n (`oauth_client`,`manager_id`)\r\n VALUES\r\n ('\".$client_id.\"',\".$this->manager_uid.\")\";\r\n\r\n $result = doInsertSql($query , \"Cross referenced keypair to Beds24 manager\");\r\n if ( !$result ){\r\n throw new Exception(\"create_api_key_pair failed to insert cross reference to beds24 table\");\r\n }\r\n \r\n return $client_id;\r\n }", "title": "" }, { "docid": "1fa0fb9c54faf19197e949acbe6e4373", "score": "0.47120795", "text": "private function createId(): string\n {\n if (method_exists($this->handler, 'create_sid')) {\n return $this->handler->create_sid();\n }\n return session_create_id();\n }", "title": "" }, { "docid": "85142337f63722f55faca34a0e10e800", "score": "0.47119367", "text": "protected function _construct()\n {\n $this->_init('liljscart/consumer', 'consumer_id');\n }", "title": "" }, { "docid": "181240e76a84f1203ff4e337571a36ea", "score": "0.46986702", "text": "public function postUpdate(Request $request)\n {\n $this->validate($request, ['id' => 'required|exists:consumers']);\n $consumer = Consumer::find($request->id);\n\n return $this->validateAndSaveConsumer($request, $consumer);\n }", "title": "" }, { "docid": "35630e5be2260fc44ad7754ab237a922", "score": "0.4697262", "text": "public function getNewId()\n\t{\n\t\treturn $this->newId;\n\t}", "title": "" }, { "docid": "348d5e9beaccbf102c0a0ad988ba5885", "score": "0.46878538", "text": "function removeConsumer (Consumer $cons) {\n foreach ($this->consumers as $c) {\n if ($c[0] === $cons) {\n if ($c[2] == 'READY') {\n $this->removeConsumerByTag($c[0], $c[1]);\n }\n return;\n }\n }\n trigger_error(\"Consumer does not belong to this Channel\", E_USER_WARNING);\n }", "title": "" }, { "docid": "c3ea767a95a8f4b3eef466146ab7125f", "score": "0.46874934", "text": "public function getPbCreateOer() {\n\t\t$id = get_theme_mod( 'create_pb', '' );\n\n\t\treturn intval( $id );\n\t}", "title": "" }, { "docid": "d31519c6cac6b63fffbcd0e682fbd0bb", "score": "0.4686013", "text": "public function create()\n {\n //\n //return('clientes.create');\n }", "title": "" }, { "docid": "473de1cae9b4490ec39ed68924a94198", "score": "0.46828234", "text": "public function testCreateDockerApplicationWhenAlreadyExists() {\n $client = $this->createClient();\n\n $validateFailure = function(PendingCommand $handler) {\n $handler->expectsOutput('A docker app already exists');\n };\n\n // Test with both of the id and secret.\n $validateFailure($this->artisan(\"financeular:create-app --client_id={$client->id} --client_secret={$client->getPlainSecretAttribute()}\"));\n\n // Check the error when using a used ID.\n $validateFailure($this->artisan(\"financeular:create-app --client_id={$client->id} --client_secret=dummy\"));\n\n // Test using a used ID.\n $validateFailure($this->artisan(\"financeular:create-app --client_id=0 --client_secret={$client->getPlainSecretAttribute()}\"));\n }", "title": "" }, { "docid": "e26ab8915b84305c337c67131121d8f1", "score": "0.46703243", "text": "public function getCreateUserId()\n {\n return $this->create_user_id;\n }", "title": "" }, { "docid": "1c4f79afa11f6d85ad83a9bd284ad6d4", "score": "0.46618158", "text": "public function newUserId()\n {\n $id = '';\n do {\n $id = $this->randomInteger(10);\n }\n while (User::find()->where(['user_id'=>$id])->exists());\n return $id;\n }", "title": "" }, { "docid": "a731c25a0301484cb7b6efb6c84fa2a3", "score": "0.4657623", "text": "public function NewId($param) {\n\t\t//$ye = $dt->format(\"y\");\n\t\t//$mo = $dt->format(\"m\");\n\t\t//$seq = new Sequencer($this->db, 'seq_generalmonthly', 'TF', ['ye', 'mo']);\n\t\t//$id = $seq->get(['ye'=>$ye, 'mo'=>$mo]);\n\t\t//return $id;\t\t\n\t\treturn uniqid();\n\t}", "title": "" }, { "docid": "a613ab3f92b595e41a2b88c66a25fe66", "score": "0.46452335", "text": "public function create($name, $description = null, $privacyType = 'public')\n {\n $this->arguments['name'] = $name;\n $this->arguments['description'] = $description;\n $this->arguments['privacy_type'] = $privacyType;\n\n $response = $this->call('collections.create', HTTP_Request2::METHOD_POST);\n\n return (int) $response->collection_id;\n }", "title": "" }, { "docid": "ecc0094e443f6736c07d063e73c397aa", "score": "0.46380657", "text": "public function get($consumer)\n {\n return $this->synchronized(\n\n function($self, $consumer){\n\n // Current consumer should wait, as long as the inventory is\n // empty.\n while (0 === $self->queue->count()) {\n\n if (null !== $consumer->worker) {\n\n printf(\"Consumer \\033[31m%s\\033[0m in worker \\033[33m%s\\033[0m is waiting for producer : [%s] ...\\n\", $consumer->name, $consumer->worker->name, (string)$self);\n\n } else {\n\n printf(\"Consumer \\033[31m%s\\033[0m is waiting for producer : [%s] ...\\n\", $consumer->name, (string)$self);\n }\n\n // Waits on the inventory object.\n // Moves current thread to the \"waiting room\" of the\n // inventory object.\n $self->wait();\n }\n\n $before = (string)$self;\n\n $p2 = $this->size;\n\n // Now, at least one product has been produced.\n // And the producer has notified the waiting consumer to come\n // back: moving from the \"waiting room\" to the \"Consuming room\".\n $product = $self->queue->shift();\n\n $p1 = $self->size - $self->queue->count();\n\n if (null !== $consumer->worker) {\n\n printf(\"Consumer \\033[31m%s\\033[0m in worker \\033[33m%s\\033[0m is consuming one product: [%s\\033[31m%-{$p1}s\\033[0m] => \\033[31m%s\\033[0m ... [%-{$p2}s]\\n\", $consumer->name, $consumer->worker->name, (string)$self, $product, $product, (string)$self);\n\n } else {\n\n printf(\"Consumer \\033[31m%s\\033[0m is consuming one product: [%s\\033[31m%-{$p1}s\\033[0m] => \\033[31m%s\\033[0m ... [%-{$p2}s]\\n\", $consumer->name, (string)$self, $product, $product, (string)$self);\n }\n\n // Now, at least one product has been taken out of the\n // inventory, so the inventory is no longer full.\n // It's safe to notify all waiting producers to come back.\n $self->notify();\n\n return $product;\n },\n\n $this, $consumer\n );\n }", "title": "" }, { "docid": "b13bba8917ef4e30e1ad3c8163462cf3", "score": "0.4632403", "text": "function ConsumerGetById($pIntConsumerId)\n\t{\n\t\t/// get results as object\n\t\t$objConsumerDAO = new ConsumerDAO();\n\t\t$objArrayConsumer=$objConsumerDAO->ConsumerGetById($pIntConsumerId);\n\n\t\tif ($objArrayConsumer!=null)\n\t\t{\n\n\t\t\t$objConsumerBO=(object)$objArrayConsumer[0];\n\t\t\t$objCountryBO=(object)$objArrayConsumer[1];\n\t\t\t$objStateBO=(object)$objArrayConsumer[2];\n\t\t\t$objSecretQuestionBO=(object)$objArrayConsumer[3];\n\t\t\t$objAccountTypeBO=(object)$objArrayConsumer[4];\n\t\t\t\n\t\t\t\n\t\t\t$xmlConsumerList='<Consumers>';\n\t\t\t$xmlConsumerList.='<NoOfRecords>'.$intCount.'</NoOfRecords><ConsumerList>';\n\n\t\t\t$xmlConsumerList.= \"<Consumer>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerId>\".$objConsumerBO->getConsumerId().\"</ConsumerId>\";\n\t\n\t\t\t$xmlConsumerList.=\"<ConsumerCountryId>\".$objConsumerBO->getConsumerCountryId().\"</ConsumerCountryId>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerStateId>\".$objConsumerBO->getConsumerStateId().\"</ConsumerStateId>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerAccountType>\".$objConsumerBO->getConsumerAccountType().\"</ConsumerAccountType>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerSecretQuestion>\".$objConsumerBO->getConsumerSecretQuestion().\"</ConsumerSecretQuestion>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerEmail>\".$objConsumerBO->getConsumerEmail().\"</ConsumerEmail>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerPassword>\".$objConsumerBO->getConsumerPassword().\"</ConsumerPassword>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerFristName>\".$objConsumerBO->getConsumerFristName().\"</ConsumerFristName>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerLastName>\".$objConsumerBO->getConsumerLastName().\"</ConsumerLastName>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerAddress>\".$objConsumerBO->getConsumerAddress().\"</ConsumerAddress>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerCity>\".$objConsumerBO->getConsumerCity().\"</ConsumerCity>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerZipCode>\".$objConsumerBO->getConsumerZipCode().\"</ConsumerZipCode>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerTelephone1>\".$objConsumerBO->getConsumerTelephone1().\"</ConsumerTelephone1>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerDateOfBirth>\".$objConsumerBO->getConsumerDateOfBirth().\"</ConsumerDateOfBirth>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerAnswer>\".$objConsumerBO->getConsumerAnswer().\"</ConsumerAnswer>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerActivationCode>\".$objConsumerBO->getConsumerActivationCode().\"</ConsumerActivationCode>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerIsVerified>\".$objConsumerBO->getConsumerIsVerified().\"</ConsumerIsVerified>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerCreateDate>\".$objConsumerBO->getConsumerCreateDate().\"</ConsumerCreateDate>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerIsActive>\".$objConsumerBO->getConsumerIsActive().\"</ConsumerIsActive>\";\n\t\t\t$xmlConsumerList.=\"<CountryName>\".$objCountryBO->getCountryName().\"</CountryName>\";\n\t\t\t$xmlConsumerList.=\"<StateName>\".$objStateBO->getStateName().\"</StateName>\";\t\t\t\n\t\t\t$xmlConsumerList.=\"<QuestionName>\".$objSecretQuestionBO->getSecretQuestionName().\"</QuestionName>\";\t\t\t\t\t\t\n\t\t\t$xmlConsumerList.=\"<AccountType>\".$objAccountTypeBO->getAccountTypeName().\"</AccountType>\";\t\t\t\t\t\t\t\t\t\n\t\t\t$xmlConsumerList.=\"<ConsumerMobile>\".$objConsumerBO->getMobileNumber().\"</ConsumerMobile>\";\n\t\t\t$xmlConsumerList.=\"<ConsumerCellularProvider>\".$objConsumerBO->getCellularId().\"</ConsumerCellularProvider>\";\n\n\t\t\t$xmlConsumerList.=\"</Consumer>\";\n\t\t\t$xmlConsumerList.=\"</ConsumerList></Consumers>\";\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NoRecordFoundExecption(\"\");\n\t\t}\n\t\t\t\n\t\treturn $xmlConsumerList;\n\n\n\t}", "title": "" }, { "docid": "cace49048e183a369262f4c607c33bf1", "score": "0.4626358", "text": "public function add(string $key, ConsumerInterface $consumer): void\n {\n $this->consumers[$key] = $consumer;\n }", "title": "" }, { "docid": "cfc54d7df6f26dea3dbc7cef3dd3b6c2", "score": "0.4622371", "text": "public function test_load_consumer_nonce_expired() {\n $dc = new data_connector();\n\n $consumer = new ToolConsumer(null, $dc);\n $consumer->name = 'TestName';\n $consumer->setKey('TestKey');\n $consumer->secret = 'TestSecret';\n $consumer->save();\n\n $nonce = new ConsumerNonce($consumer, 'testnonce');\n $nonce->expires = time() - 100;\n // Save the nonce.\n $nonce->save();\n // Expired nonce should have been deleted.\n $this->assertFalse($dc->loadConsumerNonce($nonce));\n }", "title": "" }, { "docid": "ee07fb82c69697030255ac92de68ea09", "score": "0.46187928", "text": "public function insertId();", "title": "" }, { "docid": "074ca1f8b8775a6f90f10ee64f687cc0", "score": "0.45971668", "text": "public static function createResourceId(string $type, string $id): string;", "title": "" }, { "docid": "fbf34dfd09cb05fe6bf3a39989e8b386", "score": "0.45955133", "text": "protected function _createId()\n {\n return sprintf(\"mmfe_%s\",\n preg_replace(\"/\\W/\", \"_\", $this->getName())\n );\n }", "title": "" }, { "docid": "29ed1699430a419672bfcf871e9c39d5", "score": "0.45952836", "text": "public function create()\n\t{\n\n\t\t$command = \"Command=Client.Create\";\n\t\t\n\t\t$apiPath = $command\n\t\t;\n\n\t\treturn SessionData::getSession()->getResponse($apiPath);\n\n\t}", "title": "" }, { "docid": "554a9036cbdc72672c6e14ec9529b203", "score": "0.45922384", "text": "public function create()\n\t{\n\t\t$params=Input::get();\n\t\t$info=array(\n\t\t\t'beca'=>$params->beca,\n\t\t\t'vinculacion'=>$params->vinculacion\n\t\t\t);\n\t\t$id_beca=Becas::InsertGetId($info);\n\t\tif ($id_beca) {\n\t\t\techo json_encode(array('error' => false,'messsage'=>'Response Ok','response'=>'New ciclo created ID'.$id_beca));\n\t\t} else {\n\t\t\techo json_encode(array('error' => true,'messsage'=>'Bad Response','response'=>'Failed'));\n\t\t}\n\t}", "title": "" }, { "docid": "a7319700d441ddf54bc1a8037c843852", "score": "0.4587316", "text": "protected function createId()\n {\n if ($this->id == null) {\n $this->id = uniqid(); // Create random id for new cookie\n }\n }", "title": "" }, { "docid": "7e595d2767cc05786d65b38463c2788a", "score": "0.4582245", "text": "private function createRestApiKeys()\n {\n $role_id = $this->createRestRole();\n $this->createRestRule($role_id);\n\n // create new or get existing consumer and token\n $consumer_id = $this->getRestConsumerId();\n $token_id = $this->getRestTokenIdByConsumerId($consumer_id);\n\n $consumer = Mage::getModel('oauth/consumer')->load($consumer_id)->getData();\n $token = Mage::getModel('oauth/token')->load($token_id)->getData();\n\n return array(\n 'key' => $consumer['key'],\n 'secret' => $consumer['secret'],\n 'token' => $token['token'],\n 'token_secret' => $token['secret']\n );\n }", "title": "" }, { "docid": "7771b85896897df2eece542614c24d2c", "score": "0.45806187", "text": "protected function create() {\n if($this->prop('name', '') == '' && $this->autoCreated) {\n list($newQueue, ,) = $this->createWithConfig();\n \n // reset the name from the retrieved one\n $this->setProperty('name', $newQueue);\n } else {\n $this->createWithConfig();\n }\n \n $this->info = QueueRest::retrieve($this->prop('__.vhost', ''), $this->prop('name'));\n }", "title": "" }, { "docid": "9354e009f62262585cfacab263b4a10a", "score": "0.45748383", "text": "public function __construct( $consumer, $token );", "title": "" }, { "docid": "e2beb064b6c3e16cdbc2be0da5b55c87", "score": "0.45542142", "text": "public function createCustomer()\n {\n try {\n $customerModel = $this->_customerFactory->create();\n\n// $cu = \\Stripe\\Customer::create(array(\n// \"description\" => $this->customerSession->getCustomer()->getEmail(),\n// \"email\" => $this->customerSession->getCustomer()->getEmail()\n// ));\n $url = 'https://api.stripe.com/v1/customers';\n\n $request = [\n \"description\" => $this->customerSession->getCustomer()->getEmail(),\n \"email\" => $this->customerSession->getCustomer()->getEmail()\n ];\n\n $cu = $this->_helper->sendRequest($request, $url, null);\n $customerModel->addData([\n 'magento_customer_id' => $this->customerSession->getCustomerId(),\n 'stripe_customer_id' => $cu['id']\n ])->save();\n $stripeCustomerId = $cu['id'];\n } catch (\\Exception $e) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(\n __('Create customer fail')\n );\n }\n\n return $stripeCustomerId;\n }", "title": "" }, { "docid": "ac019a70072df7a2613ef91bc430638b", "score": "0.45521945", "text": "private function generate_sb_and_color_id()\n {\n $sb_id = $this->generate_faker_number(count(SkateBoard::all()));\n $color_id = $this->generate_faker_number(3);\n $get_exist_sb_and_color_id = Sb_and_Color::where(['sb_id' => $sb_id, 'color_id' => $color_id])->count();\n $get_exist_sb_and_color_id ? $this->generate_sb_and_color_id() : SB_and_Color::create(['color_id' => $color_id, 'sb_id' => $sb_id]);\n }", "title": "" }, { "docid": "28cc73a16023481c71f5723c45588160", "score": "0.45379627", "text": "function add_cancellation($params)\n {\n $this->db->insert('cancellation',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "f51111b442ba17f6fa503069bcf39bb4", "score": "0.45354882", "text": "public static function createChannel\n\t(\n\t\t$channel\t\t// <str> The channel (hashtag) to create.\n\t,\t$password\t\t// <str> The password to assign to the channel.\n\t)\t\t\t\t\t// RETURNS <int> the ID of the resulting channel, or 0 on failure.\n\t\n\t// $channelID = AppPrivate::createChannel($channel, $password);\n\t{\n\t\t// Make sure the password is a valid hash as expected\n\t\t$password = Sanitize::safeword($password, \"/+=\");\n\t\t\n\t\t// Check to see if the channel already exists\n\t\tif($channelID = self::getChannelID($channel))\n\t\t{\n\t\t\treturn $channelID;\n\t\t}\n\t\t\n\t\t// Get the Server ID that this channel is meant for\n\t\t$loadServerID = self::getChannelServer($channel);\n\t\t\n\t\t// Get the Chat Server ID\n\t\t$host = explode(\".\", $_SERVER['SERVER_NAME']);\n\t\t$chatServID = (int) str_replace(\"pchat\", \"\", $host[0]);\n\t\t\n\t\t// If you're not on the correct server\n\t\tif($loadServerID != $chatServID)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Create the new channel\n\t\tDatabase::query(\"INSERT INTO chat_channels_private (channel, password) VALUES (?, ?)\", array($channel, $password));\n\t\t\n\t\treturn Database::$lastID;\n\t}", "title": "" }, { "docid": "d78c3411450c3ce0b9d664e99ff512bb", "score": "0.45330122", "text": "protected function getNewOAuthUserID() {\n\t\t// TODO add a way to skip this step if server was initialized\n\t\t$this->initOAuthServer();\n\n\t\t$db = UserConfig::getDB();\n\n\t\t$module = $this->getID();\n\n\t\tif ($stmt = $db->prepare('INSERT INTO '.UserConfig::$mysql_prefix.'user_oauth_identity (module) VALUES (?)'))\n\t\t{\n\t\t\tif (!$stmt->bind_param('s', $module))\n\t\t\t{\n\t\t\t\t throw new Exception(\"Can't bind parameter\".$stmt->error);\n\t\t\t}\n\t\t\tif (!$stmt->execute())\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Can't execute statement: \".$stmt->error);\n\t\t\t}\n\t\t\t$oauth_user_id = $stmt->insert_id;\n\n\t\t\t$stmt->close();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception(\"Can't prepare statement: \".$db->error);\n\t\t}\n\n\t\treturn $oauth_user_id;\n\t}", "title": "" }, { "docid": "d6ce089149c9f9591d03ed92eb219e67", "score": "0.45238385", "text": "public function create($id)\n {\n }", "title": "" }, { "docid": "73fce5843640b443b6545b6b2607e2da", "score": "0.4521804", "text": "public function getIdByOrigin($url)\n {\n //build the select\n $_select = $this->_getReadAdapter()\n ->select()\n ->from($this->getTable('liljscart/consumer_origin'), new Zend_Db_Expr('consumer_id'))\n ->where('origin = :origin');\n \n //Query the DB\n $_consumer = $this->_getReadAdapter()\n ->fetchOne(\n $_select, \n array(\n 'origin' => $url\n )\n );\n \n return $_consumer;\n }", "title": "" }, { "docid": "124745fe75f899a64f5f4b7a6f8dfba3", "score": "0.45134115", "text": "public function create()\n\t{\n\t\t//This is create part\n\t}", "title": "" }, { "docid": "4131b8c07ac37e435dac1fe139d4165d", "score": "0.44943503", "text": "public function run()\n {\n //\n factory(App\\ConsumerAlert::class, 5)->create();\n\n }", "title": "" }, { "docid": "0a57c1190ed79e8768e699fd53c45625", "score": "0.44939187", "text": "public final function createConsumer(string $name, string $email, string $password): User {\n return $this->createUser($name, $email, $password, Roles::CONSUMER)->load('role');\n }", "title": "" }, { "docid": "e6ef652bbdfd41345546dbf953142c7d", "score": "0.4493352", "text": "protected function getNewId() {\n $prefix = 'imap_id_';\n if ($self->countOfIds) {\n $self->countOfIds++;\n } else {\n $self->countOfIds = 1;\n }\n return $prefix . $self->countOfIds;\n }", "title": "" }, { "docid": "c1bfb8e0e50b1ec20abd058d3a7b0b5a", "score": "0.44881558", "text": "public function createDelivery();", "title": "" }, { "docid": "b7cb9ee477e135cb81e85b8ab58429fd", "score": "0.44797903", "text": "function action_create()\n\t{\n\t\tlog_debug(\"inc_charts\", \"Executing action_create()\");\n\n\t\t// create a new chart\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"INSERT INTO `account_charts` (chart_type) VALUES ('\". $this->data[\"chart_type\"]. \"')\";\n\t\t$sql_obj->execute();\n\n\t\t$this->id = $sql_obj->fetch_insert_id();\n\n\t\treturn $this->id;\n\n\t}", "title": "" }, { "docid": "b469a5f4c032f0243267e7caeb4a48e4", "score": "0.44764408", "text": "public function create($data, $destination_url = null) {\n if(!is_null($destination_url)){\n $data['destination_url'] = $destination_url;\n }\n\n $this->CI->db->insert($this->collection, $data);\n $this->id = $this->CI->db->insert_id();\n\n return $this->id;\n }", "title": "" }, { "docid": "bf389a5aa102ba27c9d965b2a3922607", "score": "0.447319", "text": "protected function create() {\n $this->code = self::createCode($this->gid, $this->year, $this->source, $this->type);\n $this->metadata_identifier = self::createUuid();\n\n $data = $this->attributesToArray();\n $data['created_at'] = REQUEST_TIME;\n $data['updated_at'] = REQUEST_TIME;\n\n $id = db_insert($this->table)\n ->fields($data)\n ->execute();\n\n return $id;\n }", "title": "" }, { "docid": "3aead144516f7821c63cca851bf24562", "score": "0.44712824", "text": "public static function startingConsumerProcess($cmd)\n {\n return sprintf(self::STARTING_CONSUMER_PROCESS, $cmd);\n }", "title": "" }, { "docid": "92a6e76aee1c895f7f351be11ebca912", "score": "0.4469979", "text": "public function getCreator()\n {\n\n }", "title": "" }, { "docid": "cd50bd5793fae1d53d2890ee999c37d1", "score": "0.44698846", "text": "public function actionCreateById()\r\n {\r\n// Az::$app->smart->adder->createById($id);\r\n\r\n// Az::debug($app, 'requesting for SSL certificates');\r\n// Az::$app->acme->acmecore->addSSL($domain, $app);\r\n\r\n }", "title": "" }, { "docid": "2cc10cd07609b46a9eb771e80d37a0e4", "score": "0.446791", "text": "public function consumer()\n {\n // Arrange\n $app = Mockery::mock('Illuminate\\Container\\Container', 'ArrayAccess');\n $redirectUri = 'https://example.org/callback';\n $scopes = ['email', 'read'];\n $credentials = ['client_id' => 'cl13nt1d', 'client_secret' => 'cl13nts3cr3t'];\n $twitter = new Twitter;\n\n $app->shouldReceive('make')->once()\n ->with('OAuth\\Services\\Twitter')->andReturn($twitter);\n $app->shouldReceive('offsetGet')->once()\n ->with('config')->andReturn($app);\n $app->shouldReceive('get')->once()\n ->with('php-oauth::oauth.consumers.twitter')->andReturn($credentials);\n\n $manager = new Manager($app);\n\n // Act\n $consumer = $manager->consumer('twitter', $redirectUri, $scopes);\n\n // Assert\n $this->assertEquals($credentials, $consumer->getCredentials());\n $this->assertEquals($scopes, $consumer->getScopes());\n $this->assertEquals($redirectUri, $consumer->getRedirectUri());\n }", "title": "" }, { "docid": "8eab8750f5620a2c69216a2fcc2a5bf1", "score": "0.44614136", "text": "public function getOne($id): ConsumerAutoOrderResource\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "74a8718b7af2b67d128913b8f99f768d", "score": "0.44562685", "text": "public function addNewReceiverToQueue($email_queue_id, $data)\n {\n $queue=orm::factory(\"email_queue\");\n \n $queue->email_queue_body_id=$email_queue_id;\n \n $queue->values($data);\n \n $queue->queue_create_date = date(\"Y-m-d H:i:s\");\n $queue->queue_date_to_be_send = date(\"Y-m-d H:i:s\");\n $queue->queue_priority = isset($data[\"priority\"])?$data[\"priority\"]:2;\n return $queue->save()->id;\n \n \n }", "title": "" }, { "docid": "7b405f30e84619e1d0862df662b8745d", "score": "0.44522232", "text": "public function getKey()\n {\n\n return $this->getConsumer()->getKey();\n\n }", "title": "" }, { "docid": "abbabcc6b488e73f3bef7e6c344f851b", "score": "0.4450306", "text": "public function create($id)\n {\n //\n }", "title": "" }, { "docid": "85304951247b065fd505c48cf3755d26", "score": "0.4449523", "text": "public function getIdByApiKey($apiKey)\n {\n //build the select\n $_select = $this->_getReadAdapter()\n ->select()\n ->from($this->getMainTable(), new Zend_Db_Expr('consumer_id'))\n ->where('api_key = :api_key');\n \n //Query the DB\n $_consumer = $this->_getReadAdapter()\n ->fetchOne(\n $_select, \n array(\n 'api_key' => $apiKey\n )\n );\n \n return $_consumer;\n }", "title": "" } ]
bb7b18c7842c3f5289d2c9e07c5e5aba
Creates a form to edit a GrhTypeFiche entity.
[ { "docid": "fa6cd89fb94c051c921768dd99f893d8", "score": "0.84269565", "text": "private function createEditForm(GrhTypeFiche $entity) {\r\n $form = $this->createForm('Loonins\\GrhBundle\\Form\\GrhTypeFicheType', $entity, array(\r\n 'action' => $this->generateUrl('grhtypefiche_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType'), array('label' => 'Enregistrer les modifications'));\r\n\r\n return $form;\r\n }", "title": "" } ]
[ { "docid": "4ea630e0b625ec65ba063ecec3682f90", "score": "0.72308165", "text": "private function createCreateForm(GrhTypeFiche $entity) {\r\n $form = $this->createForm('Loonins\\GrhBundle\\Form\\GrhTypeFicheType', $entity, array(\r\n 'action' => $this->generateUrl('grhtypefiche_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', LegacyFormHelper::getType('Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType'), array('label' => 'Enregistrer'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "a3def1f150f74da5a302e5a96157e7d4", "score": "0.7057041", "text": "private function createEditForm(Facture $entity) {\n $form = $this->createForm(new FactureType(), $entity, array(\n 'action' => $this->generateUrl('facture_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "c0a13f78e07927914218ae3a183fbbc0", "score": "0.70228446", "text": "private function createEditForm(Conge $entity) {\n\t\t$this->securityControle();\n $form = $this->createForm(new CongeType(), $entity, array(\n 'action' => $this->generateUrl('conge_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Valider'));\n\n return $form;\n }", "title": "" }, { "docid": "78cb5c73eb1ed4d6cd435944a81a0931", "score": "0.6974948", "text": "private function createEditForm(Facture $entity)\n {\n $form = $this->createForm(new FactureType(), $entity, array(\n 'action' => $this->generateUrl('facture_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "fe50f8c46255e792dbc63be1f9d65fdd", "score": "0.68973595", "text": "private function createEditForm(MissionAffretement $entity) {\n $emRole = $this->getDoctrine()->getManager();\n $roles = ($this->getUser()) ? $this->getUser()->getRoles() : array(null);\n $role = $emRole->getRepository('FdrAdminBundle:Role')->findOneByNomRole(substr(strtoupper($roles[0]), 5));\n $form = $this->createForm(new MissionAffretementType($role), $entity, array(\n 'action' => $this->generateUrl('missionaffretement_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $label = ($entity->getEtat()=='fdr-cloturer')?'Cloturer':'Modifier';\n $form->add('submit', 'submit', array('label' => $label, 'attr' => array('class' => 'btn-primary span2 offset4', 'onclick' => 'return verifDateRamLiv();')));\n return $form;\n }", "title": "" }, { "docid": "02640e827012ed1cc5314bbb1c876d6b", "score": "0.68716884", "text": "private function createEditForm(Alcances $entity)\n {\n $form = $this->createForm(new AlcancesType(), $entity, array(\n 'action' => $this->generateUrl('alcances_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr' => array('class' => 'marg btn btn-primary btn-sm')));\n \n\n return $form;\n }", "title": "" }, { "docid": "80b27f1fb131f64dfdb59a77eb0fffa3", "score": "0.68366283", "text": "private function createEditForm(Heritage $entity)\n {\n $form = $this->createForm(new HeritageType(), $entity, array(\n 'action' => $this->generateUrl('heritage_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "c1a1374b556900a86accb1d2a328ba20", "score": "0.68310505", "text": "private function createEditForm(Plaisir $entity)\r\n {\r\n $form = $this->createForm(new PlaisirType(), $entity, array(\r\n 'action' => $this->generateUrl('plaisir_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "9407077e6765835f7f58349fef722222", "score": "0.67813206", "text": "private function createEditForm(Ecriture $entity)\n {\n $form = $this->createForm(new EcritureType(), $entity, array(\n 'action' => $this->generateUrl('ecriture_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier'));\n\n return $form;\n }", "title": "" }, { "docid": "b5176b43fc49b1b7a98e4d8ff61e75cd", "score": "0.676517", "text": "public function newAction() {\r\n $entity = new GrhTypeFiche();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "title": "" }, { "docid": "05dba7f08d971cc8b25808f949611048", "score": "0.6733765", "text": "private function createEditForm(RecepisseDICT $entity)\n {\n $form = $this->createForm(new RecepisseDICTType($entity), $entity, array(\n 'action' => $this->generateUrl('recepissedict_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }", "title": "" }, { "docid": "128a0e5dcb2553adee265c6498066527", "score": "0.6713175", "text": "private function createEditForm(Curso $entity)\n {\n $form = $this->createForm(new CursoType(), $entity, array(\n 'action' => $this->generateUrl('aulas_curso_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr'=>array('class'=>'btn btn-default botonTabla')));\n $form->add('button', 'submit', array('label' => 'Volver a la lista','attr'=>array('formaction'=>'../../curso','formnovalidate'=>'formnovalidate','class'=>'btn btn-default botonTabla')));\n\n return $form;\n }", "title": "" }, { "docid": "90db97df9e95b9ec47079b5185cfe7d7", "score": "0.6695681", "text": "private function createEditForm($entity, $type)\r\n {\r\n switch ($type) {\r\n case 'artillerie':\r\n $form = $this->createForm(new ArtillerieType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n case 'mines':\r\n $form = $this->createForm(new MinesType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n case 'mortier':\r\n $form = $this->createForm(new MortierType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n case 'missiles':\r\n $form = $this->createForm(new MissilesType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n case 'roquettes':\r\n $form = $this->createForm(new RoquettesType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n case 'bombes':\r\n $form = $this->createForm(new BombesType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n case 'grenades':\r\n $form = $this->createForm(new GrenadesType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n case 'sousmunitions':\r\n case 'sousMunitions':\r\n $form = $this->createForm(new SousMunitionsType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n case 'minesmarines':\r\n case 'minesMarines':\r\n $form = $this->createForm(new MinesMarinesType(), $entity, array(\r\n 'action' => $this->generateUrl('munition_update', array(\r\n 'id' => $entity->getId(),\r\n 'type' => $type)),\r\n 'method' => 'PUT',\r\n ));\r\n break;\r\n }\r\n\r\n $form->add('submit', 'submit', array('label' => 'Valider'));\r\n $form->add('reset', 'reset', array('label' => 'Annuler'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "ea56cfc8e9b96a4f8fcdc5edcad50dbd", "score": "0.6643529", "text": "private function createEditForm(Raza $entity)\n {\n $form = $this->createForm(new RazaType(), $entity, array(\n 'action' => $this->generateUrl('admin_raza_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "title": "" }, { "docid": "632a1d768ec211fdf36e9ae4f71e0062", "score": "0.6642476", "text": "private function createEditForm(TacheStatut $entity)\r\n {\r\n $form = $this->createForm(new TacheStatutType(), $entity, array(\r\n 'action' => $this->generateUrl('tachestatut_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n return $form;\r\n }", "title": "" }, { "docid": "b941e8fad6edbce858e6c955b702bf73", "score": "0.6635267", "text": "private function createEditForm(ECursos $entity)\n {\n $form = $this->createForm(new ECursosType(true), $entity, array(\n 'action' => $this->generateUrl('cursos_update', array('id' => $entity->getId())),\n 'method' => 'post',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Actualizar', 'attr'=>array('class'=>'btn btn-success')));\n\n return $form;\n }", "title": "" }, { "docid": "086f02a06041d041e1484dba22f40c44", "score": "0.66337353", "text": "private function createEditForm(CodigoModelo $entity) {\n $form = $this->createForm(new CodigoModeloType(), $entity, array(\n 'action' => $this->generateUrl('codigo_modelo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array('class' => 'box-body')\n ));\n\n $form->add(\n 'submit', 'submit', array(\n 'label' => 'Actualizar',\n 'attr' => array('class' => 'btn btn-primary pull-right'),\n )\n );\n\n return $form;\n }", "title": "" }, { "docid": "aefdca581e1336c82f53137e734e362f", "score": "0.6629296", "text": "private function createEditForm(Critere $entity)\n {\n $form = $this->createForm(new CritereType(), $entity, array(\n 'action' => $this->generateUrl('critere_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "2fdd9bcd7178ce8b844e6a0eeb6bafd0", "score": "0.6610879", "text": "private function createEditForm(EbSubsegmento $entity)\n\t{\n $form = $this->createForm(new EbSubsegmentoType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('compras_subsegmento_update', array('id' => $entity->getId())),\n\t\t\t'method' => 'PUT',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array('label' => 'Update'));\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "4c92ba2c724f02972a95d5595e52600a", "score": "0.658583", "text": "private function createEditForm(Candidato $entity)\n {\n $form = $this->createForm(new CandidatoType(), $entity, array(\n 'action' => $this->generateUrl('candidato_update', array('id' => $entity->getPessoa()->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "title": "" }, { "docid": "d6281be8f6c05ff2e1a74597f1148aae", "score": "0.65576184", "text": "private function createEditForm(Publicacion $entity)\n {\n $form = $this->createForm(new PublicacionType(), $entity, array(\n 'action' => $this->generateUrl('publicaciones_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'em'=>$this->getDoctrine()->getManager(),\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "855caadc58137801dc6b701bd0077fb6", "score": "0.6535536", "text": "private function createEditForm(tiempoDeClase $entity)\n {\n $form = $this->createForm(new tiempoDeClaseType(), $entity, array(\n 'action' => $this->generateUrl('tiempodeclase_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "1f26a555966a8e18f28e8ac09ff5e09c", "score": "0.65337676", "text": "private function createEditForm(SkBooking $entity) {\n $form = $this->createForm(new SkBookingType(), $entity, array(\n 'action' => $this->generateUrl('booking_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "9239aec23fb7568b486eb50972257a6e", "score": "0.65324914", "text": "private function createEditForm(SecuriteProfil $entity)\n {\n $form = $this->createForm(new SecuriteProfilType(), $entity, array(\n 'action' => $this->generateUrl('securite_roles_update', array('id' => $entity->getCodeprof())),\n 'method' => 'PUT',\n ));\n return $form;\n }", "title": "" }, { "docid": "af2dff586bec0816a0c8531a6ab44595", "score": "0.6525234", "text": "private function createEditForm(DatosSeguridadParticipacion $entity)\n {\n $form = $this->createForm(new DatosSeguridadParticipacionType(), $entity, array(\n 'action' => $this->generateUrl('datosseguridadpar_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar', 'attr' => array('class' => 'btn-success')));\n\n return $form;\n }", "title": "" }, { "docid": "5429196ed7a87b1b9bd7ab3c266c81f9", "score": "0.6513246", "text": "private function createEditForm(Abono $entity)\n {\n $form = $this->createForm(new AbonoType(), $entity, array(\n 'action' => $this->generateUrl('abono_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "e61744310e68b57b1c67064548d68938", "score": "0.65098345", "text": "private function createEditForm(TipoCobrancaPagamento $entity)\n {\n $form = $this->createForm(new TipoCobrancaPagamentoType(), $entity, array(\n 'action' => $this->generateUrl('tipocobrancapagamento_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "e9a65077aa4472e5d494343c11c9c979", "score": "0.6506324", "text": "private function createEditForm(Asignatura $entity)\n {\n $form = $this->createForm(new AsignaturaType(), $entity, array(\n 'action' => $this->generateUrl('asignatura_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "title": "" }, { "docid": "84bcfde143ad761011c2921192faa30c", "score": "0.6502002", "text": "private function createEditForm(EntregasMinoristas $entity)\n {\n $form = $this->createForm(EntregasMinoristasType::class, $entity, array(\n 'action' => $this->generateUrl('retail_supplier_deliveries_edit', array('id' => $entity->getId())),\n 'method' => 'POST',\n 'attr' => array('id' => 'entregas-form'),\n 'em' => $this->getDoctrine()->getManager(),\n 'esEdicion' => TRUE\n ));\n\n $form->add('submit',SubmitType::class, array( 'label' => 'Actualizar',\n 'attr' => array('class' =>'btn btn-success')));\n\n return $form;\n }", "title": "" }, { "docid": "5ef62e51e63b4ca870c0fb35d5062a69", "score": "0.65016407", "text": "private function createEditForm(AdOcupaciones $entity)\n {\n $form = $this->createForm(new AdOcupacionesType(), $entity, array(\n 'action' => $this->generateUrl('adocupaciones_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar', 'attr' => array('class' => 'btn-success')));\n\n return $form;\n }", "title": "" }, { "docid": "8dd58638aaab5fdfef08192407d2db7a", "score": "0.6493926", "text": "private function createEditForm(procedencia $entity)\n {\n $form = $this->createForm(new procedenciaType(), $entity, array(\n 'action' => $this->generateUrl('procedencia_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "45c0655ebf92ae03e5df2375acdb4278", "score": "0.6489257", "text": "private function createEditForm(Orden $entity)\n {\n $form = $this->createForm(new OrdenType(), $entity, array(\n 'action' => $this->generateUrl('orden_update', array('id' => $entity->getId())),\n //'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "2b8124be3b0737bf4a406ad8a6ddd726", "score": "0.6485817", "text": "private function CongeEditForm(Conge $entity)\n {\n $form = $this->createForm(new CongeSupAdminType(), $entity, array(\n 'action' => $this->generateUrl('sup_ad_conge_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n \n return $form;\n }", "title": "" }, { "docid": "2d0944f1550a4c9867e329516cee556a", "score": "0.64854676", "text": "private function createEditForm(Projet $entity)\r\n {\r\n $form = $this->createForm(new ProjetType(), $entity, array(\r\n 'action' => $this->generateUrl('modifier_projet', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n return $form;\r\n }", "title": "" }, { "docid": "1edbd1f2407c2a7d34a1981fef508014", "score": "0.64826703", "text": "private function createEditForm(Credito $entity)\n {\n $form = $this->createForm(new CreditoType(), $entity, array(\n 'action' => $this->generateUrl('credito_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Guardar', 'attr' => array('class' => 'guardar')));\n \n return $form;\n }", "title": "" }, { "docid": "d0400b331abc17e860d23378a14a651e", "score": "0.6482544", "text": "private function createEditForm(Cvupload $entity) {\n\t\t$this->securityControle();\n $form = $this->createForm(new CvuploadType(), $entity, array(\n 'action' => $this->generateUrl('cvupload_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Valider'));\n\n return $form;\n }", "title": "" }, { "docid": "93e00bdf56886ee366ae362d6c57a556", "score": "0.6477201", "text": "private function createEditForm(Entidad $entity)\n {\n $securityContext = $this->container->get('security.context');\n $form = $this->createForm(new EntidadType($securityContext), $entity, array(\n 'action' => $this->generateUrl('administracion_entidad_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "2d0b3ca042fd76f8f0e4e06e5f4afb10", "score": "0.64640063", "text": "private function createEditForm(Emprendimiento $entity)\n {\n $form = $this->createForm(new EmprendimientoEditType(), $entity, array(\n 'action' => $this->generateUrl('emprendimiento_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr' => array('class' => 'boton_submit')));\n\n return $form;\n }", "title": "" }, { "docid": "bce4fd322d786431a9abb5d023161466", "score": "0.64620715", "text": "private function createEditSalarieForm(ImportSalarie $entity)\n {\n $form = $this->createForm(new ImportSalarieType(), $entity);\n return $form;\n }", "title": "" }, { "docid": "10912f7faeb424e96a40c2e1384d3706", "score": "0.6459783", "text": "private function createEditForm(Drone $entity) {\n\t\t$form = $this->createForm(new DroneType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('drone_update', array('id' => $entity->getId())),\n\t\t\t'method' => 'PUT',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array(\n\t\t\t\t'label' => 'Mettre à jour',\n\t\t\t\t'attr' => array(\n\t\t\t\t\t\t'class' => 'btn btn-info'\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "5ce5ddd6105d79bf586d21b4b754d4b9", "score": "0.6428944", "text": "private function createEditForm(Subtema $entity)\n {\n $form = $this->createForm(new SubtemaType(), $entity, array(\n 'action' => $this->generateUrl('subtema_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "09ed780d3ef3b836e5fd40e1ba7605d3", "score": "0.641917", "text": "private function createEditForm(Mercancia $entity)\n {\n $em = $this->getDoctrine()->getManager();\n $form = $this->createForm(new MercanciaType(), $entity, array(\n 'action' => $this->generateUrl('mercancia_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n $form->add('tarifaAlternativa');\n $form->remove('cantidad');\n\n return $form;\n }", "title": "" }, { "docid": "6838b969ffd01120658a09521db5cdba", "score": "0.64117354", "text": "private function createEditForm(CintasVirgenes $entity)\n {\n $form = $this->createForm(new CintasVirgenesType(), $entity, array(\n 'action' => $this->generateUrl('cintasvirgenes_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Guardar',\n 'attr' => array('class' => 'btn btn-default' )\n ));\n\n return $form;\n }", "title": "" }, { "docid": "2164b74df4be2672565cd92a36aa0956", "score": "0.6409277", "text": "public function editAction($id, $type)\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n switch ($type) {\r\n case 'sousmunitions':\r\n $type = 'sousMunitions';\r\n break;\r\n case 'minesmarines':\r\n $type = 'minesMarines';\r\n break;\r\n };\r\n\r\n\r\n $entity = $em->getRepository('FeodBundle:'.ucfirst($type))->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Munition entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity, $type);\r\n //$deleteForm = $this->createDeleteForm($id,$type);\r\n\r\n return $this->render('FeodBundle:'.ucfirst($type).':new.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $editForm->createView(),\r\n //'delete_form' => $deleteForm->createView(),\r\n ));\r\n }", "title": "" }, { "docid": "fd9eaec894261d2d5fed3b91ac150c2c", "score": "0.6408971", "text": "private function createEditForm(HotelRestaurante $entity)\n {\n $form = $this->createForm(new HotelRestauranteType(), $entity, array(\n 'action' => $this->generateUrl('hotelrestaurante_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-primary')));\n\n return $form;\n }", "title": "" }, { "docid": "891b1da444d18ae8b50640b290940613", "score": "0.64034367", "text": "private function createEditForm(Reserva $entity)\n {\n $form = $this->createForm(new ReservaType(), $entity, array(\n 'action' => $this->generateUrl('reserva_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "f298394d677d603d4b57757977588c94", "score": "0.6386142", "text": "private function createEditForm(TypeAction $entity)\r\n {\r\n $form = $this->createForm(new TypeActionType(), $entity, array(\r\n\t 'action' => $this->generateUrl('modifier_type_action', array('id' => $entity->getId())),\r\n\t 'method' => 'PUT',\r\n\t ));\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n return $form;\r\n }", "title": "" }, { "docid": "f03d6e4989a3b461d9cc65dafe7152ab", "score": "0.6379853", "text": "private function createEditForm(Trophy $entity)\n {\n $form = $this->createForm(new TrophyType(), $entity, array(\n 'action' => $this->generateUrl('trophy_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.63702095", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "121bf2a9ff3ae77660474466bb2f5062", "score": "0.63693726", "text": "private function createEditForm(Comunicacion $entity)\n {\n $form = $this->createForm(new ComunicacionType(), $entity, array(\n 'action' => $this->generateUrl('comunicacion_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "12225cc487fd1b3a745fd2895df0daa6", "score": "0.63689476", "text": "private function createEditForm(ExpTransp $entity)\n {\n $form = $this->createForm(new ExpTranspType(), $entity, array(\n 'action' => $this->generateUrl('com_ExpeTrans_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Affecter','attr'=>array('class'=>'btn btn-warning','style'=>'width:100px;')));\n\n return $form;\n }", "title": "" }, { "docid": "29101d122edf42a0efc372145fc9eab0", "score": "0.63672286", "text": "private function createEditForm(Jugador $entity)\n {\n $form = $this->createForm(new JugadorType(), $entity, array(\n 'action' => $this->generateUrl('admin_jugador_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Aplicar cambios'));\n\n return $form;\n }", "title": "" }, { "docid": "62163b074493657b994bfd2c43614659", "score": "0.63637173", "text": "private function createEditForm(DetalleEstetica $entity)\n {\n $form = $this->createForm(new DetalleEsteticaType(), $entity, array(\n 'action' => $this->generateUrl('admin_detalle-estetica_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "0258f0a0f9bfa765901741e2febeefc4", "score": "0.6345455", "text": "private function createEditForm(Luncheon $entity)\n {\n $form = $this->createForm(new LuncheonType(), $entity, array(\n 'action' => $this->generateUrl('UMRA_Luncheon_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-primary')));\n\n return $form;\n }", "title": "" }, { "docid": "fd038629a1da6649b62bd47cc86ca375", "score": "0.6343839", "text": "private function createEditForm(Commande $entity) {\n $form = $this->createForm(new CommandeType(), $entity, array(\n 'action' => $this->generateUrl('commande_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Valider'));\n\n return $form;\n }", "title": "" }, { "docid": "b597672dc84fa6494e0370372ac5684f", "score": "0.6325593", "text": "private function createEditForm(Promotion $entity)\n { \n\n // Récupération de l'utilisateur connecté\n $user = $this->getUser();\n $userRoles = $user->getRoles();\n\n $form = $this->createForm(new PromotionType(), $entity, array(\n 'action' => $this->generateUrl('promotion_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n // Si l'utilisateur est secretaire\n if(in_array('ROLE_SECRETARY', $userRoles)){\n $form->add('cursus', 'entity', array(\n 'query_builder' => function($entity) use ($user){\n return $entity\n ->createQueryBuilder('p')\n ->innerJoin('p.formation', 'formation')\n ->innerJoin('formation.secretaireFormation', 'secretaireFormation')\n ->where('secretaireFormation = :userId')\n ->orderBy('p.id', 'ASC')\n ->setParameter('userId', $user->getId());\n },\n 'property' => 'formation.nom',\n 'class' => 'OverrideScrumBundle:Cursus',\n ));\n }else{\n\n $form->add('cursus', 'entity', array(\n 'query_builder' => function($entity) { return $entity->createQueryBuilder('p')->orderBy('p.id', 'ASC'); },\n 'property' => 'formation.nom',\n 'class' => 'OverrideScrumBundle:Cursus',\n )\n );\n }\n\n $form->add('submit', 'submit', array('label' => 'Modifier', 'attr' => array('class' => 'btn btn-primary')));\n\n return $form;\n }", "title": "" }, { "docid": "ef0e81dcc74f440a5b5b78c51a919ab4", "score": "0.6313185", "text": "private function createEditForm(Offres $entity)\n {\n $form = $this->createForm(new OffresType(), $entity, array(\n 'action' => $this->generateUrl('offres-emploi__update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Éditer'));\n $form->remove('file');\n\n return $form;\n }", "title": "" }, { "docid": "4bc2123a9a12cbae4b683d4e7a3472c1", "score": "0.6304254", "text": "private function createEditForm(Utilisateur $entity)\r\n {\r\n $form = $this->createForm(new UsersType(), $entity, array(\r\n 'action' => $this->generateUrl('admin_users_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Mettre à jour les données','attr'=>array('class'=>'btn btn-sm btn-primary')));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "40901df34305a37a3ea1b03fc55e1ccd", "score": "0.6286894", "text": "public function edit(Fournisseur $fournisseur)\n {\n\n }", "title": "" }, { "docid": "f2f233020862af54a16847d51700f6d5", "score": "0.62848157", "text": "private function createEditForm(EbNotaCredito $entity)\n {\n $form = $this->createForm(new EbNotaCreditoType(), $entity, array(\n 'action' => $this->generateUrl('notacredito_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "78ab93e0e7dcc01d323e2789e15acf71", "score": "0.6281944", "text": "public function edit(FormBuilder $formBuilder,$id)\n {\n $title = $this->title;\n $form = $formBuilder->create(PegawaiForm::class, [\n 'method' => 'POST',\n 'model' => Model::findOrFail($id),\n 'url' => url('pegawais/update/'.$id)\n ]);\n\n return view('pages.base.form', compact(['form','title']));\n }", "title": "" }, { "docid": "89085ba46986e26c92dc880289b87799", "score": "0.6275479", "text": "public function edit(FormBuilder $formBuilder,$id)\n {\n $title = $this->title;\n $form = $formBuilder->create(DiklatForm::class, [\n 'method' => 'POST',\n 'model' => Model::findOrFail($id),\n 'url' => url('info_diklats/update/'.$id)\n ]);\n\n return view('pages.base.form', compact(['form','title']));\n }", "title": "" }, { "docid": "432f57cb1ac502a4aa5f7b27d9572233", "score": "0.62739813", "text": "private function createEditForm(UserType $entity)\n {\n $form = $this->createForm(\n new UserTypeType(),\n $entity,\n array(\n 'action' => $this->generateUrl('user_type_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array(\n 'class' => 'form-horizontal'\n )\n )\n );\n\n return $form;\n }", "title": "" }, { "docid": "57a1af1297a328b965a42335b40072a5", "score": "0.6272491", "text": "public function edit(Factura $factura)\n {\n //\n }", "title": "" }, { "docid": "74f4610b02260bd682c1fffbad39f8ef", "score": "0.6269733", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $this->getCheval($em, $id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Cheval entity.');\n }\n\n $chevalType = new ChevalType($em);\n $chevalType->setUser($this->get('security.context')->getToken()->getUser());\n\t\t$chevalType->setCheval($entity);\n $editForm = $this->createForm($chevalType, $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('chevChevalBundle:Cheval:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "5bdb17a0e0e38be8967b2b5e35eef464", "score": "0.62617576", "text": "private function createEditForm(LiquidacionMaterial $entity)\n {\n $form = $this->createForm(new LiquidacionMaterialType(), $entity, array(\n 'action' => $this->generateUrl('liquidacionmaterial_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Editar', 'attr' => array('class' => 'btn btn-warning entity-submit pull-right')));\n\n return $form;\n }", "title": "" }, { "docid": "5c0624fa463882618674256ec75e133d", "score": "0.6252802", "text": "public function editar($id=0)\n {\n if($id){\n $obj = Actividad::find($id);\n } else {\n $obj = new Actividad();\n }\n if(!$obj->latitud) $obj->latitud = 40.426175;\n if(!$obj->longitud) $obj->longitud = -3.685144;\n\n $form = DataEdit::source($obj);\n $form->add('titulo','Título', 'text')->rule('required'); //field name, label, type\n\n $form->add('concejalia_id', 'Concejalia', 'select')->options(Concejalia::dameConcejalias())->rule('required');\n $form->add('tipo_actividad_id', 'Tipo Actividad', 'select')->options(TipoActividad::dameTiposActividad())->rule('required');\n $form->add('organizacion.nombre','Organización','autocomplete')->search(['nombre'])\n ->extra('<br />Ingresar texto para buscar una Organización ya existente<br />');\n\n $form->add('descripcion', 'Descripción', 'textarea')->rule('required');\n\n $form->add('imagen','Imagen', 'image')->move('uploads/images/actividades/')->preview(400,160)->fit(800,320)\n ->extra('<br />Tamaño: 800 x 320');\n $form->add('mapa','Ubicaci&oacute;n','App\\Utils\\MapWithKey')\n ->latlon('latitud','longitud')->setKey(env('GOOGLE_MAP_KEY'))->zoom(15)->setMapWidth(700)->setMapHeight(400)\n ->extra('<br />Arrastre el pin a las coordenadas de la actividad');\n\n $form->add('website', 'Sitio Web', 'text')->extraAttributes(['placeholder'=>'http://pagina.com']);\n $form->add('telefono', 'Teléfono', 'text');\n $form->add('email', 'Email', 'text')->rule('email');\n\n if(!$id){\n $form->add('fecha_inicio', 'Fecha de Inicio', 'datetime')->rule('required|after:yesterday');\n $form->add('fecha_fin', 'Fecha Finalización', 'datetime')\n ->extra('<br />Dejar vacio si el evento dura un solo día<br />')->rule('after:fecha_inicio');\n } else {\n $form->add('fecha_inicio', 'Fecha de Inicio', 'datetime')->rule('required');\n $form->add('fecha_fin', 'Fecha Finalización', 'datetime')\n ->extra('<br />Dejar vacio si el evento dura un solo día<br />')->rule('after:fecha_inicio');\n }\n\n $form->saved(function() use ($form, $id)\n {\n\n if(!$id){\n $form->message(\"Actividad creada correctamente\");\n } else {\n $form->message(\"Actividad actualizada!\");\n }\n $form->link(url(\"/panel/\".$this->path),\"Regresar al listado\");\n $form->link(url(\"/panel/\".$this->path.\"/editar/0\"),\"Crear una nueva actividad\");\n\n if($form->model->id){\n $form->link(url(\"/panel/\".$this->path.\"/editar/\".$form->model->id),\"Editar actividad anterior\");\n }\n });\n\n return view('pages.panel.'.$this->path.'.form', compact('form'));\n }", "title": "" }, { "docid": "9276df0d5927c086ad49e950404830eb", "score": "0.6252266", "text": "private function createEditForm(CatedraticoCurso $entity)\n {\n $form = $this->createForm(new CatedraticoCursoType(), $entity, array(\n 'action' => $this->generateUrl('catedraticocurso_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Actualizar',\n 'attr' => array('class' => 'btn btn-primary'),\n ));\n\n return $form;\n }", "title": "" }, { "docid": "7d7e688295ddcda567a5127cbd1160bb", "score": "0.6250467", "text": "private function createEditForm(Peage $entity)\n {\n $form = $this->createForm(new PeageType(), $entity, array(\n 'action' => $this->generateUrl('peage_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n //--\n $form->add('submit', 'submit', array('label' => 'Modifier','attr'=>array('class'=>'btn-primary span2 offset5')));\n //--\n return $form;\n }", "title": "" }, { "docid": "1e80a2cce4f6f0c76aac28d8bdcc1311", "score": "0.6247717", "text": "private function createEditForm(Projets $entity)\n {\n $form = $this->createForm(new ProjetsType(), $entity, array(\n 'action' => $this->generateUrl('projets_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour', 'attr' => array('class' => 'btn btn-red')));\n\n return $form;\n }", "title": "" }, { "docid": "d937d0c45cc85128cc28992052c35c8b", "score": "0.6224425", "text": "public function edit(Tipoentrega $tipoentrega)\n {\n //\n }", "title": "" }, { "docid": "562a4e3c75c1ab3664220bf7ed6b755e", "score": "0.62209797", "text": "private function createEditForm(Paiement $paiement)\n {\n // On crée le formulare d'édition de paiement\n $form = $this->createForm(new PaiementType(), $paiement, array(\n 'action' => $this->generateUrl('paiement_edit', array('id' => $paiement->getId())),\n 'method' => 'PUT',\n 'attr' => array('class' => 'form-horizontal'),\n ));\n // on crée un bouton pour la soumission du formulaire\n $form->add('submit', 'submit', array('translation_domain' => 'FOSUserBundle', 'label' => 'actions.update', 'attr' => array( 'class' => 'btn btn-primary' )));\n // On retourne le formulaire\n return $form;\n }", "title": "" }, { "docid": "091802c879add93f8f6dde3d1dc61a80", "score": "0.6220563", "text": "private function createEditForm(Domaine $entity)\n {\n $form = $this->createForm(new DomaineType(), $entity, array(\n 'action' => $this->generateUrl('domaine_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "11603f86c3d338bff5df2e4991687c06", "score": "0.62170106", "text": "function get_edit_form() {\n return $this->form;\n }", "title": "" }, { "docid": "dbd31af8f3f30449369f48cf227d2157", "score": "0.621456", "text": "private function createEditForm(Evento $entity)\n {\n $form = $this->createForm(new EventoType(), $entity, array(\n 'action' => $this->generateUrl('evento_update', array('id' => $entity->getIdEvento())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "91f8372d4e0e25b40a77e3b1611d2498", "score": "0.62000906", "text": "private function createEditForm(licencia_equipo $entity)\n {\n $form = $this->createForm(new licencia_equipoType(), $entity, array(\n 'action' => $this->generateUrl('licencia_equipo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "749533dd6a34f3debb5aceeae60ad519", "score": "0.61885595", "text": "private function createEditForm(Evento $entity)\n {\n $form = $this->createForm(new EventoType(), $entity, array(\n 'action' => $this->generateUrl('evento_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "f3565c4a8217adf50b852e24316deb93", "score": "0.6186622", "text": "private function createEditForm(EbRegional $entity)\n {\n $form = $this->createForm(new EbRegionalType(), $entity, array(\n 'action' => $this->generateUrl('configuracao_regional_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "498e9e68ee7ac1d881125c1154c173cc", "score": "0.6186275", "text": "private function createEditForm(Profumo $entity,$pagina,$produttore)\n {\n $form = $this->createForm(new ProfumoType(), $entity, array(\n 'action' => $this->generateUrl('profumo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('pagina', 'hidden', array(\n 'data' => $pagina,\"mapped\" => false\n ));\n\n $form->add('filtroProduttore', 'hidden', array(\n 'data' => $produttore,\"mapped\" => false\n ));\n\n return $form;\n }", "title": "" }, { "docid": "8a3eae437b240f1a0a3c78a357c40a3e", "score": "0.61795926", "text": "public function edit(Ferreteria $ferreteria)\n {\n //\n \n }", "title": "" }, { "docid": "2985ea95ec617b9322c16b67ca9086ae", "score": "0.6173739", "text": "private function createEditForm(Utilisateur $entity)\n {\n $form = $this->createForm(new UtilisateurType(), $entity, array(\n 'action' => $this->generateUrl('utilisateur_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'passwordRequired' => false,\n //'lockedRequired' => true\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier'));\n\n return $form;\n }", "title": "" }, { "docid": "32d11983a9f8ce26063ce3958b8f8a21", "score": "0.6172112", "text": "public function edit(Fiche $fiche)\n {\n return view('fiches.edit', compact('fiche'));\n }", "title": "" }, { "docid": "9b1fac24e1f6bc6d27242aa82eb05b25", "score": "0.61708295", "text": "private function createEditForm(Program $entity)\n {\n $form = $this->createForm(new ProgramCompetencesType(), $entity, array(\n\n ));\n\n\n return $form;\n }", "title": "" }, { "docid": "984f70944bf6ad39105a4abe2d991279", "score": "0.6163863", "text": "private function createEditForm(Hotels $entity) {\n $form = $this->createForm(new HotelsType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "05b44ec89a88bc113f378098c9451cd1", "score": "0.61614823", "text": "private function createEditForm(TournamentTable $entity)\r\n {\r\n \t$number = 1 + $this->getRepository()->findMaxNumberByTournament($entity->getTournament());\r\n\r\n $form = $this->createForm(TournamentTableType::class, $entity, array(\r\n 'action' => $this->generateUrl('table_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n 'number' => $number\r\n ));\r\n \r\n $form->add('submit', SubmitType::class, array('label' => 'Update'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "c37105ea70d59014f33b40322ebfd3f3", "score": "0.61573744", "text": "public function editAction()\r\n\t{\r\n\t\t$form = new ContentTypeForm();\r\n\t\t$form->content_type_submit->setLabel('Edit Content Type');\r\n\t\t\r\n\t\t$request = $this->getRequest();\r\n\t\t\r\n\t\tif ($request->isPost()) {\r\n\t\t\t$formData = $request->post()->toArray();\r\n\t\t\tif ($form->isValid($formData)) {\r\n\t\t\t\t$id = $form->getValue('content_type_id');\r\n\t\t\t\t$typeName = $form->getValue('content_type_name');\r\n\t\t\t\t$typeDiscription = $form->getValue('content_type_description');\r\n\t\t\t\tif ($this->contentType->getContentType($id)) {\r\n\t\t\t\t\t$this->contentType->updateContentType($id, $typeName, $typeDiscription);\r\n\t\t\t\t}\r\n\t\t\t\t// Redirect to list of content type\r\n\t\t\t\treturn $this->redirect()->toRoute('default', array(\r\n\t\t\t\t'controller' => 'admincp-content-type',\r\n\t\t\t\t'action' => 'index',\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$id = $request->query()->get('id', 0);\r\n\t\t\tif ($id > 0) {\r\n\t\t\t $content = $this->contentType->getContentType($id);\r\n\t\t\t if ($content) {\r\n\t\t\t $form->populate($content->getArrayCopy());\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array('form' => $form);\r\n\t}", "title": "" }, { "docid": "bfc3c6b60fc78b96d2e222b63e6ef0b6", "score": "0.615018", "text": "private function createEditForm(Padres $entity)\n {\n $form = $this->createForm(new PadresType(), $entity, array(\n 'action' => $this->generateUrl('padres_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "a3bb530895c429d600e64fbae745af87", "score": "0.6149599", "text": "function eck__entity__edit($entity_type, $bundle, $id) {\n if (is_numeric($id)) {\n $entities = entity_load($entity_type, array($id));\n $entity = $entities[$id];\n }\n\n global $user;\n\n $entity->uid = $user->uid;\n $entity->changed = time();\n\n return drupal_get_form(\"eck__entity__form\", $entity);\n}", "title": "" }, { "docid": "6172b33ed8272279c8be92044d44b361", "score": "0.614623", "text": "private function createEditForm(Programas $entity)\n {\n $form = $this->createForm(new ProgramasType(), $entity, array(\n 'action' => $this->generateUrl('admin_programas_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "7f96797c9ce77817e8d1ef35ced400f6", "score": "0.61454403", "text": "function edit($idformulariofyc)\n { \n // check if the formulariofyc exists before trying to edit it\n $data['formulariofyc'] = $this->Formulariofyc_model->get_formulariofyc($idformulariofyc);\n \n if(isset($data['formulariofyc']['idformulariofyc']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n\t\t\t\t \n\t\t\t\tif(isset($_POST['completado'])){\n\t\t\t\t\t$completado=1;\n\t\t\t\t} else {\n\t\t\t\t\t$completado=0;\n\t\t\t\t}\n\t\t\t\tif(isset($_POST['aprobado'])){\n\t\t\t\t\t$aprobado=1;\n\t\t\t\t} else {\n\t\t\t\t\t$aprobado=0;\n\t\t\t\t}\n\n $params = array(\n\t\t\t\t\t'categoriafiscal' => $this->input->post('categoriafiscal'),\n\t\t\t\t\t'idproveedor' => $this->input->post('idproveedor'),\n\t\t\t\t\t'identificaciontributaria' => $this->input->post('identificaciontributaria'),\n\t\t\t\t\t'numidentificacion' => $this->input->post('numidentificacion'),\n\t\t\t\t\t'identtribpaisorigen' => $this->input->post('identtribpaisorigen'),\n\t\t\t\t\t'tipopersona' => $this->input->post('tipopersona'),\n\t\t\t\t\t'catsiap' => $this->input->post('catsiap'),\n\t\t\t\t\t'motivobaja' => $this->input->post('motivobaja'),\n\t\t\t\t\t'fechaconstitucion' => $this->input->post('fechaconstitucion'),\n\t\t\t\t\t'banco' => $this->input->post('banco'),\n\t\t\t\t\t'sucursalbanco' => $this->input->post('sucursalbanco'),\n\t\t\t\t\t'tipocuenta' => $this->input->post('tipocuenta'),\n\t\t\t\t\t'cbu' => $this->input->post('cbu'),\n\t\t\t\t\t'cuit' => $this->input->post('cuit'),\n\t\t\t\t\t'beneficiariochq' => $this->input->post('beneficiariochq'),\n\t\t\t\t\t'situacioniibb' => $this->input->post('situacioniibb'),\n\t\t\t\t\t'numinscripiibb' => $this->input->post('numinscripiibb'),\n\t\t\t\t\t'porcret' => $this->input->post('porcret'),\n\t\t\t\t\t'ganancias' => $this->input->post('ganancias'),\n\t\t\t\t\t'suss' => $this->input->post('suss'),\n\t\t\t\t\t'agentepercepcioniva' => $this->input->post('agentepercepcioniva'),\n\t\t\t\t\t'agentepercepcionivares' => $this->input->post('agentepercepcionivares'),\n\t\t\t\t\t'agentepercepcionivaali' => $this->input->post('agentepercepcionivaali'),\n\t\t\t\t\t'agentepercepcioniibb1' => $this->input->post('agentepercepcioniibb1'),\n\t\t\t\t\t'agentepercepcioniibb1pcia' => $this->input->post('agentepercepcioniibb1pcia'),\n\t\t\t\t\t'agentepercepcioniibb1ali' => $this->input->post('agentepercepcioniibb1ali'),\n\t\t\t\t\t'agentepercepcioniibb2' => $this->input->post('agentepercepcioniibb2'),\n\t\t\t\t\t'agentepercepcioniibb2pcia' => $this->input->post('agentepercepcioniibb2pcia'),\n\t\t\t\t\t'agentepercepcioniibb2ali' => $this->input->post('agentepercepcioniibb2ali'),\n\t\t\t\t\t'agentepercepcioniibb3' => $this->input->post('agentepercepcioniibb3'),\n\t\t\t\t\t'agentepercepcioniibb3pcia' => $this->input->post('agentepercepcioniibb3pcia'),\n\t\t\t\t\t'agentepercepcioniibb3ali' => $this->input->post('agentepercepcioniibb3ali'),\n\t\t\t\t\t'agenteretgcias' => $this->input->post('agenteretgcias'),\n\t\t\t\t\t'agenteretgciasres' => $this->input->post('agenteretgciasres'),\n\t\t\t\t\t'agenteretgciasiibb' => $this->input->post('agenteretgciasiibb'),\n\t\t\t\t\t'agenteretgciasiibbres' => $this->input->post('agenteretgciasiibbres'),\n\t\t\t\t\t'agenteretgciassuss' => $this->input->post('agenteretgciassuss'),\n\t\t\t\t\t'agenteretgciassussres' => $this->input->post('agenteretgciassussres'),\n\t\t\t\t\t'agenteretgciasivares' => $this->input->post('agenteretgciasivares'),\n\t\t\t\t\t'factultimocierre' => $this->input->post('factultimocierre'),\n\t\t\t\t\t'factanteultimocierre' => $this->input->post('factanteultimocierre'),\n\t\t\t\t\t'factantepenultimocierre' => $this->input->post('factantepenultimocierre'),\n\t\t\t\t\t'refcom1' => $this->input->post('refcom1'),\n\t\t\t\t\t'refcom1contacto' => $this->input->post('refcom1contacto'),\n\t\t\t\t\t'refcom1tel' => $this->input->post('refcom1tel'),\n\t\t\t\t\t'refcom2' => $this->input->post('refcom2'),\n\t\t\t\t\t'refcom2contacto' => $this->input->post('refcom2contacto'),\n\t\t\t\t\t'refcom2tel' => $this->input->post('refcom2tel'),\n\t\t\t\t\t'refcom3' => $this->input->post('refcom3'),\n\t\t\t\t\t'refcom3contacto' => $this->input->post('refcom3contacto'),\n\t\t\t\t\t'refcom3tel' => $this->input->post('refcom3tel'),\n\t\t\t\t\t'areacontabletel' => $this->input->post('areacontabletel'),\n\t\t\t\t\t'areacontablemail' => $this->input->post('areacontablemail'),\n\t\t\t\t\t'areacontablehorario' => $this->input->post('areacontablehorario'),\n\t\t\t\t\t'areapagostel' => $this->input->post('areapagostel'),\n\t\t\t\t\t'areapagosmail' => $this->input->post('areapagosmail'),\n\t\t\t\t\t'areapagoshorario' => $this->input->post('areapagoshorario'),\n\t\t\t\t\t'otrasareastel' => $this->input->post('otrasareastel'),\n\t\t\t\t\t'otrasareasmail' => $this->input->post('otrasareasmail'),\n\t\t\t\t\t'otrasareashorario' => $this->input->post('otrasareashorario'),\n\t\t\t\t\t'aprobado' => 0,\n\t\t\t\t\t'completo' => $completado\n );\n\n\t\t\t\t$this->Formulariofyc_model->update_formulariofyc($idformulariofyc,$params); \n\t\t\t\tif (isset($_POST['completado'])){\t\t\t\n\t\t\t\t\t$htmlContent = '<h4>SISTEMA SGPd</h4>';\n\t\t\t\t\t$htmlContent .= '<p>Se ha completado el Formulario Fiscal y Comercial</p>';\n\t\t\t\t\t$htmlContent .= 'Proveedor: '.$this->session->userdata('empresa');\n\t\t\t\t\t$htmlContent .= '<p>Modulo Proveedores, SGPd</p>';\n\t\t\t\t\t$this->notificarViaMail($this->config->item('emailbackoffice'),$htmlContent,'Formulario FyC Completado');\n\t\t\t\t} \n redirect('proveedores', 'refresh');\n }\n else\n {\n\t\t\t\t$data['esproveedor'] = 'SI';\n\t\t\t\t$data['titulacion']=\"Formulario FyC\";\n\t\t\t\t$data['_view'] = 'formulariofyc/edit';\n\t\t\t\t$this->load->view('template/header',$data);\n $this->load->view('layouts/main');\n }\n }\n else\n show_error('The formulariofyc you are trying to edit does not exist.');\n\t}", "title": "" }, { "docid": "816fb795886eb2fc128b70ab0ee9688d", "score": "0.6144473", "text": "private function createEditForm(Commande $entity)\n {\n $form = $this->createForm(new CommandeType(), $entity, array(\n 'action' => $this->generateUrl('commande_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "7958b60bbc91e1e2f79b95a4c7722b11", "score": "0.6143741", "text": "private function createEditForm(IngredientsCategory $entity)\n {\n $form = $this->createForm(new IngredientsCategoryType(), $entity, array(\n 'action' => $this->generateUrl('ingredientscategory_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Update',\n 'attr' => array(\n 'class' => 'buttonS bGreen'\n )\n ));\n\n return $form;\n }", "title": "" }, { "docid": "487be2b10cc9d08f455686c5c91ac6c8", "score": "0.6139537", "text": "private function createEditForm(SystemMalarski $entity)\n {\n $form = $this->createForm(new SystemMalarskiType(), $entity, array(\n 'action' => $this->generateUrl('backend_system_malarski_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Aktualizuj'));\n\n return $form;\n }", "title": "" }, { "docid": "d3e37c647d6b032f7db9adb994874150", "score": "0.6128851", "text": "private function createEditForm(Image $entity)\n {\n $form = $this->createForm(new ImageEditType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Modifier'));\n\n return $form;\n }", "title": "" }, { "docid": "2f574755e0fe3e2e948b8dd3b3f006e3", "score": "0.61286813", "text": "private function createEditForm(Doc $entity)\n {\n $form = $this->createForm(new DocType(), $entity, array(\n 'action' => $this->generateUrl('doc_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n\t\t'label' => 'MODIFIER',\n\t\t'attr' => array('class'=>'btn btn-warning','disabled'=>'disabled'),\n\t));\n\n return $form;\n }", "title": "" }, { "docid": "75d48b221c13bfffe86ba1686098c547", "score": "0.6105655", "text": "private function createEditForm($entity)\n {\n $descriptor = $this->getDescriptor();\n \n $form = $this->createForm($descriptor->getForm('edit'), $entity, array(\n 'action' => $this->generateUrl($descriptor->getRoute('update'), array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'admin.update', 'attr' => array('class' => 'btn btn-primary')));\n\n return $form;\n }", "title": "" }, { "docid": "6657df79a0b4d2ddf05dae4b0721417a", "score": "0.60992885", "text": "private function DemandeEditForm(Demande $entity)\n {\n $form = $this->createForm(new DemandeSupAdminType(), $entity, array(\n 'action' => $this->generateUrl('sup_ad_demandes_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n \n return $form;\n }", "title": "" }, { "docid": "a9b048cdf901f24ab3e0c7f9af1f5fb5", "score": "0.60985166", "text": "private function createEditForm(Document $entity)\n {\n $form = $this->createForm(new DocumentMetaType(), $entity, array(\n 'action' => $this->generateUrl('document_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "bea1e371f0511531371fa3ea4361bd10", "score": "0.6094783", "text": "private function createEditForm(Articulos $entity)\n {\n $form = $this->createForm(ArticulosType::class, $entity, array(\n 'action' => $this->generateUrl('articulos_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Actualizar'));\n\n return $form;\n }", "title": "" }, { "docid": "d003f694cb280e3eac9f0ff7ded1000c", "score": "0.60920995", "text": "public function typeEditAction() {\n\n $option_id = $this->_getParam('option_id');\n include APPLICATION_PATH . '/application/modules/Sitestaticpage/controllers/license/license2.php';\n $option_table = Engine_Api::_()->fields()->getTable('sitestaticpage_page', 'options');\n //GENERATE FORM\n $this->view->form = $form = new Sitestaticpage_Form_Admin_Type();\n $form->setTitle('Edit Form Meta-data');\n $form->submit->setLabel('Save');\n $db = Engine_Db_Table::getDefaultAdapter();\n $default_email = Engine_Api::_()->getApi('settings', 'core')->getSetting('core.mail.contact');\n\n $select = $option_table->select()->from($option_table->info('name'), array('*'))\n ->where('option_id = ?', $option_id);\n $values = $option_table->fetchRow($select);\n $value = $values->toArray();\n if (empty($values['button_text']))\n $values['button_text'] = 'Submit';\n\n if (!$this->getRequest()->isPost()) {\n $form->form_heading->setValue($values['form_heading']);\n $form->form_description->setValue($values['form_description']);\n \n if(isset($form->recaptcha))\n $form->recaptcha->setValue($values['recaptcha']);\n \n $form->label->setValue($values['label']);\n if (empty($values['email']))\n $form->email->setValue($default_email);\n else\n $form->email->setValue($values['email']);\n $form->button_text->setValue($values['button_text']);\n return;\n }\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n if (!empty($_POST['email'])) {\n $emailArray = explode(',', $_POST['email']);\n $errorMessage = array();\n $validatorEmail = new Zend_Validate_EmailAddress();\n $validatorEmail->getHostnameValidator()->setValidateTld(false);\n foreach ($emailArray as $val) {\n if (!$validatorEmail->isValid(trim($val))) {\n $errorMessage = \"Please enter valid email address\";\n break;\n }\n }\n if (!empty($errorMessage)) {\n $form->addError($errorMessage);\n return;\n }\n }\n $this->updateMail($_POST['email'], $_POST['form_heading'], $_POST['form_description'], $_POST['button_text'], $option_id);\n\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n ));\n }\n }", "title": "" } ]
27c2304eb41f64eac89238cc37c174a8
Marks the specified subtask complete
[ { "docid": "e9512c5e0ec5842a3e766d273e19c42f", "score": "0.63510185", "text": "public function complete($subtaskId)\n {\n $subtask = Subtask::find($subtaskId);\n\n $subtask->is_complete = 1;\n\n $subtask->save();\n\n return $subtask;\n }", "title": "" } ]
[ { "docid": "4adfdaf33403e14c7c6eb25b97700738", "score": "0.67135066", "text": "public function completeTask(Task $task, User $user)\n {\n // Remove the user from the list of users. If afterwards there's\n // no users assigned, then we mark it as complete. \n $index = array_search($user->username, $task->userid);\n if ($index === false) {\n return;\n }\n array_remove($task->userid, $index);\n\n if (count($task->userid) == 0) {\n $task->complete = true;\n }\n \n // remove the task from the watch list for the current user too\n\t\t$this->notificationService->removeWatch($user, $task->id, 'Task');\n\n $this->saveTask($task);\n }", "title": "" }, { "docid": "5436402247c0d995c909b1b732dbef58", "score": "0.6691525", "text": "public function complete($task)\n {\n Task::where('id', $task)->update(['completed' => request('completed')]);\n }", "title": "" }, { "docid": "763bff5e39fd3f5ed191273681853d3f", "score": "0.666896", "text": "public function testCompletesWhenEnoughSubTasksComplete() {\n $tasks = [new TaskStub(), new TaskStub(), new TaskStub(), new TaskStub()];\n \n // Ask for 2 successful completions before we get a result\n $task = new \\Async\\Task\\SomeTask($tasks, 2);\n \n // Check that the task is not complete\n $this->assertFalse($task->isComplete());\n \n // Complete the first task and tick\n $tasks[0]->setResult(10);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is still not complete\n $this->assertFalse($task->isComplete());\n \n // Complete another task and tick\n $tasks[2]->setResult(12);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is now complete with the correct result\n $this->assertTrue($task->isComplete());\n $this->assertFalse($task->isFaulted());\n $this->assertEquals([0 => 10, 2 => 12], $task->getResult());\n }", "title": "" }, { "docid": "45b314aa90dcbd514ea9506c2342b9d2", "score": "0.6489091", "text": "public function complete() \n\t{\n\t\t$this->completed = true;\n\t}", "title": "" }, { "docid": "839db601695276c80b25637a25a760cd", "score": "0.6387544", "text": "protected function complete()\n {\n error_log($this->identifier . \" complete\");\n parent::complete();\n // Show notice to user or perform some other arbitrary task...\n }", "title": "" }, { "docid": "839db601695276c80b25637a25a760cd", "score": "0.6387544", "text": "protected function complete()\n {\n error_log($this->identifier . \" complete\");\n parent::complete();\n // Show notice to user or perform some other arbitrary task...\n }", "title": "" }, { "docid": "92697fef7b910d11b2b7445a45dc4ec5", "score": "0.6237803", "text": "function mark_done(DatastoreClient $datastore, $taskId)\n{\n $taskKey = $datastore->key('Task', $taskId);\n $transaction = $datastore->transaction();\n $task = $transaction->lookup($taskKey);\n $task['done'] = true;\n $transaction->upsert($task);\n $transaction->commit();\n}", "title": "" }, { "docid": "3912e87510b4474e14c32bab4066a244", "score": "0.6192476", "text": "public function setComplete()\n {\n $this->complete = 1;\n }", "title": "" }, { "docid": "1cd3992424d0714526dd9f5f35d2ae12", "score": "0.61808777", "text": "public function complete() {\n\n\t\t$args = array(\n\t\t\t'status' => 'completed'\n\t\t);\n\n\t\tif( $this->subs_db->update( $this->id, $args ) ) {\n\n\t\t\tdo_action( 'edd_subscription_completed', $this->id, $this );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "9fa3dd386552fbceec9df357d2ca4692", "score": "0.61644864", "text": "protected function completeJob()\n {\n $this->isComplete = true;\n $this->currentStep = $this->totalSteps;\n\n $newsletter = $this->getObject('Newsletter');\n\n if ($newsletter) {\n $newsletter->Status = 'Sent';\n $newsletter->extend('onCompleteJob');\n $newsletter->write();\n }\n }", "title": "" }, { "docid": "8a21c1d48f8197d6f156753f88004735", "score": "0.6125841", "text": "public function complete() {\r\n\t\t$this->complete = true;\r\n\t}", "title": "" }, { "docid": "2ae7899b7d0f53f498fc5e48ec4c89d6", "score": "0.60817397", "text": "function complete() {\n if($this->active_task->isNew()) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n\n if(!$this->active_task->canChangeCompleteStatus($this->logged_user) && $this->active_task->getProjectId()!=TASK_LIST_PROJECT_ID) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n\n if($this->request->isSubmitted() || isset($_GET['auto'])) {\n\t\t//BOF:mod 20110617\n\t\t$responsible_assignee = $this->active_task->getResponsibleAssignee();\n\t\t$created_by_id = $this->active_task->getCreatedById();\n\t\t$project_leader = $this->active_project->getLeaderId();\n\t\t$parent_type = $this->active_task->getParentType();\n\t\t//BOF:mod 20120824\n\t\t/*\n\t\t//EOF:mod 20120824\n\t\t$ticket_owner_exists = false;\n\t\tif ($parent_type=='Ticket'){\n\t\t\t$temp_ticket = new Ticket($this->active_task->getParentId());\n\t\t\t$ticket_owner = $temp_ticket->getResponsibleAssignee();\n\t\t\tif (!empty($ticket_owner)){\n\t\t\t\t$ticket_owner_exists = true;\n\t\t\t}\n\t\t}\n\t\t//BOF:mod 20120824\n\t\t*/\n\t\t$owner_exists = false;\n\t\t$parent = new $parent_type($this->active_task->getParentId());\n\t\t$owner = $parent->getResponsibleAssignee();\n\t\tif (!empty($owner)){\n\t\t\t$owner_exists = true;\n\t\t}\n\t\t//BOF:mod 20121031\n\t\t$user_is_subscriber = false;\n\t\t$subscribers = array();\n\t\tif ($parent->can_have_subscribers){\n\t\t\tif ($parent->hasSubscribers() ){\n\t\t\t\t$subscribers = $parent->getSubscribers();\n\t\t\t\tforeach($subscribers as $subscriber){\n\t\t\t\t\tif ($subscriber->getId() == $this->logged_user->getId() ){\n\t\t\t\t\t\t$user_is_subscriber = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//EOF:mod 20121031\n\t\t\n\t\t$page_user_id = '';\n\t\tif ($parent_type=='Page' && stripos($parent->getName(), 'task list')!==false){\n\t\t\t$temp = explode('-', $parent->getName());\n\t\t\tif (count($temp)){\n\t\t\t\t$name = trim($temp[0]);\n\t\t\t\t$name_parts = explode(' ', $name);\n\t\t\t\tif (count($name_parts)){\n\t\t\t\t\tlist($first_name, $last_name) = $name_parts;\n\t\t\t\t\t$first_name = trim($first_name);\n\t\t\t\t\t$last_name = trim($last_name);\n\t\t\t\t\t$link = mysql_connect(DB_HOST, DB_USER, DB_PASS);\n\t\t\t\t\tmysql_select_db(DB_NAME);\n\t\t\t\t\t$query = \"select id from healingcrystals_users where first_name='\" . mysql_real_escape_string($first_name) . \"'\" . (!empty($last_name) ? \" and last_name='\" . mysql_real_escape_string($last_name) . \"'\" : \"\");\n\t\t\t\t\t$result = mysql_query($query, $link);\n\t\t\t\t\tif (mysql_num_rows($result)){\n\t\t\t\t\t\t$info = mysql_fetch_assoc($result);\n\t\t\t\t\t\t$page_user_id = $info['id'];\n\t\t\t\t\t}\n\t\t\t\t\tmysql_close($link);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//EOF:mod 20120824\t\n\t\t\t//BOF:mod 20120917 (reversed by shawn)\n\t\t\t/**/\n\t\t\t//EOF:mod 20120917\n\t\tif ( (!is_null($responsible_assignee) && $responsible_assignee->getId()==$this->logged_user->getId())\n\t\t\t\t\t|| $created_by_id==$this->logged_user->getId()\n\t\t\t\t\t|| $project_leader==$this->logged_user->getId()\n\t\t\t\t\t|| $this->logged_user->isAdministrator()\n\t\t\t\t\t//BOF:mod 20120824\n\t\t\t\t\t//EOF:mod 20120824\n\t\t\t\t\t//|| ($ticket_owner_exists && $ticket_owner==$this->logged_user->getId()) ){\n\t\t\t\t\t//BOF:mod 20120824\n\t\t\t\t\t//BOF:mod 20121031\n\t\t\t\t\t|| $user_is_subscriber \n\t\t\t\t\t//EOF:mod 20121031\n\t\t\t\t\t|| (!empty($page_user_id) && $page_user_id==$this->logged_user->getId() )\n\t\t\t\t\t|| ($owner_exists && $owner==$this->logged_user->getId()) ){\n\t\t\t\t\t//BOF:mod 20120824\n\t\t\t$warning = '';\n\t\t} else {\n $temp = new User($created_by_id);\n $warning = 'Message: Task \"' . $this->active_task->getName() . '\" cannot be closed at this time. Please send message to ' . $temp->getName() . ' to close this task.';\n unset($temp);\n\t\t}\n\t\tif (!empty($warning)){\n\t\t\t$this->smarty->assign(array('warning' => $warning,));\n\t\t\tprint tpl_fetch(get_template_path('_task_completed_row', $this->controller_name, RESOURCES_MODULE));\n\t\t\tdie();\n\t\t}\n\t\t\t//BOF:mod 20120917 (reversed by shawn)\n\t\t\t/**/\n\t\t\t//EOF:mod 20120917\n\t\t//EOF:mod 20110617\n\t\tdb_begin_work();\n\t\t$_SESSION['new_recurring_task_id'] = null;\n $action = $this->active_task->complete($this->logged_user);\n if($action && !is_error($action)) {\n db_commit();\n\n if($this->request->getFormat() == FORMAT_HTML) {\n if($this->request->get('async')) {\n $this->smarty->assign(array(\n '_object_task' => $this->active_task,\n\t\t\t\t'new_recurring_task_id' => $_SESSION['new_recurring_task_id'], \n ));\n print tpl_fetch(get_template_path('_task_completed_row', $this->controller_name, RESOURCES_MODULE));\n\t\t\t if (!empty($_SESSION['new_recurring_task_id'])){\n\t\t\t\t $this->smarty->assign(array(\n\t\t\t\t\t'_object_task' => new Task($_SESSION['new_recurring_task_id']),\n\t\t\t\t ));\n\t\t\t\t print tpl_fetch(get_template_path('_task_opened_row', $this->controller_name, RESOURCES_MODULE));\n\t\t\t }\n\t\t\t unset($_SESSION['new_recurring_task_id']);\n die();\n } else {\n //flash_success('Task \":name\" has been completed', array('name' => str_excerpt($this->active_task->getName(), 80, '...')));\n //bof:mod\n flash_success('Task \":name\" has been completed', array('name' => str_excerpt(strip_tags($this->active_task->getName()), 80, '...')));\n //eof:mod\n\t\t\t if (isset($_GET['auto'])){\n\t\t\t $this->redirectToUrl($this->active_task->getViewUrl());\n\t\t\t } else {\n\t\t\t\t$this->redirectToReferer($this->active_task->getViewUrl());\n\t\t\t }\n } // if\n } else {\n $this->serveData($this->active_task);\n } // if\n } else {\n db_rollback();\n\n if($this->request->getFormat() == FORMAT_HTML) {\n if($this->request->get('async')) {\n $this->serveData($action);\n } else {\n flash_error('Failed to complete task \":name\"', array('name' => str_excerpt($this->active_task->getName(), 80, '...')));\n $this->redirectToReferer($this->active_task->getViewUrl());\n } // if\n } else {\n $this->httpError(HTTP_ERR_OPERATION_FAILED);\n } // if\n } // if\n } else {\n $this->httpError(HTTP_ERR_BAD_REQUEST);\n } // if\n }", "title": "" }, { "docid": "279d1d9c835c1d5ae01bd3a50152bb93", "score": "0.60235083", "text": "public function complete(): void;", "title": "" }, { "docid": "1f84629b263ba281e301e76e3cac3d26", "score": "0.59824514", "text": "public function testCompletesWithAcceptableSubTaskFailures() {\n $tasks = [new TaskStub(), new TaskStub(), new TaskStub(), new TaskStub()];\n \n // Ask for 2 successful completions before we get a result\n $task = new \\Async\\Task\\SomeTask($tasks, 2);\n \n // Check that the task is not complete\n $this->assertFalse($task->isComplete());\n \n // Complete the first task and tick\n $tasks[0]->setResult(10);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is still not complete\n $this->assertFalse($task->isComplete());\n \n // Fail a task and tick\n $tasks[1]->setException(new \\Exception(\"failure\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is still not complete\n $this->assertFalse($task->isComplete());\n \n // Complete a second task and tick\n $tasks[2]->setResult(12);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is now complete with the correct result\n $this->assertTrue($task->isComplete());\n $this->assertFalse($task->isFaulted());\n $this->assertEquals([0 => 10, 2 => 12], $task->getResult());\n }", "title": "" }, { "docid": "8e6185f17853a90ea17f3a1c1c2ab8d4", "score": "0.5972197", "text": "public function complete(): void {\n\t}", "title": "" }, { "docid": "014031053e2230ebae053d961c245892", "score": "0.59671605", "text": "public function onTaskCompleted($event)\n {\n dump('onTaskCompleted');\n\n $this->send($event->task->notifications()->completed()->get());\n }", "title": "" }, { "docid": "88bc96bc5e3dab82831eba6859cd8e31", "score": "0.5896676", "text": "public function toggleCompleted() {\n $this->completed = !$this->completed;\n }", "title": "" }, { "docid": "054aae5662f782209f4bc90d5c12f4a9", "score": "0.5888702", "text": "static function markCompleted($tid, $completed){\n\t\n\t\trequire_once 'DBO.class.php';\n\t\n\t\t$db = DBO::getInstance();\n\t\n\t\t$statement = $db->prepare('UPDATE tasks\n\t\t\t\tset completed = :completed,\n\t\t\t\t\tend_date = CURDATE()\n\t\t\t\tWHERE id = :tid');\n\t\n\t\t$statement->execute(array(\n\t\t\t\t':tid' => $tid,\n\t\t\t\t':completed' => $completed));\n\t\tif($statement->errorCode() != 0)\t{\n\t\t\t$error = $statement->errorInfo();\n\t\t\tthrow new Exception($error[2]);\n\t\t}\n\t\n\t\tif(!$statement->rowCount())\n\t\t\tthrow new Exception(\"Cant update task, the task may have been modified by other user.\");\n\t\n\t\treturn true;\n\t\n\t}", "title": "" }, { "docid": "e6bc92bf05b114e80392b3bfc8c716dc", "score": "0.5872632", "text": "public function completed()\n {\n }", "title": "" }, { "docid": "3ae0b8bd84eaa7de8927c669faaa3a4b", "score": "0.5870019", "text": "public function complete($taskId)\n\t{\n\t\t$result = $this->client->call('task.item.complete', array($taskId));\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "54efd7654466a44ab47f78b676343f43", "score": "0.58604735", "text": "public function testCompletingAdditionalSubTasksDoesntAffectResult() {\n $tasks = [new TaskStub(), new TaskStub(), new TaskStub(), new TaskStub()];\n \n // Ask for 2 successful completions before we get a result\n $task = new \\Async\\Task\\SomeTask($tasks, 2);\n \n // Complete the first two tasks and check the task is complete with the\n // expected result\n $tasks[0]->setResult(10);\n $tasks[1]->setResult(11);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n $this->assertTrue($task->isComplete());\n $this->assertFalse($task->isFaulted());\n $this->assertEquals([0 => 10, 1 => 11], $task->getResult());\n \n // Complete the third task and check that the result is unaffected\n $tasks[2]->setResult(12);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n $this->assertTrue($task->isComplete());\n $this->assertFalse($task->isFaulted());\n $this->assertEquals([0 => 10, 1 => 11], $task->getResult());\n \n // Fail the fourth task and check the result is unaffected\n $tasks[3]->setException(new \\Exception(\"failure\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n $this->assertTrue($task->isComplete());\n $this->assertFalse($task->isFaulted());\n $this->assertEquals([0 => 10, 1 => 11], $task->getResult());\n }", "title": "" }, { "docid": "8c4af4998d7d9bc6a8845c48fac527dd", "score": "0.5832865", "text": "function mark_completed() {\r\n global $db;\r\n if ($this->status == false || $this->status == \"cancelled\") {\r\n $db->Execute(\"UPDATE \" . TABLE_ORDERS . \" SET date_completed = now() WHERE orders_id = '\" . $this->oID . \"'\");\r\n\r\n if ($this->status == \"cancelled\") {\r\n $db->Execute(\"UPDATE \" . TABLE_ORDERS . \" SET date_cancelled = NULL WHERE orders_id = '\" . $this->oID . \"'\");\r\n }\r\n if (STATUS_ORDER_COMPLETED != 0) {\r\n update_status($this->oID, STATUS_ORDER_COMPLETED);\r\n }\r\n $this->status = \"completed\";\r\n $this->status_date = zen_datetime_short(date('Y-m-d H:i:s'));\r\n }\r\n }", "title": "" }, { "docid": "b37a6db9ee5604c743adf46e9b0eb728", "score": "0.58262956", "text": "protected function complete() {\n parent::complete();\n\n // Show notice to user or perform some other arbitrary task...\n write_log( '[BackgroundImageProcess] Batch completed!' . \"\\n\\n\" );\n }", "title": "" }, { "docid": "55cfd9b863b8b2560bd187f84f363dd1", "score": "0.5755311", "text": "public function testOnlyIncompleteSubTasksScheduled() {\n $tasks = [new TaskStub(), new TaskStub(), new TaskStub(), new TaskStub()];\n \n // Ask for 2 successful completions before we get a result\n $task = new \\Async\\Task\\SomeTask($tasks, 2);\n \n // Mark the last task as complete already\n $tasks[3]->setResult(10);\n \n // Create a mock scheduler that expects to be called with the first 3 tasks\n // but not the last\n $scheduler = $this->getMock(\\Async\\Scheduler\\Scheduler::class);\n $scheduler->expects($this->exactly(3))->method('schedule');\n $scheduler->expects($this->at(0))->method('schedule')->with($tasks[0]);\n $scheduler->expects($this->at(1))->method('schedule')->with($tasks[1]);\n $scheduler->expects($this->at(2))->method('schedule')->with($tasks[2]);\n \n // Tick the task\n $task->tick($scheduler);\n }", "title": "" }, { "docid": "d24dbcb8a90c92c7e5b939b36ea08b2a", "score": "0.57459164", "text": "public function complete(){\n\t\t$this->_status = self::STATUS_COMPLETE;\n\t\t$this->_purchaseDate = time();\n\t\t$this->update();\n\t}", "title": "" }, { "docid": "424f8278b55556863c3003e2c69281c8", "score": "0.569502", "text": "public function taskIsFinished()\n {\n $restCollected = $this->executeBuffer->getCollectedTriggers();\n $this->executions($restCollected);\n $this->trigger(ProgressEvent::EVENT_FINISH);\n }", "title": "" }, { "docid": "0dd4881afc3898febf79cbd2651306ab", "score": "0.5655936", "text": "public function markCompletedAction()\n {\n if (!$job = $this->getJobFromRoute()) {\n return $this->redirect()->toRoute('furnace-crud');\n }\n\n $service = $this->service;\n $response = $this->makeServiceCall(function() use ($service, $job) {\n if ($job->isQueued()) {\n $job->clear('queuedAt');\n }\n\n $service\n ->queue($job)\n ->start($job)\n ->complete($job);\n }, $job);\n\n if ($response !== true) {\n return $response;\n }\n\n $this->flashMessenger()->addSuccessMessage('The job has been marked as completed.');\n\n return $this->redirect()->toRoute('furnace-crud', array(\n 'action' => 'view',\n 'param' => $job->getName(),\n ));\n }", "title": "" }, { "docid": "7a901ee6e1b53c4fb591d3d1f95b957a", "score": "0.5654297", "text": "public function completeTask(Request $request)\n {\n\n if (Auth::check()) {\n\n $id = Auth::user()->id;\n\n $task_name = $request->task_name;\n $completed = DB::table('tasks')\n ->where('user_id', '=', $id)\n ->where('task_name', $task_name)\n ->update(['completed' => 1]);\n\n $tasks = DB::table('tasks')->where('user_id', '=', $id)->orderBy('created_at', 'desc')->get();\n\n if ($completed) {\n return response()->json(['success' => true, 'tasks' => $tasks]);\n\n } else {\n return response()->json(['success' => false]);\n }\n\n } else {\n\n return response()->json(['success' => false]);\n }\n\n\n }", "title": "" }, { "docid": "0b501df1d4631ec589dbb6156c136a74", "score": "0.56438565", "text": "public function markFinished(){\n\t\t$this->finished = date('Y-m-d H:i:s');\n\t\t$this->status = self::STATUS_FINISHED;\n\n\t\t$this->save(false,['finished','status']);\n\t}", "title": "" }, { "docid": "ef1690d5ffd633ae610cfc08ce2241e8", "score": "0.563861", "text": "public function complete()\n {\n }", "title": "" }, { "docid": "ef1690d5ffd633ae610cfc08ce2241e8", "score": "0.56386036", "text": "public function complete()\n {\n }", "title": "" }, { "docid": "8d6e4eca9be52d7d55881999959cd042", "score": "0.56178635", "text": "protected function complete()\n {\n mailchimp_log('order_sync.completed', 'Done with the order queueing.');\n\n // add a timestamp for the orders sync completion\n $this->setResourceCompleteTime();\n }", "title": "" }, { "docid": "67a9d5a899481dfbf50b14cab25b0280", "score": "0.5596896", "text": "public function action_task_finished()\n {\n //na vystup se nebude vkladat nic\n $this->template = View::factory('empty_ajax_template');\n\n $finished = arr::get($this->request_params, 'f', NULL);\n $agendaid = arr::get($this->request_params, 'id', NULL);\n\n $agenda = ORM::factory('agenda', $agendaid);\n\n //pokud byl ukol nalezen, tak nastavi jako hotovyw\n if ($agenda->loaded() && $agenda->IsTask())\n {\n $agenda->datedone = $finished ? date('Y-m-d') : NULL;\n $agenda->save();\n } \n }", "title": "" }, { "docid": "00373b5498bb82a373379e0663df8db8", "score": "0.5565635", "text": "public function testCompletingAdditionalSubTasksDoesntAffectFailure() {\n $tasks = [new TaskStub(), new TaskStub(), new TaskStub(),\n new TaskStub(), new TaskStub(), new TaskStub()];\n \n // Ask for 3 successful completions before we get a result\n $task = new \\Async\\Task\\SomeTask($tasks, 3);\n \n // Fail the first four tasks and check the task is failed with the\n // expected exception\n $tasks[0]->setException(new \\Exception(\"failure 1\"));\n $tasks[1]->setException(new \\Exception(\"failure 2\"));\n $tasks[2]->setException(new \\Exception(\"failure 3\"));\n $tasks[3]->setException(new \\Exception(\"failure 4\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n $this->assertTrue($task->isComplete());\n $this->assertTrue($task->isFaulted());\n $this->assertInstanceOf(\n \\Async\\Task\\MultipleFailureException::class, $task->getException()\n );\n $this->assertContains('4 tasks failed', $task->getException()->getMessage());\n $this->assertEquals(\n [\n 0 => new \\Exception(\"failure 1\"),\n 1 => new \\Exception(\"failure 2\"),\n 2 => new \\Exception(\"failure 3\"),\n 3 => new \\Exception(\"failure 4\")\n ],\n $task->getException()->getFailures()\n );\n \n // Complete the fifth task and check that the failure is unaffected\n $tasks[4]->setResult(14);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n $this->assertTrue($task->isComplete());\n $this->assertTrue($task->isFaulted());\n $this->assertInstanceOf(\n \\Async\\Task\\MultipleFailureException::class, $task->getException()\n );\n $this->assertContains('4 tasks failed', $task->getException()->getMessage());\n $this->assertEquals(\n [\n 0 => new \\Exception(\"failure 1\"),\n 1 => new \\Exception(\"failure 2\"),\n 2 => new \\Exception(\"failure 3\"),\n 3 => new \\Exception(\"failure 4\")\n ],\n $task->getException()->getFailures()\n );\n \n // Fail the sixth task and check the failure is unaffected\n $tasks[5]->setException(new \\Exception(\"failure 6\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n $this->assertTrue($task->isComplete());\n $this->assertTrue($task->isFaulted());\n $this->assertInstanceOf(\n \\Async\\Task\\MultipleFailureException::class, $task->getException()\n );\n $this->assertContains('4 tasks failed', $task->getException()->getMessage());\n $this->assertEquals(\n [\n 0 => new \\Exception(\"failure 1\"),\n 1 => new \\Exception(\"failure 2\"),\n 2 => new \\Exception(\"failure 3\"),\n 3 => new \\Exception(\"failure 4\")\n ],\n $task->getException()->getFailures()\n );\n }", "title": "" }, { "docid": "4df73f89adab7ac919020195485eba3c", "score": "0.5548428", "text": "function weather_complete($task)\n{\n\techo \"Task [\" . $task->functionName() . \"] complete...\\n\";\n\n\t$weather = json_decode($task->data());\n\n\techo format_yql_weather($weather);\n}", "title": "" }, { "docid": "c176b346b26891dc4bd5b7d5ac6483e8", "score": "0.5544216", "text": "protected function setComplete($value)\n {\n $this->complete = $value;\n }", "title": "" }, { "docid": "526048e3bda1e8a8155e938e75aa0edc", "score": "0.5525926", "text": "function updateTask() {\n\t\t$sql = 'UPDATE Task set finished = 1, token=\"' . $_SESSION['token'] . '\", campaign=\"' . $_SESSION['campaign'] . '\", UID=\"' . $_SESSION['UID'] . '\" WHERE TaskId=\"' . $_SESSION['TaskId'] . '\"';\n\t\t$stmt = self::$DB -> prepare($sql);\n\t\tif ($stmt -> execute()) {\n\t\t\t$this -> removeTaskInProgress();\n\t\t} else {\n\t\t\t$arr = array('success' => 0, 'error_msg' => 'Couldn\\'t enter Events');\n\t\t\techo json_encode($arr);\n\t\t}\n\t}", "title": "" }, { "docid": "edd431e1fb2096d0a9d0ed5a5d8d8ac2", "score": "0.55255586", "text": "public function set_completed($completed)\n {\n $this->completed = $completed;\n }", "title": "" }, { "docid": "9e0ecc68ed3219e97f94b4b36314645a", "score": "0.55129176", "text": "public function markCompleted($id) {\n\n $this->appModel->markCompleted($id);\n $this->displayInitialView('Item successfully marked as completed');\n\n}", "title": "" }, { "docid": "694e35943f5ef8e673f19b189d77f9f9", "score": "0.54725164", "text": "public function updated(Task $task)\n {\n if ($task->isSubtask() && $task->status === TaskStatus::COMPLETED) {\n // Check other descendants.\n $hasPending = Task::query()\n ->descendantsOf($task->parent)\n ->where('status', TaskStatus::PENDING)\n ->exists();\n\n if (!$hasPending) {\n $task->parent->update(['status' => TaskStatus::COMPLETED]);\n }\n }\n }", "title": "" }, { "docid": "03b55a0d9169356c7805f87b4c33f411", "score": "0.5460362", "text": "public function markTaskCompleted($taskId, $lock)\n { \n $request = array(\n 'action' => 'complete_task',\n 'task_id' => $taskId,\n 'lock' => $lock\n );\n \n $response = $this->sendRequest($request);\n $baseResponse = new Responses\\BaseResponse($response);\n \n if (!$baseResponse->isOk())\n {\n $err_msg = 'marking task completed failed: [' . $baseResponse->getError() . ']';\n throw new Exception($err_msg);\n }\n }", "title": "" }, { "docid": "8580ad510b5b20877a750087c15831bc", "score": "0.54598886", "text": "public function deleting(Subtask $subtask)\n {\n $job = (new DecreasePoints($subtask))->onQueue('decrease_points');\n dispatch($job);\n }", "title": "" }, { "docid": "fcfddc58f95d48d35e371359b100d18c", "score": "0.54435915", "text": "public function testFailsEvenWithSuccessfulSubTasks() {\n $tasks = [new TaskStub(), new TaskStub(), new TaskStub(), new TaskStub()];\n \n // Ask for 2 successful completions before we get a result\n $task = new \\Async\\Task\\SomeTask($tasks, 2);\n \n // Check that the task is not complete\n $this->assertFalse($task->isComplete());\n \n // Fail the first task and tick\n $tasks[0]->setException(new \\Exception(\"failure 1\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is still not complete\n $this->assertFalse($task->isComplete());\n \n // Complete a task successfully and tick\n $tasks[2]->setResult(10);\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is still not complete\n $this->assertFalse($task->isComplete()); \n \n // Fail a second task and tick\n $tasks[1]->setException(new \\Exception(\"failure 2\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is still not complete, as it is still possible for\n // two tasks to complete successfully\n $this->assertFalse($task->isComplete());\n \n // Fail a third task and tick\n $tasks[3]->setException(new \\Exception(\"failure 3\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task has now failed with the correct failure\n $this->assertTrue($task->isComplete());\n $this->assertTrue($task->isFaulted());\n $this->assertInstanceOf(\n \\Async\\Task\\MultipleFailureException::class, $task->getException()\n );\n $this->assertContains('3 tasks failed', $task->getException()->getMessage());\n $this->assertEquals(\n [\n 0 => new \\Exception(\"failure 1\"),\n 1 => new \\Exception(\"failure 2\"),\n 3 => new \\Exception(\"failure 3\")\n ],\n $task->getException()->getFailures()\n );\n }", "title": "" }, { "docid": "b3387004171c09a6698029c6159e0001", "score": "0.54405344", "text": "public function complete(){\n\t\t$this->set_status( APPTHEMES_ORDER_COMPLETED );\n\t}", "title": "" }, { "docid": "6fcff452bcdae900f384aa978f8b5cf4", "score": "0.5422301", "text": "public function finishProjectTask($user_id,$project_id,$task_id,$data = array()){\r\n\t\t$user = $this->em->getRepository ('\\App\\Entity\\User')->findOneById ( $user_id );\r\n\t\tif(!$user){\r\n\t\t\tthrow new \\Exception(\"Member doesn't exists\");\r\n\t\t}\r\n\t\r\n\t\t// find task\r\n\t\t$t =$this->findOneTaskForProject($project_id, $task_id);\r\n\t\r\n\t\tif($t){\r\n\t\t\t// if checkbox is checked ; jquery is not sending variable when chechbox is unchecked\r\n\t\t\tif(isset($data['finished'])) {\r\n\t\t\t\t$t->setFinished(true);\r\n\t\t\t} else {\r\n\t\t\t\t$t->setFinished(false);\r\n\t\t\t}\r\n\t\t\t$this->em->flush();\r\n\t\t} else {\r\n\t\t\tthrow new \\Exception(\"This question can't be updated\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c5217dcd846ac510ddde27c4b33c6503", "score": "0.54202944", "text": "public function onTaskCompleted($event)\n {\n $task = $event->task;\n $notifications = $task->notifications()->completed()->get();\n\n foreach ($notifications as $notification)\n {\n $notification->send();\n }\n }", "title": "" }, { "docid": "8a945e8c4efce6c3e80ee944415e81dd", "score": "0.54107326", "text": "public function completeTask($user, $taskId)\n {\n echo $user; echo $taskId;\n $sql = $this->procedure.\"complete_task('\".$user.\"',\".$taskId.\")\";\n $this->executeStatementNoOutput($sql);\n }", "title": "" }, { "docid": "e82c7ebe208c361e720418eb101c5d75", "score": "0.5386915", "text": "public function testMarkMealCompleted(){\n $this->meal->complete();\n $this->assertTrue($this->meal->isComplete(), 'Recipe must be completed.');\n $this->assertNotNull($this->meal->getCompletedOn(), 'Recipe must have a completion date.');\n }", "title": "" }, { "docid": "7a8895adf9bdbbeca220bea58e4a1d6f", "score": "0.5359524", "text": "public function isParentTaskComplete(){\n if(!$this->parent_id){\n return true;\n }\n\n $depTask = self::find($this->parent_id);\n\n if(in_array($depTask->status, [self::STATUS_PENDING, self::STATUS_INPROGRESS]))\n {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "f1ea13d91fd9dcca7473f1ab41099c6c", "score": "0.5350276", "text": "public function testCreateSubTaskTest()\n {\n $this->json('POST', '/api/task', ['user_id' => '1', 'parent_id' => '1', 'title' => 'TaskUnitTest1.1', 'is_done' => '1', 'points' => 2])\n ->seeJson([\n 'title' => \"TaskUnitTest1.1\",\n 'parent_id' => '1',\n ]);\n }", "title": "" }, { "docid": "6ec15585a1e7a334ad58b2d0688653a0", "score": "0.53271174", "text": "public function markCompleted()\n\t{\n\t\tglobal $ff_sql;\n\n\t\t$hasCompleted = true;\n\t\t$ff_sql->query(\"\n\t\t\tUPDATE\n\t\t\t\t`payment_state`\n\t\t\tSET\n\t\t\t\t`has_completed` = 1\n\t\t\tWHERE\n\t\t\t\tid = \". $ff_sql->quote($this->id) .\"\n\t\t\");\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "88a91c6085dc32be2ba401e22202e1bb", "score": "0.5314275", "text": "public function mark_job_as_archived() {\n // time completed is non-zero, then the job successfully completed.\n if ($this->get_status() == __FAILED__)\n $this->set_time_completed(\"0000-00-00 00:00:00\");\n $this->set_status(__ARCHIVED__);\n }", "title": "" }, { "docid": "d0054d3f9055a7f341b5313d063ede7e", "score": "0.53072375", "text": "public function status_transition_bulk_finished()\n {\n }", "title": "" }, { "docid": "ff2425dc5db470291b7ab301402fe4be", "score": "0.52964854", "text": "public function toggle_all() {\n\t\t$total_tasks = $this->count_all_tasks($this->todos);\n\t\t$completed_tasks = $this->count_completed_tasks($this->todos);\n\t\tif ($completed_tasks < $total_tasks) {\n\t\t\tforeach ($this->todos as $idx => $task) {\n\t\t\t\t$task->completed = true;\n\t\t\t}\n\t\t} else {\n\t\t\tforeach ($this->todos as $idx => $task) {\n\t\t\t\t$task->completed = false;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7b0d7f1dcd79a9d206d573207af54232", "score": "0.5254538", "text": "function onFinish(\\swoole_server $server, $taskId, $taskObj)\n {\n }", "title": "" }, { "docid": "5de970712c09e2ebf5e5618459c69889", "score": "0.5248538", "text": "public function onComplete()\n {\n }", "title": "" }, { "docid": "5589b635f8350b687b21e859a4c92a2a", "score": "0.5248488", "text": "protected function setCompleted($bool = false)\n {\n \\jf::SaveUserSetting(\"completed_\".get_called_class(), $bool);\n $this->addSuccessMessage();\n }", "title": "" }, { "docid": "827af984045178b89343f5afc248a806", "score": "0.5241039", "text": "public function afterComplete()\n {\n $next = new DateTime();\n $next->modify('+' . $this->recreate_in . ' seconds');\n $job = new TruncateJob($this->days, $this->recreate_in);\n $service = singleton(QueuedJobService::class);\n $descriptor_id = $service->queueJob($job, $next->format('Y-m-d H:i:s'));\n if (!$descriptor_id) {\n Log::log(\"Failed to queue new TruncateJob!\", \\Psr\\Log\\LogLevel::WARNING);\n }\n }", "title": "" }, { "docid": "cd0ffaa86d68fd1b7721b272d75f6c13", "score": "0.52358425", "text": "private function onTaskFinishedRunning() {\n\t\t$this->updateAnalytics();\n\t}", "title": "" }, { "docid": "aaa4528c95f12d7cb825d8a08bd4b1a5", "score": "0.5232695", "text": "public function applyTask()\n\t{\n\t\t$this->saveTask(false);\n\t}", "title": "" }, { "docid": "59c408b75ddd667f3abb175eafa10166", "score": "0.5193258", "text": "public function notComplete($subtaskId)\n {\n $subtask = Subtask::find($subtaskId);\n\n $subtask->is_complete = 0;\n\n $subtask->save();\n\n return $subtask;\n }", "title": "" }, { "docid": "901acafbc3818a21b033311f3b534c39", "score": "0.51891303", "text": "public function testAddSubTask() {\n $site = new Site();\n $stack = new TaskStack('foo');\n $site->addTask($stack);\n // Add a task object.\n $task1 = new Task('bar');\n $site->addSubTask('foo', $task1);\n $this->assertContains($task1, $site->getTask('foo')->tasks, 'Subtask successfully added to task stack.');\n // Add a task by task name.\n $task2 = new Task('baz');\n $site->addTask($task2);\n $site->addSubTask('foo', 'baz');\n $this->assertContains($task2, $site->getTask('foo')->tasks, 'Subtask successfully added to task stack.');\n $this->assertEquals('array', gettype($site->getTasks()));\n }", "title": "" }, { "docid": "4f1da4aa67d77b6176ba1883c6fb4ffc", "score": "0.5184308", "text": "public function submitTask()\n\t{\n\t\tif (!$crumb = Request::getString('crumb', false))\n\t\t{\n\t\t\tApp::abort(422);\n\t\t}\n\n\t\t$attempt = Request::getInt('attempt', 1);\n\t\t$att = ($attempt > 1) ? '&attempt='.$attempt : '';\n\t\t$dep = PdfFormDeployment::fromCrumb($crumb);\n\t\t$ended = false;\n\n\t\t// Make sure they're not trying to take the form too many times\n\t\tif ($attempt > $dep->getAllowedAttempts())\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('COM_COURSES_WARNING_EXCEEDED_ATTEMPTS'));\n\t\t}\n\n\t\t// Check to see if the time limit has been reached\n\t\tif ($limit = $dep->getTimeLimit())\n\t\t{\n\t\t\t$resp = $dep->getRespondent($this->member, $attempt);\n\n\t\t\t$now = strtotime(Date::of('now'));\n\t\t\t$start = strtotime($resp->getStartTime());\n\t\t\t$end = strtotime($dep->getEndTime());\n\t\t\t$dur = $limit * 60;\n\n\t\t\tif ($now > ($start + $dur) || ($dep->getEndTime() && $end < $now))\n\t\t\t{\n\t\t\t\t$ended = true;\n\t\t\t}\n\t\t}\n\n\t\tlist($complete, $answers) = $dep->getForm()->getQuestionAnswerMap($_POST, $ended);\n\n\t\tif ($complete)\n\t\t{\n\t\t\t$resp = $dep->getRespondent($this->member, $attempt);\n\t\t\tif (!$resp->getEndTime())\n\t\t\t{\n\t\t\t\t$resp->saveAnswers($_POST)->markEnd();\n\t\t\t}\n\n\t\t\tApp::redirect(Route::url($this->base . '&task=form.complete&crumb=' . $crumb . $att, false));\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setView('form', 'complete');\n\t\t\t$this->_task = 'complete';\n\t\t\t$this->view->incomplete = array_filter(\n\t\t\t\t$answers,\n\t\t\t\tfunction($ans)\n\t\t\t\t{\n\t\t\t\t\treturn is_null($ans[0]);\n\t\t\t\t}\n\t\t\t);\n\t\t\t$this->completeTask();\n\t\t}\n\t}", "title": "" }, { "docid": "dec5841d40e22500f46792558a3f027d", "score": "0.51544774", "text": "public function completeTask($taskId) : Task\n {\n // Try to find Task object from repository, from given ID\n try {\n $task = $this->taskRepository->find($taskId);\n } catch (TaskNotFoundException $e) {\n throw $e;\n }\n\n // Update Task's status to completed\n $task->setStatus(Task::STATUS_COMPLETED);\n\n // Try to save Task object into repository\n try {\n $this->taskRepository->save($task);\n } catch (TaskCannotBeSavedException $e) {\n throw $e;\n }\n\n // Return Task object\n return $task;\n }", "title": "" }, { "docid": "ee862b39968fb647f12e1ff88f5a40bb", "score": "0.5149715", "text": "public function complete($completion) {\n $this->review($completion, true, true);\n }", "title": "" }, { "docid": "55dd8de41e6ca7299fb02697ed70f720", "score": "0.51357925", "text": "public function done(Request $request, Task $task)\n {\n $this->authorize('destroy', $task);\n $mark = Task::where('id', $task->id)\n ->update(['status' => 1]);\n \n return redirect('tasks')->with(\"status\", \"Task marked as done\");\n }", "title": "" }, { "docid": "66319fb7ab295f8f13f8be2652618ee4", "score": "0.51346684", "text": "public function taskFinalized($id) {\r\n\t\t$conn = parent::connect ();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$statement = $conn->prepare ( 'UPDATE task SET isFinalized=1 WHERE id=:id;' );\r\n\t\t\t$statement->bindValue ( \":id\", $task->getId () );\r\n\t\t\t\r\n\t\t\t$statement->execute ();\r\n\t\t\tif ($statement->rowCount () > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} catch ( PDOException $e ) {\r\n\t\t\tthrow new DAOException ( $e->getMessage (), null, $e );\r\n\t\t} finally {\r\n\t\t\t$conn = null;\r\n\t\t\t$statement->closeCursor ();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4441b820c5c804eb8d8b77164a503c58", "score": "0.5122054", "text": "protected function complete() {\n dokan_log( 'Vendor Zone Data Sync completed', 'info' );\n parent::complete();\n }", "title": "" }, { "docid": "08a79dc742b2ab8df1f4250f1bb7c03b", "score": "0.5104434", "text": "public function testFailsWhenEnoughSubTasksFail() {\n $tasks = [new TaskStub(), new TaskStub(), new TaskStub(), new TaskStub()];\n \n // Ask for 2 successful completions before we get a result\n $task = new \\Async\\Task\\SomeTask($tasks, 2);\n \n // Check that the task is not complete\n $this->assertFalse($task->isComplete());\n \n // Fail the first task and tick\n $tasks[0]->setException(new \\Exception(\"failure 1\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is still not complete\n $this->assertFalse($task->isComplete());\n \n // Fail another task and tick\n $tasks[1]->setException(new \\Exception(\"failure 2\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task is still not complete, as it is still possible for\n // two tasks to complete successfully\n $this->assertFalse($task->isComplete());\n \n // Fail a third task and tick\n $tasks[3]->setException(new \\Exception(\"failure 3\"));\n $task->tick($this->getMock(\\Async\\Scheduler\\Scheduler::class));\n \n // Check that the task has now failed with the correct failure\n $this->assertTrue($task->isComplete());\n $this->assertTrue($task->isFaulted());\n $this->assertInstanceOf(\n \\Async\\Task\\MultipleFailureException::class, $task->getException()\n );\n $this->assertContains('3 tasks failed', $task->getException()->getMessage());\n $this->assertEquals(\n [\n 0 => new \\Exception(\"failure 1\"),\n 1 => new \\Exception(\"failure 2\"),\n 3 => new \\Exception(\"failure 3\")\n ],\n $task->getException()->getFailures()\n );\n }", "title": "" }, { "docid": "96e54be3ca74f353b9781c53bcd98b29", "score": "0.50975937", "text": "public function completeProgressBar()\n {\n if (!empty($this->progressBarCompleteMessage)) {\n printf(\"%s\", $this->progressBarCompleteMessage);\n }\n\n printf(PHP_EOL);\n $this->progressBarStarted = false;\n $this->progressBarActive = false;\n }", "title": "" }, { "docid": "344213db6bf44930f641de7c02b72f4e", "score": "0.50923604", "text": "function list_completed() {\n if (!$this->request->isAsyncCall()) {\n $this->redirectToReferer('dashboard');\n } // if\n\n $completed_tasks = $this->active_task_parent->getCompletedTasks();\n $this->smarty->assign(array(\n 'completed_tasks' => $completed_tasks\n ));\n }", "title": "" }, { "docid": "4be1a23a52ee2fa961ee324eb18f292e", "score": "0.50551134", "text": "public function complete($id)\n {\n $this->db->setData(\"UPDATE {$this->table} SET completedate = ? WHERE id = ?\", [date(\"Y-m-d\"), $id]);\n }", "title": "" }, { "docid": "152247a8a664511d901b96aecd9c8302", "score": "0.504902", "text": "public function updateStatus(Task $task, Status $status);", "title": "" }, { "docid": "1e017f5b631868018586b40fa936d7b9", "score": "0.5035124", "text": "public function finish($status = array(), $jobId = false) {\n\t\tif (!$jobId)\n\t\t\t$jobId = $this->currentJobId;\n\t\t$job = $this->getStatus($jobId);\n\t\tif ($job['status'] < self::STATUS_COMPLETED) {\n\t\t\t$this->update(array_merge(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t'progress' => 100,\n\t\t\t\t'end_time' => date('Y-m-d H:i:s'),\n\t\t\t\t'status' => self::STATUS_COMPLETED,\n\t\t\t\t\t\t\t), $status\n\t\t\t\t\t), $jobId);\n\t\t}\n\t\t$this->cleanDb(); // cleanup of Old items\t\t\n\t}", "title": "" }, { "docid": "cc924da330a38e1f787534acd2a093dd", "score": "0.50294894", "text": "public function generate_completetasklink(UserAction $task) {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$href = $this->generate_viewactionjsonurl($task);\n\t\t\t$icon = $bootstrap->icon('fa fa-check-circle');\n\t\t\t$icon .= ' <span class=\"sr-only\">Mark as Complete</span>';\n\t\t\treturn $bootstrap->a(\"href=$href|role=button|class=btn btn-xs btn-primary complete-action|title=Mark Task as Complete\", $icon);\n\t\t}", "title": "" }, { "docid": "2e1200000dcea5431a4922933ce96848", "score": "0.50274956", "text": "public function done(): void;", "title": "" }, { "docid": "4e119b74c6c7ada53fb6f25b7ab37868", "score": "0.50202423", "text": "public function hasSubtaskInProgress()\n {\n return session_is_true('hasSubtaskInProgress');\n }", "title": "" }, { "docid": "e2cc43ea7d921962f998819bdc663a44", "score": "0.50095767", "text": "protected function finish()\n {\n $event = array_shift($this->done);\n \n if ($event) {\n $event->finish();\n }\n }", "title": "" }, { "docid": "e3a0ae57eb59e59081883403bba3ec9d", "score": "0.5002876", "text": "public function finish()\n {\n $this->finished = date(\"Y-m-d H:i:s\");\n }", "title": "" }, { "docid": "d693b196e4366b1905195832fd8dbb78", "score": "0.49934888", "text": "public function setCompletedBy($value)\n {\n $this->setProperty(\"CompletedBy\", $value, true);\n }", "title": "" }, { "docid": "406a4c06f569e28f0ac8426d939f43e0", "score": "0.49851382", "text": "public function didComplete(bool $success = true): void\n {\n if ($this->wasClientDispatched()) {\n $this->clientJob->completed($success);\n }\n }", "title": "" }, { "docid": "c4283e6ea830874a2510315e5684dd64", "score": "0.49848166", "text": "function mymultistepform_registration_subtask_finish(&$form_state) {\n // Clear our Ctool cache object.\n mymultistepform_registration_clear_page_cache('signup');\n\n \n// Redirect the user to the front page.\n drupal_goto('<front>');\n}", "title": "" }, { "docid": "76594e7441a3f4b7d58ba84b25a2e4d2", "score": "0.49809575", "text": "public function completeTask($id) : Task\n {\n // Find Task object from repository\n try {\n $task = $this->repository->findById($id);\n } catch (TaskNotFoundException $e) {\n throw $e;\n }\n\n // Validate ability to complete task\n try {\n $this->validator->validateAbilityToCompleteTask($task);\n } catch (TaskCompletionException $exception) {\n throw $exception;\n }\n\n // Update Task status to completed\n $task->setStatus(Task::STATUS_COMPLETED);\n\n // Try to save Task object into repository\n try {\n $this->repository->save($task);\n } catch (TaskSavingException $exception) {\n throw $exception;\n }\n\n return $task;\n }", "title": "" }, { "docid": "008c55d018f51b52950934461b11d906", "score": "0.49752903", "text": "function removeTaskInProgress() {\n\t\t$sql = 'DELETE FROM TaskInProgress WHERE TaskId=\"' . $_SESSION['TaskId'] . '\"';\n\t\t$stmt = self::$DB -> prepare($sql);\n\t\tif ($stmt -> execute()) {\n\t\t\t$this->checkForCampaignFinished();\n\t\t} else {\n\t\t\t$arr = array('success' => 0, 'error_msg' => 'Couldn\\'t enter Events');\n\t\t\techo json_encode($arr);\n\t\t}\n\t}", "title": "" }, { "docid": "451e05af9295b1a0f80cde4cdbf52585", "score": "0.49750543", "text": "function updateTask()\n {\n $this->_updateStatus();\n return $this->getFullStatus();\n }", "title": "" }, { "docid": "03b8c6d521003bafc600fde81e6b07d1", "score": "0.49725252", "text": "public function complete($result);", "title": "" }, { "docid": "6ce7a26c2832888263c0d1d132c3cb50", "score": "0.49598095", "text": "public function cleanAllCompletedTasks()\n {\n try {\n $this->taskRepository->removeByStatus(Task::STATUS_COMPLETED);\n } catch (TaskCannotBeRemovedException $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "85ffbb622f2071833fe311e5b1583ca9", "score": "0.4953536", "text": "public function complete()\n {\n //Retrieve task id from URL\n $tasksId = Input::get('id');\n\n //Determine if serve was accepted by vendor\n $accept = Input::get('accept');\n\n\n //Retrieve task data from db\n $CurrentTask = Tasks::whereId($tasksId)->first();\n\n //Get zip code of serve address\n $job = DB::table('jobs')->where('id', $CurrentTask->job_id)->first();\n\n $order = Orders::whereId($CurrentTask->order_id)->first();\n\n //Determine if the defendant was served\n $served = Input::get('served');\n\n\n //Find current task due\n $LatestTask = DB::table('tasks')->OrderBy('step', 'asc')\n ->where('job_id', $CurrentTask->job_id)\n ->where('completion', NULL)->first();\n\n //See if requested task is current task due, if not throw an error\n if ($LatestTask->id != $tasksId) {\n\n Return \"Not Authorized To View!\";\n\n //Check to see if user is authorized to complete task\n } elseif (Auth::user()->user_role=='Admin' OR Auth::user()->company_id == $CurrentTask->vendor) {\n\n //Complete vendor accept serve step\n if ($CurrentTask->step == 0){\n\n\n //If vendor accepts serve, complete step and proceed with serve\n if($accept == TRUE){\n\n $this->tasks->TaskComplete($tasksId);\n\n return Redirect::back();\n\n }\n //If vendor rejects serve, find next server\n elseif($accept == false){\n\n //Complete Task\n $this->tasks->TaskComplete($tasksId);\n\n //Find next available server\n //$serverData = array('jobId' => $CurrentTask->job_id, 'zipcode' => $job->zipcode);\n //$server = $this->jobs->SelectServer($serverData);\n\n //Assign tasks to new server\n //$newServer = array('jobId' => $CurrentTask->job_id, 'vendor' => $server, 'orderId' => $CurrentTask->order_id);\n //$newTask = $this->tasks->ReAssignServer($newServer);\n\n //Reproject pending tasks\n //$this->tasks->TaskReproject($newTask);\n\n return Redirect::to('/');\n\n }\n }\n\n if($CurrentTask->process == 1){\n\n //Documents picked up\n if($CurrentTask->step == 2){\n\n $this->tasks->TaskComplete($CurrentTask->id);\n\n Return Redirect::route('jobs.show', $CurrentTask->job_id);\n }\n\n //QA Documents\n if($CurrentTask->step == 3){\n\n //Find uploaded service documents\n $documents = Documents::whereOrderid($CurrentTask->order_id)->get();\n\n Return View::make('tasks.qa')->with(['task' => $CurrentTask])->with(['documents' => $documents]);\n }\n\n //Documents received\n if($CurrentTask->step == 5){\n\n $this->tasks->TaskComplete($CurrentTask->id);\n\n Return Redirect::route('jobs.show', $CurrentTask->job_id);\n }\n\n //Documents filed\n if($CurrentTask->step == 6){\n\n //Find documents to be served for this order\n $documentsServed = DocumentsServed::whereOrderid($order->id)->get();\n\n Return View::make('tasks.filed')->with(['task' => $CurrentTask])->with(['documentsServed' => $documentsServed]);\n }\n\n //Documents recorded\n if($CurrentTask->step == 7){\n\n //Find documents to be served for this order\n $documentsServed = DocumentsServed::whereOrderid($order->id)->get();\n\n Return View::make('tasks.recorded')->with(['task' => $CurrentTask])->with(['documentsServed' => $documentsServed]);\n }\n }\n\n //If posting, complete serve\n if($CurrentTask->process == 3 AND $CurrentTask->step == 1){\n\n Return View::make('serve.posting')->with(['task' => $CurrentTask]);\n\n }\n\n if($CurrentTask->process == 2 OR $CurrentTask->process == 3) {\n //Enter service attempt\n if ($CurrentTask->step == 1) {\n\n //If defendant was served, enter service details\n if ($served == TRUE) {\n\n Return View::make('serve.create')->with(['task' => $CurrentTask]);\n\n } //If service attempt, enter attempt details\n else {\n\n Return View::make('attempts.create')->with(['task' => $CurrentTask])->with(['job' => $job]);\n }\n }\n\n //Generate and upload proof\n if ($CurrentTask->step == 2) {\n\n //Find proofs, if any\n\n $proof = Documents::whereJobid($job->id)->whereDocument('Unexecuted_Proof')->OrderBy('created_at', 'desc')->pluck('filename');\n\n //Find server for this company\n\n $servers = User::whereCompany(Auth::user()->company)->lists('name', 'name');\n\n Return View::make('tasks.generate')->with(['task' => $CurrentTask])->with(['proof' => $proof])->with(['servers' => $servers])->with(['job' => $job]);\n\n }\n\n //File proof with court or send to client\n if ($CurrentTask->step == 3) {\n\n Return View::make('tasks.send')->with(['order' => $order])->with(['task' => $CurrentTask]);\n }\n\n //Generate declaration\n if ($CurrentTask->step == 4) {\n\n //Find proofs, if any\n\n $proof = Documents::whereJobid($job->id)->whereDocument('Unexecuted_Declaration')->OrderBy('created_at', 'desc')->pluck('filename');\n\n //Find server for this company\n\n $servers = User::whereCompany(Auth::user()->company)->lists('name', 'name');\n\n Return View::make('tasks.declaration')->with(['task' => $CurrentTask])->with(['proof' => $proof])->with(['servers' => $servers])->with(['job' => $job]);\n\n }\n\n //upload declaration\n if ($CurrentTask->step == 5) {\n\n //Find proofs, if any\n\n $proof = Documents::whereJobid($job->id)->whereDocument('Unexecuted_Declaration')->OrderBy('created_at', 'desc')->pluck('filename');\n\n //Find server for this company\n\n $servers = User::whereCompany(Auth::user()->company)->lists('name', 'name');\n\n Return View::make('tasks.declaration')->with(['task' => $CurrentTask])->with(['proof' => $proof])->with(['servers' => $servers])->with(['job' => $job]);\n\n }\n }\n\n }\n else{\n\n Return \"Not Authorized To View!\";\n }\n }", "title": "" }, { "docid": "cf99003458aca83aaa5cbf8471080614", "score": "0.49464664", "text": "public function markNotCompleted($id) {\n $this->appModel->markNotCompleted($id);\n $this->displayCompleted('Item successfully marked as not completed');\n}", "title": "" }, { "docid": "102751e778cb08c1b0fb9f0a8832c213", "score": "0.49447772", "text": "public function convertToCompletedTask($id)\n {\n $task = task::find($id);\n if (is_null($task))\n {\n return $this->sendError('Task not found.');\n }\n\n $errorMessage = [] ;\n if ( $task->user_id != Auth::id())\n {\n return $this->sendError('you dont have rights' , $errorMessage);\n }\n\n DB::table('tasks')->where('id', $id)->where('status', 0)->update([\n 'status' => 1,\n ]);\n return $this->sendResponse(new taskResource($task), 'Task is Completed');\n }", "title": "" }, { "docid": "eebc99db7294d2b5e1acaecaf3fd21dd", "score": "0.4940493", "text": "public function markAsFinished($output = '')\n {\n DatabaseBackupFinished::dispatch(tap($this)->update([\n 'status' => 'finished',\n 'exit_code' => 0,\n 'output' => $output,\n ]));\n }", "title": "" }, { "docid": "5ba33c922765d1745fb9700b4aa4ef4f", "score": "0.49318865", "text": "public function canEndTask()\n {\n return true;\n }", "title": "" }, { "docid": "5f0d2551d9ca3038b3de579a97ea5ba0", "score": "0.49317038", "text": "public function finish() {\n\t\t$this->set_reason( '' );\n\t\t$this->set_started( null );\n\t}", "title": "" }, { "docid": "7b4e21725943dbd755951c4add7d4d0b", "score": "0.49287888", "text": "public function updated(Task $task)\n {\n if (array_key_exists('status', $task->getChanges())) {\n //no need for recording data here Only status is changed (request is sent per every change)\n if (array_values($task->getChanges())[0]) {\n $this->activityCreate($task, false, 'task completed');\n } else {\n $this->activityCreate($task, false, 'task marked as in completed');\n }\n } else {\n $this->activityCreate($task, true, 'task updated');\n }\n }", "title": "" }, { "docid": "a0a90378923a9389719aed9ca65989ce", "score": "0.4921834", "text": "public function testCompleteServiceJobByServiceJobId()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "afac52a56c11da89c0b6fcb2b157300b", "score": "0.49211875", "text": "function isCompleted($entity);", "title": "" }, { "docid": "0aec58c12331d6828eacab8a6f793552", "score": "0.49189967", "text": "public function toggleCompleted($id)\n {\n try {\n $task = Task::whereId($id)->first();\n $task->toggleCompleted();\n $task->save();\n return $this->respond(TaskResource::make($task));\n }catch (\\Exception $e){\n return $this->respondInternalError();\n }\n }", "title": "" }, { "docid": "dedbe7cf60115bd6c8f2bd2c646c0ef9", "score": "0.49156058", "text": "function notifyComplete () {\n foreach($this->exStrats as $strat) {\n $strat->complete();\n }\n // Notify all channels\n foreach ($this->chans as $chan) {\n $chan->onSelectEnd();\n }\n }", "title": "" }, { "docid": "74feee69c101011c50c80e6737f9e444", "score": "0.4909398", "text": "public function isCompleted(): bool {\n return $this->getPhase() === Phase::COMPLETED;\n }", "title": "" }, { "docid": "51b9ef0aeaa85073b6aa5a483b267439", "score": "0.49083954", "text": "public function parallelJobCompleted($name, $pid, $status)\n {\n $schedule = $this->runningJobs[$name];\n unset($this->runningJobs[$name]);\n\n $errorStatus = Mage_Cron_Model_Schedule::STATUS_SUCCESS;\n\n $exitCode = pcntl_wexitstatus($status);\n if (pcntl_wifsignaled($status) || $exitCode != 0) {\n $errorStatus = Mage_Cron_Model_Schedule::STATUS_ERROR;\n $schedule->setMessages(\n Mage::helper('cron')->__('Job failed with exit code: %d', $exitCode)\n );\n }\n\n // Collect any recorded logs into the given schedule messages\n $this->processBlackBox($schedule, $pid);\n\n $schedule\n ->setStatus($errorStatus)\n ->setFinishedAt(strftime('%Y-%m-%d %H:%M:%S', time()))\n ->save();\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "995658e79be6624118d520d72cd5c6e3", "score": "0.0", "text": "public\n\tfunction update(\n\t\tRequest $request, $id\n\t) {\n\t\t//\n\t}", "title": "" } ]
[ { "docid": "b253a586f54d8fcd444353d114e8da96", "score": "0.76002145", "text": "public function update(IResource $resource)\r\n {\r\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e4f40e3038a0bbe2516116b595f30a89", "score": "0.6757658", "text": "public function PUT($resource = null) {\r\n if ($resource === null || !($resource instanceof Resource)) {\r\n return null;\r\n }\r\n $already_cached = $this->isCached($resource->getURI());\r\n // set ID\r\n $this->setURI($resource->getURI());\r\n // read\r\n if ($this->isCached($resource->getURI())) {\r\n $this->GET();\r\n }\r\n // set properties\r\n $this->version = $this->version + 1;\r\n $this->modified = microtime(true);\r\n $this->resource = $resource;\r\n $this->resource_type = get_class($resource);\r\n // update/create\r\n if ($already_cached) {\r\n $this->bind($this->getStorage()->update($this, $this->getURI()));\r\n } else {\r\n $this->bind($this->getStorage()->create($this, $this->getURI()));\r\n }\r\n // mark changed\r\n $this->changed();\r\n // return\r\n return $this->resource;\r\n }", "title": "" }, { "docid": "af0e53c810a141c868f509b2eca6ad23", "score": "0.6743531", "text": "public function updateResource(AbstractHeidelpayResource $resource): AbstractHeidelpayResource\n {\n $method = HttpAdapterInterface::REQUEST_PUT;\n $response = $this->send($resource, $method);\n\n $isError = isset($response->isError) && $response->isError;\n if ($isError) {\n return $resource;\n }\n\n $resource->handleResponse($response, $method);\n return $resource;\n }", "title": "" }, { "docid": "9901ee04c4556a77d0429d850748027c", "score": "0.6518833", "text": "public function updateFromResource(\n $resource,\n $entity\n );", "title": "" }, { "docid": "cd4cefef6a02422061b8e2fdc23cf805", "score": "0.642772", "text": "public function updateResource($path) {\n return $this->makeResource($path, HTTPRequest::PUT);\n }", "title": "" }, { "docid": "f77e0fca5e412969e5d9a60f3c165b4e", "score": "0.6323831", "text": "public function update(Request $request, Resource $resource)\n {\n $resource->title = $request->title;\n $resource->question = $request->question;\n $resource->user = $request->user()->associate(User::findOrFail($request->user_id));\n }", "title": "" }, { "docid": "6d27a80a2106069e33922d96d66fcde8", "score": "0.63188976", "text": "public function update(Request $request, Resource $resource)\n {\n\n\n if ($request->file('img') != null) {\n Storage::delete($resource->img);\n $resource->img = $request->file('img')->store('public/media');\n }\n\n try{\n $resource->name = $request->input('name');\n $resource->price = $request->input('price');\n $resource->description = $request->input('description');\n $resource->resource_code = $request->input('code');\n\n if ($request->input('addresource') != 0 ){\n $resource->quantity = $request->input('quantity') + $request->input('addresource');\n } else {\n $resource->quantity = $request->input('quantity');\n }\n\n $resource->save();\n return redirect(route('resource.index'))->with('message', 'Componente Aggiornato Con Successo!');\n }\n catch (Exception $e){\n $message = explode(' ', $e->getMessage());\n $dbCode = rtrim($message[4], ']');\n $dbCode = trim($dbCode, '[');\n\n switch($dbCode){\n case 1062:\n $error = 'Codice Componente Duplicato ';\n break;\n case 2002:\n $error = 'Impossibile Connettersi Al Server MySql';\n break;\n case 2003:\n $error = 'Impossibile Connettersi Al Server MySql';\n break;\n default:\n $error = $e;\n break;\n }\n\n\n return redirect(route('resource.index'))->with('error', $error);\n }\n\n\n\n }", "title": "" }, { "docid": "bf67dca88299af3aa93875dea0131d6c", "score": "0.62461627", "text": "public function update(ResourceUpdateRequest $request, Resource $resource): RedirectResponse\n {\n $input = $request->validated();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource->update($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n laraflash()\n ->message()\n ->title('Resource was updated')\n ->content('Resource was updated successfully.')\n ->success();\n\n return redirect()->route('resources.index');\n }", "title": "" }, { "docid": "0c0b4b27f6984eb668efd2e9b636202f", "score": "0.61261433", "text": "public function update($id, Request $request)\n\t{\n\t\t//$this->validate($request, ['name' => 'required']); // Uncomment and modify if needed.\n\t\t$resource = Resource::findOrFail($id);\n\n \t\t/*if($request->has('')){\n \t$resource->=1;\n }\n else{\n \t$resource->=0;\n }\n*/\n \t\t\n \t\t$resource->update($request->except(''));\n\t\treturn redirect('admin/resources')->with('success', Lang::get('message.success.update'));\n\t}", "title": "" }, { "docid": "9b0e60b6f7646914f2d5fb4d66277596", "score": "0.6066986", "text": "public function updateStorage($nid, $bundle, $vid, $profile_id);", "title": "" }, { "docid": "d841657bead79fe39d3503705f5c4087", "score": "0.60630876", "text": "public function update() {\n\t\ttry {\n\t\t\t$this->validateUpdate();\n\n\t\t\t$isParentWritable = false;\n\t\t\tif ($this->parentId) {\n\t\t\t\ttry {\n\t\t\t\t\t$this->context->checkPermission(\n\t\t\t\t\t\t\\Scrivo\\AccessController::WRITE_ACCESS,\n\t\t\t\t\t\t$this->parentId);\n\t\t\t\t\t$isParentWritable = true;\n\t\t\t\t} catch (\\Scrivo\\ApplicationException $e) {}\n\t\t\t}\n\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"UPDATE asset SET\n\t\t\t\t\tparent_id = :parentId, type = 1, size = :size,\n\t\t\t\t\tdate_online = :dateOnline, date_offline = :dateOffline,\n\t\t\t\t\tdate_modified = now(), title = :title, location = :location,\n\t\t\t\t\tmime_type = :mimeType\n\t\t\t\tWHERE instance_id = :instId AND asset_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->bindValue(\":parentId\", $this->parentId, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":size\", $this->size, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":dateOnline\",\n\t\t\t\t$this->dateOnline->format(\"Y-m-d H:i:s\"), \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":dateOffline\", $this->dateOffline\n\t\t\t\t? $this->dateOffline->format(\"Y-m-d H:i:s\")\n\t\t\t\t: null, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":title\", $this->title, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":location\", $this->location, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":mimeType\", $this->mimeType, \\PDO::PARAM_STR);\n\n\t\t\t$sth->execute();\n\n\t\t\tunset($this->context->cache[$this->id]);\n\t\t\tunset($this->context->cache[$this->parentId]);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "title": "" }, { "docid": "1353d923d0fcfd0113977041bf74d05f", "score": "0.6000983", "text": "function update($id, $name)\n {\n $data = array(\n 'RESOURCE' => $name\n );\n return $this->db->update('resources', $data, array('ID' => $id));\n }", "title": "" }, { "docid": "af225e219a46339f3a9ee2689837d399", "score": "0.5993225", "text": "public function updateStorage($nid);", "title": "" }, { "docid": "d5cbb3a27c8468dc9640e48a0df53162", "score": "0.5968083", "text": "public function refresh($resource);", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "dcfead633b02d4f78a929c5d2ae54c9f", "score": "0.5879812", "text": "public function update($id)\n {\n $name = Input::get('name');\n if ($id and $name) {\n $storage = PhoneStorage::find($id);\n if ($storage) {\n $storage->name = $name;\n if ($storage->save()) {\n return redirect('admin/sku/storage/show');\n }\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "29902bb4a9714a42f12eb5c45ea89ba9", "score": "0.58743304", "text": "public function update(Request $request, $id)\n {\n $request_data = $request ->all();\n if ($request->hasfile('img')) {\n $old_img = Product::find($id)->img;\n\n Storage::disk('public')->delete($old_img);\n $path = $request->file('img') ->store('','public');\n $request_data['img'] = $path;\n }\n Product::find($id) ->update($request_data);\n return redirect('/product_manager/products/');\n }", "title": "" }, { "docid": "f426c6b2b02fdbb52ed2455f38355540", "score": "0.58324945", "text": "public function update($object, Response $response) {}", "title": "" }, { "docid": "9b56bc7994357f250ca341a17f3d507e", "score": "0.5832236", "text": "public function updateStream($path, $resource, Config $config)\n {\n // TODO: Implement updateStream() method.\n }", "title": "" }, { "docid": "bf76975e3712725cb52495c5847b54b8", "score": "0.5827159", "text": "public function update(Request $request, $slug)\n {\n try{\n $obj = Obj::where('slug',$slug)->first();\n\n /* delete file request */\n if($request->get('deletefile')){\n\n if(Storage::disk('public')->exists($obj->image)){\n Storage::disk('public')->delete($obj->image);\n }\n redirect()->route($this->module.'.show',[$slug]);\n }\n\n $this->authorize('update', $obj);\n /* If image is given upload and store path */\n if(isset($request->all()['file_'])){\n $file = $request->all()['file_'];\n $filename = $request->get('slug').'.'.$file->getClientOriginalExtension();\n $path = Storage::disk('public')->putFileAs('company', $request->file('file_'),$filename);\n $request->merge(['image' => $path]);\n }\n\n \n\n $obj->update($request->except(['file_'])); \n\n $sizes = [300,600,900];\n foreach($sizes as $s)\n image_resize($obj->image,$s);\n\n /* update cache file of this product */\n $filename = $obj->slug.'.json';\n $filepath = $this->cache_path.$filename;\n file_put_contents($filepath, json_encode($obj,JSON_PRETTY_PRINT));\n\n /* update in cache folder main file */\n $filename = 'index.'.$this->app.'.'.$this->module.'.json';\n $filepath = $this->cache_path.$filename;\n $objs = $obj->orderBy('created_at','desc')\n ->get(); \n file_put_contents($filepath, json_encode($objs,JSON_PRETTY_PRINT));\n \n\n flash('('.$this->app.'/'.$this->module.') item is updated!')->success();\n return redirect()->route('page',$slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "bb41fea0d7e3820af9d350e035befccd", "score": "0.582132", "text": "public function update($resource, array $values, array $conditions);", "title": "" }, { "docid": "2f3851fd0b5ba0a397a32a1d8eba656a", "score": "0.5812446", "text": "public function update(Request $request, $id)\n {\n $accessLevel = $request->user()->hasAccessTo('resource', 'edit', 0);\n if ($accessLevel < 1) {\n throw new AccessDeniedHttpException('You don\\'t have permission to access this page');\n }\n\n $this->validate($request, []);\n\n $resource = resource::where('organization_id', $request->user()->organization_id)->where('resource_id', $id)->first();\n if (is_null($resource)) {\n return 'No such resource';\n }\n\n $resource->name = $request->name;\n $resource->amount = $request->amount;\n $resource->description = $request->description;\n $resource->organization_id = $request->user()->organization_id;\n\n $resource->save();\n\n Session::flash('success', 'Новый ресурс успешно сохранен!');\n\n return redirect()->route('resource.show', $resource->storage_id);\n }", "title": "" }, { "docid": "9e790706f8baf53a6ef7115ea3fe6310", "score": "0.5789587", "text": "public function updateStream($path, $resource, Config $config){\n\t\treturn $this->writeStream($path, $resource, $config);\n\t}", "title": "" }, { "docid": "80c3484093dcbc8bd47dc3e4e04d9033", "score": "0.57762426", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $request->validate([\n 'price' => 'numeric',\n 'stock' => 'nullable|integer|min:0'\n ]);\n\n $product->name = $request->name;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "e0ff4c1cfc6836b51bae3fbbba8ef3aa", "score": "0.57603025", "text": "public function update(int $id, array $parameters): Disk;", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "c237902cc83db4968a50dc1c6f5d8365", "score": "0.57336116", "text": "public function update(Storage $storage)\n {\n $data = request()->validate([\n 'name' => 'required|min:3',\n 'local' => 'required|min:3',\n ]);\n\n $storage->update($data);\n\n return back()->with('status', 'Estoque Alterado com sucesso!');\n }", "title": "" }, { "docid": "4833158a02d90c87e3c27432dd93c80b", "score": "0.57304865", "text": "public function update($id)\n {\n //Get Input\n $input = Input::all();\n\n if ($this->photo->isValid($input)) {\n $mime = $input['file']->getMimeType();\n $fileName = time() . \".\" . strtolower($input['file']->getClientOriginalExtension());\n\n $photo = Photo::find($id);\n $photo->title = Input::get('title');\n\n //Delete Old from Bucket\n $s3 = AWS::get('s3');\n $s3->deleteObject(array('Bucket' => 'anglyeds','Key' => \"resource/{$photo->file}\"));\n $s3->deleteObject(array('Bucket' => 'anglyeds','Key' => \"resource/{$photo->file}\"));\n\n //Upload new files\n $image = Image::make($input['file']->getRealPath());\n $this->upload_s3($image, $fileName, $mime, \"resource\");\n $image->resize(400, 300);\n $this->upload_s3($image, $fileName, $mime, \"resource\");\n\n $photo->file = $fileName;\n $photo->save();\n\n return Redirect::route('photo.index');\n } else {\n Session::flash('error', 'Se ha producido un error al editar la imagen');\n return Redirect::back()->withInput()->withErrors($this->photo->messages);\n }\n }", "title": "" }, { "docid": "992bd9bfc3103db43dbbe54ae361cb84", "score": "0.5727633", "text": "function item_put()\n {\n $key = $this->get('id');\n $record = array_merge(array('id' => $key), $this->_put_args);\n $this->inventories->update($record);\n $this->response(array('ok'), 200);\n }", "title": "" }, { "docid": "55142d8fdc217df83e69b5aed38a2b33", "score": "0.5727569", "text": "public function save(ResourceInterface $resource): void;", "title": "" }, { "docid": "8c02cbf8969d18f12686c5d54fa56b63", "score": "0.57223403", "text": "public function POST($resource) {\r\n if ($resource === null || !($resource instanceof Resource)) {\r\n throw new Error('No resource given to update', 400);\r\n }\r\n // set ID\r\n $this->setURI($resource->getURI());\r\n // set properties\r\n $this->version = 1;\r\n $this->modified = microtime(true);\r\n $this->resource = $resource;\r\n $this->resource_type = get_class($resource);\r\n // create\r\n $id = $this->getStorage()->create($this, $this->getURI());\r\n // mark changed\r\n $this->changed();\r\n // return\r\n return $id;\r\n }", "title": "" }, { "docid": "a0fc094a7f5473b79a41c9c40db99e36", "score": "0.5718959", "text": "private function put()\n {\n $response = $this->client->put(\n $this->resource . '/' . $this->resourceId,\n ['json' => $this->payload]\n );\n $this->response = json_decode($response->getBody()->getContents(), true);\n }", "title": "" }, { "docid": "7b8b98368c0360d1cb78858a1ff8292d", "score": "0.5718498", "text": "public function put($path, $data);", "title": "" }, { "docid": "cbf8435986892ace3d4dbcfbf62f6804", "score": "0.5714311", "text": "public function isUpdateResource();", "title": "" }, { "docid": "3bf886fc4d65fbf4193a0c7a70e3d27b", "score": "0.5710541", "text": "public function update( $resourcePath, Array $body = array() ) {\n\t\treturn $this->callResource( 'put', $resourcePath, array( 'body' => $body ) );\n\t}", "title": "" }, { "docid": "b4fb8c5371252f73bdae53fec248b16b", "score": "0.57056284", "text": "public function updateProduct(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->price = $request->input('price');\n\n if ($request->has('primary_img')) {\n $extension = $request->file('primary_img')->getClientOriginalExtension();\n $path = $request->file('primary_img')->storeAs('/product_img', uniqid() . \".\" . $extension, 'public');\n $product->primary_img = $path;\n } else {\n $product->primary_img = $product->primary_img;\n }\n $product->save();\n\n return redirect('/productos');\n }", "title": "" }, { "docid": "1042199aefe1809b61c91a4de6229983", "score": "0.56951517", "text": "public function put($resource, $data, array $headers = array(), $json = true)\n {\n return $this->sendRequest($resource, 'PUT', $data, $headers, $json);\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "38f04b68f8f45d3d25cd6544a96ec0f3", "score": "0.56726104", "text": "public function update(RestRequestInterface $request, string $identifier);", "title": "" }, { "docid": "f5de51ce0ea61490afec8e0f53576129", "score": "0.5672095", "text": "public function update($id, Request $request)\n {\n $imgID = Album::find($id);\n $edit = Photo::find($imgID->photo_id);\n Storage::disk('public')->delete('img/'.$edit->url);\n $request->file('url')->storePublicly('img/', 'public');\n $edit->url = $request->file('url')->hashName();\n $edit->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "5714eda4d057b7b9776c292a2e47264d", "score": "0.56627923", "text": "public function update(Request $request, $id)\n {\n request()->validate([\n \"url\" => ['image','mimes:jpeg,png,jpg,gif,svg','max:2048']\n ]);\n\n $request->file('url')->storePublicly('img/','public');\n\n $updatePhoto = Photo::find($id);\n\n Storage::delete('public/img'.$updatePhoto->url);\n $updatePhoto->url = $request->file('url')->hashName();\n Storage::put('public/img', $request->file('url'));\n $updatePhoto->save();\n\n\n\n return redirect('/');\n }", "title": "" }, { "docid": "d45e1f57150d79cb0312c16b4b049e4f", "score": "0.5658075", "text": "public function update($id, Request $request)\n {\n $product = Product::find($id);\n $product->name= $request->input('name');\n $product->productID= $request->input('productID');\n $product->categoryID= $request->input('categoryID');\n $product->price= $request->input('price');\n $product->description= $request->input('description');\n $product->availability= $request->input('availability');\n\n $image = $request->file('image');\n $imageName = $image->getClientOriginalName();\n $image->move(\"storage/\", $imageName);\n $product->image = $request->root().\"/public/storage\".$imageName;\n\n $product->save();\n\n return Response::json(['success'=> \"Here you are!\"]);\n }", "title": "" }, { "docid": "ab66e621ecfde5ba3711ea79b9268701", "score": "0.563982", "text": "public function update(Request $request, $id)\n {\n $data = Product::find($id);\n $data->name = $request->name;\n $data->color = $request->color;\n $data->price = $request->price;\n $data->qty = $request->qty;\n if (empty($request->image)) {\n $data->image = $data->image;\n } else if (!empty($request->image)) {\n if ($data->image && file_exists(storage_path('app/public/' . $data->image))) {\n Storage::delete('public/' . $data->image);\n }\n $image_name = $request->file('image')->store('images', 'public');\n $data->image = $image_name;\n }\n $data->save();\n return redirect()->route('items')\n ->with('success', 'Item updated successfully');\n }", "title": "" }, { "docid": "d2036238965929966e0135348b9517ff", "score": "0.5609874", "text": "public function update(Request $request, $id)\n {\n $product = Products::find($id);\n $product->title = request('title');\n $product->category = request('category');\n $product->description = request('description');\n $product->brand = request('brand');\n $product->price = request('price');\n $product->file = request('file');\n $my_hot_value = $request['hot'];\n if($my_hot_value === 'yes')\n $product->hot = 1;\n else\n $product->hot = 0;\n // My checkbox slider value\n $my_slider_value = $request['slider'];\n if($my_slider_value === 'yes')\n $product->slider = 1;\n else\n $product->slider = 0;\n if($request->hasFile('file'))\n {\n $product->file->storeAs('public', $product->id);\n }\n\n $product->save();\n return redirect('admin');\n\n \n }", "title": "" }, { "docid": "05f26af1049875ba2f12ffb974cc9a64", "score": "0.5602483", "text": "public function update($Object);", "title": "" }, { "docid": "bfeea9f9948c0db1c36784d6379c7189", "score": "0.55961096", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::where('id', $id)->get()->first();\n $file = $request->file('file');\n if (!$product || !$file) {\n return redirect()->back();\n }\n\n //$filename = 'SP_' . $id . '_' . strtotime(date('d-m-y h:m:s')) . '.jpg';\n $filename = 'SP_' . $id . '_' . $request['avatarNumber'] . '.jpg';\n Storage::disk('public')->put($filename, File::get($file));\n if ($request['avatarNumber'] == \"1\") {\n $product->avatar = $filename ? $filename : null;\n }\n if ($request['avatarNumber'] == \"2\") {\n $product->avatar2 = $filename ? $filename : null;\n }\n if ($request['avatarNumber'] == \"3\") {\n $product->avatar3 = $filename ? $filename : null;\n }\n $product->update();\n\n return redirect()->route('products.index')->with(['message' => 'Image uploaded!']);\n }", "title": "" }, { "docid": "025f3bc95bae47de84ce7ea5679c819d", "score": "0.5595669", "text": "public function update($id)\n\t{\n //Get Input\n $input = Input::all();\n if ($this->photo->isValid($input)) {\n $mime = $input['file']->getMimeType();\n $fileName = time() . \".\" . strtolower($input['file']->getClientOriginalExtension());\n\n $photo = Photo::find($id);\n $photo->title = Input::get('title');\n\n //Delete Old from Bucket\n $s3 = AWS::get('s3');\n $s3->deleteObject(array('Bucket' => 'images.jacksonlive.es','Key' => \"test/high/{$photo->file}\"));\n $s3->deleteObject(array('Bucket' => 'images.jacksonlive.es','Key' => \"test/low/{$photo->file}\"));\n\n //Upload new files\n $image = Image::make($input['file']->getRealPath());\n $this->upload_s3($image, $fileName, $mime, \"high\");\n $image->resize(400, 300);\n $this->upload_s3($image, $fileName, $mime, \"low\");\n\n $photo->file = $fileName;\n $photo->save();\n\n return Redirect::route('photo.index');\n } else {\n Session::flash('error', 'Se ha producido un error al editar la imagen');\n return Redirect::back()->withInput()->withErrors($this->photo->messages);\n }\n\t}", "title": "" }, { "docid": "058a35e0ac342d137897ebe02714f4f1", "score": "0.55892015", "text": "public function update($id, Request $request)\n {\n $data = $this->getData($request);\n if($request->hasFile('icon')) { \n $file = $request->file('icon');\n $photo = md5(mt_rand(0,100000000000)).'.'.$file->getClientOriginalExtension();\n $file->move(base_path().'/public/media/',$photo);\n $data['icon'] = $photo; \n }\n\n try {\n $service = Service::findOrFail($id);\n $service->update($data);\n\n return redirect()->route('services.service.index')\n ->with('success_message', 'Service was successfully updated.');\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request.']);\n } \n }", "title": "" }, { "docid": "2249dc8ec122c9b1f72a6b802b92d42f", "score": "0.5585837", "text": "public function update(Request $request, string $id)\n {\n Image::destroy($id);\n Storage::disk('private')->delete(self::IMAGES_DIR_PATH.$id);\n\n return $this->store($request);\n }", "title": "" }, { "docid": "89c4a67510aadba767b3971ac6b08d35", "score": "0.5584348", "text": "public function update($record)\n\t{\n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $retrieved = $this->rest->put('/supplies', $record);\n\t}", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "5b19d86345d122ba39068d134a83d940", "score": "0.5580762", "text": "public function update(Request $request, $id)\n {\n $data = array();\n\n $data['product_name'] = $request->product_name;\n $data['product_description'] = $request->product_description;\n $data['product_code'] = $request->product_code;\n $data['selling_price'] = $request->selling_price;\n $data['root'] = $request->root;\n $data['buying_price'] = $request->buying_price;\n $data['category_id'] = $request->category_id;\n $data['supplier_id'] = $request->supplier_id;\n $data['product_quantity'] = $request->product_quantity;\n $image = $request->newphoto;\n\n if($image){\n $position = strpos($image,';');\n\n //which index to take\n $sub = substr($image,0,$position);\n //remove slash from image link\n\n $ext = explode('/',$sub)[1];\n\n //image naming //\n\n $name = time().\".\".$ext;\n\n //image making & resizing with intervention //\n $image = Image::make($image)->resize(240,200);\n\n //upload path//\n $upload_path = 'ims/products/';\n $image_url = $upload_path.$name;\n $img = $image->save($image_url);\n\n if($img){\n $data['product_image'] = $image_url;\n $findphoto = Product::where('id',$id)->first();\n $oldImagePath = $findphoto->product_image;\n $unbind = unlink($oldImagePath);\n\n\n\n $update = Product::where('id',$id)->update($data);\n }\n }else{\n $oldPhoto = $request->photo;\n $data['product_image'] = $oldPhoto;\n $update = Product::where('id',$id)->update($data);\n }\n }", "title": "" }, { "docid": "64d7bb836b1a4ee806618910164b6428", "score": "0.55798095", "text": "public function update(Request $request, $id)\n {\n\n $request->validate([\n 'image-file' => 'image|mimes:png,jpg,jpeg,bmp,svg',\n 'id' =>'required',\n \n \n ]);\n\n $file_name = '.jpg';\n if($request->file('image-file')) {\n $img = $request->file('image-file');\n $file_ext = $img->getClientOriginalExtension();\n $file_name =$request->input('id').\".\".$file_ext;\n Storage::disk('imagesPC')->put(\n $file_name,\n file_get_contents($img->getRealPath())\n );\n }\n \n $product = Product::find($id);\n $product->update([\n 'img' => $file_name,\n 'id' => $request->input('id'),\n \n // 'status' => $request->input('status'),\n \n ]);\n\n return redirect()\n ->route('product');\n // ->with('status', 'Informacion Modificada Satisfactoriamente');\n }", "title": "" }, { "docid": "f12ebea5694f9afc42343cf99118a0d3", "score": "0.55755484", "text": "public function updateAction () {\n\t\t$this->validateHttpMethod(\"PUT\");\n\n\t\t// Expected / Allowed params.\n\t\t$expectedParams = array(\n\t\t\t\"id\"\n\t\t);\n\n\t\t// Get the expected params.\n\t\t$this->getExpectedParams($expectedParams);\n\n\t\t// Get the params.\n\t\t$params = $this->format($this->route->params);\n\n\t\t// Get the criteria (ID).\n\t\t$criteria = array(\"id\" => $params[\"id\"]);\n\n\t\t// Get the data, by removing the ID.\n\t\tunset($params[\"id\"]);\n\n\t\t// Update the attachment.\n\t\t$attachment = $this->attachmentsModel->update($params, $criteria);\n\n\t\t// Output the updated attachment.\n\t\t$this->view->json = $attachment;\n\t}", "title": "" }, { "docid": "94afefa8c113972aad0d3526b5234a55", "score": "0.5574236", "text": "public function update(Request $request, $id)\n {\n $productToUpdate = Product::find($id);\n\n \t\t$productToUpdate->name = $request->input('name');\n \t\t$productToUpdate->spec = $request->input('spec');\n \t\t$productToUpdate->varietal_id = $request->input('varietal_id');\n \t\t$productToUpdate->price = $request->input('price');\n\n \t\t// Obtengo el archivo que viene en el formulario (Objeto de Laravel) que tiene a su vez el archivo de la imagen\n \t\t$image = $request->file('image'); // El value del atributo name del input file\n\n \t\tif ($image) {\n\n $imagenFinal = uniqid(\"win_\") . \".\" . $image->extension();\n\n $image->storePubliclyAs(\"public/vinos\", $imagenFinal);\n\n $productToUpdate->image = $imagenFinal;\n \t\t}\n\n \t\t$productToUpdate->save();\n\n \t\t// Redireccionamos SIEMPRE a una RUTA\n \t\treturn redirect('/admin');\n }", "title": "" }, { "docid": "b96a752fa168940f8e9321e2329c1f2d", "score": "0.5573474", "text": "public function update(Model_has_permissionStoreRequest $request, $id)\n {\n \n$Model_has_permission=Model_has_permission::get()->where('id',$id)->first();\n if($Model_has_permission->update($request->toArray())) {\n return new Model_has_permissionResource($Model_has_permission);\n }\n }", "title": "" }, { "docid": "0b30756234d825612f1930f0d07886e9", "score": "0.557255", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'name'=>'required|unique:products,name,'.$id,\n 'description'=>'required',\n 'image'=>'image',\n 'purchase_price'=>'required',\n 'sale_price'=>'required',\n 'stock'=>'required'\n ]);\n $product=Product::findOrFail($id);\n $product->update($request->except('image'));\n if($request->image){\n if ($product->image != 'default.png'){\n Storage::disk('public_uploads')->delete('/product_images/' . $product->image);\n }\n Image::make($request->image)->resize(300, null, function ($constraint) {\n $constraint->aspectRatio();\n })->save(public_path('uploads/product_images/' . $request->image->hashName()),60);\n $product->image = $request->image->hashName();\n }\n $product->save();\n flash()->success(__('messages.Edited Successfuly'));\n return redirect(route('dashboard.products.index'));\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "a17739672373b86b1bfc5b1c4620e617", "score": "0.55606586", "text": "public function update(Request $request, $id)\n {\n $this->validate(request(), [\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required|numeric|min:0',\n 'amount' => 'required|integer|min:0',\n 'file' => 'image|max:2048',\n ]);\n\n try{\n $product= Product::findOrFail($id);\n\n $product->name = $request['name'];\n $product->description = $request['description'];\n $product->price = $request['price'];\n $product->amount = $request['amount'];\n\n if ($request->hasFile('file') ? true : false)\n {\n // Deleting not working\n if ($product->image_path != \"\")\n {\n $path = public_path() . '/products/' . $product->image_path;\n if(file_exists($path)) {\n unlink($path);\n }\n }\n $file = $request->file('file');\n $extension = $file->getClientOriginalExtension();\n $filename =time().'.'.$extension;\n $file->move('products/', $filename);\n\n $product->image_path = $filename;\n }\n\n $product->active = ($request['active'] ? true : false);\n\n $product->save();\n\n session()->flash('message', 'Product updated');\n return redirect('administration/products');\n }\n catch(ModelNotFoundException $err){\n //Show error page\n }\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "72d4cf29d9ecee41a871927431f897ac", "score": "0.5549225", "text": "public function update($product_id, $id, Request $request) {\n $request->validate([\n 'name' => 'required',\n ]);\n\n $user = new User;\n $product = new Product;\n if ($user->storage($id)) {\n $product = $product->find($product_id);\n $product->name = $request->name;\n $product->save();\n }\n\n return redirect()->route('storage.list', $id);\n }", "title": "" }, { "docid": "a8f6fde443ffe7bf36ad99060af97a8e", "score": "0.55437666", "text": "public function update(Request $request, $id)\n {\n // dd($request);\n $complaint = Complaint::find($id);\n $complaint->fill($request->all());\n if ($request->hasFile('image')) {\n $path = $request->file('image')->store('complaint');\n $file = Storage::delete($complaint->image);\n $complaint->image = $path; \n }\n $complaint->update();\n // dd($complaint);\n return response()->json($complaint);\n }", "title": "" }, { "docid": "289387f15ea9b3c4b7c9c815400a2279", "score": "0.5543617", "text": "function put() {\n // Bypasses versioning if not applicable\n if (!$this->versioning) return parent::put();\n // Manages versioning\n $result = parent::put();\n $this->version('put', array(), $result);\n return $result;\n }", "title": "" }, { "docid": "aae45da6856538036b071d0306ddee2c", "score": "0.5542785", "text": "public function put($resource, $resourceId = null, $data = [])\n {\n $resourcePath = \"/$resource\";\n\n $resourceIdPath = (isset($resourceId)) ? \"/$resourceId\" : \"\";\n\n $relationshipsPath = \"\";\n if (isset($resource['relationship'])) {\n $relationshipsPath = \"/relationships/{$resource['relationship']}\";\n }\n\n $uri = \"{$resourcePath}{$resourceIdPath}{$relationshipsPath}\";\n $res = $this->request(\"PUT\", $uri, [], $data);\n return $res->getBody();\n }", "title": "" }, { "docid": "12e9da82b5f3a8c8188cbdeb9349fb89", "score": "0.55409086", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|min:5|max:100',\n 'description' => 'required',\n 'price' => 'required|numeric',\n 'picture' => 'image:max:3000',\n 'status' => 'required|in:published,unpublished',\n 'sales' => 'required|in:sale,standard',\n 'reference' => 'required|alpha_num|min:16|max:16',\n 'categorie_id' => 'required|integer',\n 'sizes' => 'required'\n ]);\n\n // store the datas\n $datas = $request->all();\n\n\n // Store the image inside a folder named 'products' if the picture exist\n $file = $request->file('picture');\n if(!empty($file)){\n $file->store('products');\n $imgName = $request->picture->hashName();\n $datas['picture'] = 'products/' . $imgName; // Rewrite \"$datas['picture']\" as a path\n }\n\n\n // update the datas inside the database\n $product = Product::find($id);\n $product->update($datas);\n $product->size()->sync($request->sizes);\n\n return redirect()->route('products.index')->with('message', 'Votre produit a bien été mise à jour');\n }", "title": "" }, { "docid": "1af99b27761bbae794d8786141e7959f", "score": "0.5537572", "text": "public function update(Request $request, $id)\n {\n \n $historia = Historia::findOrFail($id);\n if($request->hasFile('imagen')){\n \n Storage::delete('public/'.$historia->imagen);\n $historia['imagen']= $request->file('imagen')->store('uploads','public');\n }\n\n $historia->descripcion = $request->descripcion;\n $historia->estado = $request->estado;\n $historia->update();\n return redirect('/historia')->with('mensaje','historia editada con éxito');\n \n }", "title": "" }, { "docid": "af8c898e1690790987dc2c3dd4f2392b", "score": "0.5537518", "text": "public function updateAction () {\n\t\t$this->validateHttpMethod(\"PUT\");\n\n\t\t// Expected / Allowed params.\n\t\t$expectedParams = array(\n\t\t\t\"id\"\n\t\t);\n\n\t\t// Get the expected params.\n\t\t$this->getExpectedParams($expectedParams);\n\n\t\t// Get the params.\n\t\t$params = $this->format($this->route->params);\n\n\t\t// Get the criteria (ID).\n\t\t$criteria = array(\"id\" => $params[\"id\"]);\n\n\t\t// Get the data, by removing the ID.\n\t\tunset($params[\"id\"]);\n\n\t\t// Update the tag.\n\t\t$tag = $this->tagsModel->update($params, $criteria);\n\n\t\t// Output the updated tag.\n\t\t$this->view->json = $tag;\n\t}", "title": "" }, { "docid": "0fa030ba99104dbf523d8f45baf06dac", "score": "0.55348396", "text": "abstract public function update($id, $object);", "title": "" }, { "docid": "f78eedb59ed2325d8a0c66b0a9d03f4e", "score": "0.552736", "text": "public function update(Request $request, $id)\n {\n $v = Validator::make($request->all(),[\n 'rak_id' => 'required|exists:raks,id',\n 'tingkat_id' => 'required|exists:tingkatan_raks,id'\n ]);\n\n if ($v->fails()) {\n return back()->withErrors($v)->withInput();\n }\n $storage = Storage::where('storage_in_kode', $id)->first();\n\n $storage->update($request->only('tingkat_id'));\n\n return redirect(route('storage.index'))->with('success', __( 'Saved!' ));\n }", "title": "" }, { "docid": "92db954df11f0863c42be0ce8c4c8b06", "score": "0.5522571", "text": "public function update(Request $request, $id)\n {\n $data=$this->validate($request,[\n 'name'=>'required|string|max:255',\n 'slug'=>'required|string|max:255|unique:products,slug,'.$id,\n 'brand'=>'required|string|max:20',\n 'image'=>'sometimes|image|mimes:jpg,jpeg,png,gif,svg',\n 'description'=>'required|string|min:100',\n 'specification'=>'required|string|min:10',\n ]);\n if($request->status=='on')\n {\n $request['status']='active';\n }\n else{\n $request['status']='pending';\n }\n $product=Product::find($id);\n $product->name=$data['name'];\n $product->slug=$data['slug'];\n $product->brand=$data['brand'];\n if($request->hasFile('image')){\n $extension=$request->image->extension();\n $img_name=$request['slug'].'.'.$extension;\n Storage::delete($product->image);\n $imagename=$request->image->storeAs('public/uploads/products',$img_name);\n $product->image=$imagename; \n }\n $product->description=$data['description'];\n $product->specification=$data['specification'];\n $product->status=$request['status'];\n $product->save();\n return redirect(route('products.index'))->with('success','Product has been updated successfully');\n }", "title": "" }, { "docid": "6efd0813cbdc295654c1e414776ed58b", "score": "0.55184317", "text": "public function update(Request $request, $id)\n {\n if(Product::find($id)){\n $save_data=$request->all();\n \n $validator = Validator::make($save_data, [\n \"name\"=>['required', 'string', 'max:255'],\n \"sku_code\"=>['required','unique:products,sku_code,'.$id],\n \"description\"=>['required', 'string'],\n \"imageviewfile\"=>['image','mimes:png,gif','max:2048']\n ]);\n\n if ($validator->fails()) {\n return response()->json([\"success\"=>false,'message'=>\"Validation fail\",'data'=>$validator->errors()], 422);\n }\n\n $update_data=[\n 'name' => $save_data['name'],\n 'sku_code' => $save_data['sku_code'],\n 'description' => $save_data['description'],\n 'update_by' =>auth('api')->user()->id\n ];\n\n if(!empty($request->file('imageviewfile'))){\n $update_data['imageviewfile'] = Storage::put('product_image',$request->file('imageviewfile'));\n }\n \n $product_data=Product::where('id',$id)->update($update_data);\n\n return response()->json([\n \"success\"=>true,\n \"message\"=>\"Product Updated\",\n \"data\"=>Product::find($id)\n ],200);\n }else{\n return response()->json([\"success\"=>false,'message'=>\"Invalid Id\",'data'=>[]], 422);\n }\n }", "title": "" }, { "docid": "3504c324cf5adb45e583c6d14200c48f", "score": "0.5516269", "text": "public function update(StoreProductRequest $request, $id)\n {\n $product = Product::find($id); // associé les fillables\n $product->sizes()->sync($request->sizes); // Synchronisation des tailles du produit\n\n $product->update($request->all());\n \n // image\n $im = $request->file('picture');\n \n // si on associe une image à un product \n if (!empty($im)) {\n $link = $request->file('picture')->store('images');\n\n if ($product->picture) {\n $product->picture()->delete();\n }\n\n // mettre à jour la table picture pour le lien vers l'image dans la base de données\n $product->picture()->create([\n 'link' => $link,\n ]);\n }\n\n return redirect()->route('product.index')->with('success', 'Le produit a été mis à jour');\n }", "title": "" }, { "docid": "7438ea17945e59af2ceb56728b438a5e", "score": "0.55092084", "text": "public function update(EntityInterface $Entity);", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "0a31514680492fb282b8c54ef7d31776", "score": "0.5504863", "text": "public function update( Request $request, int $id )\n {\n $this->validate( $request, $this->fieldRequirement );\n\n $param = [\n 'name' => $request->get( 'name' ),\n 'price' => $request->get( 'price' ),\n 'category_id' => $request->get( 'category_id' ),\n 'description' => $request->get( 'description' ),\n ];\n\n $img = $request->file( 'img' );\n if ( $img && $img->isValid() ) {\n $imgName = hash_file( 'sha256', $img->getRealPath() ) . '.' . $img->getExtension();\n $img->move( public_path(), $imgName );\n $param[ 'img' ] = $imgName;\n }\n\n Product::find( $id )->update( $param );\n\n return redirect( '/' )->with( 'success', 'Edit successful' );\n }", "title": "" }, { "docid": "d879d942faec78fcdd9fe4bb72f22e68", "score": "0.5496361", "text": "public function update(StoreImageRequest $request, $id)\n {\n $this->productImageService->update($request, $id);\n return redirect('/products')->with('success','The image modifyed successfully!'); \n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "890dad3fdc9c25a0b27968f49ad32d24", "score": "0.5493897", "text": "public function startPut(string $resource, string $id, array $data) : string;", "title": "" }, { "docid": "360c61b32382459191d9d100527769a1", "score": "0.5488976", "text": "public function update(Request $request, $id)\n {\n\n\n $product = Product::findOrFail($id);\n\n if ($product) {\n if($request->hasFile('picture')) {\n $fileNameWithExt = $request->file('picture')->getClientOriginalName(); // Dit zet de exacte file naam in een var\n // Get just filename\n $filename = pathinfo($fileNameWithExt, PATHINFO_FILENAME); // Standaard php geen Laravel\n // Get just extension\n $extension = $request->file('picture')->getClientOriginalExtension();\n // Filename to store, alles samengevoegd in 1 var\n $fileNameToStore = $filename . '_' . time() . '.' . $extension;\n // Upload the image\n $path = $request->file('picture')->storeAs('images/', $fileNameToStore); // Save in /storage/app/public/images\n } else {\n $fileNameToStore = 'noimage.jpg';\n }\n\n\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n //$product->picture = $request->input('picture');\n $product->picture = \"/storage/images/\". $fileNameToStore; // href in view is /public/storage/images , which points to /storage/app/public/images\n $product->start_of_bid_period = $request->input('start_of_bid_period');\n $product->end_of_bid_period = $request->input('end_of_bid_period');\n $product->user_id = $request->input('user_id');\n $product->category_id = $request->input('category_id');\n }\n\n $product->save();\n\n compact('product');\n $request->session()->flash('alert-danger', 'Product was successful updated!');\n return redirect('/products');\n }", "title": "" }, { "docid": "fd6ecbbda7a15bdea01c7a62e4ecff3c", "score": "0.5486526", "text": "public function updateStream($path, $resource, $config = null)\n {\n $location = $this->applyPathPrefix($path);\n $result = $this->client->uploadFromStream($location, $resource);\n\n return $this->normalizeObject($result, $path);\n }", "title": "" }, { "docid": "51721799def9f75202fd763a50f731ba", "score": "0.5486384", "text": "public function update()\n {\n $tripod = $this->getTripod();\n if(isset($this->stat))\n {\n $tripod->setStat($this->stat);\n }\n $tripod->getComposite($this->operation)->update($this);\n }", "title": "" }, { "docid": "ac2354d8104b57ec9aec77b78215ec62", "score": "0.548305", "text": "public function update(Request $request, $id)\n {\n try {\n $result = $this->model->find($id);\n\n if ($result) {\n $inputs = $request->except('_token');\n\n if ($request->hasFile('icon')) {\n $fileName = time() . '.' . $request->icon->getClientOriginalExtension();\n $file = $request->file('icon');\n\n Storage::put($this->iconStoragePath . $fileName, file_get_contents($file), 'public');\n\n $inputs['icon'] = $fileName;\n\n if (isset($result->icon) && $result->icon) {\n if (Storage::exists($this->iconStoragePath . $result->icon)) {\n Storage::delete($this->iconStoragePath . $result->icon);\n }\n }\n }\n\n $isSaved = $result->update($inputs);\n\n if ($isSaved) {\n return redirect($this->moduleRoute)->with(\"success\", __($this->moduleName . \" updated!\"));\n }\n }\n return redirect($this->moduleRoute)->with(\"error\", __(\"Something went wrong, please try again later.\"));\n } catch (\\Exception $e) {\n return redirect($this->moduleRoute)->with('error', $e->getMessage());\n }\n }", "title": "" }, { "docid": "a246c7bce0b05275faa44d910c6a4ba0", "score": "0.5482692", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $stock = $product->stock;\n \n $this->validate($request,[\n 'name' => 'required|max:100',\n 'price' => 'required|numeric',\n 'cost' => 'required|numeric',\n 'stock' => 'required|numeric'\n ]);\n \n $product->name = $request->name;\n $product->price = $request->price;\n $product->cost = $request->cost;\n $stock->quantity = $request->stock;\n\n $product->save();\n $stock->save();\n\n return redirect()->back();\n }", "title": "" }, { "docid": "ef8052b00b5f9454ac32e1d5673258e4", "score": "0.54818344", "text": "public function update(Request $request, $id)\n {\n $product = Products::find($id);\n $requestData = $request->all();\n\n //判斷 是否有上傳圖片\n if($request->hasFile('product_image')) {\n //刪除舊有圖片\n $old_image = $product->product_image;\n File::delete(public_path().$old_image);\n\n //上傳新的圖片\n $file = $request->file('product_image');\n $path = $this->fileUpload($file,'product');\n\n //將新圖片的路徑,放入requestData中\n $requestData['product_image'] = $path;\n }\n\n $product->update($requestData);\n\n return redirect('/admin/product');\n }", "title": "" }, { "docid": "19869a7846a6aa9929efa8fd6945374d", "score": "0.5472727", "text": "public function update(Request $request, $id)\n { \n $path_name = '';\n if ($request->hasFile('thumb')) {\n $file = $request->thumb;\n $name = time() . $file->getClientOriginalName();\n $file_path = $request->file('thumb')->move('uploads/', $name);\n $path_name = $file_path->getPathname();\n }\n $data = [\n 'name' => $request->name,\n 'des' => $request->des,\n 'price' => $request->price,\n 'discount' => $request->discount,\n 'qty' => $request->qty,\n 'category_id' => $request->category_id,\n 'thumb' => $path_name ?? ''\n ];\n return $this->productRepo->update($id, $data);\n }", "title": "" }, { "docid": "adf4dc960b0f2ee354f5339e80bdc964", "score": "0.54717267", "text": "public function updateStream($path, $resource, array $config = [])\n {\n return $this->fileSystem->updateStream($path, $resource, $config);\n }", "title": "" }, { "docid": "d1f8487ee1e40873ff5630de6641484f", "score": "0.546559", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'bland' => 'required|max:100',\n 'type' => 'nullable|max:100',\n 'area' => 'nullable|max:100',\n 'alcohol_content' => 'nullable|max:100',\n 'distillery' => 'nullable|max:100',\n 'memo' => 'nullable|max:500',\n 'image' => 'file|image|mimes:jpeg,png',\n ]);\n \n $item = Item::findOrFail($id);\n \n $item->bland = $request->bland;\n $item->type = $request->type;\n $item->area = $request->area;\n $item->alcohol_content = $request->alcohol_content;\n $item->distillery = $request->distillery;\n $item->memo = $request->memo;\n \n $item->user_id = $request->user()->id;\n \n if ($request->hasfile('image')) {\n $image = $request->file('image');\n $path = Storage::disk('s3')->putFile('test', $image, 'public');\n $item->image = Storage::disk('s3')->url($path);\n \n }\n $item->save();\n return redirect('');\n }", "title": "" }, { "docid": "d37d959897d637a1048c5095937ffc40", "score": "0.54649365", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->name = $request->name;\n $product->category_id = $request->brand;\n $image = $request->image->store('public/product');\n $product->image = $image;\n\n $image_detail = $request->image_detail->store('public/product');\n $product->imageDetail = $image_detail;\n\n $product->quantity = $request->quantity;\n $product->costPrice = $request->cost_price;\n $product->price = $request->price;\n $product->description = $request->description;\n $product->concentration = $request->concentration;\n $product->size = $request->size;\n\n $product->save();\n return redirect()->route('product.index');\n\n\n\n }", "title": "" }, { "docid": "3dfda81d3fa381cfa11d09a563d0ae01", "score": "0.546223", "text": "public function update(Request $request, Product $product)\n {\n\n // dd($request->file('imagen')->store('public'));\n $product->update(request(['codigo','nombre','stock','tipo','precio','categorias','marca']));\n return redirect('/products');\n }", "title": "" }, { "docid": "6b251af5c3f654e0524d57b218977068", "score": "0.5460091", "text": "public function update(Request $request, $id)\n {\n $p = Product::find($id);\n\n if($request->img->getClientOriginalName()){\n $ext = $request->img->getClientOriginalExtension();\n $file = date('YmdHis').'_'.rand(1,999).'.'.$ext;\n $request->img->storeAs('public/ProductImg',$file);\n }else{\n if(!$p->img)\n $file = '';\n else\n $file = $p->img;\n }\n\n $p->name = $request->name;\n $p->sub_category_id = $request->scid;\n $p->price = $request->price;\n $p->img = $file;\n $p->description = $request->description;\n $p->purl = $request->purl;\n\n // $p->sid = Auth::user()->supplier->id;\n $p->save();\n\n return redirect('dashboard/product');\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "e160bd8a9f09b461b2f22f7417e53dfa", "score": "0.54570204", "text": "public function update(Request $request, $id)\n {\n\n $request->validate([\n 'public_name'=>'required',\n 'time'=>'required'\n \n ]);\n\n $data = array(\n 'public_name'=>$request->public_name,\n 'duration'=>$request->time\n );\n\n $res = Re_s3bucket::where(['etag'=>$id])->update($data);\n if($res)\n {\n return back()\n ->with('success', $request->public_name.' Has Been updated!.');\n \n \n \n }else{\n return back()\n ->with('error','Something Went Wrong!');\n }\n\n\n }", "title": "" }, { "docid": "d455ba07ce24df9d8ecac7b576a15a4a", "score": "0.54476535", "text": "public function update(Request $request, ResourceFile $resourcefile)\n {\n $validator = Validator::make($request->all(), self::RESOURCE_FILE_RULES);\n if ($validator->fails()) {\n return response()->json([\n 'error' => true,\n 'message' => $validator->messages()\n ]);\n }\n\n $oldName = $resourcefile->name;\n $resourcefile->name = $request->get(\"name\");\n $resourcefile->save();\n return response()->json([\n 'error' => false,\n 'message' => sprintf(self::UPDATE_RESOURCE_FILE, $oldName, $resourcefile->name)\n ]);\n }", "title": "" }, { "docid": "579bd0a2ccff79bfa2c9728cc98e4a35", "score": "0.54462624", "text": "public function update(UpdateAssetRequest $request, $id)\n {\n $input = $request->validated();\n \n $asset = Asset::find($id);\n if (is_null($asset)) {\n return $this->sendError('Asset not found.');\n }\n \n if ($request->picture_path) {\n \n $this->deleteOne($asset->picture_path);\n $image = $this->uploadOne($input['picture_path'], 'Assets');\n $input['picture_path'] = $image;\n }\n \n \n\n $asset->update($input);\n\n return $this->sendResponse(new AssetResource($asset), 'Asset Updated successfully.');\n }", "title": "" } ]
f6a81e7daf5cb4203819cae07192e3a0
Get one database information for a set of template IDs. We assume that the underlying database information is the same for all IDs.
[ { "docid": "ecd4e7ee26b5fe904760b19f392c802a", "score": "0.71246827", "text": "public function get_templ_db(array $templids) {\n assert(!empty($templids));\n\n // We take the last entry, presumably the most current\n $query = $this->db\n ->select('dbname,dbpropname,qoname')\n ->where_in('id',$templids)\n ->order_by('id','DESC')\n ->limit(1)\n ->get('sta_quiztemplate');\n\n return $query->row();\n }", "title": "" } ]
[ { "docid": "483c504d665f5bde1cef4548abbfd08f", "score": "0.58744615", "text": "function getTemplateID() {\n Database::connect();\n\n $sql = \"SELECT templateID FROM templates WHERE name = :template\";\n $stmt = Database::$db->prepare($sql);\n \n $stmt->bindValue(':template', TEMPLATE);\n $stmt->execute();\n $row = $stmt->fetch();\n\n if (!empty($row)) {\n $templateID = $row['templateID'];\n } else {\n $templateID = NULL;\n }\n return $templateID;\n}", "title": "" }, { "docid": "1ef0e6d1b7bc4f11d1ffbddd9bcfb33a", "score": "0.56339484", "text": "function getTemplateData($id)\r\n {\r\n }", "title": "" }, { "docid": "4ab3cdd30aa7f625748a5f9c4656509d", "score": "0.5548695", "text": "public function getDatabaseById($id);", "title": "" }, { "docid": "40ee97c151f80940bb3a785a2ca10312", "score": "0.547968", "text": "function getTemplateData()\n\t{\n\t\t $sql=\"select templateid,templatename,gridcount from tb_template where status=1\";\n\t\t $res = mysql_query($sql);\n\t\t /** TEMPLATE COUNT **/\n\t\t $tempcount = mysql_num_rows($res);\n\t\t \n\t\t for($i=1;$i<=$tempcount;$i++)\n\t\t {\n\t\t $rows= mysql_fetch_assoc($res);\n\t\t /** TEMPLATE IDS **/\n\t\t $tempids[$i]=$rows['templateid'];\n\t\t /* TEMPLATE NAMES **/\n\t\t $tempnames[$i]=$rows['templatename'];\n\t\t /** RELATED GRID COUNT **/\n\t\t $gridcnt[$i]=$rows['gridcount']; \n\t\t \n\t\t }\n\t\t \n\t\t \n\t\t $returnstr=\"\";\n\t\t for($j=1;$j<= $tempcount;$j++)\n\t\t { \n\t\t $temp1[$j]= $tempids[$j].\",\".$tempnames[$j].\",\".$gridcnt[$j].\"#\";\n\t\t \t\n\t\t $sql2=\"select * from tb_grids where status=1 and templateid=\".$tempids[$j];// and gridId=\".$grid;\n\t\t\t\n\t\t $res2 = mysql_query($sql2);\n\t\t\t\n\t\t\t$temp2=\"\";\n\n\t\t \tfor($k=1;$k<=$gridcnt[$j];$k++)\n\t\t\t{\n\n\t\t \t$rows2 = mysql_fetch_assoc($res2);\n\t\t\t\t\t\n\t\t\t\t$temp2 = $temp2.$rows2['row'].\",\".$rows2['column'].\",\".$rows2['width'].\",\".$rows2['height'].\"#\";\n\t\t\t\t\t\n\t\t\t}\n\t\t $returnstr = $returnstr.$temp1[$j].$temp2.\":\";\n\t\t }\n\n\t\t return $returnstr;\n\t}", "title": "" }, { "docid": "002625cf679a377722ee0ae4ef50d16b", "score": "0.5468399", "text": "function get_template_by_Id($template_id)\n {\n $parameter_array = array();\n \n array_push($parameter_array, array(\n 'and',\n 'id',\n '=',\n $template_id\n ));\n \n $output = $this->result('i', $parameter_array);\n $row = mysqli_fetch_assoc($output);\n \n return $row;\n }", "title": "" }, { "docid": "e770e16db8c6e5b2a858b3e0e10612a6", "score": "0.5446032", "text": "public static function get_fallback_template_from_db($template_slug, $db_templates)\n {\n }", "title": "" }, { "docid": "2e2cc1406f77e59898c1053e9905efda", "score": "0.54217136", "text": "function getoneTemplateData($tmpltselected)\n\t{\n\t\t $returnstr=\"\";\n\t\t \n\t \t $sql=\"select templatename,gridcount from tb_template where status=1 and templateid=\".$tmpltselected;\n\t\t $res = mysql_query($sql);\n\t\t $rows= mysql_fetch_assoc($res);\n\t\t \n\t\t //* TEMPLATE NAMES **/\n\t\t $tempname=$rows['templatename'];\n\t\t /** RELATED GRID COUNT **/\n\t\t $gridcnt=$rows['gridcount']; \n\t\t \n\t\t $temp1= $tmpltselected.\",\".$tempname.\",\".$gridcnt.\"#\";\n\t\t \n\t\t \n\t\t // Fetching the Grid data\t\n\t\t $sql2=\"select * from tb_grids where status=1 and templateid=\".$tmpltselected;// and gridId=\".$grid;\t\n\t\t $res2 = mysql_query($sql2);\n\t\t \n\t\t\t$temp2=\"\";\n\t\t \tfor($k=1;$k<=$gridcnt;$k++)\n\t\t\t{\n\t\t $rows2 = mysql_fetch_assoc($res2);\n\t\t\t\n\t\t\t$temp2 = $temp2.$rows2['gridId'].\",\".$rows2['row'].\",\".$rows2['column'].\",\".$rows2['width'].\",\".$rows2['height'].\"#\";\t\n\t\t\t}\n\t\t\t\n\t\t$returnstr = $returnstr.$temp1.$temp2.\":\";\n\t\t\n\t\treturn $returnstr;\t\n\t}", "title": "" }, { "docid": "474f1b85dcbaecbcf9c81962c259243e", "score": "0.54167485", "text": "function db_get_template ($tpl_name, &$tpl_source, &$smarty_obj) {\n Global $loq;\n $rs = $loq->_adb->Execute(\"select template from \".T_TEMPLATES.\" where templatename='$tpl_id'\");\n if($rs !== false && !$rs->EOF){\n $tpl_source = $rs->fields[0];\n }\n return true;\n}", "title": "" }, { "docid": "4173f5fa0e463ca1437eb3ebb6423e05", "score": "0.53910536", "text": "public function getAllTemplates(){ //return all templates in database to the select to choose from templates\n return TemplatesResource::collection(TemplateProject::all());\n }", "title": "" }, { "docid": "15c9c02c535790714d4ea7f99d2df494", "score": "0.538465", "text": "public function getAdsTemplateID(){\n $id = DB::table('customize')\n ->where('name', 'adsTemplate')\n ->get();\n return json_encode($id);\n }", "title": "" }, { "docid": "d75319cd126b0b554a167fc666363c9b", "score": "0.53805107", "text": "function _invoice_get_variable($template, $name, $default=NULL) {\n // if $template is empty, check if a general/default value is available\n if (empty($template)) {\n return variable_get('invoice_' . $name, '');\n }\n\n static $templates = NULL;\n\n // Get all template settings from the database only one time\n if (!is_array($templates)) {\n // Get template names available on disk\n $template_names = _invoice_get_templates();\n\n // Add templates to the database that exist on the disk but not in the database yet.\n $database_template_names = array();\n $result = db_query(\"SELECT name FROM {invoice_templates} WHERE name IN (:names)\", array(\n ':names' => $template_names))->fetchAll(PDO::FETCH_ASSOC);\n foreach ($result as $row) {\n $database_template_names[] = $row['name'];\n }\n\n foreach ($template_names as $template_name) {\n if (!in_array($template_name, $database_template_names)) {\n // Add template\n db_insert('invoice_templates')->fields(array(\n 'name' => $template_name,\n 'locale' => '',\n 'date_format' => '',\n 'vat' => variable_get('invoice_vat', 0),\n 'pay_limit' => variable_get('invoice_pay_limit', 0),\n 'supplier_company_name' => '',\n 'supplier_street' => '',\n 'supplier_building_number' => '',\n 'supplier_zipcode' => '',\n 'supplier_city' => '',\n 'supplier_state' => '',\n 'supplier_country' => '',\n 'supplier_phone' => '',\n 'supplier_fax' => '',\n 'supplier_email' => '',\n 'supplier_web' => '',\n 'supplier_coc_number' => '',\n 'supplier_vat_number' => '',\n 'api_username' => '',\n 'display_column_vat' => variable_get('invoice_display_column_vat', 0),\n 'display_column_exunitcost' => variable_get('invoice_display_column_exunitcost', 1),\n 'display_column_incunitcost' => variable_get('invoice_display_column_incunitcost', 1),\n 'display_column_extotal' => variable_get('invoice_display_column_extotal', 1),\n 'display_column_inctotal' => variable_get('invoice_display_column_inctotal', 1)\n ))->execute();\n }\n }\n\n // Get all template settings\n $templates = array();\n $result = db_query(\"SELECT * FROM {invoice_templates} WHERE name IN (:names)\", array(\n ':names' => $template_names))->fetchAll(PDO::FETCH_ASSOC);\n foreach ($result as $row) {\n $templates[$row['name']] = $row;\n }\n }\n\n // Get template info that is stored in the database\n $template = $templates[$template];\n\n if (!empty($template[$name]) || is_numeric($template[$name])) {\n return $template[$name];\n }\n else {\n if (!is_null($default)) {\n return $default;\n }\n else {\n // if $default is not null, check if a general/default value is available\n return variable_get('invoice_' . $name, '');\n }\n }\n}", "title": "" }, { "docid": "4e70c04e5acbe2bf920cff57e778b588", "score": "0.5356068", "text": "public function getTemplatesData()\n\t{\n\t\treturn (new Query())\n\t\t\t->where(['templateid' => $this->templateId])\n\t\t\t->from('vtiger_trees_templates_data')\n\t\t\t->createCommand()->queryAll();\n\t}", "title": "" }, { "docid": "eefba9ba5a459535632af828b12f3e67", "score": "0.5349594", "text": "public static function get_template_by_id($conn, $template_id)\n { \n Ossim_db::check_connection($conn);\n \n $template_data = array();\n \n $rs = $conn->Execute($query, array($template_id));\n $query = 'SELECT HEX(id) AS id, name FROM acl_templates WHERE id = UNHEX(?)'; \n \n $rs = $conn->Execute($query, array($template_id));\n \n if (!$rs)\n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n if (!$rs->EOF) \n {\n //Menu permissions\n $query_2 = \"SELECT p.* FROM acl_templates_perms tp, acl_perm p \n WHERE tp.ac_templates_id = UNHEX(?) AND tp.ac_perm_id = p.id\";\n \n $rs_2 = $conn->Execute($query_2, array($template_id));\n \n if (!$rs_2) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n while (!$rs_2->EOF) \n {\n $perms[$rs_2->fields['id']] = $rs_2->fields['value'];\n \n $rs_2->MoveNext();\n }\n }\n \n $template_data = array(\n 'id' => $rs->fields['id'],\n 'name' => $rs->fields['name'],\n 'perms' => $perms\n );\n }\n }\n \n return $template_data;\n }", "title": "" }, { "docid": "525db4899bbec50e8b7e4ac601ef51cf", "score": "0.52968687", "text": "public function getId()\n\t{\n\t\treturn $this->get('templateid');\n\t}", "title": "" }, { "docid": "95d19c32ebf0913a54274df615cf6ae2", "score": "0.5293444", "text": "function getTemplateInfo($dealerId,$forceTemplateId = 0) {\n\tif (empty($dealerId)) {\n\t\t$dealerId = $GLOBALS[\"gDealerId\"];\n\t}\n\t$templateArray = array();\n\tif ($forceTemplateId > 0) {\n\t\t$templateArray['id'] = $forceTemplateId;\n\t} else {\n\t\t$templateArray['id'] = getFieldFromId('template_id','dealers','dealer_id',$dealerId);\n\t}\n\t$templateArray['default'] = \"templates/default\";\n\tif (empty($templateArray['id'])) {\n\t\t$templateArray['path'] = $templateArray['default'];\n\t} else {\n\t\t$templateArray['path'] = \"templates/\" . getFieldFromId('template_path','templates','template_id',$templateArray['id']);\n\t}\n\tif (file_exists($templateArray['path'] . \"/header.inc\")) {\n\t\t$templateArray['header'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['header'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/sidebar.inc\")) {\n\t\t$templateArray['left'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['left'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/right.inc\")) {\n\t\t$templateArray['right'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['right'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/footer.inc\")) {\n\t\t$templateArray['footer'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['footer'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/functions.inc\")) {\n\t\t$templateArray['functions'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['functions'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/homebanners.css\")) {\n\t\t$templateArray['homebanners_css'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['homebanners_css'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/homebanners.inc\")) {\n\t\t$templateArray['homebanners'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['homebanners'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/catalogbanners-c.inc\")) {\n\t\t$templateArray['catalogbanners'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['catalogbanners'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/zipcode_finder.css\")) {\n\t\t$templateArray['zipcodes'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['zipcodes'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/checkout.css\")) {\n\t\t$templateArray['checkout_styles'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['checkout_styles'] = $templateArray['default']; \n\t}\n\tif (file_exists($templateArray['path'] . \"/checkout_sidebar.inc\")) {\n\t\t$templateArray['checkout_sidebar'] = $templateArray['path'];\n\t} else {\n\t\t$templateArray['checkout_sidebar'] = $templateArray['default']; \n\t}\n\treturn $templateArray;\n}", "title": "" }, { "docid": "793179038fa8d3d64ca13f2db280fb5b", "score": "0.5264267", "text": "public function getPrimaryKey()\n\t{\n\t\t$pks = array();\n\t\t$pks[0] = $this->getIdTemplateDirectory();\n\t\t$pks[1] = $this->getNodeLevel();\n\n\t\treturn $pks;\n\t}", "title": "" }, { "docid": "549a5caf30e5c3a059781bbdc92ad121", "score": "0.52487415", "text": "public static function loadTemplateData()\n {\n $templateId = 0;\n $app = Factory::getApplication();\n\n if ($app->isClient('site'))\n {\n $currentTemplate = $app->getTemplate(true);\n $templateId = $currentTemplate->id ?? 0;\n\n\t\t\t/**\n\t\t\t * If a page/menu is assigned to a specific template\n\t\t\t * then get the template ID.\n\t\t\t */\n\t\t\t$activeMenu = $app->getMenu()->getActive();\n\n\t\t\tif (!empty($activeMenu) && !empty($activeMenu->template_style_id))\n\t\t\t{\n\t\t\t\t$templateId = $activeMenu->template_style_id;\n\t\t\t}\n }\n else\n {\n if ($app->input->get('option') === 'com_ajax' && $app->input->get('helix') === 'ultimate')\n {\n $templateId = $app->input->get('id', 0, 'INT');\n }\n }\n\n\t\tif (empty($templateId))\n\t\t{\n\t\t\t$templateId = $app->input->get('helix_id', 0, 'INT');\n\t\t}\n\n if($templateId)\n {\n $template = [];\n\n $draftKeyOptions = [\n 'option' => 'com_ajax',\n 'helix' => 'ultimate',\n 'status' => 'draft',\n 'id' => $templateId\n ];\n\n $draftKey = self::generateKey($draftKeyOptions);\n $cache = new HelixCache($draftKey);\n\n /**\n * Check the fetch destination. If it is iframe then load the settings\n * from draft, otherwise if it is document that means this request\n * comes from the original site visit. So load from saved cache.\n */\n $requestFromIframe = $app->input->get('helixMode', '') === 'edit';\n \n if ($cache->contains() && $requestFromIframe)\n {\n $template = $cache->loadData();\n }\n else\n {\n $keyOptions = [\n 'option' => 'com_ajax',\n 'helix' => 'ultimate',\n 'status' => 'init',\n 'id' => $templateId\n ];\n \n $key = self::generateKey($keyOptions);\n $cache->setCacheKey($key);\n \n if ($cache->contains())\n {\n $template = $cache->loadData();\n }\n else\n {\n $template = self::getTemplateStyle($templateId); \n }\n }\n\n\t\t\tif (isset($template->template) && !empty($template->template))\n\t\t\t{\n\t\t\t\tif (!empty($template->params) && \\is_string($template->params))\n\t\t\t\t{\n\t\t\t\t\t$template->params = new Registry($template->params);\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * If params field is found empty in the database or cache then\n\t\t\t\t * read the default options.json file from the template and assign\n\t\t\t\t * the options as template params.\n\t\t\t\t */\n\t\t\t\telseif (empty($template->params))\n\t\t\t\t{\n\t\t\t\t\t$filePath = JPATH_ROOT . '/templates/' . $template->template . '/' . 'options.json';\n\n\t\t\t\t\tif (\\file_exists($filePath))\n\t\t\t\t\t{\n\t\t\t\t\t\t$defaultParams = \\file_get_contents($filePath);\n\t\t\t\t\t\t$template->params = new Registry($defaultParams);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$template->params = new Registry;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $template;\n\t\t\t}\n }\n\n $template = new \\stdClass;\n $template->template = 'system';\n $template->params = new Registry;\n\n return $template;\n }", "title": "" }, { "docid": "2c2b9de485897894e58e72fb32f41298", "score": "0.52431583", "text": "public function getTemplates(){\n\t\n\t\tif( empty($this->_templates) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.tmpl_id AS value, t.tmpl_name AS text' );\n\t\t\t$query->from( '#__zbrochure_templates AS t' );\n\t\t\t$query->where( 't.tmpl_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_templates = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_templates;\n\t\n\t}", "title": "" }, { "docid": "b0e58587bb9028f1a0100b53d8d3383c", "score": "0.52415276", "text": "static public function master_pool()\n\t{\n\t\trequire( LOCAL_DOCUMENT_ROOT.\"/configure/db.php\" );\n\t\treturn $master_pool[ array_rand( $master_pool ) ];\n\t}", "title": "" }, { "docid": "d3141a3280e1f7471d6db1892cc05015", "score": "0.5239047", "text": "public function id(){\n \treturn $this->template_id;\n }", "title": "" }, { "docid": "98a2dbb9c9cbd48af46bdc7b3b043fd3", "score": "0.5231266", "text": "public function getAllSMSTemplates()\n {\n $selectTempsql = 'SELECT temp_id, temp_name FROM ' . _DB_PREFIX_ . 'onehop_sms_templates';\n $selectTempsql .= ' WHERE 1 Order By temp_name ASC';\n $templateRes = Db::getInstance()->ExecuteS($selectTempsql);\n return $templateRes;\n }", "title": "" }, { "docid": "fab01775acbed4f1fddb8197ea24ce2e", "score": "0.5225176", "text": "function getTemplates() {\n\n // Lets load the data if it doesn't already exist\n if (empty($this->_data)) {\n\n // constructs the query\n $query = ' SELECT * '\n . ' FROM #__templateck';\n\n // retrieves the data\n $this->_data = $this->_getList($query);\n }\n\n return $this->_data;\n }", "title": "" }, { "docid": "43c9d47e576260785baddc9d0fc827c7", "score": "0.5204653", "text": "function id_get_template ($tpl_id, &$tpl_source, &$smarty_obj)\n{\n // do database call here to fetch your template,\n // populating $tpl_source\n $templates = new B2b_Template();\n $row = $templates->fetchRow(\"id = \" . $tpl_id);\n if(!is_null($row)) {\n $tpl_source = $row->content;\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "40a1481c5838ce50409b0d0137722ef6", "score": "0.5179836", "text": "function GetFrom($db, $value='')\n {\n // print_r($db);\n $query = \"SELECT * FROM `$value`\";\n $result = mysqli_query($db, $query );\n\n foreach ($row = mysqli_fetch_assoc($result)) {\n $_id = $row['id'];\n }", "title": "" }, { "docid": "b1caf34f1d5bfe3416041a6fb629a2e0", "score": "0.5160873", "text": "public function show($ids)\n {\n //\n $templates = Templates::join('templates_categories', 'templates.id', '=', 'templates_categories.template_id')\n ->whereIn('category_id', $this->filterIntegerRequest($ids))\n ->get();\n\n return $templates;\n }", "title": "" }, { "docid": "af1340f9fd6703511afde18044f92c26", "score": "0.5155461", "text": "public function get_template_ids(){\n $templates = $this->templates;\n $return = array();\n foreach($templates as $key => $val){\n array_push($return, $val['id'] );\n }\n if (empty($return)){\n $return = false;\n }\n return $return;\n }", "title": "" }, { "docid": "cf7a5bbb36d4c808b6129dc3792b7658", "score": "0.5123882", "text": "private function createDatabaseInfo()\n\t{\n\t\t// build the parameters\n\t\t$parameters = array();\n\t\t$parameters['theme'] = $this->themeName;\n\t\t$parameters['label'] = $this->dbLabel;\n\t\t$parameters['path'] = $this->dbPath;\n\t\t$parameters['data'] = $this->dbTemplateData;\n\n\t\t// return\n\t\treturn (bool) Knife::getDB(true)->insert('themes_templates', $parameters);\n\t}", "title": "" }, { "docid": "243233d3dfd0015e92aaab2032c4a5b2", "score": "0.5123853", "text": "public function getDocumentTemplateById($id) {\n return Doctrine_Query::create()\n ->select('dtt.*')\n ->from('DocumentTemplate dtt')\n ->leftJoin('dtt.DocumentTemplateVersion dtv')\n ->where('dtv.id = ?', $id)\n ->execute();\n }", "title": "" }, { "docid": "e5a39bad96a855c05c48101bfb56c415", "score": "0.5096837", "text": "function supplier_getById($sID,$db = false){return supplier_resolveIds(array($sID),$db);}", "title": "" }, { "docid": "e37fa81da1a6732606f38f802449ee3c", "score": "0.5090784", "text": "private function getTemplateById($id) {\r\r\n\t\t\r\r\n\t\tglobal $__CONN__;\r\r\n\t\t\r\r\n\t\t$sql = \"SELECT * FROM \".self::TABLE_NAME.\" WHERE id = ?\";\r\r\n\t\t$stmt = $__CONN__->prepare($sql);\r\r\n\t\tif (!$stmt->execute(array($id)))\r\r\n\t\t\tthrow new Exception('Template could not match id : <b>'.$id.'</b> .');\r\r\n\t\t\r\r\n\t\t$template = $stmt->fetchObject();\r\r\n\t\t\r\r\n\t\t//set datas to $this object\r\r\n\t\t\r\r\n\t\t$this->name = $template->nume;\r\r\n\t\t$this->type = $template->tip;\r\r\n\t\t$this->content = $template->continut;\r\r\n\t\r\r\n\t}", "title": "" }, { "docid": "1ffa942c2b22356236962c7595358f41", "score": "0.5056763", "text": "public function getProfileTemplate (){\n $db = new db();\n $db->connect();\n $row = $db->selectOne('settings', 'id', 1);\n return $row['template'];\n }", "title": "" }, { "docid": "15836ce280a7802cc7fb0f45d0360ec6", "score": "0.50297177", "text": "public function getTemplateById($id){\r\n \r\n try {\r\n $selectStatememt = $this->select()\r\n ->where('id = ?', $id);\r\n $row = $this->fetchRow($selectStatememt);\r\n \r\n return $row;\r\n \r\n } catch (Exception $e) {\r\n echo 'Unable to getTemplateById in Templates model: '.$e->getMessage();\r\n }\r\n \r\n }", "title": "" }, { "docid": "9e5ef35eaf4a68aca60b351c28ca0b7f", "score": "0.5028454", "text": "function db_get_template ($tpl_name, &$tpl_source, &$smarty_obj)\n{\n $Q=\"SELECT content \n\t\tFROM templates\n WHERE name='$tpl_name' LIMIT 1\";\n $sql = mysql_query($Q);\n if (mysql_num_rows($sql))\n\t{\n list($tpl_source) = mysql_fetch_row($sql);\n return true;\n } \n\telse \n\t{\n return false;\n }\n}", "title": "" }, { "docid": "37a482717b7c45864b1c74338acd8c69", "score": "0.50041246", "text": "public function getSubjectTemplateID() {\n\n\t\t\t$sql = new DB_Sql();\n\t\t\t$sql->connect();\n\t\t\t$query = \"SELECT template_id FROM webmatrix_page_template WHERE basename = '\".$this->subject_tpl.\"'\"; // Get template ID\n\t\t\t$sql->query($query, $this->debug);\n\t\t\tif ($sql->num_rows() > 0) {\n\t\t\t\twhile($sql->next_record()) {\n\t\t\t\t\t$this->subject_tpl_id = $sql->Record['template_id'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "57d9be7eb31050b0d7b26edb8515ffe6", "score": "0.5000262", "text": "function getBasicTemplates() {\n\t\t\t$q = sqlquery(\"SELECT * FROM bigtree_templates WHERE level <= '\".$this->Level.\"' ORDER BY position DESC, id ASC\");\n\t\t\t$items = array();\n\t\t\twhile ($f = sqlfetch($q)) {\n\t\t\t\tif (!$f[\"routed\"]) {\n\t\t\t\t\t$items[] = $f;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $items;\n\t\t}", "title": "" }, { "docid": "31db793f1ff98a3a39483dcb2a6e1523", "score": "0.49895623", "text": "public function get_email_template_details($template_id = '') {\n\t\t$condition = array('id'=>$template_id);\n\t\t$res = $this->db->get_where(E_TEMPLATE,$condition);\n\t\treturn $res->row();\n\t}", "title": "" }, { "docid": "00023d0893c7325038a21225a51eb0d6", "score": "0.49874347", "text": "public function getDatabase($identifier) {\n $criteria = (is_numeric($identifier)) ? 'id' : 'name';\n /** @var Collection $databases */\n $databases = $this->getDatabases();\n $database = $databases->filter(function($database) use ($criteria, $identifier){\n return $database->$criteria == $identifier;\n }, $databases)->first();\n return $database;\n }", "title": "" }, { "docid": "9f1e03bee82781ff3c521c3271f1c92b", "score": "0.49782023", "text": "public function run()\n {\n // template1\n DB::table('template')->insert([\n 'nombre' => 'plantilla1',\n 'archivo' => 'templates.template1.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '1',\n 'imagen' => 'imagen1.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Diseño Web'\n ]);\n\n // template2\n DB::table('template')->insert([\n 'nombre' => 'plantilla2',\n 'archivo' => 'templates.template2.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '2',\n 'imagen' => 'imagen2.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n // template3\n DB::table('template')->insert([\n 'nombre' => 'plantilla3',\n 'archivo' => 'templates.template3.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '3',\n 'imagen' => 'imagen3.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'E-Commerce'\n ]);\n\n //template4\n DB::table('template')->insert([\n 'nombre' => 'plantilla4',\n 'archivo' => 'templates.template4.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '4',\n 'imagen' => 'imagen4.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template5\n DB::table('template')->insert([\n 'nombre' => 'plantilla5',\n 'archivo' => 'templates.template5.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '5',\n 'imagen' => 'imagen5.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template6\n DB::table('template')->insert([\n 'nombre' => 'plantilla6',\n 'archivo' => 'templates.template6.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '6',\n 'imagen' => 'imagen6.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template7\n DB::table('template')->insert([\n 'nombre' => 'plantilla7',\n 'archivo' => 'templates.template7.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '7',\n 'imagen' => 'imagen7.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template8\n DB::table('template')->insert([\n 'nombre' => 'plantilla8',\n 'archivo' => 'templates.template8.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '8',\n 'imagen' => 'imagen8.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template9\n DB::table('template')->insert([\n 'nombre' => 'plantilla9',\n 'archivo' => 'templates.template9.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '9',\n 'imagen' => 'imagen9.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template3\n DB::table('template')->insert([\n 'nombre' => 'plantilla10',\n 'archivo' => 'templates.template10.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '10',\n 'imagen' => 'imagen10.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template3\n DB::table('template')->insert([\n 'nombre' => 'plantilla11',\n 'archivo' => 'templates.template11.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '11',\n 'imagen' => 'imagen11.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n\n //template3\n DB::table('template')->insert([\n 'nombre' => 'plantilla12',\n 'archivo' => 'templates.template12.index'\n ]);\n\n DB::table('template_descripcion')->insert([\n 'template_id' => '12',\n 'imagen' => 'imagen12.jpg',\n 'descripcion' => 'descripcion',\n 'tipo' => 'Desarrollo'\n ]);\n }", "title": "" }, { "docid": "7662ae5b427d229adc30c45e1933053a", "score": "0.49705434", "text": "function lidtonfid($lid, $templateID) {\n global $_TABLES;\n $sql = \"SELECT id FROM {$_TABLES['nftemplatedata']} WHERE nf_templateid={$templateID} AND logicalID={$lid}\";\n $result = DB_Query($sql);\n $A = DB_FetchArray($result);\n if($A[0] == NULL){\n $retval = NULL;\n } else {\n $retval = $A[0];\n }\n return $retval;\n}", "title": "" }, { "docid": "6875200bdad1c03871997242b49b4ed0", "score": "0.49664903", "text": "function useTemplate()\r\n { \t\r\n \t$objDef = self::definition();\r\n \t \t\r\n \t$db = eZDB::instance();\r\n \t$rows = $db->arrayQuery('\r\n \t\tSelect IF( T1.use_template_title IS NULL, FALSE, T1.use_template_title ) as title,\r\n \t\t\t IF( T1.use_template_description IS NULL, FALSE, T1.use_template_description ) as description\r\n \t\tFrom '. $objDef['name']. ' as T0 \r\n \t\tLeft Join opsarss_export_item_template as T1\r\n \t\tOn T0.id = T1.ezrss_export_item_id\r\n \t\tWhere T0.id = '. $this->ID.'\r\n \t');\r\n \t\r\n \treturn $rows[0];\r\n }", "title": "" }, { "docid": "eb79d37ec5856d3ea317c00f9b5170cf", "score": "0.4965546", "text": "static function retrieveByPKs($id) {\n\t\tif (null === $id) {\n\t\t\treturn null;\n\t\t}\n\t\tif (static::$_poolEnabled) {\n\t\t\t$pool_instance = static::retrieveFromPool($id);\n\t\t\tif (null !== $pool_instance) {\n\t\t\t\treturn $pool_instance;\n\t\t\t}\n\t\t}\n\t\t$q = new Query;\n\t\t$q->add('id', $id);\n\t\treturn static::doSelectOne($q);\n\t}", "title": "" }, { "docid": "b8987c4c09a16ba12450ceb85a640808", "score": "0.49444363", "text": "function da_single_templates( $template = '' ) {\n\tglobal $post;\n\t$meta = get_post_meta( $post->ID, 'campaigns', true );\n\tif ( 1 === $meta ) {\n\t\t$template = locate_template(\n\t\t\tarray( 'single-campaigns.php', $template ),\n\t\t\tfalse\n\t\t);\n\t}\n\treturn $template;\n}", "title": "" }, { "docid": "2a35e9be6cc51084b04aef90781c198c", "score": "0.49270812", "text": "protected function getTemplates()\n\t{\n\t\t$db = Factory::getDbo();\n\n\t\t// Get the database object and a new query object.\n\t\t$query = $db->getQuery(true);\n\n\t\t// Build the query.\n\t\t$query->select('element, name')\n\t\t\t->from('#__extensions')\n\t\t\t->where('client_id = ' . $this->clientId)\n\t\t\t->where('type = ' . $db->quote('template'))\n\t\t\t->where('enabled = 1');\n\n\t\t// Set the query and load the templates.\n\t\t$db->setQuery($query);\n\n\t\treturn $db->loadObjectList('element');\n\t}", "title": "" }, { "docid": "1673c3e9e08ee72c029b8a98f5409e0d", "score": "0.49185488", "text": "public function get_block_templates_from_db($slugs = array(), $template_type = 'wp_template')\n {\n }", "title": "" }, { "docid": "584d670ed0554d46cc00076fb5e1848a", "score": "0.4912875", "text": "public static function get_template_by_name($conn, $template_name)\n { \n Ossim_db::check_connection($conn);\n \n $template_data = array();\n \n $query = \"SELECT HEX(id) as id, name FROM acl_templates WHERE name = ?\"; \n \n $rs_1 = $conn->Execute($query, array($template_name));\n \n if (!$rs_1)\n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n { \n while (!$rs_1->EOF) \n {\n $template_id = $rs_1->fields['id'];\n \n //Menu permissions\n $query_2 = \"SELECT p.* FROM acl_templates_perms tp, acl_perm p WHERE tp.ac_templates_id=UNHEX(?) AND tp.ac_perm_id=p.id\";\n \n $rs_2 = $conn->Execute($query_2, array($template_id));\n \n if (!$rs_2) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n } \n else \n {\n $perms = array();\n \n while (!$rs_2->EOF) \n {\n $perms[$rs_2->fields['id']] = $rs_2->fields['value'];\n \n $rs_2->MoveNext();\n }\n \n $template_data[$template_id] = array(\n 'id' => $template_id,\n 'name' => $rs_1->fields['name'],\n 'perms' => $perms\n );\n }\n \n $rs_1->MoveNext();\n }\n }\n \n return $template_data;\n }", "title": "" }, { "docid": "b2da8e31d4f5871094e970a9a10144d8", "score": "0.4890861", "text": "function set_template_by_Id($template_id)\n {\n $parameter_array = array();\n \n array_push($parameter_array, array(\n 'and',\n 'id',\n '=',\n $template_id\n ));\n \n $output = $this->result('i', $parameter_array);\n $row = mysqli_fetch_assoc($output);\n \n $this->id = $row['id'];\n $this->name = $row['name'];\n $this->description = $row['description'];\n $this->source = $row['source'];\n $this->phases = $row['phases'];\n $this->output_source = $row['output_source'];\n }", "title": "" }, { "docid": "0c945584a89341530480981bcbc1e691", "score": "0.48747283", "text": "function getId($db, $tabledefuuid, $uuid){\r\n\r\n $querystatement = \"\r\n SELECT\r\n `maintable`\r\n FROM\r\n `tabledefs`\r\n WHERE\r\n `uuid` = '\".$tabledefuuid.\"'\";\r\n\r\n $queryresult = $db->query($querystatement);\r\n\r\n $tablerecord = $db->fetchArray($queryresult);\r\n\r\n $querystatement = \"\r\n SELECT\r\n `id`\r\n FROM\r\n `\".$tablerecord[\"maintable\"].\"`\r\n WHERE\r\n `uuid` = '\".$uuid.\"'\";\r\n\r\n $queryresult = $db->query($querystatement);\r\n\r\n if($db->numRows($queryresult))\r\n $therecord = $db->fetchArray($queryresult);\r\n else\r\n $therecord[\"id\"] = null;\r\n\r\n return $therecord[\"id\"];\r\n\r\n}", "title": "" }, { "docid": "5a05af5e30afaaa5bfd2835ec21371f8", "score": "0.48700097", "text": "protected function getReplicateDb($sql)\n {\n $sql = trim($sql);\n\n if (stripos($sql, 'SELECT') !== 0) {\n //Not select query\n if (preg_match('/insert\\s+into\\s+([a-z0-9_]+)/ims', $sql, $match)) {\n $table = $match[1];\n $querytype = 'INSERT';\n } elseif (preg_match('/update\\s+([a-z0-9_]+)/ims', $sql, $match)) {\n $table = $match[1];\n $querytype = 'UPDATE';\n } elseif (preg_match('/delete\\s+from\\s+([a-z0-9_]+)/ims', $sql, $match)) {\n $table = $match[1];\n $querytype = 'DELETE';\n } else {\n $querytype = 'OTHER';\n }\n } else {\n $querytype = 'SELECT';\n\n if (preg_match('/^select.*?from\\s+([a-z0-9_]+)/ims', $sql, $match)) {\n $table = $match[1];\n }\n }\n\n //////////////////////\n // SELECT DB BASE ON QUERY TYPE\n if ($querytype == 'SELECT') {\n $replicateCount = count($this->connectinfo['slave']);\n\n //select slave\n if ($replicateCount == 0) {\n die('slave DB Config not found.');\n } else {\n //Select a random slave info\n $randomConnectInfo = array();\n $randseed = rand(1, $replicateCount);\n $i = 1;\n foreach ($this->connectinfo['slave'] as $connectinfo) {\n if ($i == $randseed) {\n $randomConnectInfo = $connectinfo;\n }\n $i++;\n }\n\n /////////////////////////////////\n $db = $this->initConnection(false, $randomConnectInfo['identifier']);\n\n }\n } else {\n $replicateCount = count($this->connectinfo['master']);\n if ($replicateCount == 0) {\n die('Master DB Config not found.');\n } else {\n //Select a random master info\n $randomConnectInfo = array();\n $randseed = rand(1, $replicateCount);\n $i = 1;\n foreach ($this->connectinfo['master'] as $connectinfo) {\n if ($i == $randseed) {\n $randomConnectInfo = $connectinfo;\n }\n $i++;\n }\n\n /////////////////////////////////\n $db = $this->initConnection(true, $randomConnectInfo['identifier']);\n }\n }\n\n //////////////\n return $db;\n }", "title": "" }, { "docid": "c59f500a7a025d4bd623628cc876dbd8", "score": "0.483489", "text": "function getListTemplates($pearDB, $svcId, $alreadyProcessed = array())\n{\n $svcTmpl = array();\n if (in_array($svcId, $alreadyProcessed)) {\n return $svcTmpl;\n } else {\n $alreadyProcessed[] = $svcId;\n $statement = $pearDB->prepare(\"SELECT * FROM service WHERE service_id = :service_id\");\n $statement->bindValue(':service_id', (int)$svcId, \\PDO::PARAM_INT);\n $statement->execute();\n\n if ($row = $statement->fetch()) {\n if ($row['service_template_model_stm_id'] !== null) {\n $svcTmpl = array_merge(\n $svcTmpl,\n getListTemplates($pearDB, $row['service_template_model_stm_id'], $alreadyProcessed)\n );\n }\n $svcTmpl[] = $row;\n }\n return $svcTmpl;\n }\n}", "title": "" }, { "docid": "112e28ba3620bcf6d212d5eb84c83a80", "score": "0.48347905", "text": "public function get_template_record(int $template_id, ?array $replace_datas = null): array {\r\n\t\t$record = $this->_template_view()->where(['mt.id'=>$template_id])->one();\r\n\t\treturn is_null($replace_datas) ? $record : $this->replace_template_description($record, $replace_datas);\r\n\t}", "title": "" }, { "docid": "ae4d08f2286b142e0a544f3c201e742f", "score": "0.48199448", "text": "public static function get_block_templates_from_db($slugs = array(), $template_type = 'wp_template')\n {\n }", "title": "" }, { "docid": "adf8f5d531f04a432e06753a88464c32", "score": "0.48193774", "text": "function bmlt_fetch_templates ()\n {\n global $g_server;\n \n $ret = null;\n \n $retData = array();\n $retLongData = array();\n \n try // Catch any thrown exceptions.\n {\n $sql = \"SELECT * FROM `\".$g_server->GetMeetingTableName_obj().\"_data` WHERE `meetingid_bigint` = 0\";\n $row_result = c_comdef_dbsingleton::preparedQuery ( $sql, array() );\n \n if ( is_array ( $row_result ) && count ( $row_result ) > 0 )\n {\n foreach ( $row_result as $row )\n {\n $retData[$row['key']]['field_prompt'] = $row['field_prompt'];\n $retData[$row['key']]['lang_enum'] = $row['lang_enum'];\n $retData[$row['key']]['visibility'] = $row['visibility'];\n $retData[$row['key']]['data_string'] = $row['data_string'];\n $retData[$row['key']]['data_bigint'] = $row['data_bigint'];\n $retData[$row['key']]['data_double'] = $row['data_double'];\n }\n }\n \n $sql = \"SELECT * FROM `\".$g_server->GetMeetingTableName_obj().\"_longdata` WHERE `meetingid_bigint` = 0\";\n $row_result = c_comdef_dbsingleton::preparedQuery ( $sql, array() );\n \n if ( is_array ( $row_result ) && count ( $row_result ) > 0 )\n {\n foreach ( $row_result as $row )\n {\n $retLongData[$row['key']]['field_prompt'] = $row['field_prompt'];\n $retLongData[$row['key']]['lang_enum'] = $row['lang_enum'];\n $retLongData[$row['key']]['visibility'] = $row['visibility'];\n if ( array_key_exists ( $row, 'data_longtext' ) )\n {\n $retLongData[$row['key']]['data_longtext'] = $row['data_longtext'];\n }\n elseif ( array_key_exists ( $row, 'data_blob' ) )\n {\n $retLongData[$row['key']]['data_blob'] = $row['data_blob'];\n }\n }\n }\n }\n catch ( Exception $e )\n {\n die ( '<pre>'.htmlspecialchars ( print_r ( $e, true ) ).'</pre>' );\n }\n \n if ( is_array ( $retData ) && count ( $retData ) )\n {\n $ret['data'] = $retData;\n }\n \n if ( is_array ( $retLongData ) && count ( $retLongData ) )\n {\n $ret['longdata'] = $retLongData;\n }\n \n return $ret;\n }", "title": "" }, { "docid": "be388735ba519ebe8ea4c03d9c4c5d02", "score": "0.4798554", "text": "public function getTemplates($setId) {\n $select = $this->getDatabase()\n ->select()\n ->from(self::TEMPLATES_TABLE)\n ->where('statisticSetId = ?', $setId);\n\n $data = $select->fetchAll();\n\n $result = array();\n foreach ($data as $item) {\n $result[] = (int)$item['statisticTemplateId'];\n }\n\n return $result;\n }", "title": "" }, { "docid": "9dea8fe77c5f5c273b0eacd91e1e0816", "score": "0.47970927", "text": "function getCacheId() {\n $result = $this->table_name;\n \n $id = $this->getPrimaryKey();\n sort($id);\n \n foreach($id as $id_field) {\n $result .= '_' . $id_field . '_' . $this->getFieldValue($id_field);\n } // if\n \n return $result;\n \t}", "title": "" }, { "docid": "8a70616f7d01ecc84aec45ecf34bfb7e", "score": "0.47966602", "text": "function getPagesDataBase($parameters){\n global $db,$db_table_prefix, $db_name; \n\n $id_site=$db->sql_escape($parameters['id_site']);\n\n $sql = \" SELECT '000' AS id , 'Todas las paginas' AS description UNION ALL\";\n $sql .= \" SELECT id, title_es as description \";\n $sql .= \" FROM [\".$db_name.\"].[dbo].[\".$db_table_prefix.\"\".$db_table_prefix.\"page] p where site_id=\".$id_site.\" order by description\";\n\n $result = $db->sql_query($sql);\n $result = $db->sql_fetchrowset($result);\n\n return $result;\n}", "title": "" }, { "docid": "0f9fb27bc450a5a55b7b1ab61be72fef", "score": "0.47851586", "text": "public static function get_current_template_id_query( $compare ) {\n $query = \"SELECT mba_cur_temp_id FROM main_base WHERE mba_id = $compare\";\n return $query;\n }", "title": "" }, { "docid": "d335d6610eb891bd466aee3960f48ba0", "score": "0.4783535", "text": "public function GetTemplatesFromDB(GetTemplatesFromDB $parameters)\n {\n return $this->__soapCall('GetTemplatesFromDB', array($parameters));\n }", "title": "" }, { "docid": "1d92d1eacd0fbe596d6028eeb0307c24", "score": "0.4779632", "text": "function getInfoFromDatabase();", "title": "" }, { "docid": "5b861511b34bead8b4aa8294f76e4d22", "score": "0.47785303", "text": "abstract function getPrimaryKey();", "title": "" }, { "docid": "47664ded307030ee8bc4b063dd9ecf00", "score": "0.47762764", "text": "public function getTemplateId($templatename)\n {\n $queueselect = $this->select()->where('template_name = ?', $templatename);\n $row = $this->fetchRow($queueselect);\n \n if (isset($row['template_id']))\n return $row['template_id'];\n \n return null;\n }", "title": "" }, { "docid": "77121f08c291ffe19d0de8fd4075c500", "score": "0.47762144", "text": "public function getFeedTemplateInfo($app_id, $template_id)\n {\n $key = $app_id . ',' . $template_id;\n\n if (Zend_Registry::isRegistered('FEED_TEMPLATE_INFO')) {\n $FEED_TEMPLATE_INFO = Zend_Registry::get('FEED_TEMPLATE_INFO');\n\n if (isset($FEED_TEMPLATE_INFO[$key])) {\n return $FEED_TEMPLATE_INFO[$key];\n }\n }\n else {\n $FEED_TEMPLATE_INFO = array();\n }\n\n $template_info = Bll_Cache_FeedTemplate::getInfo($app_id, $template_id);\n\n if ($template_info) {\n $FEED_TEMPLATE_INFO[$key] = $template_info;\n\n Zend_Registry::set('FEED_TEMPLATE_INFO', $FEED_TEMPLATE_INFO);\n\n return $template_info;\n }\n\n return null;\n }", "title": "" }, { "docid": "0ba886c42cd948f2107f05e13c516d49", "score": "0.47669914", "text": "public function getTemplate($templateID) {\n\t\ttry {\n\t\t\tif($result = self::$db->find('*', array('id'=>$templateID),EMAIL_TEMPLATES,'Email Template')) {\n\t\t\t\treturn $this->getTemplateData($result);\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "147a6c52ff12168221ea4d2486d229f6", "score": "0.4758804", "text": "private function getDatabaseString($datasets) {\n\t\t$this->Project =& ClassRegistry::init('Project');\n\t\t$databaseString = '';\n\t\t\n\t\tif(sizeof($datasets) == 1 && !is_array($datasets)) {\n\t\t\t$datasets = array($datasets);\n\t\t}\n\t\t\n\t\t$projectId = $this->Project->getProjectId($datasets[0]);\n\t\t\n\t\tforeach($datasets as $dataset) {\n\t\t\t$databaseString .= SEQUENCE_STORE_PATH.\"/$projectId/$dataset/$dataset \";\n\t\t}\n\t\t\n\t\treturn trim($databaseString);\n\t}", "title": "" }, { "docid": "63d6cae13ea9aec2bca38301281563e3", "score": "0.47552428", "text": "function find_template (){\n global $cPath;\n\n\t$products_id=intval($_GET['products_id']); // Get current product ID\n\t\n // Check if there is a content template\n\t$this->content_template_file = $this->find_content_template($products_id, $cPath); \n\n\t// Check now for the 'outside' template (columns, header, footer):\n\t// Is there a template for this particular product?\n\t$check_file= STS_TEMPLATE_DIR . \"product_info.php_$products_id.html\";\n\tif (file_exists($check_file)) {\n\t // Use it\n\t $this->template_file = $check_file;\n\t return $check_file;\n }\n\t\n\t// Is there a category-specific template for products like \"product_info.php_c1_17.html\", then \"product_info.php_c1.html?\n\t$sts_cpath= $cPath;\n\twhile ($sts_cpath != \"\") {\n \n $check_file = STS_TEMPLATE_DIR . \"product_info.php_c$sts_cpath.html\";\n if (file_exists($check_file)) {\n // Use it\n\t\t$this->template_file = $check_file;\n\t\treturn $check_file;\n }\n\t $sts_cpath = substr($sts_cpath, 0, (strrpos($sts_cpath, \"_\")));\n\t} //end while\n\t\n\t\n\t// Is there a general template for products?\n\t$check_file= STS_TEMPLATE_DIR . \"product_info.php.html\"; \n\tif (file_exists($check_file)) {\n\t // Use it\n\t $this->template_file = $check_file;\n\t return $check_file;\n\t}\t\n\t\n\t// Is there a category-specific template like \"index.php_1_17.html\", then \"index.php_1.html?\n\t$sts_cpath= $cPath;\n\twhile ($sts_cpath != \"\") {\n \n $check_file = STS_TEMPLATE_DIR . \"index.php_$sts_cpath.html\";\n if (file_exists($check_file)) {\n // Use it\n\t\t$this->template_file = $check_file;\n\t\treturn $check_file;\n }\n\t $sts_cpath = substr($sts_cpath, 0, (strrpos($sts_cpath, \"_\")));\n\t} //end while\n\n\t// No specific template found, use default template\n\treturn STS_DEFAULT_TEMPLATE;\n }", "title": "" }, { "docid": "abf0cf3443898ca9eea72a4aa803455f", "score": "0.47361898", "text": "public function getAllTemplates(){\r\n return $this->fetchAll();\r\n }", "title": "" }, { "docid": "4bd2d174a723751fb0264550dfa1fa89", "score": "0.47290716", "text": "function FetchByID()\n\t{\n\t\tglobal $dal_info;\n\t\t$tableinfo = &$dal_info[ $this->infoKey ];\n\n\t\t$dal_where = \"\";\n\t\tforeach($tableinfo as $fieldname => $fld)\n\t\t{\n\t\t\t$command = 'if(isset($this->'.$fld['varname'].')) { ';\n\t\t\t$command.= '$this->Value[\\''.escapesq($fieldname).'\\'] = $this->'.$fld['varname'].';';\n\t\t\t$command.= ' }';\n\t\t\t\n\t\t\teval($command);\n\t\t\t\n\t\t\tforeach($this->Param as $field => $value)\n\t\t\t{\n\t\t\t\tif( strtoupper($field) != strtoupper($fieldname) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t$dal_where.= $this->_connection->addFieldWrappers( $fieldname ).\"=\".$this->PrepareValue($value, $fld[\"type\"]) . \" and \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// cleanup\n\t\t$this->Reset();\n\t\t// construct and run SQL\n\t\tif ($dal_where)\n\t\t\t$dal_where = \" where \".substr($dal_where, 0, -5);\n\t\t\t\n\t\t$dalSQL = \"select * from \".$this->_connection->addTableWrappers( $this->m_TableName ).$dal_where;\n\t\treturn $this->_connection->query( $dalSQL );\n\t}", "title": "" }, { "docid": "8fca551413533d1755a59a0613b2da08", "score": "0.4727163", "text": "function get_template($id, $type)\n{\n\t$query = \"SELECT template from users WHERE id='$id'\";\n\t$result = mysql_query($query) or die('Hiba a lekérdezésben: ' . mysql_error());\n\t$user = mysql_fetch_array($result, MYSQL_ASSOC);\n\tmysql_free_result($result);\n\t\n\t$less = explode(\"<post>\", $user['template']);\n\tif ($type == \"header\")\n\t\treturn $less[0];\n\telse\n\t{\n\t\t$less = explode(\"</post>\", $less[1]);\n\t\tif ($type == \"footer\")\n\t\t\t\treturn $less[1];\n\t\telse\n\t\t\treturn $less[0]; // post\n\t}\n}", "title": "" }, { "docid": "0056eb325d4f70a479bc59d76cc65242", "score": "0.47242555", "text": "public function getUseDbId();", "title": "" }, { "docid": "52f7ad904ff6b5f885207c209a36435d", "score": "0.4711636", "text": "abstract public function getTemplate();", "title": "" }, { "docid": "80976df20c5c1484d377c2294a3b3242", "score": "0.47042367", "text": "public function getDb();", "title": "" }, { "docid": "80976df20c5c1484d377c2294a3b3242", "score": "0.47042367", "text": "public function getDb();", "title": "" }, { "docid": "80976df20c5c1484d377c2294a3b3242", "score": "0.47042367", "text": "public function getDb();", "title": "" }, { "docid": "8286e44d67ecc4f39a1071c073ad1639", "score": "0.47035143", "text": "protected abstract static function getPrimaryKey();", "title": "" }, { "docid": "a4c6254029f20fc3bc7068c50977debe", "score": "0.46978799", "text": "function get_all_templates () {\n global $dbconnect;\n $query = \"SELECT * FROM emails ORDER BY email_id ASC;\";\n $result = mysql_query($query, $dbconnect);\n confirm_query($result);\n return $result;\n}", "title": "" }, { "docid": "fd9bb5241602084a9510d89d9a811ab1", "score": "0.46953222", "text": "public function getByID($tables,$pk,$id){\n $this->db->where($pk,$id);\n return $this->db->get($tables)->result();\n }", "title": "" }, { "docid": "fd9bb5241602084a9510d89d9a811ab1", "score": "0.46953222", "text": "public function getByID($tables,$pk,$id){\n $this->db->where($pk,$id);\n return $this->db->get($tables)->result();\n }", "title": "" }, { "docid": "f9f0290b45a2d290753d35d9b1e79108", "score": "0.46912032", "text": "public function getMulti( $ids ){\n\n // $IdPlaceholders = trim( str_repeat('?,', count($ids) ), ',' );\n\n $ids = join(',', $ids);\n\n $sql = \"\n SELECT\n tc.*,\n tcp.id AS challenge_id,\n tcp.user_id AS challenger_id,\n tcp.img AS challenger_img,\n tcp.joined as joined\n FROM `hotornot-dev`.tblChallenges AS tc\n LEFT JOIN `hotornot-dev`.tblChallengeParticipants AS tcp\n ON tc.id = tcp.challenge_id\n WHERE tc.id IN ( $ids )\n ORDER BY tcp.joined\";\n\n $stmt = $this->prepareAndExecute( $sql );\n\n //$params = array( $ids );\n //$stmt = $this->prepareAndExecute( $sql, $params );\n\n $data = $stmt->fetchAll( PDO::FETCH_CLASS, 'stdClass' );\n }", "title": "" }, { "docid": "9a26f881fa8d162befa1342ddf8e5dd2", "score": "0.46893674", "text": "function getListTemplates() {\n global $output;\n\n require('dataconf.php');\n $tpl_info = $bdd->query(\"SELECT DISTINCT file, qsosappfamily, qsosspecificformat, language, repo FROM templates ORDER BY qsosappfamily ASC, qsosspecificformat DESC\");\n\n $templates = $output->createElement(\"templates\");\n\n while ($info = $tpl_info->fetch()) {\n $newtreeitem = $output->createElement(\"item\");\n $newtreeitem->setAttribute(\"id\", $info[0]);\n $newtreeitem->setAttribute(\"name\", $info[1]);\n $newtreeitem->setAttribute(\"version\", $info[2]);\n $newtreeitem->setAttribute(\"language\", $info[3]);\n $newtreeitem->setAttribute(\"repo\", $info[4]);\n $templates->appendChild($newtreeitem);\n } \n\n return $templates;\n}", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.46764383", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.46764383", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.46764383", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.46764383", "text": "public function getTemplate();", "title": "" }, { "docid": "97c8a62edc3b030008f62a827d53df76", "score": "0.46679786", "text": "public static function get($database = 'portal')\r\n {\r\n return Zend_Registry::get('db')->getDb($database == 'db' ? 'portal' : $database);\r\n }", "title": "" }, { "docid": "66f7a91f5ad2ed45f4d92b9bba1a7646", "score": "0.4660713", "text": "public function getTemplateId()\n {\n return $this->template_id;\n }", "title": "" }, { "docid": "66f7a91f5ad2ed45f4d92b9bba1a7646", "score": "0.4660713", "text": "public function getTemplateId()\n {\n return $this->template_id;\n }", "title": "" }, { "docid": "66f7a91f5ad2ed45f4d92b9bba1a7646", "score": "0.4660713", "text": "public function getTemplateId()\n {\n return $this->template_id;\n }", "title": "" }, { "docid": "645ac86516513a4f75ffa5988aeff1c2", "score": "0.4658492", "text": "public static function get_collections_db_identifiers() {\n\t\t$Tainacan_Collections = \\Tainacan\\Repositories\\Collections::get_instance();\n\t\t$collections = $Tainacan_Collections->fetch( [], 'OBJECT' );\n\t\t$cpts = [];\n\t\tforeach ( $collections as $col ) {\n\t\t\t$cpts[] = $col->get_db_identifier();\n\t\t}\n\n\t\treturn $cpts;\n\t}", "title": "" }, { "docid": "df861dfbc18f9d57b1a49fafc4f9937b", "score": "0.46574864", "text": "public function getDatabase();", "title": "" }, { "docid": "4ce8a1a181e2720b4ee219d447c67e38", "score": "0.46483105", "text": "public function getDbTemplatePath()\n {\n return $this->getSettingArray()[\"db_template_path\"];\n }", "title": "" }, { "docid": "acc83a1ad24e0d5d4591dedb240959ed", "score": "0.46445668", "text": "function ListTemplates()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $Config;\r\n\t\t\t\r\n\t\t\t$sql = \"select * from templates order by TemplateDisplayName asc\" ; \r\n\t\t\treturn $this->get_results($sql);\t\t\r\n\t }", "title": "" }, { "docid": "f5b0c2d2d0bec7076a334ebbc7efc161", "score": "0.46438172", "text": "public function getTemplateData(string $templateId): \\Yana\\Views\\MetaData\\IsTemplateMetaData;", "title": "" }, { "docid": "d590013f41502775ce4d9294aceb7b6b", "score": "0.463891", "text": "function workspace_getStructureID($workspaces) {\n\tglobal $Auth;\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t$db_connection = new DB_Sql();\n\t\n\t\n\t## prepare the query\n\t$query = '';\n\tforeach($workspaces as $current_workspace) {\n\t\tif($query=='') {\n\t\t\t$query .= \"workspace_id='\".$current_workspace.\"'\";\n\t\t} else {\n\t\t\t$query .= \" OR workspace_id='\".$current_workspace.\"'\";\n\t\t}\n\t}\t\n\t\n\t## now do the actually query\n\t$query = \"SELECT DISTINCT(structure_id) FROM \".DB_PREFIX.\"workspace_item AS a INNER JOIN \".STRUCTURE.\" AS b ON a.workspace_item=b.page_id WHERE a.client_id='$client_id' AND (\".$query.\")\";\n\t$result_pointer = $db_connection->query($query);\n\t\n\t$results = array();\n\twhile($db_connection->next_record()) {\t\n\t\t$results[] = $db_connection->Record[\"structure_id\"];\t\n\t}\n\treturn $results;\t\n}", "title": "" }, { "docid": "b3e173a5d52d4fe5b3940ef280c532e2", "score": "0.46386743", "text": "public abstract function getDb();", "title": "" }, { "docid": "c0849b4c0a2689b2bc968c10740c9fe6", "score": "0.4637611", "text": "public function admin_get_dbs() {}", "title": "" }, { "docid": "3e7e2a0d6d496671ca1ddc2fd45481cb", "score": "0.46348462", "text": "private function get_backupset_data($db, $id) {\n $query = \"SELECT * from backupset where id=:id\";\n $params = array(\"id\"=>$id);\n $result = $db->get_query_result($query, $params);\n\n if(count($result)==1) {\n $result = $result[0];\n } else {\n $result = 0;\n }\n return $result;\n }", "title": "" }, { "docid": "e2c8ad1aeec0a2e95be5f92468ed1fce", "score": "0.46254575", "text": "function template_fields()\n {\n $query = $this->db->query(\"SELECT TEMPLATE_ID,TEMPLATE_NAME FROM LZ_ITEM_TEMPLATE ORDER BY TEMPLATE_ID\");\n return $query->result_array();\n// $query = $this->db->select('TEMPLATE_ID,TEMPLATE_NAME');\n// $query = $this->db->from('LZ_ITEM_TEMPLATE');\n\n// return $query->result_array();\n // $temp_result = $this->db->get();\n // return $temp_result;\n \n }", "title": "" }, { "docid": "fc5e92dcd7283849ae76c7e7a4d0d5d2", "score": "0.46202344", "text": "static public function grabDbInfos() {\n global $DB;\n\n $dbinfos = $DB->getInfo();\n\n $size_res = $DB->request([\n 'SELECT' => new \\QueryExpression(\"ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) AS dbsize\"),\n 'FROM' => 'information_schema.tables',\n 'WHERE' => ['table_schema' => $DB->dbdefault]\n ])->next();\n\n $db = [\n 'engine' => $dbinfos['Server Software'],\n 'version' => $dbinfos['Server Version'],\n 'size' => $size_res['dbsize'],\n 'log_size' => '',\n 'sql_mode' => $dbinfos['Server SQL Mode']\n ];\n\n return $db;\n }", "title": "" }, { "docid": "4dd7dec1f71874db4e1b2ed05ea581af", "score": "0.46143278", "text": "static function custom_get_one_sql($id) {\n # this is the default functionality\n $primary_key = static::get_primary_key();\n return static::get_sql() . \" WHERE o.`$primary_key`='$id'\";\n }", "title": "" }, { "docid": "ec3a68aee11b6460c630bfbcc4684336", "score": "0.46100962", "text": "function template( $identifier, $auth ) {\n // get template id\n $identifier = array('id' => $identifier->id, 'type' => 'template');\n\n // get asset subscribers\n $reply = $client->listSubscribers(\n array ( 'authentication' => $auth,\n 'identifier' => $identifier )\n );\n\n\t//echo \"(format) site://\". $identifier->path->siteName .\"/\". $identifier->path->path . \"\\r\\n\";\n return \n}", "title": "" }, { "docid": "fbdf60845507662f2e9b664dceb8b340", "score": "0.46060848", "text": "function getDatabase();", "title": "" } ]
77fa04ca17b0832feeeb9135899ba90a
Select Character Width ====================== $size: string (double / normal)
[ { "docid": "26a11b30b04f2f86005863769b9d460f", "score": "0.802485", "text": "function Width($size = \"double\"){\n if($this -> handle == false) return false;\n \n switch($size){\n case \"double\":\n $set = kbyte(32);\n break;\n \n default:\n $set = kbyte(0);\n }\n \n return $this -> Append(kbyte(27) . \"!\" . $set);\n }", "title": "" } ]
[ { "docid": "9338d61f1b28824291cd70545ee4fd10", "score": "0.6905367", "text": "static function getSize($size) {\n\n //TRANS: list of unit (o for octet)\n $bytes = [__('o'), __('Kio'), __('Mio'), __('Gio'), __('Tio')];\n foreach ($bytes as $val) {\n if ($size > 1024) {\n $size = $size / 1024;\n } else {\n break;\n }\n }\n //TRANS: %1$s is a number maybe float or string and %2$s the unit\n return sprintf(__('%1$s %2$s'), round($size, 2), $val);\n }", "title": "" }, { "docid": "d3c6ef56e4866f5024b281ecdee9ff52", "score": "0.6737133", "text": "public function setSize($size) {\n\t\t$s = trim(strtolower($size));\n\t\treturn $this->owner->addExtraClass(\"input-{$s}\");\n\t}", "title": "" }, { "docid": "9ef8f3e3e18dc2de950dfa595e2df7de", "score": "0.6559615", "text": "function format_size($size) {\n if ($size < BYTE_A_KB) {\n return str_replace('@size', round($size, 2), '@size bytes');\n }\n else {\n $size = $size / BYTE_A_KB; // Convert bytes to kilobytes.\n $units = array(\n '@size KB',\n '@size MB',\n '@size GB',\n '@size TB',\n '@size PB',\n '@size EB',\n '@size ZB',\n '@size YB',\n );\n foreach ($units as $unit) {\n if (round($size, 2) >= BYTE_A_KB) {\n $size = $size / BYTE_A_KB;\n }\n else {\n break;\n }\n }\n return str_replace('@size', round($size, 2), $unit);\n }\n}", "title": "" }, { "docid": "4e3b0cc8e6e361713d0953808ed24712", "score": "0.64839715", "text": "public function setSize(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size) {}", "title": "" }, { "docid": "ed19a9abb29a8c4cbd545cc39f9aacc9", "score": "0.6434258", "text": "function setWidth( $value )\r\n {\r\n $this->Width = $value;\r\n }", "title": "" }, { "docid": "c70d40b706dfcaf09059cf7df67bb73e", "score": "0.6426734", "text": "public function getWidth($string)\n {\n }", "title": "" }, { "docid": "b6d93c3252bacf746f7beccce4cced66", "score": "0.6413986", "text": "function Size($size = 0){\n if($this -> handle == false) return false;\n if($size < 0) $size = 0;\n elseif($size > 255) $size = 255;\n \n return $this -> Append(kbyte(29) . \"!\" . kbyte($size));\n }", "title": "" }, { "docid": "6557f3babf936e17809e54f0e120777c", "score": "0.62848765", "text": "function Set_Char_Size($pt) {\r\n\t\tif ($pt > 3) {\r\n\t\t\t$this->_Char_Size = $pt;\r\n\t\t\t$this->SetFont($this->_Font,'',$this->_Char_Size);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0ed46020b669b204017eb763ec2a8a58", "score": "0.62595505", "text": "function display_size($size) {\n\n static $gb, $mb, $kb, $b;\n\n if (empty($gb)) {\n $gb = get_string('sizegb');\n $mb = get_string('sizemb');\n $kb = get_string('sizekb');\n $b = get_string('sizeb');\n }\n\n if ($size >= 1073741824) {\n $size = round($size / 1073741824 * 10) / 10 . $gb;\n } else if ($size >= 1048576) {\n $size = round($size / 1048576 * 10) / 10 . $mb;\n } else if ($size >= 1024) {\n $size = round($size / 1024 * 10) / 10 . $kb;\n } else {\n $size = $size .' '. $b;\n }\n return $size;\n}", "title": "" }, { "docid": "a3ae32c666489c385b347ae5de863170", "score": "0.62572515", "text": "function FormatSize ($size) {\n $kb = 1024; // Kilobyte\n $mb = 1024 * $kb; // Megabyte\n $gb = 1024 * $mb; // Gigabyte\n $tb = 1024 * $gb; // Terabyte\n \n /* If it's less than a kb we just return the size, otherwise we keep going until\n the size is in the appropriate measurement range. */\n if($size < $kb) {\n return $size.\" B\";\n }\n else if($size < $mb) {\n return round($size/$kb,2).\" KB\";\n }\n else if($size < $gb) {\n return round($size/$mb,2).\" MB\";\n }\n else if($size < $tb) {\n return round($size/$gb,2).\" GB\";\n }\n else {\n return round($size/$tb,2).\" TB\";\n }\n}", "title": "" }, { "docid": "1584011bc1669efe81ce1f064281ddcf", "score": "0.62436897", "text": "function calculate_size($size) {\n if (!$size) {\n return '0';\n }\n $base = log($size, 1024);\n $suffixes = array('', 'K', 'M', 'G', 'T');\n if ( isset($suffixes[floor($base)]) ) {\n return round(pow(1024, $base - floor($base)), 2) . ' ' . $suffixes[floor($base)];\n } else {\n return '0';\n }\n \n }", "title": "" }, { "docid": "c6113674a6db700f67f965eae9dd0eda", "score": "0.6213203", "text": "public function setWidth($val){\n\n $this->width = (int)$val;\n\n }", "title": "" }, { "docid": "9938cf35b65e20de1bdfdca0258ce4ec", "score": "0.6200044", "text": "static public function format_size( $size ) {\n $sizes = array( \" Bytes\", \" KB\", \" MB\", \" GB\", \" TB\", \" PB\", \" EB\", \" ZB\", \" YB\" );\n if( $size == 0 ) {\n return ( 'n/a' );\n } else {\n return ( round( $size / pow( 1024, ( $i = floor( log( $size, 1024 ) ) ) ), 2 ) . $sizes[ $i ] );\n }\n }", "title": "" }, { "docid": "ca3f103f77e53eb6fcc74caeb8b48bd6", "score": "0.61933225", "text": "public function setSize(string $size)\n\t{\n\t\t$this->size=$size; \n\t\t$this->keyModified['Size'] = 1; \n\n\t}", "title": "" }, { "docid": "3d3ec75cd186cbf0f30ff912965f310f", "score": "0.6182591", "text": "public static function formatSize($size) {\n $kilobyte = 1024;\n if ($size < $kilobyte) {\n return $size . ' bytes';\n } else {\n $size = $size / $kilobyte; // Convert bytes to kilobytes.\n $units = array('@size KB', '@size MB', '@size GB', '@size TB', '@size PB', '@size EB', '@size ZB', '@size YB');\n foreach ($units as $unit) {\n if (round($size, 2) >= $kilobyte) {\n $size = $size / $kilobyte;\n } else {\n break;\n }\n }\n return str_replace('@size', round($size, 2), $unit);\n }\n }", "title": "" }, { "docid": "781e83a799a489cacffa29db769a84de", "score": "0.6175553", "text": "protected function addSizeToOptions()\n\t{\n\t\t$val = floatval($this->sizeCss);\n\n\t\t$charPos = 0;\n\t\twhile (is_numeric($this->sizeCss[$charPos])) $charPos++;\n\n\t\t$unit = $charPos > 0 ? substr($this->sizeCss, $charPos) : '';\n\t\tHtml::addCssStyle($this->options, [\n\t\t\t'width'=>$this->isSquared ? $val . $unit : (1.33333 * $val) . $unit,\n\t\t\t'line-height'=>$val . $unit,\n\t\t]);\n\t}", "title": "" }, { "docid": "2245364ec36e0fee47568cbe97adefb9", "score": "0.6171482", "text": "public function setSize($size) {\n $this->size = intval($size);\n }", "title": "" }, { "docid": "51a5465121551e874a8f24322970df31", "score": "0.614311", "text": "public function size($size)\n {\n $this->size = $size;\n }", "title": "" }, { "docid": "81826487ecbb21b48125fcea6bb31bcf", "score": "0.61376125", "text": "public function set_size($value)\r\n\t{\r\n\t\treturn $this->set_attr('size', $value);\r\n\t}", "title": "" }, { "docid": "1875081ffa832275cfa52fd690a72d73", "score": "0.6128213", "text": "public function setFontSize ($pointsize) {}", "title": "" }, { "docid": "587c02f1b5ddd3121cda1d9d5b1520fa", "score": "0.60657024", "text": "public function width()\n {\n return $this->_size[0];\n }", "title": "" }, { "docid": "337ee580bf02e3b340261da60bb5ce0a", "score": "0.60639364", "text": "public function setSize($size)\n {\n $s = (int)$size;\n if ($s > 1 && $s < 512) {\n $this->size = $s;\n } else {\n $this->size = 80;\n }\n return $this;\n }", "title": "" }, { "docid": "04e9250b3e042bc1a0e4b8a5cf80ccd6", "score": "0.6058987", "text": "public static function format_size($size)\n {\n if ($size < 1024) {\n return $size . ' bytes';\n }\n if ($size < 1024*1024) {\n return round($size/1024) . ' KB';\n }\n if ($size < 1024*1024*10) {\n return round(($size/(1024*1024))*10)/10 . ' MB';\n }\n if ($size < 1024*1024*1024) {\n return round($size/(1024*1024)) . ' MB';\n }\n return round(($size/(1024*1024*1024))*10)/10 . ' GB';\n }", "title": "" }, { "docid": "a0b144289213645efdbf1ceb28171961", "score": "0.6058281", "text": "public function size($value)\n {\n return 'size:'.$value;\n }", "title": "" }, { "docid": "ae6f6c1688ba516a775bcf932235940f", "score": "0.6056564", "text": "function put_size( $size ) {\n if( $size >= 1 * 1024 * 1024 ) return round( $size / ( 1024 * 1024 )) . ' MB';\n else if( $size >= 1 * 1024 ) return round( $size / ( 1024 )) . ' KB';\n else if( $size > 0 ) return $size ;\n else return '';\n}", "title": "" }, { "docid": "8a8665e762d54bd5020a9d09673f2d4d", "score": "0.6046412", "text": "function responsive_filesize($size){\n $size = intval($size);\n $output = \"\";\n if($size<=1024){\n $output = $size.\" KB\";\n return $output;\n }\n else if($size>1024 && $size<=1048576){\n $size = round($size/1024, 1);\n $output = $size.\" MB\";\n return $output;\n }\n else if($size>1048576 && $size<=1073741824){\n $size = $size/1024;\n $size = round($size/1024, 1);\n $output = $size.\" GB\";\n return $output;\n }\n else{\n $size = $size/1024;\n $size = $size/1024;\n $size = round($size/1024, 1);\n $output = $size.\" TB\";\n return $output;\n }\n}", "title": "" }, { "docid": "ae6b0935f53d063ac3436f5ddeef2f2c", "score": "0.6044349", "text": "public static function spinner_size($size) {\n switch ($size) {\n case 'small':\n return 'la-sm';\n break;\n case 'normal':\n return '';\n break;\n case 'medium':\n return 'la-2x';\n break;\n case 'large':\n return 'la-3x';\n break;\n default:\n return '';\n break;\n }\n }", "title": "" }, { "docid": "9d1683de41f1f55a6c6a8113efbf7db7", "score": "0.60379094", "text": "function convert($size)\n {\n $unit = ['b', 'kb', 'mb', 'gb', 'tb', 'pb'];\n\n return @round($size / pow(1024, ($i = floor(log($size, 1024)))), 2).' '.$unit[$i];\n }", "title": "" }, { "docid": "126ac5d668da2c645aab6a053dc4cb23", "score": "0.6022531", "text": "function sizeOfFile($size)\r\n\t{\r\n\t\t$extensions = array('KB', 'MB', 'GB', 'TB');\r\n\t\t$counter = -1;\r\n\t\t$ext = '';\r\n\t\twhile($size >= 1024)\r\n\t\t{\r\n\t\t\t$size = $size / 1024;\r\n\t\t\t$counter++;\r\n\t\t\t$ext = $extensions[$counter];\r\n\t\t}\r\n\t\t$size = round($size, 0);\r\n\t\t$size = $size.' '.$ext;\r\n\t\treturn $size;\r\n\t}", "title": "" }, { "docid": "3ca7fb4c396567659c5d1dac7e7b2187", "score": "0.60208833", "text": "function format_size($size) {\n $suffix = t('bytes');\n if ($size >= 1024) {\n $size = round($size / 1024, 2);\n $suffix = t('KB');\n }\n if ($size >= 1024) {\n $size = round($size / 1024, 2);\n $suffix = t('MB');\n }\n return t('%size %suffix', array('%size' => $size, '%suffix' => $suffix));\n}", "title": "" }, { "docid": "407e4e5106a152af05f4dd45cc68b0bf", "score": "0.6017375", "text": "function set_size($size)\r\n {\r\n $this->size = $size;\r\n }", "title": "" }, { "docid": "407e4e5106a152af05f4dd45cc68b0bf", "score": "0.6017375", "text": "function set_size($size)\r\n {\r\n $this->size = $size;\r\n }", "title": "" }, { "docid": "ab96683bcf100f9fe864e788a167805a", "score": "0.60012996", "text": "public function setWidth($value)\n {\n return $this->set(self::WIDTH, $value);\n }", "title": "" }, { "docid": "af5e57f51961c5c19d2bf474597cec00", "score": "0.6000949", "text": "public function size($size){ $this->attributes['size']=$size; return $this; }", "title": "" }, { "docid": "8c8d26538c6c68bc8621d6fc741b0a33", "score": "0.59880376", "text": "function getWidth():string\n {\n return $this->width;\n }", "title": "" }, { "docid": "0a72bf3e48141f1df9f930b7410a884d", "score": "0.5983298", "text": "private function _bsize($s)\n\t{\n\t\tforeach (array('','K','M','G') as $i => $k)\n\t\t{\n\t\t\tif ($s < 1024)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$s/=1024;\n\t\t}\n\t\treturn sprintf(\"%5.1f %sBytes\", $s, $k);\n\t}", "title": "" }, { "docid": "e70e4bc0d60a63e75e54c174ca7959ab", "score": "0.59809214", "text": "Function makesize($size)\t//\tmake filesize 0KB/KB/MB/GB\n\t{\n\tif ($size == 0)\n\t\treturn (\"0K\");\n\telseif ($size < 1024)\n\t\treturn (\"1KB\");\t//if filesize is < 1K size is 1K\n\telseif (@floor($size / 1024) < 1024)\n\t\treturn @floor($size / 1024).\"KB\";\n\telseif (@floor(($size / 1024)/1024) < 1024)\n\t\treturn @floor(($size / 1024)/ 1024).\"MB\";\n\telse\n\t\treturn @floor((($size / 1024)/ 1024)/ 1024).\"GB\";\n\t}", "title": "" }, { "docid": "abb37a7655b7c44f49d590c85a1b31cc", "score": "0.5964747", "text": "public function setSize($size)\n {\n $this->size = $size;\n }", "title": "" }, { "docid": "aee2a83d2ef2d4677205e299ba7958a6", "score": "0.5961032", "text": "public static function size(int $size): string\n {\n if ($size < 0) {\n return 'N/A';\n }\n if ($size === 0) {\n return '0 b';\n }\n\n $base = log($size, 1024);\n $suffixes = ['b', 'kb', 'mb', 'gb'];\n\n if ($base >= 4) {\n throw new \\LogicException('Size too large to format...');\n }\n\n return round(1024 ** ($base - floor($base))) . ' ' . $suffixes[(int) floor($base)];\n }", "title": "" }, { "docid": "a5fcb2ba514aac739c3d742e178eca82", "score": "0.59589064", "text": "function Height($size = \"double\"){\n if($this -> handle == false) return false;\n \n switch($size){\n case \"double\":\n $set = kbyte(16);\n break;\n \n default:\n $set = kbyte(0);\n }\n \n return $this -> Append(kbyte(27) . \"!\" . $set);\n }", "title": "" }, { "docid": "d668091e58a09d620dfdb82c868ea074", "score": "0.59469116", "text": "public function set_width($value)\r\n\t{\r\n\t\treturn $this->set_attr('width', $value);\r\n\t}", "title": "" }, { "docid": "bc004b31a8a5ac679d67308b4992926b", "score": "0.59436935", "text": "public function size($value){\r\n $this->option['w:bottom']['@attributes']['w:sz'] = $value;\r\n\t\treturn $this;\r\n }", "title": "" }, { "docid": "a3f359be1484ec137867f827c6b54a9b", "score": "0.5937621", "text": "function setSize($size)\n {\n $this->_size = $size;\n }", "title": "" }, { "docid": "57de895ff4be1fdcff2ec16328404068", "score": "0.5935506", "text": "function niceSize($size) {\n\tdefine(\"SIZESTEP\", 1024.0);\n\tstatic $sizeUnits = Array();\n\tif (count($sizeUnits)==0) {\n\t\t$sizeUnits[] = \"&nbsp;\".translate(\"B\");\n\t\t$sizeUnits[] = translate(\"KB\");\n\t\t$sizeUnits[] = translate(\"MB\");\n\t\t$sizeUnits[] = translate(\"GB\");\n\t\t$sizeUnits[] = translate(\"TB\");\n\t}\n\t\n\tif ($size===\"\")\n\t\treturn \"\";\n\t\n\t$unitIndex = 0;\n\twhile ($size>SIZESTEP) {\n\t\t$size = $size / SIZESTEP;\n\t\t$unitIndex++;\n\t}\n\t\n\tif ($unitIndex==0) {\n\t\treturn number_format($size, 0).\"&nbsp;\".$sizeUnits[$unitIndex];\n\t} else {\n\t\treturn number_format($size, 1, \".\", \",\").\"&nbsp;\".$sizeUnits[$unitIndex];\n\t}\n}", "title": "" }, { "docid": "c0fa621fa8c1cf7d4d39acf336a01357", "score": "0.59342194", "text": "public function getWidthS();", "title": "" }, { "docid": "b678b407ed63619a7bb0f5f33d7bb3e3", "score": "0.5932024", "text": "public function change_font_size()\n {\n $validator = ub_validator::get_instance();\n if ($validator->validate('GET', 'resize', TYPE_STRING, CHECK_INSET, null, array('smaller', 'standard', 'bigger')))\n {\n switch ($this->unibox->session->env->input->resize)\n {\n case 'smaller':\n $this->unibox->session->font_size -= $this->unibox->config->system->font_size_change_value;\n break;\n case 'standard':\n $this->unibox->session->font_size = 0;\n break;\n case 'bigger':\n $this->unibox->session->font_size += $this->unibox->config->system->font_size_change_value;\n break;\n }\n $sql_string = 'UPDATE\n sys_sessions\n SET\n session_font_size = \\''.$this->unibox->session->font_size.'\\'\n WHERE\n session_id = \\''.$this->unibox->session->session_id.'\\'';\n $this->unibox->db->query($sql_string, 'failed to update font-size');\n }\n $this->unibox->redirect();\n }", "title": "" }, { "docid": "877c9b948dee2fd2b974949ed4bf871e", "score": "0.5925804", "text": "public function setSize($size) {\n $this->setData('size', $size);\n }", "title": "" }, { "docid": "6a00e44878a81144974210ca36607ee0", "score": "0.5918217", "text": "public static function formatSize($size)\n {\n if ($size < DRUSH_KILOBYTE) {\n // format_plural() not always available.\n return dt('@count bytes', ['@count' => $size]);\n } else {\n $size = $size / DRUSH_KILOBYTE; // Convert bytes to kilobytes.\n $units = [\n dt('@size KB', []),\n dt('@size MB', []),\n dt('@size GB', []),\n dt('@size TB', []),\n dt('@size PB', []),\n dt('@size EB', []),\n dt('@size ZB', []),\n dt('@size YB', []),\n ];\n foreach ($units as $unit) {\n if (round($size, 2) >= DRUSH_KILOBYTE) {\n $size = $size / DRUSH_KILOBYTE;\n } else {\n break;\n }\n }\n return str_replace('@size', round($size, 2), $unit);\n }\n }", "title": "" }, { "docid": "fec55c6c9cd14f3ecf994c1e09fa1bc3", "score": "0.5908055", "text": "public function get_font_size_control() {\n\n\t\t\t// Variables used in view\n\t\t\t$value = $this->value('font_size');\n\t\t\t$step = 1;//$this->font_properties['font_size_step'];\n\t\t\t$min_range = 10;//$this->font_properties['font_size_min_range'];\n\t\t\t$max_range = 100;//$this->font_properties['font_size_max_range'];\n\t\t\t$default_amount = $this->default['font_size'];\n\t\t\t$default_unit = 'px';//$this->defaults['font_size']['unit'];\n\t\t\t\n\t\t\t$current_amount = isset( $value ) ? $value : $default_amount;\n\t\t\t$current_unit = $default_unit;\n\t\t\t\n\t\t\t// Get control view\n\t\t\t?>\n <label><?php _e( 'Font Size', 'scratch' ); ?>\n\n <input class='sc-font-size-number' type=\"number\" min=\"<?php echo $min_range ?>\"\n max=\"<?php echo $max_range ?>\" step=\"<?php echo $step ?>\" value=\"<?php echo $current_amount ?>\"\n default=\"<?php echo $default_amount ?>\"\n <?php $this->link('font_size') ?>\n />\n px\n\n </label>\n\n <?php\n\t\t}", "title": "" }, { "docid": "5d42c78b0000a0e08bc9b06a983a8cac", "score": "0.5907498", "text": "public function width($value) {\n return $this->setProperty('width', $value);\n }", "title": "" }, { "docid": "5d42c78b0000a0e08bc9b06a983a8cac", "score": "0.5907498", "text": "public function width($value) {\n return $this->setProperty('width', $value);\n }", "title": "" }, { "docid": "5d42c78b0000a0e08bc9b06a983a8cac", "score": "0.5907498", "text": "public function width($value) {\n return $this->setProperty('width', $value);\n }", "title": "" }, { "docid": "5d42c78b0000a0e08bc9b06a983a8cac", "score": "0.5907498", "text": "public function width($value) {\n return $this->setProperty('width', $value);\n }", "title": "" }, { "docid": "5d42c78b0000a0e08bc9b06a983a8cac", "score": "0.5907498", "text": "public function width($value) {\n return $this->setProperty('width', $value);\n }", "title": "" }, { "docid": "5d42c78b0000a0e08bc9b06a983a8cac", "score": "0.5907498", "text": "public function width($value) {\n return $this->setProperty('width', $value);\n }", "title": "" }, { "docid": "5d42c78b0000a0e08bc9b06a983a8cac", "score": "0.5907498", "text": "public function width($value) {\n return $this->setProperty('width', $value);\n }", "title": "" }, { "docid": "599bce5bf59867dfeb4bae0a8f60561c", "score": "0.5890804", "text": "public function set_size($size = 100) {\n\n // Resize\n if ($this->x_input > $size && $this->y_input > $size) {\n\n // Wide\n if ($this->x_input >= $this->y_input) {\n\n $this->x_output = $size;\n $this->y_output = ($this->x_output / $this->x_input) * $this->y_input;\n\n } // Tall\n else {\n\n $this->y_output = $size;\n $this->x_output = ($this->y_output / $this->y_input) * $this->x_input;\n\n }\n\n // Ready\n $this->resize = TRUE;\n\n } // Don't resize\n else { $this->resize = FALSE; }\n\n }", "title": "" }, { "docid": "b51daecdd9e1cd7e55529e3338551f2a", "score": "0.5889309", "text": "public function setWidth($field_width) { \n $this->setAttribute(\"size\", $field_width);\n }", "title": "" }, { "docid": "15d9984350814572e62e06e320a2a46b", "score": "0.58886766", "text": "public function post_thumbnail_size_display_filter( $size ) {\r\n\r\n\t\t\treturn $size;\r\n\t\t}", "title": "" }, { "docid": "53b32f3bfd33eb361ad70ebae65c50a4", "score": "0.5888309", "text": "function convertToReadableSize($size){\n\t$base = log($size) / log(1024);\n\t$suffix = array(\"\", \"Ko\", \"Mo\", \"Go\", \"To\");\n\t$f_base = floor($base);\n\treturn round(pow(1024, $base - floor($base)), 1) . $suffix[$f_base];\n}", "title": "" }, { "docid": "8387003b1f5173e565e13c0f869d5b5f", "score": "0.588349", "text": "function Set_Char_Size(&$pdf,$pt)\r\n\t{\r\n // phpcs:enable\r\n\t\tif ($pt > 3) {\r\n\t\t\t$this->_Char_Size = $pt;\r\n\t\t\t$this->_Line_Height = $this->_Get_Height_Chars($pt);\r\n\t\t\t$pdf->SetFont('','',$pt);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1e25792abe7917d918e63668a5f2b40d", "score": "0.5867264", "text": "function size_str($x) {\n if ($x >= TERA) {\n $y = number_format($x/TERA, 2);\n return \"$y TB\";\n }\n if ($x >= GIGA) {\n $y = number_format($x/GIGA, 2);\n return \"$y GB\";\n }\n if ($x >= MEGA) {\n $y = number_format($x/MEGA, 2);\n return \"$y MB\";\n }\n if ($x >= KILO) {\n $y = number_format($x/KILO, 2);\n return \"$y KB\";\n }\n return \"$x bytes\";\n}", "title": "" }, { "docid": "6cc27b667f9e8c783021aeb8697e7c65", "score": "0.58603275", "text": "public function setFontSize($size) {\n $this->setOptionNumeric(\"fontSize\", $size);\n }", "title": "" }, { "docid": "85b40d191c7b60ef44d251e1ecbdc123", "score": "0.5854173", "text": "public function setSize($size) {\n $this->size = $size;\n }", "title": "" }, { "docid": "ab3e0607c03afd481a2792e493b0be1b", "score": "0.5837921", "text": "function nc_return_size_string($val) \n{\n\tif($val > 1048576)\n\t\t return round(($val/1048576), 2).' MB';\n\tif($val > 1024)\n\t\t return round((integer)($val/1024), 2).' KB';\n\t\n return ($val).' Bytes';\n}", "title": "" }, { "docid": "a01e37fa070ce06bcd5e4e139bca1944", "score": "0.58371556", "text": "function parse_size($size) {\n $unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size.\n $size = preg_replace('/[^0-9\\.]/', '', $size); // Remove the non-numeric characters from the size.\n if ($unit) {\n // Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by.\n return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));\n }\n else {\n return round($size);\n }\n}", "title": "" }, { "docid": "d219c09cb2348c09d05652f06e3c915a", "score": "0.58202684", "text": "function DoSize($bbcode, $action, $name, $default, $params, $content) {\n if ($action == BBCODE_CHECK)\n return true;\n\n $size_css = array(1 => 'kmsgtext-xs', 'kmsgtext-s', 'kmsgtext-m', 'kmsgtext-l', 'kmsgtext-xl', 'kmsgtext-xxl');\n if (isset($size_css [$default])) {\n $size = \"class=\\\"{$size_css [$default]}\\\"\";\n } elseif (!empty($default)) {\n $size = \"style=\\\"font-size:{$default}\\\"\";\n } else {\n $size = \"class=\\\"{$size_css [3]}\\\"\";\n }\n return \"<span {$size}>{$content}</span>\";\n }", "title": "" }, { "docid": "a2f83425c7ae15c93fce0d708e7b53a6", "score": "0.5816794", "text": "function file_size($size)\r\n{\r\n $units = array('b', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb');\r\n\r\n for ($i = 0; $size > 1024; $i++)\r\n $size /= 1024;\r\n\r\n return round($size, 2).' '.$units[$i];\r\n}", "title": "" }, { "docid": "f03f39829dd8b212c72875ac08f8ef8b", "score": "0.5812336", "text": "function getSize($type) {\n\t\t$size = preg_replace('/\\D/',\"\",$type);\n\n\t\treturn $size*1;\n\t}", "title": "" }, { "docid": "793f4c1e8940af79c9d466a02d739e8d", "score": "0.5791565", "text": "public function get_width()\r\n\t{\r\n\t\treturn $this->get_attr('width');\r\n\t}", "title": "" }, { "docid": "fd875b796eaf26bb48fa9bc078b03982", "score": "0.57913244", "text": "function parsebytesize($size,$digits=2,$dir=false) {\n\t$kb=1024; $mb=1024*$kb; $gb=1024*$mb; $tb=1024*$gb;\n\tif (($size==0)&&($dir)) { return \"Empty\"; }\n\telseif ($size<$kb) { return $size.\"Bytes\"; }\n\telseif ($size<$mb) { return round($size/$kb,$digits).\"Kb\"; }\n\telseif ($size<$gb) { return round($size/$mb,$digits).\"Mb\"; }\n\telseif ($size<$tb) { return round($size/$gb,$digits).\"Gb\"; }\n\telse { return round($size/$tb,$digits).\"Tb\"; }\n}", "title": "" }, { "docid": "e8a7795ffd79ef536a8e30f5bb8b24c5", "score": "0.5778702", "text": "public function getSize()\n {\n return $this->size ?: static::DEFAULT_STRING_SIZE;\n }", "title": "" }, { "docid": "6e8efce77aa0a48f3c4884151cfa43a1", "score": "0.57769716", "text": "protected function getVariableStringWidth($string,$use_font_size = false) {\r\n if ($this->direction != -1) {\r\n return $this->font_metrics[$this->direction]->getVariableStringWidth($string,$use_font_size);\r\n } else {\r\n return parent::getVariableStringWidth($string,$use_font_size);\r\n }\r\n }", "title": "" }, { "docid": "dd5c0fb0ce9d52405151d642307b2476", "score": "0.57716066", "text": "public function getWidthSq();", "title": "" }, { "docid": "f03cb59aad95ce6c6df7cad2a0a846a3", "score": "0.5762596", "text": "public function getWidthC();", "title": "" }, { "docid": "0d60e6f2f8d41efa10488ad375390f2b", "score": "0.5755934", "text": "function size($taille,$dim){if(strlen($taille)>$dim){$ref='...';}else{$ref='';}return $ref;}", "title": "" }, { "docid": "56c885e44bcac415dd00cade153b79b1", "score": "0.57499915", "text": "public function getWidthN();", "title": "" }, { "docid": "e6023af769480ea82e7632b6d214b48c", "score": "0.5747558", "text": "function get_size($size)\n{\n if($size/1000000000>=1)\n return number_format($size/1000000000, 2).\"GB\";\n else if($size/1000000>=1)\n return number_format($size/1000000, 2).\"MB\";\n else if($size/1000>=1)\n return number_format($size/1000, 2).\"KB\";\n else\n return $size.\"B\";\n}", "title": "" }, { "docid": "364b0197efeb4bef183c941047119d21", "score": "0.5744392", "text": "public static function fromBytes($size) {\n\t\tif($size < 0) $size = 0;\n\t\tif($size < 1024) return round($size , 0).'&nbsp;Bytes';\n\t\tif($size < 1048576) return round($size / 1024 , 2).'&nbsp;KB';\n\t\tif($size < 1073741824) return round($size / 1048576 , 2).'&nbsp;MB';\n\t\tif($size < 1099511627776) return round($size / 1073741824 , 2).'&nbsp;GB';\n\t\t return round($size / 1099511627776, 2).'&nbsp;TB';\n\t}", "title": "" }, { "docid": "0e154746dc50da53ad4b3bbaffad01ec", "score": "0.5743939", "text": "function setSize($size)\n {\n $this->updateAttributes(array('size' => $size));\n }", "title": "" }, { "docid": "0eb9b47cc04b0aafa3b8d0941b1b15d1", "score": "0.57390034", "text": "public function getCharacterWidth($ch,$use_font_size = false) {\r\n if ($this->direction != -1) {\r\n return $this->font_metrics[$this->direction]->getCharacterWidth($ch,$use_font_size);\r\n } else {\r\n return parent::getCharacterWidth($ch,$use_font_size);\r\n }\r\n }", "title": "" }, { "docid": "9718a42d12aedeafce33b7a3e791b646", "score": "0.5728271", "text": "public function getWidth();", "title": "" }, { "docid": "faf9576f82d96831cf7ea7aae476ee03", "score": "0.57145", "text": "public function size_as_text() {\n\t\tif($this->size < 1024) {\n\t\t\treturn \"{$this->size} bytes\";\n\t\t} elseif($this->size < 1048576) {\n\t\t\t$size_kb = round($this->size/1024);\n\t\t\treturn \"{$size_kb} KB\";\n\t\t} else {\n\t\t\t$size_mb = round($this->size/1048576, 1);\n\t\t\treturn \"{$size_mb} MB\";\n\t\t}\n\t}", "title": "" }, { "docid": "4a0ea2afb32b455e685ba97b91374c8d", "score": "0.57140857", "text": "public function getFontSize () {}", "title": "" }, { "docid": "a4ebb28e36419de9803a1e913446b446", "score": "0.57131207", "text": "public function setSize($size = 32)\n\t{\n\t\t$this->size = (int) $size;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c1c34adb05b1fc282b3b5aabcd19914b", "score": "0.5711718", "text": "public function get_size()\r\n\t{\r\n\t\treturn $this->get_attr('size');\r\n\t}", "title": "" }, { "docid": "d67cdb40222c0f9300738fbf2257bd5e", "score": "0.5710964", "text": "public static function human_readable_size($size) {\n\t\tif($size == 0) {\n\t\t\treturn(\"0 Bytes\");\n\t\t}\n\t\t$filesizename = array(' Bytes', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB');\n\t\treturn round($size/pow(1024, ($i = floor(log($size, 1024)))), 1) . $filesizename[$i];\n\t}", "title": "" }, { "docid": "71c92bb7188f6beb3182b333d249bcbc", "score": "0.57102275", "text": "public function setFontSize($size) {\r\n foreach ($this->directions as $direction) {\r\n $this->font_metrics[$direction]->setFontSize( $size);\r\n } \r\n parent::setFontSize( $size);\r\n }", "title": "" }, { "docid": "3ff47c3d5ba67dcb6f26bec2ec94d122", "score": "0.5707043", "text": "public function getMinimalWidth();", "title": "" }, { "docid": "1b37794a101c94fc7025929e46a7733d", "score": "0.5703246", "text": "function mts_ad_size_value($ad_size = '0') {\n\t$mts_get_ad_size_array = mts_ad_sizes();\n\n\tif ( $mts_get_ad_size_array[$ad_size] != 'Auto' ) {\n\t\t$ad_size_parts = explode(' x ', $mts_get_ad_size_array[$ad_size]);\n\t\t$ad_size = array(\n\t\t\t'ad_width' => $ad_size_parts[0],\n\t\t\t'ad_height' => $ad_size_parts[1],\n\t\t);\n\t\techo 'width:'.$ad_size['ad_width'].'px; height:'.$ad_size['ad_height'].'px;';\n\t}\n}", "title": "" }, { "docid": "1ecba94c8e90b1ab7f0f61ad4f951319", "score": "0.5699336", "text": "public function renderSize()\n {\n $this->setRender(\" size='{$this->component->getSize()}'\");\n return $this;\n }", "title": "" }, { "docid": "48e43433bdf5d888f78836a735262c83", "score": "0.56973743", "text": "public function getWidthO();", "title": "" }, { "docid": "246ed7d7e36e87ce696d0f62120f6811", "score": "0.5694917", "text": "public function getSize(): string\n {\n return $this->model->size;\n }", "title": "" }, { "docid": "37c87054186b348a33857255155b097b", "score": "0.5692258", "text": "function getSize();", "title": "" }, { "docid": "417a626ee7841ae4e76941259dcbc5cb", "score": "0.56862414", "text": "public function getWidthM();", "title": "" }, { "docid": "816868c8aa4dcc31895c77b8356ea033", "score": "0.566908", "text": "public function size($size = null)\n {\n /* To do: function should be called ratio() */\n if (is_null($size)) {\n if (isset($this->size_attribute)) {\n return $this->size_attribute;\n } else {\n return;\n }\n }\n $size = $this->parseSize($size)->raw;\n $this->size_attribute = $size;\n $this->todo('resize');\n\n return $this;\n }", "title": "" }, { "docid": "e5364b0867a5f901b9aacfccb75d8301", "score": "0.5669049", "text": "function setWidth(string $p_width):void\n {\n $this->width=$p_width;\n }", "title": "" }, { "docid": "06753eac66779c9e1b0bd3103a026881", "score": "0.5667293", "text": "function get_file_size($size)\n{\n\n static $units = array('Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');\n if (!$size || $size < 0) {\n return (int)$size . ' ' . $units[0];\n }\n\n return @round($size / pow(1024, ($key = floor(log($size, 1024)))), 2) . ' ' . $units[(int)$key];\n}", "title": "" }, { "docid": "31f27555da09dee060bc46e54d019de5", "score": "0.5664524", "text": "public function niceSize() {\n return f::niceSize($this->size());\n }", "title": "" }, { "docid": "5c40791c2ff8f1ff47a51e7e3d89bca0", "score": "0.56591773", "text": "private function _addSpaces($name, $size) {\n $strlen = strlen($name);\n $spaces = '';\n for($i = $strlen; $i < $size; $i++) {\n $spaces .= ' ';\n }\n return $spaces;\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "700ae1eb76d3e0bcef3c4cd15c66b898", "score": "0.0", "text": "public function __construct() {\n $this->middleware(['permission:read-sellers-app'])->only('index');\n $this->middleware(['permission:create-sellers-app'])->only('accept');\n }", "title": "" } ]
[ { "docid": "e5e7384bd73dca78941fcbd89a202b70", "score": "0.7997081", "text": "public function action_listing() {\n\t\t$this->_content('listing', $this->_instances(), true);\n\t}", "title": "" }, { "docid": "5843220cf684a1a73c04dea06b179c98", "score": "0.77250284", "text": "public function listAction ()\n {\n $module = $this->_request->getModuleName();\n $controller = $this->_request->getControllerName();\n\n $resourceResource = $this->_helper->modelResource('Resources');\n $resources = $resourceResource->fetchAll();\n $this->view->resources = $resources;\n }", "title": "" }, { "docid": "a9bb13ba4c87678e1ac5005171d43f4a", "score": "0.74907076", "text": "public function actionList()\n {\n $this->render('list');\n }", "title": "" }, { "docid": "8d51b677bee6c53da8e98cce79f655aa", "score": "0.7418133", "text": "public function listAction()\n {\n echo Zend_Json::encode($this->_records->queryRecords(\n $this->_request->getParams()\n ));\n }", "title": "" }, { "docid": "6eac2ccd3e0cf5d8296b9c33085d378d", "score": "0.72538555", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$search = $this->getInput(array('name', 'status'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Super_Service_Resource::search($page, $perpage, $search);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t\t$this->cookieParams();\r\n\t}", "title": "" }, { "docid": "3b1a348da533dcb6668082a3467f61de", "score": "0.7189258", "text": "public function actionList()\n {\n $this->restObj->loadModels();\n }", "title": "" }, { "docid": "2cdc01c5b6d9b929fb113d684dccaced", "score": "0.7156122", "text": "public function index()\n {\n $resource = $this->resource->all();\n\n return view('resources', compact('resource'));\n }", "title": "" }, { "docid": "717b72f905cc3eb38c16a04ff9a86ae6", "score": "0.7114549", "text": "public function index()\n {\n // $this->hasAccessOrFail('list');\n $this->setOperation('list');\n if ($this->tienePermiso('list')) {\n $this->data = array();\n $this->data['title'] = $this->getTitle() ?? mb_ucfirst($this->entity_name_plural);\n $this->data['routerAlias'] = $this->getRouterAlias();\n $this->data['contentClass'] = $this->getListContentClass();\n $this->data['heading'] = $this->getHeading() ?? $this->entity_name_plural;\n $this->data['subheading'] = '';\n $this->data['permissionName'] = $this->getPermissionName();\n $this->data['buttons_top'] = $this->getButtons()->where('stack', 'top');\n $this->data['columns'] = $this->getColumns();\n $this->data['columnOrderNum'] = $this->getColumnNumericIndex($this->getDefaultOrderColumn());\n $this->data['columnOrderName'] = $this->getDefaultOrderColumn();\n $this->data['columnOrderDire'] = $this->getDefaultOrderDirection();\n $this->data['filtros'] = $this->getfilters();\n\n // load the view from /resources/views/vendor/Cesi/crud/ if it exists, otherwise load the one in the package\n return view($this->getListView(), $this->data);\n } else {\n return view('cesi::errors.401');\n }\n }", "title": "" }, { "docid": "7246ebaf3415f94d436da4bb642e24a3", "score": "0.70818526", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$search = $this->getInput(array('name', 'status'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Gou_Service_Resource::search($page, $perpage, $search);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t\t$this->cookieParams();\r\n\t}", "title": "" }, { "docid": "7adba616fe1b0a755e693520aac54298", "score": "0.7053882", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $recipes = $em->getRepository('AppBundle:Recipe')->findAllPublic();\n\n return $this->render('recipe/list.html.twig', array(\n 'recipes' => $recipes,\n ));\n }", "title": "" }, { "docid": "3046e5391755ed0249127951b935e880", "score": "0.7045966", "text": "public function indexAction()\n {\n $filterRenderer = $this->getFilterRenderer();\n $listRenderer = $this->getListRenderer();\n\n return $this->container->get('templating')\n ->renderResponse($listRenderer->getTemplate(), array(\n 'renderer' => $listRenderer,\n 'filter' => $filterRenderer,\n 'csrf' => $this->container->get('form.csrf_provider')->generateCsrfToken('list')\n ));\n }", "title": "" }, { "docid": "0c4d22454d91d669f713e248e6cd4363", "score": "0.70392543", "text": "public function listAction()\n {\n\n // get reference to our repository\n // and get array of all DVDs\n $dvdRepository = new DvdRepository();\n $dvds = $dvdRepository->getAllDvds();\n\n // add to args array\n // ------------\n $argsArray = [\n 'dvds' => $dvds\n ];\n\n // render (draw) template\n // ------------\n $templateName = 'list';\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\n }", "title": "" }, { "docid": "a9ac287e901f12c6cd37fe3754d96da7", "score": "0.70273596", "text": "public function index()\n {\n return $this->showAll(PeopleResource::collection(People::get()));\n }", "title": "" }, { "docid": "61981ceb471a82ebd3789f7373c04b9c", "score": "0.7009925", "text": "public function display() {\n $res = NULL;\n $params = $this->request->query;\n if (empty($params) || empty($params['cat'])) {\n $res = $this->getAllListings();\n }\n else {\n $res = $this->getListingsByCategory($params['cat'],\n $params['sort'],\n $params['ascDesc']);\n }\n $this->set(['listings' => $res]);\n }", "title": "" }, { "docid": "9c23597c81f0260d62a430388b719886", "score": "0.6998034", "text": "public function list()\n {\n try {\n\n } catch (\\Exception $e) {\n echo '<pre>';\n print_r($e->getMessage());\n echo '</pre>';\n }\n }", "title": "" }, { "docid": "271af64fc25b41beefcb0ae2bf3d06c1", "score": "0.69789684", "text": "public function index()\n {\n $this->lst();\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "333551ff905b0a0ba61cb4344dc527c5", "score": "0.6954035", "text": "public function index()\n\t{\n\t\t$lines = $this->repository->getPaginate(10);\n\t\t$links = str_replace('/?', '?', $lines->render());\n\n\t\treturn view($this->base.'.list', compact('lines', 'links'));\n\t}", "title": "" }, { "docid": "763c667833a58c0ab1d9b6ed41fcd7f1", "score": "0.6949768", "text": "public function actionList(){\n // input\n $t = Text::getEntityTexts($this->moduleid, $this->entityid);\n \n // process\n \n // output\n Page::setTitle(\"Consulta de \".$t->entity());\n $this->view(\"list\");\n }", "title": "" }, { "docid": "a42d2c3cb23ebb4d90fe085f81abfdf1", "score": "0.694591", "text": "public function indexAction()\n {\n $handler = $this->_createModelHandler();\n\n $url = $this->getRequest()->getRequestUri();\n $params = Rest_Serializer::decode($url, Rest_Serializer::FULL_URL_UNKNOWN);\n\n try {\n $items = $handler->getList($params);\n } catch (Rest_Model_MethodNotAllowedException $e) {\n $this->getResponse()->setHttpResponseCode(405);\n $this->getResponse()->setHeader('Allow', implode(', ', $e->getAllowedMethods()));\n $this->view->data = $e->getMessage();\n return;\n } catch (Rest_Model_BadRequestException $e) {\n $this->getResponse()->setHttpResponseCode(400);\n $this->view->data = $e->getMessage();\n return;\n } catch (Exception $e) {\n $this->getResponse()->setHttpResponseCode(500);\n // should output 500 errors conditional to APP_ENV being dev\n // should log errors no matter what environment\n return;\n }\n\n $this->view->data = $items;\n }", "title": "" }, { "docid": "f39dea430d1832d789b6e49e5d7554be", "score": "0.692712", "text": "public function index()\n {\n $categories = Category::all();\n return $this->resp->ok(eRespCode::CAT_LISTED_200_00, new CategoryResourceCollection($categories));\n }", "title": "" }, { "docid": "8c8ca6b1a9586345fa58fa75152c17eb", "score": "0.6921003", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SETTING\n $this->view->owner_photo = $this->_getParam('owner_photo', 1);\n\n //GET LISTING SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n }", "title": "" }, { "docid": "75c25c496b7bb134be1dfcae86fb4091", "score": "0.6907718", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"List existing templates\", \"Templates\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "ca758c8d004263d55a0ae58a76c94b8e", "score": "0.68839717", "text": "public function listAction()\n {\n $list = Interest::getList();\n\n return $this->render('interest/list', $list);\n }", "title": "" }, { "docid": "5c422eb9c63aaa4755881379e395025b", "score": "0.68358845", "text": "public function index() {\n\t\t\n\t\tif ($this->require_role('admin')) {\n\t\t\t$this->load->model('Resource', 'resource');\n\t\t\t$this->load->helper(array('form', 'url'));\n\t\n\t\t\t$data = array('resources' => $this->resource->all());\n\t\t\t$this->load->template('admin/resources_index', $data);\t\n\t\t}\n\t}", "title": "" }, { "docid": "faf64cfddc139b306817d316d98d7998", "score": "0.68326175", "text": "protected function listing(array $params) {\n\t\t// Check parameters\n\t\t// Get resources\n\t\t// Filter it by key (perms)\n\t\t// Returns the list\n\t}", "title": "" }, { "docid": "d273d165886af297123e8efab8c940d8", "score": "0.6827775", "text": "public function index()\n {\n $items = ItemResource::collection(Item::orderBy('sort_order')->get());\n\n return $this->success($items);\n }", "title": "" }, { "docid": "b868b6f2a3079e57b349fd81d8b7d5bd", "score": "0.6826282", "text": "public function index()\n {\n if (!$this->user->can('view-record')) {\n return $this->unauthorizedResponse([\n 'errors' => ['Ora entuk ndes']\n ]);\n }\n\n $records = Record::paginate();\n return $this->okResponse([\n 'data' => new RecordTableResourceCollection($records) \n ]);\n }", "title": "" }, { "docid": "5856416953feca05c4cf552b6d0d19f9", "score": "0.6806458", "text": "public function index()\n {\n // return all statuses as a resource ordered by status\n $statuses = Status::orderBy('status', 'asc')->get();\n\n // Return the statuses as a resource\n return StatusResource::collection($statuses);\n }", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "2d1d458b52819df5fe6e27c7992f0ddc", "score": "0.6779744", "text": "public function index()\n {\n $listings = Listing::latest()->paginate(20);\n return view('backend.listing.index', compact('listings'));\n }", "title": "" }, { "docid": "4c6b319e397c45d649f8fe5ba2a7bd53", "score": "0.67744184", "text": "public function index()\n {\n $model = $this->resourceModel;\n return $model::all();\n }", "title": "" }, { "docid": "b748eaa207eeee72d7887a0fc25dca4a", "score": "0.67608345", "text": "public function index() {\n\n $limit = Input::get('limit') ? : 10;\n $fullItemsBase = FullItemsBase::paginate($limit);\n return $this->respondWithPagination($fullItemsBase, $this->fullItemsBaseTransformer->transformCollection($fullItemsBase->items()));\n\n }", "title": "" }, { "docid": "aa645d4232fad0744f3db157558e1606", "score": "0.67556214", "text": "public function index()\n\t{\n\t\t\n\t\t$kiosk = Request::input('kiosk');\n\n\t\t$q = Request::input('query');\n\n\t\t$listings = Listing::search($q)\n\t\t\t->forKiosk($kiosk)\n\t\t\t->orderBy('lastName')\n\t\t\t->orderBy('company')\n\t\t\t->get([\n\t\t\t\t'listings.id',\n\t\t\t\t'firstName',\n\t\t\t\t'lastName',\n\t\t\t\t'company',\n\t\t\t\t'title',\n\t\t\t\t'listings.location',\n\t\t\t\t'address',\n\t\t\t\t'email',\n\t\t\t\t'phone',\n\t\t\t\t'description',\n\t\t\t\t'listings.image',\n\t\t\t\t'maps.image as map'\n\t\t\t]);\n\n\n\t\treturn ['listings'=>$listings];\n\t}", "title": "" }, { "docid": "5656a3bc0d701acc424777c84b33b509", "score": "0.6750781", "text": "public function index()\n {\n // If there is an Ajax request or any request wants json data\n if (request()->ajax() || request()->wantsJson()) {\n\n $sort = request()->has('sort')?request()->get('sort'):'name';\n $order = request()->has('order')?request()->get('order'):'asc';\n $search = request()->has('searchQuery')?request()->get('searchQuery'):'';\n $paginate = request()->get('paginate', 'on');\n\n list($data, $paginator) = $this->entityService->getResults($sort, $order, $search, $paginate);\n\n if (empty($data)) {\n return response([\n 'status_code' => 404,\n // 'message' => trans($this->getNotFoundKey())\n ], 404);\n }\n\n $data = $this->entityTransformer->transformCollection($data);\n\n return response([\n 'data' => $data,\n 'paginator' => $paginator,\n 'status_code' => 200\n ], 200);\n }\n\n return $this->entityList->view();\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "fcdd2b18e7fdb84a081f8b4808c3dd87", "score": "0.67329895", "text": "public function index() {\n $this->listar();\n }", "title": "" }, { "docid": "de6abddc6ff8899fbf9d928f85487ba7", "score": "0.6730043", "text": "public function index()\n {\n\n return PersonResource::collection(Person::latest()->paginate(10));\n\n }", "title": "" }, { "docid": "01a0ecf1244ed50cd57b8fc36e7c90c6", "score": "0.67276037", "text": "public function showEntries ()\r\n {\r\n $sampleDocument = [];\r\n $results = $this->doQuery();\r\n\r\n // extract document keys to use them in query autocompletion\r\n if (isset($results[0])) {\r\n $sampleDocument = json_decode($results[0][\"document\"], true);\r\n }\r\n\r\n return $this->render(\"collection/home.html.twig\", [\r\n \"results\" => $results['results'],\r\n \"pagination\" => $results['pagination'],\r\n \"db\" => $_REQUEST[\"db\"],\r\n \"collection\" => $_REQUEST[\"collection\"],\r\n \"autocompleteFields\" => array_keys($sampleDocument)\r\n ]);\r\n }", "title": "" }, { "docid": "d8665c5666597c18e5362e0a4d89c431", "score": "0.67268443", "text": "public function index()\n {\n //only allow get requests to this endpoint\n $this->request->allowMethod('get');\n\n //fetch user id of the logged in user\n $user_id = $this->Authentication->getIdentity()['id'];\n\n //query the database\n $lists = $this->TodoLists->find()->where(['user_id'=>$user_id])->toArray();\n\n if (count($lists) === 0) {\n return $this->respond(400, [], 'No lists in the database');\n }\n\n return $this->respond(200, $lists, 'Lists fetched from the database');\n }", "title": "" }, { "docid": "c47747da41037cffb7ca6030eb0269ad", "score": "0.6714673", "text": "public function listAll()\n {\n echo view('{name}/listAll', [\n 'rows' => $this->model->paginate(20),\n ]);\n }", "title": "" }, { "docid": "f9f637b83ec4dd52acd76b5a1b723b01", "score": "0.6714468", "text": "public function index()\n\t{\n\t\t$resources = Resource::with('user')->get();\n\t\treturn View::make('resources.index')->with('resources', $resources);\n\t}", "title": "" }, { "docid": "b3f65d348a322a4797182798d5dd2389", "score": "0.6711745", "text": "public function action_list()\n\t{\n\t\t// Load the contest id\n\t\t$contest_id = $this->request->param('contest_id');\n\n\t\t// Load the contest model\n\t\t$contest = new Model_Photo_Contest($contest_id);\n\n\t\t// Load the active contest if the ID is not set\n\t\tif ($contest_id === NULL)\n\t\t{\n\t\t\t$contest->get_active();\n\t\t}\n\n\t\t// You can only see the list if the contest has started\n\t\tif ($contest->id === NULL)\n\t\t{\n\t\t\tdie('Sorry you can\\'t view this listing yet');\n\t\t}\n\n\t\t// Lets build the filters\n\t\t$query = $this->request->query();\n\t\t$filters = array(\n\t\t\t'amount' \t=> Arr::get($query, 'amount', 9),\n\t\t\t'order_by' \t=> Arr::get($query, 'order_by', 'last_vote'),\n\t\t\t'page' \t\t=> Arr::get($query, 'page', 1),\n\t\t);\n\n\t\t// Let the view build the list\n\t\t$content = new View_Photo_Contest_List($contest, $this->auth, $filters);\n\t\t$this->_build_layout($content, $contest, array('top'));\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "6a2ce4bfb9032f960818fea7d1c1fd2f", "score": "0.6711654", "text": "function view()\n\t{\n\t\t$model\t=& $this->getModel( 'List' );\n\t\t$view =& $this->getView( 'List' );\n\t\t$view->setModel( $model, true );\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "2e4e6ad1b566258d4381885b7225442d", "score": "0.66980463", "text": "public function index()\n {\n //\n $resources = Resource::all();\n return response([\n 'status' => true,\n 'resources' => $resources,\n ]);\n }", "title": "" }, { "docid": "a32ed162bac5feffa4d0d4d75f031e5f", "score": "0.66931826", "text": "public function index()\n {\n //\n\t\t$comp = Entity::paginate(10);\n\t\treturn view('entity.list')->with('user', $comp);\n }", "title": "" }, { "docid": "7a9f78e0d04bc17991354eb2a8289b5e", "score": "0.66906714", "text": "function listing(){\n\t\t// la variable $listado guarda el resultado de la funcion GetPersons\n\t\t//para luego ser enviada a la vista en el objeto _listado\n\t\t\t\t$listado = $this->_person->getPersons();\n\t\t\t\t$this->_view->_listado = $listado;\n\t\t\t\t\n\t\t\t\t$this->_view->render('listing', 'persons', '',$this->_sidebar_menu);\n\t\t\t}", "title": "" }, { "docid": "2734f9c5798c709c85e88386fda37702", "score": "0.66896355", "text": "public function index()\n {\n $students = Student::paginate(15);\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "484df5509ac351a459c94ed96dad9631", "score": "0.6678784", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Cod_Service_Type::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\r\n\t}", "title": "" }, { "docid": "232eafda3e687831892df1684534abd5", "score": "0.66763496", "text": "public function index()\n {\n // Get products\n $products = Product::paginate(3);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "e6c8741b5d134655b9c2b8dd778cefb8", "score": "0.66754305", "text": "function index()\n {\n // a main page yet ;-).\n $this->listings();\n }", "title": "" }, { "docid": "0fca76630447c6e294fc2e600086d38d", "score": "0.66752857", "text": "public function indexAction()\n\t{\n\t\t$albums = Album::find();\n\n\t\t// send data to the view\n\t\t$this->view->albums = $albums;\n\n\t\t$this->view->setLayout('list');\n\t}", "title": "" }, { "docid": "65070a2f2a7d54a05f7733a8e04446da", "score": "0.6657747", "text": "public function index() {\n\n $limit = Input::get('limit') ? : 10;\n $itemsBase = Item::paginate($limit);\n return $this->respondWithPagination($itemsBase, $this->itemTransformer->transformCollection($itemsBase->items()));\n\n }", "title": "" }, { "docid": "c7007e2c86edf572b2e16d9880bffb0d", "score": "0.6656419", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_permission->get_all();\n\t\t$this->template->set('title', 'Permission List');\n\t\t$this->template->load('template', 'contents', 'permission/list', $data);\n\t}", "title": "" }, { "docid": "f4d17451160e0b6de7ae955b505d6c54", "score": "0.6638445", "text": "public function list() {\n\n\t}", "title": "" }, { "docid": "518e90338c030a6d81f610434bd500ce", "score": "0.663422", "text": "public function list()\n {\n \n }", "title": "" }, { "docid": "5e41c828cebc4cc13f7309e5c05c4bc4", "score": "0.66317695", "text": "public function index()\n {\n //\n\n $listings = Listing::all();\n\n return view('admin.listing.index', compact('listings'));\n\n }", "title": "" }, { "docid": "a0c0872e537528aa097056ee2809bd73", "score": "0.662889", "text": "public function index()\n {\n return $this->responseCollection(['title' => 'Đây là resource collection']);\n }", "title": "" }, { "docid": "c0b97bdef674a1363cd928a5e28e2df1", "score": "0.66180605", "text": "public function index()\n {\n $items = $this->itemSrv->findAll();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "5a2c942ef5f8bfbf353721a34ccb1db0", "score": "0.6603064", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t$params = $this->getInput(array('rid', 'imei'));\n\t\t$search = array();\n\t\tif ($params['rid']) $search['rid'] = $params['rid'];\n\t\tif ($params['imei']) $search['imei'] = $params['imei'];\n\t\t\n\t\tlist($total, $rids) = Gou_Service_Rid::getList($page, $perpage, $search);\n\t\t$this->assign('rids', $rids);\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $this->perpage, $url));\n\t\t$this->assign('search', $search);\n\t}", "title": "" }, { "docid": "d118079baa11c6896210752de43f466a", "score": "0.6598392", "text": "public function actionIndex()\n {\n $cars = Car::getAll(5);\n\n return $this->render('index', [\n\t 'cars' => $cars['cars'],\n\t 'pagination' => $cars['pagination'],\n ]);\n }", "title": "" }, { "docid": "7b0362011beee277adca7fa19bb6e265", "score": "0.6589539", "text": "public function listAction() {\n\t\t$this->view->role = Auth_Info::getUser ()->user_type;\n\t\tLog::infoLog ( 'method=' . __FUNCTION__ . ';user_id=' . Auth_Info::getUser ()->user_id . ';control_number' . ';Start action' );\n\t\t\n\t\t$page = null;\n\t\t// Doan nay phan biet POST voi GET\n\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t// Trong nay danh cho thu tuc post\n\t\t} else {\n\t\t\t// Trong nay danh cho thu tuc get\n\t\t\t\n\t\t\t// Lay ra danh sach account\n\t\t\t$select = TTestings::getInstance ()->getTestList ();\n\t\t\t$this->view->paginator = Zynas_Paginator::factoryWithOptions ( $select, $page, $this->view );\n\t\t\t// Lay ra danh sach chi tiet\n\t\t\t$select1 = TTestingdetails::getInstance ()->getListDetail ();\n\t\t\t$this->view->paginator1 = Zynas_Paginator::factoryWithOptions ( $select1, $page, $this->view );\n\t\t}\n\t\tLog::infoLog ( 'method=' . __FUNCTION__ . ';user_id=' . Auth_Info::getUser ()->user_id . ';control_number' . ';End action' );\n\t}", "title": "" }, { "docid": "58397a3ae7d676f27e069b6cd638cb54", "score": "0.65887684", "text": "public function index()\n {\n $products = Product::paginate(15);\n return ProductResource::collection($products);\n //\n }", "title": "" }, { "docid": "d387ade88ed7ada9aa0979d5a0c09bee", "score": "0.6585575", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate());\n }", "title": "" }, { "docid": "cf63b2e262afbf8c41ea8735174a1c1f", "score": "0.65836424", "text": "public function index()\n {\n $links = Link::all();\n return $this->showAll($links);\n }", "title": "" }, { "docid": "3d9f02ab227264eab59e37e914140bf1", "score": "0.65828973", "text": "public function index()\n {\n\n $perPage = Input::has('entries') ? Input::get('entries') : 10;\n if (Input::has('searchText'))\n return $this->respository->paginateSearch($perPage, Input::get('sort'), Input::get('searchText'));\n return $this->respository->paginate($perPage, Input::get('sort'));\n }", "title": "" }, { "docid": "1d851e06286b1c4304d70235a04c9b12", "score": "0.6582138", "text": "public function index()\n {\n\n $this->repository->skipPresenter();\n\n $perPage = request()->has('per_page') ? (int) request()->per_page : 5;\n\n if (request()->has('sort')) {\n list($sortCol, $sortDir) = explode('|', request()->sort);\n $catalogos = $this->repository->with('items')->orderBy($sortCol, $sortDir)->paginate($perPage);\n } else {\n $catalogos = $this->repository->with('items')->orderBy('id', 'asc')->paginate($perPage);\n }\n\n \n return response()->json($catalogos);\n }", "title": "" }, { "docid": "414d41e0df5b50d2fc08d8b1ff7cd984", "score": "0.65818864", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\tif ($page < 1) $page = 1;\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Resource_Service_Attribute::getList(1, $this->perpage,array('at_type'=>1,'status'=>1), array('sort'=>'DESC'));\n\t\t\r\n\t\t$this->cookieParams();\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\r\n\t}", "title": "" }, { "docid": "083677cf7d4c4336b6764e1c2e471e53", "score": "0.6575686", "text": "public function index()\n {\n return success($this->service->getList());\n }", "title": "" }, { "docid": "02f1b268574a4e41b19c995fbc856de6", "score": "0.6574009", "text": "public function index()\n {\n $items=Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "e99878c1a0eff5bcf7bf12ed5c8ef9d5", "score": "0.65716714", "text": "public function show()\n {\n return view('listing::show');\n }", "title": "" }, { "docid": "7b5e2b301434be8bca6abbff68773c36", "score": "0.6567384", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(10));\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "46f84c15b7beced16b95caa4f1ddc7b9", "score": "0.65611297", "text": "public function listing() {\n //show a list of games\n \n //prepare a collection of all games\n $this->games = new boardgameCollection();\n //pass this to the view\n View::setTemplate('gamelisting');\n }", "title": "" }, { "docid": "ae1d3b1986302fafef3e4fcf2486c80a", "score": "0.655366", "text": "public function index()\n {\n AnonymousResourceCollection::wrap('list');// 资源列表默认返回 data 更换为 list\n\n $lists = QueryBuilder::for(ElectricChargeLog::class)\n ->defaultSort('-created_at')\n ->where('user_id', '=', auth('api')->id())\n ->paginate();\n\n return ElectricChargeLogResource::collection($lists);\n }", "title": "" }, { "docid": "2bf1a2bd26f0394c521a6010c1bf0f05", "score": "0.6550969", "text": "public function listAction()\n {\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n $this->view->page_id = $page_id = $this->_getParam('page_id');\n\n //GET PROJECT ITEM\n $this->view->sitepage = $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n\n //IF THERE IS NO PAGE.\n if (empty($sitepage)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n Engine_Api::_()->core()->setSubject($sitepage);\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n $this->view->initiatives = $outcomes = Engine_Api::_()->getDbtable('initiatives', 'sitepage')->getAllInitiativesByPageId($page_id);\n\n }", "title": "" }, { "docid": "b07dc2d3e33f03e6da772e77e05f7172", "score": "0.654454", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\t\t\n\t\t$params = $this->getInput(array('id', 'name'));\n\t\t\n\t\t$search = array();\n\t\tif ($params['id']) $search['id'] = $params['id'];\n\t\tif($params['name']) $search['name'] = array('LIKE', trim($params['name']));\n\t\t\n\t list($total, $suppliers) = Gou_Service_Url::getList($page, $perpage, $search);\n\t\t$this->assign('suppliers', $suppliers);\n\t\t$this->assign('search', $search);\n\t\t$this->cookieParams();\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($params) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t}", "title": "" }, { "docid": "dc0dfaf548f5417e5fb8ca63e88f4bab", "score": "0.65415925", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Devices'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['client_id', 'client_id DESC', 'IP', 'IP DESC', 'lastActive', 'lastActive DESC', 'name', 'name DESC', 'status', 'status DESC', 'type', 'type DESC']) ? $value : null;\n });\n\n // Check if limit to client's devices\n if ($client = $this->request->getQuery('client', 'int', null, true)) {\n $data = Devices::find(['client_id = :client:', 'order' => $this->request->getQuery('order', 'in_array', 'id', true), 'bind' => ['client' => $client]]);\n } else {\n $data = Devices::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]);\n }\n\n // Get devices and prepare pagination\n $paginator = new Paginator([\n \"data\" => $data,\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "8ea0483fd142809c831c55dd4d54c8bc", "score": "0.6534711", "text": "public function index()\n {\n return response(Entry::getAll(), 200);\n }", "title": "" }, { "docid": "e58e46ad70cfe2abf6e6334edfcf4d33", "score": "0.653384", "text": "public function index()\n {\n return ProductResource::collection($this->model->all());\n }", "title": "" }, { "docid": "c53e5e5723ef0824b3deac61a33dcd59", "score": "0.653131", "text": "public function list()\n {\n $tickets = $this->getRepo()->all();\n $this->render('tickets.php', ['tickets' => $tickets]);\n }", "title": "" }, { "docid": "48a441e4246d6b8497f81c71044cc07c", "score": "0.6530572", "text": "public function listing()\n {\n return true;\n }", "title": "" }, { "docid": "f13e9e33ef11f1b3cc6bbc86c6cf452b", "score": "0.65302867", "text": "public function index()\n\t{\n\t\t$resources = Resource::select(\n\t\t\tarray(\n\t\t\t'resources.id',\n\t\t\t'resources.name',\n\t\t\t'resources.description',\n\t\t\t'resources.thumb',\n\t\t\t'resources.url',\n\t\t\t'resources.type'\n\t\t\t)\n\t\t)->limit(999)->get();\n\n\t\t// Derive the hover thumbnail image and add it to the object\n\t\tforeach ($resources as &$resource) {\n\t\t\t$resource->hover = str_replace('th.jpg', 'hv.jpg', $resource->thumb);\n\t\t}\n\n\t\t// Make sure we have an even number of entries, which is a factor of 3\n\t\t$count = $resources->count();\n\t\t$count = (($count % 2) !== 0) ? ($count + 1): $count;\n\n\t\t$first = null;\n\t\t$useImage = 0;\n\t\twhile (($count % 3) !== 0) {\n\t\t\t$use = clone($resources->get($useImage));\n\t\t\t$use['id'] = (9999 + $useImage);\t\t// Dummy unique id\n\t\t\t$resources = $resources->merge([$use]);\n\t\t\t$count = $resources->count();\n\t\t\t$useImage++;\n\t\t}\n\n\t\treturn view('pages.home', compact('resources'));\n\t}", "title": "" }, { "docid": "f36768242b82968fc5b2a672bf3b5d40", "score": "0.65284115", "text": "public function index()\n {\n // Get books or resources\n $booksOrResources = BookOrResource::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return BookOrResourceResource::collection($booksOrResources);\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "134e2581f1e75a4912a1c302ac7bdb43", "score": "0.6523618", "text": "public function index()\n {\n $contacts = Contact::forUser(Auth::user())->orderByDesc('id')->paginate(20);\n\n return ContactListResource::collection($contacts);\n }", "title": "" }, { "docid": "ba54d9aa7546c8835b3a3ea61bb72cf7", "score": "0.6519067", "text": "public function listAction(){\r\n\r\n $filter = $this->Request()->getParam('filter', null);\r\n $sort = $this->Request()->getParam('sort', null);\r\n $page = $this->Request()->getParam('page', 1);\r\n $start = $this->Request()->getParam('start', 0);\r\n $limit = $this->Request()->getParam('limit', 20);\r\n if (empty($sort)) {\r\n $sort = array(array('property' => 'o.offerTime', 'direction' => 'DESC'));\r\n } else {\r\n $sort[0]['property'] = 'o.' . $sort[0]['property'];\r\n }\r\n $repository = Shopware()->Models()->getRepository('Shopware\\CustomModels\\Offer\\Offer');\r\n $builder = $repository->getListQuery($filter, $sort);\r\n\r\n $builder = $builder->setFirstResult($start)\r\n ->setMaxResults($limit);\r\n\r\n $query = $builder->getQuery();\r\n $query->setHydrationMode(\\Doctrine\\ORM\\Query::HYDRATE_ARRAY);\r\n\r\n $paginator = $this->getModelManager()->createPaginator($query);\r\n $total = $paginator->count();\r\n\r\n $data = $paginator->getIterator()->getArrayCopy();\r\n if(!empty($data)) {\r\n $offers = $this->processOffersData($data, false);\r\n }\r\n\r\n // sends the out put to the view of the HBox\r\n $this->View()->assign(array(\r\n 'success' => true,\r\n 'data' => $offers,\r\n 'total' => $total\r\n ));\r\n }", "title": "" }, { "docid": "dd68c5aaf62bba59eb1c118ba9877062", "score": "0.65172595", "text": "public function index()\n {\n $this->authorize('items', 'index');\n $data = $this->service->index();\n return $this->successResponse($data);\n }", "title": "" }, { "docid": "319e68416f72b5d4be9e16bfd153c873", "score": "0.6512332", "text": "public function index()\n {\n //get staff\n $staff = StaffModel::paginate(10);\n\n return StaffResource::collection($staff);\n }", "title": "" }, { "docid": "0128f4addd68bf96770aa31441d1e085", "score": "0.65060353", "text": "public function index()\n {\n //\n //return Artista::all();\n return ArtistaResource::collection(Artista::all());\n }", "title": "" }, { "docid": "2028e84eeee5da547d802b37530d47f0", "score": "0.650491", "text": "public function show()\n {\n return $this->service->getAll();\n }", "title": "" }, { "docid": "e1ee96a401d87220945c1c91f862da36", "score": "0.6501406", "text": "public function index()\n {\n $mall = Mall::orderBy('id', 'DESC')->get();\n return MallResource::collection($mall);\n }", "title": "" }, { "docid": "3373e9d4bf0613737bfacd0d8bf0cbaf", "score": "0.65009093", "text": "public function index()\n {\n $this->indexPage('list-category', 'List Category');\n }", "title": "" }, { "docid": "cda757802b45272ab522944beaaf5df2", "score": "0.6493003", "text": "public function index()\n {\n if(request('reload'))\n $articles = Article::orderBy('created_at', 'desc')->paginate(3);\n else\n $articles = Article::all()->sortByDesc('id');\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "552960c1c38f29b1dc303b574b3afc2c", "score": "0.6492177", "text": "public function indexAction() {\n //do some sanity checking\n $error = array();\n $id_User = Default_Model_Auth::getUserId();\n\n try {\n $allitems = $this->RESTModel->gets($id_User);\n } catch( Exception $exc ) {\n $error['code'] = 400;\n $error['message'] = $exc->getMessage();\n }\n\n if( count($error) > 0 )\n $this->getResponse()\n ->setBody($error['message'])\n ->setHttpResponseCode($error['code']);\n else\n $this->getResponse()\n ->setBody(json_encode($allitems))\n ->setHttpResponseCode(200);\n\n }", "title": "" }, { "docid": "26b752dd4fadfe9ae139146b6a14ba4f", "score": "0.6483919", "text": "public function listAction() {\n $this->_template = 'ItemsList';\n Route::factory()->setAction('list');\n // Filter parameters to array if need\n Filter::setFilterParameters();\n // Set filter elements sortable\n Filter::setSortElements();\n $page = !(int) Route::param('page') ? 1 : (int) Route::param('page');\n // Check for existance\n $group = DB::select()->from('catalog_tree')->where('alias', '=', Route::param('alias'))->where('status', '=', 1)->as_object()->execute()->current();\n if( !$group ) { return Config::error(); }\n // Seo\n $this->setSeoForGroup($group);\n // Add plus one to views\n DB::update('catalog_tree')->set(array('views' => (int) $group->views + 1))->where('id', '=', $group->id)->execute();\n // Get items list\n $result = Filter::getFilteredItemsList($this->limit, ($page - 1) * $this->limit, $this->sort, $this->type);\n // Generate filter add for sql queries\n $add = Filter::getSql();\n // Count of parent groups\n $count = DB::query(Database::SELECT, 'SELECT COUNT(DISTINCT catalog.id) AS count FROM catalog '.$add['join'].'WHERE catalog.parent_id = \"'.$group->id.'\" AND catalog.status = \"1\"'.$add['where'])->as_object()->execute()->current();\n if ($count) {\n $count = $count->count;\n } else {\n $count = 0;\n }\n // Generate pagination\n $pager = Pager::factory($page, $count, $this->limit)->create();\n // Render page\n $this->_content = View::tpl( array('result' => $result, 'pager' => $pager), 'Catalog/ItemsList' );\n }", "title": "" }, { "docid": "9e1f5a874e1a782bad9b3af042809146", "score": "0.64805275", "text": "public function index()\n {\n //Show listings\n $listings = Listing::orderBy('created_at', 'desc')->get();\n return view('listings.index')->with('listings', $listings);\n }", "title": "" }, { "docid": "1093dccb5201e51e58ffed50dfe8aa7c", "score": "0.6477544", "text": "public function index()\n {\n $aventura = Aventura::latest()->paginate(10);\n return AventuraResource::collection($aventura);\n }", "title": "" }, { "docid": "fd2bf2ef206a7df828f6b8610a41b3a4", "score": "0.64756256", "text": "public function index()\n {\n // Get brands\n $brand = Brand::all();\n\n // Return collection of brands as resource\n return BrandResource::collection($brand);\n }", "title": "" } ]
a4512ce19222b578452277f3cc71acd5
Created by PhpStorm. User: admin Date: 28/05/14 Time: 5:28 PM encapsulate connection stuff in a function. // When called this function returns a reference // to a PDO Database connection object.
[ { "docid": "46ef8c254a9c42fa42c9262acf81c4da", "score": "0.719462", "text": "function getConnection(){ // Connection details\n\n\n\t/**\n PLEASE DONT CHANGE THIS VALUES, THEY SHOULD BE COMMENTED, NOT CHANGED.\n \n //SERVER HOST\n // $dbhost = \"localhost\";\n //$dbName = \"eConference\";\n //$dbUser = \"eConference_user\";\n //$dbpass = \"UewSLJMV3r%m\";\n\t*/\n\t// LOCALHOST\n //$dbhost=\"127.0.0.1\";\n $dbhost=\"localhost\";\n\t$dbUser=\"dstc\";\n\t$dbpass=\"Traumacare2014\";\n\t$dbName=\"dstcapp\";\n\n\n\n //$dbh = new PDO(\"mysql:host=$dbhost;dbname=$dbName\",$dbUser,$dbpass);\n //$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return new PDO(\"mysql:host=$dbhost;dbname=$dbName;charset=utf8\", $dbUser, $dbpass, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n\n}", "title": "" } ]
[ { "docid": "7f2ac154f743ec026dc07474c7c0cd44", "score": "0.7859319", "text": "function get_db_connection(){\r\n\r\n\tglobal $db_host, $db_name, $db_user, $db_pass, $db_charset;\r\n\r\n\t$dsn = \"mysql:host=$db_host;dbname=$db_name;charset=$db_charset\"; // siehe https://en.wikipedia.org/wiki/Data_source_name\r\n\t$options = [\r\n\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n\t\tPDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n\t\tPDO::ATTR_EMULATE_PREPARES => false\r\n\t];\r\n\ttry {\r\n\t\t$db = new PDO($dsn, $db_user, $db_pass, $options);\r\n\t} catch (\\PDOException $e) {\r\n\t\tthrow new \\PDOException($e->getMessage(), (int)$e->getCode());\r\n\t}\r\n\treturn $db;\r\n}", "title": "" }, { "docid": "52e4d757ab092b1b36f5043d4473cc3f", "score": "0.7800408", "text": "function connect()\n{\n\n try\n {\n //instantiate a database object\n $dbh = new PDO(DB_DSN, DB_USERNAME,\n DB_PASSWORD);\n return $dbh;\n\n } catch (PDOException $e)\n {\n echo $e->getMessage();\n return;\n }\n}", "title": "" }, { "docid": "6a339bffc17fea694ddd04c1a5495e5d", "score": "0.7784999", "text": "protected function connection() {\n\n\t\ttry {\n\n\t\t\t$this->dbConnection = new \\PDO(\\Settings::$DB_CONNECTION, \\Settings::$DB_USERNAME, \\Settings::$DB_PASSWORD,\n\t\t\t\t array(\\PDO::ATTR_EMULATE_PREPARES => false, \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION));\n\n\t\t\treturn $this->dbConnection;\t\n\n\t\t} catch (PDOException $e) {\n\n\t\t\techo $e->getMessage();\n\t\t}\t\n\t}", "title": "" }, { "docid": "2b8ec1613b405af27e1bc2c217c156e5", "score": "0.7763413", "text": "function get_pdo_connection() {\n\tglobal $dbhost, $dbname, $dbuser, $dbpass;\n\treturn new PDO( \"mysql:dbname=$dbname;host=$dbhost;charset=utf8\", $dbuser, $dbpass );\n}", "title": "" }, { "docid": "ff6bd15e834e9baeaf8d6c0195108304", "score": "0.7753526", "text": "function get_connection()\n{\n $dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME;\n\n // attempt to create a connection to the database\n try {\n $connection = new \\PDO($dsn, DB_USER, DB_PASS);\n } catch (\\PDOException $e) {\n // deal with connection error\n print 'there was an ERROR trying to connect to the database…';\n }\n\n return $connection;\n\n}", "title": "" }, { "docid": "535d5d75b1af44da276bc64a6487ca72", "score": "0.7750528", "text": "function dbPdoConnect() {\n\tglobal $DB_ADDRESS, $DB_USERNAME, $DB_PASSWORD, $DB_NAME, $DB_PORT;\n\t$pdo = new PDO(\"mysql:host=$DB_ADDRESS;port=$DB_PORT;dbname=$DB_NAME\", $DB_USERNAME, $DB_PASSWORD);\n\t$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\treturn $pdo;\n}", "title": "" }, { "docid": "b9fde5ce0b4c4807381fa93a592f19b1", "score": "0.77395123", "text": "public function dbConnect()\n\t{\n\t\trequire_once(PDO);\t\t\t\t\t\t\t\t\t#including CXPDO class\n\t\trequire_once(PDO_CONFIG);\t\t\t\t\t\t\t#Requiring configuration array for PDO \n\t\t\n\t\t$db = dbclass::instance($config);\t\t\t\t\t#calling static instance() method of dbclass \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#which returns connection object\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\treturn $db; \t\t\t\t\t\t\t\t\t\t#returning connection object\t\n\t}", "title": "" }, { "docid": "f998ded18b1006ae0ee878f70412816b", "score": "0.7661995", "text": "function db_connect() {\n\n try {\n // try to open database connection using constants set in config.php\n // return $pdo;\n $connectionString = 'mysql:host='.DBHOST.';dbname='.DBNAME;\n $pdo = new PDO($connectionString, DBUSER, DBPASS);\n return $pdo;\n }\n\n catch (PDOException $e)\n {\n die($e->getMessage());\n }\n\n}", "title": "" }, { "docid": "a753fa12260c2922cb2222b3fa1feada", "score": "0.76213586", "text": "public function connection()\r\n {\r\n try {\r\n\r\n $connectionStrign = DB_TYPE . \":host=\" . DB_HOST . \";dbname=\" . DB_NAME . \";\";\r\n self::$connection = new PDO($connectionStrign, DB_USER, DB_PASS);\r\n\r\n return self::$connection;\r\n } catch (PDOException $e) {\r\n die($e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "b5b4eb0608015108cba64da0727df51d", "score": "0.7602559", "text": "public function getConnection(){\n\n $this->conn = null;\n\n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n\n return $this->conn;\n\n }", "title": "" }, { "docid": "832ab47b28dc4927a48e5314fa994ed3", "score": "0.7600991", "text": "function openConnection()\n{\n $dbhost = \"localhost\";\n $dbuser = \"root\";\n $dbpass = \"\";\n $db = \"becode\";\n\n// Try to understand what happens here\n\n return new PDO('mysql:host=' . $dbhost . ';dbname=' . $db , $dbuser , $dbpass);\n \n}", "title": "" }, { "docid": "21a82f19e297d1e5c3c890e78219b577", "score": "0.75864303", "text": "function getConnection(){\n\t$dbhost=\"127.0.0.1\";//localhost\n\t$dbuser=\"root\";\n\t$dbpass=\"1234\";\n\t$dbname=\"dotheg_db\";\n\t$dbh = new PDO(\"mysql:host=$dbhost;dbname=$dbname\", $dbuser, $dbpass);\n\t$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\treturn $dbh;//when you close database connection, you should set $dbh = null\n}", "title": "" }, { "docid": "5248523b7f1afe448404d135299ea79f", "score": "0.75858086", "text": "function getConnection(){\n\t\ttry{\n\t\t\t$dbh = new PDO(\"mysql:host=\" . $this->host.\";dbname=\".$this->db,$this->username,$this->password);\n\t\t\treturn $dbh;\n\t\t\n\t\t}catch(PDOException $e){\n\t\t\techo $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "48c7dba62fa19ad2b163fabd7b3b57d0", "score": "0.7582228", "text": "function connect()\n{\n global $pdo;\n $pdo = new PDO(\"mysql:host=\". DB_HOST .\";dbname=\". DB_NAME .\"\", DB_USER, DB_PASSWORD);\n}", "title": "" }, { "docid": "bea630f30eb455b93e5801d6fe545fd3", "score": "0.7580913", "text": "private static function getConnection() : PDO\n {\n if (self::$connection) {\n return self::$connection;\n }\n\n $dsn = sprintf('mysql:host=%s;dbname=%s;charset=%s', ...[\n self::CONNECTION_CONFIG['host'],\n self::CONNECTION_CONFIG['dbName'],\n self::CONNECTION_CONFIG['charset'],\n ]);\n $opt = [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n PDO::ATTR_EMULATE_PREPARES => false,\n ];\n\n return self::$connection = (new PDO(\n $dsn,\n self::CONNECTION_CONFIG['user'],\n self::CONNECTION_CONFIG['password'],\n $opt\n ));\n }", "title": "" }, { "docid": "11ed60e7a6bbf2906bea3c8bb7cb8f90", "score": "0.7570709", "text": "private function connection()\r\n\t\t{\r\n\t\t\tif (array_search($this->driver, PDO::getAvailableDrivers()) === FALSE) {\r\n\t\t\t\tHelper::log('database', \"Driver '{$this->driver}' not available\");\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t$pdo = new PDO(\"{$this->driver}:host={$this->host};dbname={$this->database};charset=UTF-8\", \"{$this->login}\", \"{$this->password}\");\r\n\t\t\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); \r\n\t\t\t\t\r\n\t\t\t\t// Check if database exists\r\n\t\t\t\t$sql = $pdo->prepare(\"SHOW TABLES\");\r\n\t\t\t\t$sql->execute();\r\n\t\t\t\t\r\n\t\t\t\treturn $pdo;\r\n\t\t\t}\r\n\t\t\tcatch ( PDOException $Exception ) {\r\n\t\t\t\tHelper::log('database', $Exception->getMessage());\r\n\t\t\t\texit;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "2d75305c04e0886781b73789866e2c7e", "score": "0.7566506", "text": "private function getConnection()\n\t\t\t\t\t\t\t\t\t\t{\n\t// Create PDO instance using MySQL connection string.\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t$conn = new PDO(\"mysql:dbname={$this->dbname};host={$this->host};\",\n\t\"$this->user\", \"$this->password\");\n\t// Make sure to turn on exceptions for debugging.\n\n\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\treturn $conn;\n\t}", "title": "" }, { "docid": "5ba711fc9cd586856b7e45a6c1cab3c8", "score": "0.75633925", "text": "function Get_connection()\n{\n try\n {\n $conn = new PDO('mysql:host=localhost;dbname=users',\n 'root') or die('Cannot connect');\n return $conn;\n }\n catch (PDOException $e)\n {\n echo ($e->getMessage());\n }\n}", "title": "" }, { "docid": "12b38d567af271fa3d46cadad2db5128", "score": "0.7561794", "text": "function db_connect(){\n $PDO = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8', DB_USER, DB_PASS);\n $PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $PDO;\n}", "title": "" }, { "docid": "7e9f58a9cafa8c5573fbc4e0995d66d6", "score": "0.7559191", "text": "public abstract function getPDO(): \\PDO;", "title": "" }, { "docid": "c8a1a81a79f64cbd2d3760f2539fafa9", "score": "0.7555951", "text": "protected function connection(){\n\t\tif($this->dbConnection == null){\n\t\t\t$this->dbConnection = new \\PDO('mysql:host=' . \\Config::DB_HOST . ';dbname=' . \\Config::DB_NAME . ';charset=utf8', \\Config::DB_USERNAME, \\Config::DB_PASSWORD, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\t\t\tif(\\Config::DEBUG){\n\t\t\t\t$this->dbConnection->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}\n\t\t}\n\t\treturn $this->dbConnection;\n\t}", "title": "" }, { "docid": "439b39d181ce5e10d260c24ada993892", "score": "0.75518054", "text": "public function getConnection(){\n \n $this->conn = null;\n \n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->conn->exec(\"set names utf8\");\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n //echo \"Connection Succesful\";\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "9818d60c1f1d99321779876d0fb5978f", "score": "0.7542697", "text": "function db_connect()\n{\n\treturn new PDO(DB_DSN, DB_USER, DB_PASS);\n}", "title": "" }, { "docid": "ff74c5b38e2a955e5e7fc3a89f271787", "score": "0.75382924", "text": "function getConnection($username, $login) {\n $db = new PDO(\"mysql:dbname=Lab8;host=localhost\",$username, $login); \n return $db;\n}", "title": "" }, { "docid": "2a5f54b12813874401f8ace12816e24c", "score": "0.7533239", "text": "function getDbConnection() {\r\n $DBDriver = defined('DBDriver') ? DBDriver : \"mysql\";\r\n\r\n $test = $DBDriver . \":dbname=\" . DBName . \";host=\" . DBServerName . \";charset=utf8\";\r\n\r\n $db = new PDO($test, UserName, Password);\r\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n return $db;\r\n}", "title": "" }, { "docid": "16da2e5df8da08d8263ee775c9dd1fac", "score": "0.7525536", "text": "function getConnection() {\n\t\ttry {\n\t\t\t$connection = new PDO('mysql:host='.DB_HOST.';dbname='.DB_DATABASE, DB_USER, DB_PASSWORD);\n\t\t\t$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\treturn $connection;\n\t\t} catch(PDOException $ex) {\n\t\t\tdie('Kan geen verbinding maken met de database.');\n\t\t}\n\t}", "title": "" }, { "docid": "bfccccf45a83a7de960082dc8b6bcdfe", "score": "0.75148535", "text": "static function connection(){\n\t\t\tglobal $db;\n\t\t\treturn new PDO(\n\t\t\t\t//aqui estamos tirando de los campos de $config que hemos guardado al principio en la variable $db \n\t\t\t\t\"mysql:host={$db['host']};\n\t\t\t\tdbname={$db['dbname']};\n\t\t\t\tcharset={$db['charset']}\",\n\t\t\t\t$db['user'],\n\t\t\t\t$db['password']\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "2faa3e21e30ec9fc7a76c23d7b745871", "score": "0.7511092", "text": "function dbConnetion(){\n\tstatic $conn = null; \n\n\tif(!$conn){\n\t\t$conn = new PDO(DB_DNS, DB_USER, DB_PASS);\n\t}\n\treturn $conn;\n}", "title": "" }, { "docid": "0327d12ae0d434cd109b1b58171f074b", "score": "0.74903053", "text": "static public function getConnection()\n {\n if (self::$_db == null) { // No PDO exists yet, so make one and send it back.\n try {\n self::$_db = new PDO('pg:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS);\n } catch (PDOException $e) {\n // Use next line for debugging only, remove or comment out before going live.\n // echo 'PDO says: ' . $e->getMessage() . '<br />';\n // This is all the end user should see if the connection fails.\n die('<h1>Sorry. The Database connection is temporarily unavailable.</h1>');\n } // end PDO connection try/catch\n return self::$_db;\n } else { // There is already a PDO, so just send it back.\n return self::$_db;\n } // end PDO exists if/else\n }", "title": "" }, { "docid": "f5a4e914426361f925afe5e15df9cd7c", "score": "0.74731326", "text": "function getPDOConnection(){\n $dsn = 'mysql:dbname='.DB_NAME.';host='.DB_HOST.';charset=utf8';\n $user = DB_USER;\n $password = DB_PASSWORD;\n $options = [\n PDO::ATTR_ERRMODE =>PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE =>PDO::FETCH_ASSOC\n ];\n \n \n try{\n $bdd = new PDO($dsn, $user, $password,$options);\n }catch(Exception $e){\n die('Erreur: '.$e->getMessage());\n }\n return $bdd;\n\n}", "title": "" }, { "docid": "b3a1fe29fe790e50f0e5acae1f34e9bc", "score": "0.7472189", "text": "public function getDatabaseConnection(){\n\n //there is not connection at the moment\n $this -> connection = null;\n\n //tell the function what to do first\n try {\n //try to create mysql connection with the variables initiated in the beginning\n $connnect = new PDO(\"mysql:host=$servername;dbname=$database\", $username, $password);\n // set the PDO error mode to exception\n $connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n //echo \"Connected successfully: <br>\";\n echo \"<br>\";\n }\n //in case something goes wrong, we will try to catch the prob\n catch (PDOException $e) {\n //print_r($e)\n echo \"Connection failed: \" . $e->getMessage();\n }\n return $this->connection;\n }", "title": "" }, { "docid": "61a6d48753038815abc403426bd9258d", "score": "0.7470903", "text": "public function getConnection() {\n \n $this->conn = null;\n \n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "1c2a551e96076d64356fbfed301e5237", "score": "0.7469078", "text": "function getConnection() {\n\n $dbhost=\"127.0.0.1\"; //IP\n $dbuser=\"root\"; //user\n $dbpass=\"\"; //pass\n $dbname=\"api_db\"; //db name\n $dbh = new PDO(\"mysql:host=$dbhost;dbname=$dbname\", $dbuser, $dbpass); //PDO connect\n $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); //return an error if the connexion can't be establsihed\n return $dbh;\n\n}", "title": "" }, { "docid": "7d7332046ab753177f0df19e1dea6ba2", "score": "0.7463195", "text": "protected function getConnection()\n {\n self::$pdo = new DBmysql();\n self:: $db\t= new PDO($GLOBALS['DB_DSN'],\n $GLOBALS['DB_USER'],\n $GLOBALS['DB_PASS']);\n\n return $this->createDefaultDBConnection(self::$db, $GLOBALS['DB_NAME']);\n }", "title": "" }, { "docid": "5aa5344c2f8c7feef568d241fe8dc047", "score": "0.74456996", "text": "function openConnection()\n{\n $hostname = \"remotemysql.com\";\n $dbname = \"RXe6HPUpGx\";\n $username = \"RXe6HPUpGx\";\n $password = \"kfMp1XQ155\";\n\n // Try to understand what happens here\n $pdo = new PDO(\"mysql:host=$hostname;dbname=$dbname\", $username, $password);\n\n // Why we do this here\n return $pdo;\n}", "title": "" }, { "docid": "c58c99aee396f5cd4ff4cf3acca4edd4", "score": "0.7432496", "text": "function db_connect()\n{\n $db = new PDO('mysql:host=localhost;dbname=jackydev', USERNAME, PASSWORD);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n\n return $db;\n}", "title": "" }, { "docid": "7b0cbed087dd73a4f59018ef18e7e031", "score": "0.7429549", "text": "function ft_getConnection ($db_dsn, $db_user, $db_password) {\n\n //Try Catch to ID Possible connection failures\n try {\n\n $dbConn = new PDO($db_dsn, $db_user, $db_password);\n $dbConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $dbConn;\n } catch (PDOException $e) {\n\n echo \"Connection Failure Due To: \".$e->getMessage().PHP_EOL;\n }\n }", "title": "" }, { "docid": "6ddb1668d7b27419010e26bcf0a71320", "score": "0.742847", "text": "protected function getConnection(){\n $username = self::USERNAME;\n $password = self::PASSWORD;\n $host = self::HOST;\n $db = self::DB;\n $connection = new PDO(\"mysql:dbname=$db;host=$host\", $username, $password);\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $connection;\n }", "title": "" }, { "docid": "8e16736b371b5b6289e5703201a69490", "score": "0.74232167", "text": "function connect(){\n //1. Get the connection info\n require_once dirname($_SERVER['DOCUMENT_ROOT']).'/dbconn/2017_oop_connect.php';\n //2. Make the connection\n $this->conn = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME,DB_USER,DB_PASSWORD);\n \n //3. set error reporting level\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n //4. Return the connection resource back to calling environment\n return $this->conn;\n }", "title": "" }, { "docid": "d88b0a6dde8e30de9f6e2fbb8f5d0b6d", "score": "0.74232167", "text": "function getPDO() {\n try {\n require '../config/sql.php';\n $pdo = new PDO('mysql:host='.$host.';dbname='.$dbase, $user, $pass);\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $pdo;\n }\n catch(DBException $e) {\n echo 'The connect can not create: ' . $e->getMessage();\n }\n}", "title": "" }, { "docid": "01fd83ae474d5499b1dc769b42038fbe", "score": "0.74220836", "text": "public function getConnection(){\n\n $this->conn = null;\n\n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->conn->exec(\"set names utf8\");\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n\n return $this->conn;\n }", "title": "" }, { "docid": "01fd83ae474d5499b1dc769b42038fbe", "score": "0.74220836", "text": "public function getConnection(){\n\n $this->conn = null;\n\n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->conn->exec(\"set names utf8\");\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n\n return $this->conn;\n }", "title": "" }, { "docid": "f98f2dc8a34148a94468394a49b67cb1", "score": "0.7417647", "text": "protected function connection()\n\t{\n\t\ttry {\n\t\t $dbh = new PDO('mysql:host=localhost;dbname=lphp1808e;charset=utf8', 'root', '');\n\t\t $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t return $dbh;\n\t\t} catch (PDOException $e) {\n\t\t print \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t die();\n\t\t}\t\n\t}", "title": "" }, { "docid": "ae2884a9474eeb8118b69030e33c65b8", "score": "0.7415602", "text": "function conn(){\t\t\n\t\t$con = new PDO(\"mysql:host=localhost;dbname=reloj\", \"root\", \"compu31011991\");\n\t\treturn $con;\n\t}", "title": "" }, { "docid": "6cc6f50fc82d694cb38ac9b8bfcfbb19", "score": "0.7397619", "text": "function getConnection()\n{\n try {\n $db = new PDO('mysql:host=localhost;dbname=boutique-en-ligne;charset=utf8', 'alexis', 'GRTY247mys/*/', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n } catch (Exception $e) {\n die('Erreur : ' . $e->getMessage());\n }\n return $db;\n}", "title": "" }, { "docid": "66de3f65667d78849e3322335843e402", "score": "0.73959434", "text": "public static function getConnection() {\n\n // create the pdoConnection if it does not exist\n\t\tif(!isset(self::$pdoConnection)) {\n\n\t\t\ttry{\n $dsn = 'mysql:host='.Connection::$host.';dbname='.Connection::$db.';charset='.Connection::$charset;\n self::$pdoConnection = new PDO($dsn, Connection::$user, Connection::$pass, Connection::$options);\n \n\t\t\t}catch (PDOException $ex) {\n \n //die(json_encode(array('ERROR' => $ex->getTraceAsString () )));\n throw new PDOException($ex->getMessage(), (int)$ex->getCode());\n }\n\t\t}\n\t\t// return the pdoConnection\n\t\treturn self::$pdoConnection;\n\t}", "title": "" }, { "docid": "661ceb17273a76a0c72b132c32de51f7", "score": "0.7395692", "text": "public function connectToDatabase () {\n\n $server = SERVER;\n $user = USER;\n $pass = PASSWORD;\n $database = DATABASE;\n\n try {\n return $connection = new \\PDO(\"mysql:host=$server;dbname=$database;\", $user, $pass);\n }\n catch(\\PDOException $e) {\n echo $e->getMessage();\n }\n}", "title": "" }, { "docid": "ed1d9b01988add490d1049b2b5a843cf", "score": "0.738953", "text": "function connectToDb(){\n try {\n\n return new PDO('mysql:host=localhost;dbname=mytodo', 'root', 'root');\n } catch (PDOException $e) {\n //die('Could not connect.');\n die($e->getMessage());\n }\n}", "title": "" }, { "docid": "914d6b33e26fd8f5c217c1391fa13c41", "score": "0.7385641", "text": "public static function getConnection()\n {\n// $params = include($paramsPath);\n//\n// $dsn = \"mysql:host={localhost};dbname={metro}\";\n// $db = new PDO($dsn, 'root', '');\n//\n// return $db;\n $host = 'localhost';\n $db = 'metro';\n $user = 'root';\n $pass = '';\n $charset = 'utf8';\n\n $dsn = \"mysql:host=$host;dbname=$db;charset=$charset\";\n $opt = [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n PDO::ATTR_EMULATE_PREPARES => false,\n ];\n $pdo = new PDO($dsn, $user, $pass, $opt);\n return $pdo;\n }", "title": "" }, { "docid": "8774cb851482ff3fd20b01bcc926b279", "score": "0.7367448", "text": "public function getDb(): PDO;", "title": "" }, { "docid": "de09601b515da62ccf978e783105320a", "score": "0.736551", "text": "public function getPdo() : \\PDO;", "title": "" }, { "docid": "b660296f16c057bd96dc6bb226868bd8", "score": "0.7364349", "text": "public static function connect(){\n try {\n \t$myhost = Database::$host;\n \t$mydb = Database::$database_name;\n Database::$connection = new PDO(\"mysql:host=$myhost;dbname=$mydb\", Database::$username, Database::$password);\n // set the PDO error mode to exception\n Database::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return Database::$connection; \n }\ncatch(PDOException $e)\n {\n echo $e->getMessage(). \"<br>\";\n return null;\n }\n //End of connect()\n}", "title": "" }, { "docid": "808e5e99abe62911c53a75ad10e21bfd", "score": "0.7359808", "text": "private function getConn(){\n\n $db_cfg = new db_config();\n\n\n $conn = new PDO('mysql:host='.$db_cfg->db_hostname.';dbname='.$db_cfg->db_database.';charset=utf8',$db_cfg->db_username, $db_cfg->db_password);\n if(!$conn){\n die('Erro ao criar a conexão');\n }\n\n return $conn;\n }", "title": "" }, { "docid": "c519f7e29bf2417d0d33a267f9cc0c24", "score": "0.73589224", "text": "function openConnection()\n{\n $hostname = \"remotemysql.com\";\n $dbname = \"RXe6HPUpGx\";\n $username = \"RXe6HPUpGx\";\n $password = \"kfMp1XQ155\";\n\n // Try to understand what happens here\n\n $pdo = new PDO('mysql:host=$hostname;port=3306;dbname=RXe6HPUpGx;charset=utf8', $username, $password);\n\n\n // Why we do this here\n return $pdo;\n}", "title": "" }, { "docid": "b76246a4ea13a2e72c74ee59df362a4e", "score": "0.73552394", "text": "function getConnection()\n { \n $this->dsn = NULL;\n $conn = \"mysql:host=\" .$this->db_host. \";dbname=\" .$this->db_name. \";charset=\" .$this->db_charset; \n $options = [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n PDO::ATTR_EMULATE_PREPARES => false,\n ];\n \n try{\n $this->dsn = new PDO($conn,$this->db_username,$this->db_password,$options);\n } \n catch(\\PDOException $e)\n {\n // throw new \\PDOException($e->getMessage(), (int)$e->getCode());\n echo \"not connected to database\";\n }\n return $this->dsn;\n }", "title": "" }, { "docid": "0ed7c93b42283cb859fe44c9492c9919", "score": "0.7348623", "text": "function databaseConnection() {\n // connection parameters\n require_once('../lightup_mysql.php');\n\n // Attempt connection\n try {\n $db = new PDO(\"mysql:host=$host;dbname=$dbname;charset=utf8\", $user, $password);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); // For development only\n $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n return $db;\n }\n catch (PDOException $e) {\n\t\theader('Location: index.php');\n\t\texit();\n \t}\n}", "title": "" }, { "docid": "90200aa897eca989e228c20e0181f240", "score": "0.7340076", "text": "function getDatabaseConnection() {\n\ttry {\n\t\tglobal $SERVER_NAME, $DATABASE_USERNAME, $DATABASE_PASSWORD, $DATABASE;\n\t\t$conn = new PDO ( \"mysql:host=$SERVER_NAME;dbname=$DATABASE\", $DATABASE_USERNAME, $DATABASE_PASSWORD );\n\t\t// set the PDO error mode to exception\n\t\t$conn->setAttribute ( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\t} catch ( PDOException $e ) {\n\t\techo \"Connection failed: \" . $e->getMessage ();\n\t\treturn null;\n\t}\n\treturn $conn;\n}", "title": "" }, { "docid": "4efd4a12ccda227b53db6bd2777f1236", "score": "0.73394907", "text": "function getConnection(){\n\t$host = 'mysql:host=localhost;dbname=passagem;charset=utf8';\n\t$username = 'root';\n\t$password = '';\n\n\ttry {\n\t\t$con = new PDO($host, $username, $password);\n\t\treturn $con;\n\t}catch(PDOException $exception) {\n\t\techo 'Connection error: ' . $exception->getMessage();\n\t}\t\n}", "title": "" }, { "docid": "b6fe5586f1bf2983e5abdfdb0fcba16b", "score": "0.733395", "text": "public function getConnection()\n {\n\n $this->conn = null;\n\n try {\n $this->conn = new PDO(\"mysql:host=\" . $this->db_host . \";dbname=\" . $this->db_name, $this->db_user, $this->db_psw);\n $this->conn->exec(\"set names utf8\");\n $this->conn->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);\n //$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $exception) {\n die(\"Connection error: \" . $exception->getMessage());\n\n }\n\n return $this->conn;\n }", "title": "" }, { "docid": "a7a939cc8f124fc7671b1b070ffd9d02", "score": "0.7332752", "text": "function getPDO(){\n require_once 'inc.db.php';\n\n try {\n $pdo = new PDO(CONNECT_MYSQL, USER, PWD);\n\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n return $pdo;\n\n } catch (PDOException $e) {\n die($e->getMessage());\n \n }\n }", "title": "" }, { "docid": "20cc5bf3677b65bd70d7f7b9b3f94bd8", "score": "0.73279345", "text": "public function connectPDO() {\n\t\t//hacemos la conexion al servidor\n\t\ttry {\n\t\t\t$this->connection = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME , DB_USERNAME, DB_PASSWORD,array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''));\n\t\t} catch (PDOException $e) {\n\t\t\techo \"Falló al hacer la conexion: \" . $e->getMessage();\n\t\t}\n\t\t//retornamos el link de conexion\n\t\treturn $this->connection;\n\t}", "title": "" }, { "docid": "6739a3c31d506f9e2bb3c9514c898d70", "score": "0.73099285", "text": "public static function connect() {\n\t\t$Config = (object) Load::file('/config.php')['DataBase'];\n\n\t\t$pdo \t= new PDO(\"mysql:host={$Config->DBHost};dbname={$Config->DBName};charset={$Config->DBCharset}\", \"{$Config->DBUserName}\", \"{$Config->DBPassword}\");\n\t\t\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\n\t\treturn $pdo;\n\t}", "title": "" }, { "docid": "e408ad6e48a1d0afefb94a8198a64d30", "score": "0.73020256", "text": "function getPDO()\n{\n require \".constant.php\";\n $dbh = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $user, $pass);\n return $dbh;\n\n\n}", "title": "" }, { "docid": "4700e6178a5ebe0d2c62dd2aed1589a8", "score": "0.72909784", "text": "function connectToDb() : PDO {\n $db = new PDO ('mysql:host=db;dbname=collector_challenge', 'root', 'password');\n $db -> setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n return $db;\n}", "title": "" }, { "docid": "9cf3a2502d36cfe2a3a1827506e11004", "score": "0.72908455", "text": "public function getConnection(){\n \n $this->conn = null;\n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";port=\" . $this->port . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $this->conn->exec(\"set names utf8mb4_swedish_ci\");\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "d986f176e800c3cb1c2af0e64dc294e0", "score": "0.7287872", "text": "function connect() {\r\n global $cfg, $data_source_name;\r\n $options = [\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_NUM,\r\n PDO::ATTR_EMULATE_PREPARES => false,\r\n PDO::ATTR_PERSISTENT => true\r\n ];\r\n return new PDO($data_source_name, $cfg->User, $cfg->Pwd, $options);\r\n}", "title": "" }, { "docid": "68b7bfd21a87872dc9824323f3581c14", "score": "0.7287809", "text": "function databaseConnection(){\n\ttry{\n\t\t$db = new PDO('mysql:host='.getHost().';dbname='.getPrefDb(), ''.getUsr().'', ''.getPwd().'', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n\t}\n\tcatch (Exception $e){\n\t\tdie('Erreur : ' . $e->getMessage());\n\t}\n\t\n\treturn $db;\n}", "title": "" }, { "docid": "5a7ad2e71942797fee2886c73f688a0e", "score": "0.728208", "text": "function dbConn() {\n\trequire_once('../globalsettings.php');\n\t$userName = $GLOBALS['username'];\n\t$passWord = $GLOBALS['password'];\n\t$conn = new PDO('mysql:host=localhost;dbname=ithaax_testdata',$userName, $passWord);\n\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\treturn $conn;\n}", "title": "" }, { "docid": "36608494c07123904ac3d251fe74c3be", "score": "0.72694594", "text": "public static function getConnection()\n\t{\n\t\tif (DBConnection::$db === null) {\n\t\t\t$db_host = \"localhost\";\n\t\t\t$db_user = \"root\";\n\t\t\t$db_pass = \"\";\n\t\t\t$db_base = \"hotel_db\";\n\t\t\t$db_dsn = \"mysql:host=$db_host;dbname=$db_base;charset=utf8\";\n\t\t\tDBConnection::$db = new PDO($db_dsn, $db_user, $db_pass);\n\t\t}\n\t\treturn DBConnection::$db;\n\t}", "title": "" }, { "docid": "82874aca5e366c6322b9e3cca9dea254", "score": "0.72640616", "text": "public static function getConnection(){\n return new PDO(\"mysql:hostname=\" . HOSTNAME . \";dbname=\" . DBNAME . \";charset=utf8;\", DB_USERNAME , DB_PASSWORD );\n }", "title": "" }, { "docid": "ee786c062b6059a52e7b533c7e76a1d4", "score": "0.7261253", "text": "public function getConnection(){\n\t\n $this->conn = null;\n \n try{\n $this->conn = new \\PDO(\"mysql:host=\" . self::$mysql['address'] . \";dbname=\" . self::$mysql['database'], self::$mysql['user'], self::$mysql['password']);\n $this->conn->exec(\"set names utf8\");\n\t\t\t\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "c34c965b7637e8c4769fcc7b1375eaba", "score": "0.72612154", "text": "public function getConnection()\n {\n try {\n $this->connection = new PDO(DB_HOST, DB_USER, DB_PASS);\n $this->connection->exec('SET NAMES utf8');\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n return $this->connection;\n } catch (\\Exception $errorConnection) {\n die('Erreur de connection :'.$errorConnection->getMessage());\n }\n }", "title": "" }, { "docid": "5704f27b156c140b9c99cd14a781b622", "score": "0.7258664", "text": "public static function getConnection()\n {\n // Credentials for the DB\n require(UTIL_DB_CREDS);\n\n // Only complete if the connection does not exist\n if (self::$connection === null) {\n try {\n // Create the DB connection\n self::$connection = new PDO($dsn, $user, $pass);\n # Fires exceptions. Use try/catch with this\n self::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch(PDOException $e) {\n echo $e->getMessage();\n die();\n }\n }\n return self::$connection;\n }", "title": "" }, { "docid": "adb47862f47726a601a2935e20aa53fc", "score": "0.7254507", "text": "public function getConnection(){\n \n $this->conn = null;\n \n try{\n $this->conn = new PDO(\"mysql:host=\" . $this->host . \";dbname=\" . $this->db_name, $this->username, $this->password);\n $q = $this->conn->query('set names UTF8');\n $q->setFetchMode(PDO::FETCH_ASSOC);\n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage();\n }\n \n return $this->conn;\n }", "title": "" }, { "docid": "9e332003a9d0db461ed77409eb98c66c", "score": "0.7253058", "text": "public static function createConnection(): PDO\n {\n if (!isset(self::$connection)) {\n $driver = Env::get('DB_DRIVER');\n $host = Env::get('DB_HOST');\n $name = Env::get('DB_NAME');\n $user = Env::get('DB_USER');\n $pass = Env::get('DB_PASS');\n\n //create db connection\n self::$connection = new PDO(\"{$driver}:host={$host};dbname={$name}\", $user, $pass);\n //convert all db errors to exceptions\n self::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n self::$connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);\n }\n\n return self::$connection;\n }", "title": "" }, { "docid": "af9792a2df24706001542ef2820731f3", "score": "0.7234934", "text": "function db_connect()\n {\n $conn_id = false;\n try {\n $conn_id = new PDO ($this->database, $this->username, $this->password);\n log_message('debug', \"PDO driver connecting \".$this->database);\n } catch (PDOException $e) {\n log_message('debug','merde');\n log_message('error', $e->getMessage());\n if ($this->db_debug)\n {\n $this->display_error($e->getMessage(), '', TRUE);\n }\n }\n log_message('debug',print_r($conn_id,true));\n if ( $conn_id ) {\n log_message('debug','PDO driver connection ok');\n }\n\n // Added by Xi\n $this->conn_id=$conn_id;\n\n return $conn_id;\n }", "title": "" }, { "docid": "45b81ca0a6c6b8770e9ef7c7d81da9f4", "score": "0.72345966", "text": "public function getConnection() \n {\n\n $this->returnedconnection = null;\n\n //Try to establish a new connection.\n try {\n $this->returnedconnection = new \\PDO(\n \"mysql:host=\" . self::$Host .\n \";dbname=\" . self::$DatabaseName, \n self::$DatabaseUser, \n self::$DatabasePassword);\n\n //Catch the exception for error output.\n } catch (PDOException $exception) {\n echo \"Opps \" . $exception->getMessage();\n }\n\n return $this->returnedconnection;\n }", "title": "" }, { "docid": "8d01848c0b646286044a3a1ac37ffb16", "score": "0.7222252", "text": "function connect(){\n\t\ttry{\n\t\t\t#MySQL connection with PDO_MYSQL\n\t\t\t$dbc = new PDO(\"mysql:host=localhost;dbname=century\", 'robin', '');\n\t\t\t$dbc->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\treturn $dbc;\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo $e;\n\t\t}\n\t}", "title": "" }, { "docid": "a392eb0c77021b4b6c096225c2ab1779", "score": "0.72221524", "text": "function conn() {\n $dsn = \"mysql:host=localhost;dbname=bibl\";\n $user = \"root\";\n $password = \"root\";\n $option = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');\n\n try {\n $db = new PDO ($dsn, $user, $password, $option);\n } catch (PDOException $e) {\n echo \"Подключение не удалось: \" . $e -> getMessage();\n }\n return $db;\n}", "title": "" }, { "docid": "820330cb22d433f7431cf1da6621702f", "score": "0.72194904", "text": "public function openConnection(){\n try {\n \n $this->conn = new PDO($this->dsn, $this->username, $this->password, $this->options);\n \n //Returns connection\n return $this->conn;\n \n }catch(PDOException $e){\n \n echo \"Error. There is an issue with the database connection: \" . $e->getMessage();\n \n }\n }", "title": "" }, { "docid": "69cd5e13f41a955778c4197c425e9254", "score": "0.7216416", "text": "function getDBConnection()\n{\n\tif(!is_readable(DBPATH)){\n\t\treportError(\"DB does not exist or is not readable. If this is a new installation did you run install.sh? (See README)\", 500); \n\t}\t\n\t$db = new PDO(PDO_DSN);\n\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\n\t//enable foreign key enforcement - not enabled by default in sqlite and must be done per connection\n\t$db->exec(\"PRAGMA foreign_keys = ON\");\t\n\t\n\treturn $db;\t\t\n}", "title": "" }, { "docid": "c07e9751611764f643f9e12e8d4c1ada", "score": "0.72160673", "text": "function connectMysql()\r\n {\r\n try \r\n {\r\n $this->dbh = new PDO(\"mysql:host=$this->host;dbname=$this->dbName\", $this->user, $this->password);\r\n } \r\n catch (PDOException $e) \r\n {\r\n print \"Error!: \" . $e->getMessage() . \"<br/>\";\r\n die();\r\n }\r\n return $this->dbh;\r\n }", "title": "" }, { "docid": "f4ef67e112d15fb81acbeb9f18ffed6d", "score": "0.720247", "text": "public static function getConnection() {\n\t\t\tif(!self::$pdo) {\n\t\t\t\ttry {\n\t\t\t\t\tself::$pdo = new DB();\n\t\t\t\t} catch(PDOException $e) {\n\t\t\t\t\t// error_log($e->getMessage());\n\t\t\t\t\theader('HTTP/1.0 500 Internal Server Error');\n\t\t\t\t\tdie('We were unable to connect to the backend database. Please ask your server administrator to investigate');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn self::$pdo;\n\t\t}", "title": "" }, { "docid": "669345ef73209df81eebc8b8be5b2a56", "score": "0.72018015", "text": "function connectDB()\n {\n\n static $db = null;\n\n if($db === null){\n try \n {\n $db = new PDO(\"mysql:host=\" . SERVER . \";dbname=\" . DATABASE_NAME, PSEUDO, PWD, array('charset' => 'utf8'));\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } \n catch (PDOException $e) \n {\n die('Erreur : ' . $e->getMessage());\n }\n }\n\n return $db;\n\n }", "title": "" }, { "docid": "ce1cf193c4bf53c5354cb6bdfe1d3db0", "score": "0.7200546", "text": "function db_connect() {\n $dsn = \"mysql:host=\". DB_HOST .\";dbname=\" . DB_NAME . \";charset=utf8\";\n $opt = array(\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC\n );\n return new PDO($dsn, DB_USER, DB_PASS, $opt);\n}", "title": "" }, { "docid": "afe3d5ed4929016227e6806a76ff5cab", "score": "0.71967816", "text": "private function openConnection()\n {\n $str_conn = $this->db_driver.\":host=\".$this->db_host.\";port=\".$this->db_port.\";dbname=\" .$this->db_name;\n\n $this->conn = new PDO($str_conn,$this->db_user,$this->db_pass);\n\n # para manejar errores y excepcciones especiales para el manejo de transacciones\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n # codificacion utf-8\n $this->conn->query(\"SET NAMES 'utf8'\");\n\n return $this->conn ;\n\n }", "title": "" }, { "docid": "556291673eda8ec5c2eb465d7feaaa80", "score": "0.7187705", "text": "function users_db_connect(){\n\n$db = new PDO('mysql:host=localhost;dbname=puppymaker;charset=utf8', 'root', 'root');\nreturn $db;\n}", "title": "" }, { "docid": "3892e68391caa18e1b9d494609c216e7", "score": "0.71818703", "text": "public static function getConnection(): Database\n {\n return static::$pdo;\n }", "title": "" }, { "docid": "4cc378e8a4a968e2a9a524bda86eadb4", "score": "0.7176046", "text": "public function getConnection()\n {\n $db_hostname = 'localhost';\n $db_database = 'dedc';\n $db_username = 'tester';\n $db_password = 'test';\n\n if (Database::mysql === self::$db_type)\n {\n $db_id = \"mysql:host=$db_hostname;dbname=$db_database\";\n }\n if (Database::postgres === self::$db_type)\n {\n $db_id = \"pgsql:host=$db_hostname;dbname=$db_database\";\n }\n\n // DB Setup\n $dbh;\n try\n {\n $dbh = new PDO($db_id, $db_username, $db_password);\n } catch (PDOException $e)\n {\n die(\"Failed to connect to DB\" . $e->getMessage());\n }\n $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $dbh;\n }", "title": "" }, { "docid": "c5ca73dffbdac9203a7997f74feec7d8", "score": "0.71738476", "text": "function dbConnect() {\n\tif ($dbh = new PDO(SQLDB)) {\n\t\treturn $dbh;\n\t}\n\telse {\n\t\tworkerLog('dbConnect(): Connection failed');\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "524d422d2000d6c4b6ee1602ada2a299", "score": "0.7170949", "text": "public function getConnection() {\n $appProperties = parse_ini_file(parse_ini_file(\"application.ini\")[\"propFile\"]);\n $host = $appProperties[\"db_host\"];\n $dbName = $appProperties[\"db_name\"];\n $username = $appProperties[\"db_user\"];\n $password = $appProperties[\"db_password\"];\n $this->connection = null;\n try {\n $this->connection = new PDO(\"mysql:host=\" . $host . \";dbname=\" . $dbName, $username, $password);\n $this->connection->exec(\"set names utf8\");\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $exception) {\n echo \"Database connection error: \" . $exception->getMessage();\n }\n\n return $this->connection;\n }", "title": "" }, { "docid": "ed9466137541e8e781187e885dc4a71c", "score": "0.71702033", "text": "public static function &get_connection() {\n\t\t$db_obj = &$arr_db_objects[0];\n\t\tif (!$db_obj) {\n\t\t\t$db_obj = new db();\n\t\t\t$arr_db_objects[0] = $db_obj;\n\t\t}\n\t\treturn $db_obj;\n\t}", "title": "" }, { "docid": "edde5293598734510607303a6f968057", "score": "0.716598", "text": "function connect()\n {\n $pdo = new PDO('mysql:host=localhost;dbname=trds', 'root', '');\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $pdo;\n }", "title": "" }, { "docid": "0f5b5eeb60a2fd9eabaa7e8b02e7d895", "score": "0.7165692", "text": "public static function getInstance() : PDO\n {\n if(!self::$l_oConnection){\n self::$l_oConnection = new PDO(\n 'mysql:host=localhost;dbname=meteoor_dwoo',\n 'root',\n '');\n self::$l_oConnection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n self::$l_oConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n\n return self::$l_oConnection;\n }", "title": "" }, { "docid": "2fe0c98c17b29eb3513314f364648e48", "score": "0.7165309", "text": "function pdo(): PDO\n {\n return DB::getPdo();\n }", "title": "" }, { "docid": "719588bcffa2de2edd7125fa62e75820", "score": "0.7157793", "text": "function connect()\r\n{\r\n require_once '/home/aknoxgre/config.php';\r\n try {\r\n //Instantiate a database object\r\n $dbh = new PDO(DB_DSN, DB_USERNAME,\r\n DB_PASSWORD );\r\n //echo \"Connected to database!!!\";\r\n return $dbh;\r\n }\r\n catch (PDOException $e) {\r\n echo $e->getMessage();\r\n return;\r\n }\r\n}", "title": "" }, { "docid": "5c2ec28222c6e695fbcbaa800f8f24e9", "score": "0.7157414", "text": "protected function getConn() {\n\n global $db_default;\n $this->db_conn = new PDO('mysql:host=' . $db_default['host'] . ';port=3306;dbname=' . $db_default['dbname'],\n $db_default['username'], $db_default['password'],\n array(PDO::ATTR_PERSISTENT => FALSE));\n }", "title": "" }, { "docid": "63f6c08d0033171220d6406931c96191", "score": "0.71560997", "text": "function ConnectToDatabase() {\n\t\tglobal $db_hostname, $db_username, $db_password, $db_database;\n\t\t\n\t\ttry {\n\t\t\t//Try to connect, otherwise return an error\n\t\t\t$dbh = new PDO('mysql:host='. $db_hostname .';dbname='. $db_database, $db_username, $db_password);\n\t\t\treturn $dbh;\n\t\t} catch(PDOException $e) {\n\t\t\tReturnError(\"A database error has occured\");\n\t\t}\n\t}", "title": "" }, { "docid": "a5d6fecaff5ed14f16526eeb8907e26a", "score": "0.7154783", "text": "function connect() {\n try {\n\t$db = new PDO(\"mysql:host=localhost;dbname=php_project;charset=utf8\", \"root\", \"root\", array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n\treturn $db;\n }\n catch (Exception $e) {\n\tdie(\"Error : \" . $e -> getMessage());\n }\n}", "title": "" }, { "docid": "e533cce614a07ac55565eb749b836d65", "score": "0.7148926", "text": "function connectDatabase() {\n\trequire_once('db.class.php');\n\treturn new InternetradioPDO('db.ini');\n}", "title": "" } ]
18ee50c9646b948055726d1c8440efe5
Returns the fully qualified name of the class that this mapper maps.
[ { "docid": "256208a578fcdaafda683fd1dfecbb5d", "score": "0.0", "text": "public function mapFor()\n {\n return Password::class;\n }", "title": "" } ]
[ { "docid": "158665724eda3adc39df99e4a6a0788b", "score": "0.7725857", "text": "public function get_class_name();", "title": "" }, { "docid": "a31ba09e8b988178c63ac1d7c99b49a7", "score": "0.76001453", "text": "public function getNameClass() : string\n {\n return get_class($this);\n }", "title": "" }, { "docid": "1336c76df887e980d1733adce20d2f1f", "score": "0.7587708", "text": "public function getClassName()\n {\n return join('', array_slice(explode('\\\\', get_class($this)), -1));\n }", "title": "" }, { "docid": "47e0a8ecd9eaddf10773d0a85860341b", "score": "0.75807035", "text": "public function getClassName()\r\n {\r\n return join('', array_slice(explode('\\\\', get_class($this)), -1));\r\n }", "title": "" }, { "docid": "b6b5fef8ec5bc0359e6d0db78067e4d0", "score": "0.75076824", "text": "public function getClassName() {\n return $this->class;\n }", "title": "" }, { "docid": "a1feeaa8e2530c40a56cb1b47789dcc3", "score": "0.74876237", "text": "public function className() {\n return get_class($this);\n }", "title": "" }, { "docid": "be8ed6f3670dd9c84fcb8e37f968a52b", "score": "0.74609464", "text": "public function class_name() {\n return strtolower(get_class($this));\n }", "title": "" }, { "docid": "3a65638bafaf45402e1f5ec25b32b851", "score": "0.7430162", "text": "public function get_class_name()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "ebda83c4944e86d3851f692426e42412", "score": "0.74171525", "text": "protected function getClassName() {\n $class_name = get_class($this);\n return $class_name;\n }", "title": "" }, { "docid": "9655cfa1e1db3fb165cab725fcaa8ae7", "score": "0.741175", "text": "public function getClassName()\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "61ff048c84756dadf3a4fb8ba09c0702", "score": "0.739857", "text": "public function getClassName()\n {\n return substr(get_class($this), 10);\n }", "title": "" }, { "docid": "70515ae49eb067b61591035cdbdd4af5", "score": "0.73847705", "text": "public function getClassName()\n\t\t{\n\t\t\t\n\t\t\treturn $this->getClass();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "c499a7104b4b2e76c20a94e477ab1c5f", "score": "0.73736924", "text": "public function getFullClass()\n {\n return ($this->namespace === null ? '' : $this->namespace . '\\\\') . $this->getClass();\n }", "title": "" }, { "docid": "a08ba490c971dd471fac05e9447cfdba", "score": "0.73605555", "text": "public function class_name() { return $this->class_name; }", "title": "" }, { "docid": "b23ed690fb374360249321c8fc3d1807", "score": "0.73404574", "text": "private function getClassName()\n\t{\n\t\t// Get the class name without the namespace.\n\t\treturn $this->reflectionClass->getShortName();\n\t}", "title": "" }, { "docid": "dfbbd80b59d891e20a9f3077ca0ad19a", "score": "0.731156", "text": "public function getName(): string\n {\n return class_basename($this);\n }", "title": "" }, { "docid": "aefff7ec444f89b588e20eda3f2f76a9", "score": "0.7311209", "text": "public function getClassName()\n\t{\n\t\treturn Names::pathToClass(lLastParse($this->path, SL));\n\t}", "title": "" }, { "docid": "ab8700c5707e95bbd9746987d9d8a25f", "score": "0.7282935", "text": "public static function getClassName() {\n\t\t$cls = static::class;\n\t\treturn substr($cls, strrpos($cls, '\\\\') + 1);\n\t}", "title": "" }, { "docid": "93842647b748890274e37e498415db86", "score": "0.7278867", "text": "public function getClassName() {\n return $this->metadata->getName();\n }", "title": "" }, { "docid": "7ddc4e6860dcdff564069026aa5e4991", "score": "0.7253262", "text": "public function getClassName(): string\n {\n return parent::getClassName();\n }", "title": "" }, { "docid": "17a502a6fc294c04f8115980356ce776", "score": "0.72529197", "text": "public function getClassName()\n\t{\n\t\treturn $this->reflection->getClassName();\n\t}", "title": "" }, { "docid": "6e8b0e1934127c51ff64a276f49ffa96", "score": "0.7247777", "text": "public function get_class_name(){\n return get_called_class();\n }", "title": "" }, { "docid": "5ba4ceec124bdc797eab6ceb7211c4d6", "score": "0.7238876", "text": "protected function classname()\r\n {\r\n $classname = get_called_class();\r\n $classname_r = explode('\\\\', $classname);\r\n $classname = $classname_r[count($classname_r)-1];\r\n return $classname;\r\n }", "title": "" }, { "docid": "0b1c2e22d91133954288534d85cf60b6", "score": "0.72082573", "text": "public static function getResourceName()\n {\n return ClassHelper::GetClassnameFromFullyQualified(get_called_class());\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.7207383", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "92b835372f3dc81c5e76792bbae58eb7", "score": "0.7202163", "text": "public function getClassName() {\n list($class) = explode('.', $this->type, 2);\n\n return $class;\n }", "title": "" }, { "docid": "ef9c96c37233304dbc7f831dd11623d1", "score": "0.7188662", "text": "public static function class_name()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "c903669d0cb4913b8aeba539d788899f", "score": "0.7182808", "text": "public static function className()\n {\n //downgrade to 5.2\n //return get_called_class();\n return get_class();\n }", "title": "" }, { "docid": "c08e1d997faa7e6d1cf0ed8823597a81", "score": "0.71758777", "text": "public function getClassName() : string\n {\n return $this->className;\n }", "title": "" }, { "docid": "d765665eacc252f3c5b427f779226634", "score": "0.71631527", "text": "public function getShortName() {\n $class = get_class($this);\n\n if (false === strpos($class, '\\\\')) {\n return $class;\n }\n\n $name_parts = explode('\\\\', $class);\n\n return $name_parts[1];\n }", "title": "" }, { "docid": "a6db9f301dc1db69eb98ffc4c7a6625f", "score": "0.7146219", "text": "public function getName()\n\t{\n\t\t// The class name without the namespace.\n\t\t$name = $this->reflectionClass->getShortName();\n\t\t// Append the classpath to the name\n\t\tif(($this->classpath))\n\t\t{\n\t\t\t$name = $this->classpath . $name;\n\t\t}\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "9e00111cd4090c569c02534ed7274321", "score": "0.7136619", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "78ef703e4eb049ba82ed22f549c81de6", "score": "0.7134965", "text": "protected function resolveClassName() : string\n\t{\n\t\t$className = $this->getSection()->get($this->type);\n\n\t\treturn is_null($className) ? '' : $className;\n\t}", "title": "" }, { "docid": "b96b976e592ed0855dc69555289639f0", "score": "0.712304", "text": "public function getClass(): string\n {\n return $this->clazz;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.7118649", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.7118649", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.7118649", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.7118649", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "25fa6f24835b1ee8540ba5b323c7e5c8", "score": "0.7112733", "text": "public function className() {\n return get_called_class();\n }", "title": "" }, { "docid": "4efacfa1ad8481222c1ea91294a0437a", "score": "0.7111463", "text": "public function getClassName(): string {\n return $this->className;\n }", "title": "" }, { "docid": "52d5cb40c9d6b4340c217f9762985f9a", "score": "0.7099478", "text": "function getclassname() {\n\t\t\treturn (string) $this->classname;\n\t\t}", "title": "" }, { "docid": "d97dd30920e4acdbb2a5cf0f5b7d3820", "score": "0.7093812", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.7093125", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "6a5fe810f33aafb21ffc3b52248b0871", "score": "0.7087395", "text": "public function getClass()\n {\n return $this->className;\n }", "title": "" }, { "docid": "22646fd24a9767f0a7e584d6e6541489", "score": "0.7085853", "text": "public static function className() {\n return get_called_class();\n }", "title": "" }, { "docid": "49df58ef0b6394657411dc8662f77ba1", "score": "0.7077004", "text": "public function getClassName() {\n return $this->className;\n }", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.7062999", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.7062999", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.7062999", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.7062999", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.7062999", "text": "public function getClassName();", "title": "" }, { "docid": "c372115439d13abaf540e9a2fd51e249", "score": "0.70583797", "text": "public function name()\n {\n return get_class();\n }", "title": "" }, { "docid": "bf30c7007bf5f8d53d8d3d987e7a9acb", "score": "0.7049743", "text": "public function getClassName() {\n return $this->_className;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.70488584", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.70488584", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "10dd901111718bc70c6f48188bae19e6", "score": "0.7047411", "text": "public function getResourceName()\n {\n if (isset($this->resourceName))\n {\n return $this->resourceName;\n }\n\n $full_class_arr = explode(\"\\\\\", get_called_class());\n $class = end($full_class_arr);\n $this->resourceName = $class;\n\n return $class;\n }", "title": "" }, { "docid": "172933c45050a262b0bdd5dd82798d5c", "score": "0.7045358", "text": "public static function getClass() {\n\t\treturn basename(str_replace('\\\\','/',get_called_class()));\n\t}", "title": "" }, { "docid": "0471f34d900bd1fbf648ed1449c63d07", "score": "0.7038938", "text": "public function classMapping()\n {\n $class = '\\\\Acelle\\\\Model\\\\' . $this->type;\n return $class::find($this->id);\n }", "title": "" }, { "docid": "8f03cec547edab52e08c1b4156406ffb", "score": "0.70107424", "text": "public function getName()\n {\n return array_search(get_class($this), self::getTypesMap(), true);\n }", "title": "" }, { "docid": "a55dd8bccc6c4b669d86f3d04513b914", "score": "0.6998094", "text": "public function getClassName() {\n\t\treturn $this->className;\n\t}", "title": "" }, { "docid": "37ba24a37a24defd7b38ba978b635e85", "score": "0.6980608", "text": "public function getClassName() {\r\n\t\treturn $this->className;\r\n\t}", "title": "" }, { "docid": "74ddf0dac64eebb4eb7f488646d56fc0", "score": "0.697204", "text": "public function getClass()\n {\n return ucfirst($this->class); // class name first letter must be uppercase\n }", "title": "" }, { "docid": "b8570318d591637cba6da41b85087d8c", "score": "0.69719374", "text": "public function getClassName() {\n\t\treturn $this->_className;\n\t}", "title": "" }, { "docid": "cf6870c04f7e73a4aaace56f44d9db5c", "score": "0.6951046", "text": "public function getName()\n {\n return \\get_class($this);\n }", "title": "" }, { "docid": "37d2a8df82de9823257d2623d828f4e3", "score": "0.6927897", "text": "public function getClassName() \n\t{\n\t return $this->className;\n\t}", "title": "" }, { "docid": "71bbd5926a1e023500dc53db2cb51175", "score": "0.6923417", "text": "public function getName(): string\n {\n $baseClassName = basename(str_replace('\\\\', '/', $this->class));\n return Str::singular(Str::snake($baseClassName));\n }", "title": "" }, { "docid": "aec2693ce58d69fd8c2c9ce95babd15d", "score": "0.6921964", "text": "public function getClassName()\n {\n return get_class($this->innerExtension);\n }", "title": "" }, { "docid": "0fd999ec974b80a0f306871ef0361085", "score": "0.6921496", "text": "public static function getClassName(): string\n {\n return static::THIS_CLASS_NAME;\n }", "title": "" }, { "docid": "de4c93afc00f3db7bdf12e623a2d4f45", "score": "0.6913576", "text": "public function getName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "ccd2a56b05cf16cda769235dbe2ad3d8", "score": "0.69093156", "text": "public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}", "title": "" }, { "docid": "e4542e1c608744a5c5f999d6a866f441", "score": "0.68994", "text": "function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "74ba637c6ae6965f890e8f1c051efb97", "score": "0.68958896", "text": "public function getClassName() : string;", "title": "" }, { "docid": "74ba637c6ae6965f890e8f1c051efb97", "score": "0.68958896", "text": "public function getClassName() : string;", "title": "" }, { "docid": "d8f5c96b54446519e9f14f7e23b3e174", "score": "0.6889271", "text": "public function getClass() {\r\n\t\treturn self::getClassName(get_called_class());\r\n\t}", "title": "" }, { "docid": "a6b3a59236a766d12b0631e2cb9a1018", "score": "0.6877243", "text": "public function get_class() {\n $class = \"\\App\\Ctrl\\Models\\\\{$this->name}\"; \n return $class;\n }", "title": "" }, { "docid": "861244f8974ee223c872ffc17bb0ed7b", "score": "0.6867999", "text": "public function getClassName()\n {\n // TODO: Implement getClassName() method.\n }", "title": "" }, { "docid": "293f405f3e8375f6c5cdee05546ecd57", "score": "0.6844965", "text": "function getClassName()\n {\n return $this->classname;\n }", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.6826156", "text": "public function getClassName(): string;", "title": "" }, { "docid": "79a9ed46bb844b4ad92182aa087825df", "score": "0.6816199", "text": "public function className(): string;", "title": "" }, { "docid": "da6d1ae8c871d202d2d6398d1741b7b9", "score": "0.681372", "text": "public static function getClassName();", "title": "" }, { "docid": "add26b3cae555975470cc1daeb4d20ec", "score": "0.6811904", "text": "public static function get_type_name()\n {\n return ClassnameUtilities::getInstance()->getClassNameFromNamespace(self::class_name(), true);\n ;\n }", "title": "" }, { "docid": "1a8daed21e8d414356031ce6af5f270e", "score": "0.6787892", "text": "private function nameClass() {\n\t\treturn empty($this->type) ? \"{$this->name}\" : \" {$this->name}-{$this->type}\";\n\t}", "title": "" }, { "docid": "8b449d878045bad2113afafa738155bb", "score": "0.6785577", "text": "protected static function className()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "04abf59c17c921d8ba94a3719cf30d25", "score": "0.6782449", "text": "public function getName()\r\n {\r\n return get_called_class();\r\n }", "title": "" }, { "docid": "602136394dd0da087d590c22bbb4302a", "score": "0.67817295", "text": "public function getClass() : string{\n return $this->class;\n }", "title": "" }, { "docid": "3c7d7e399556404978c43f6eff4d1523", "score": "0.6766585", "text": "public static function getClassName():string;", "title": "" }, { "docid": "b6295324677c7f8af6e06ccaa670f396", "score": "0.67521745", "text": "public function getUnprefixedClassname()\n {\n return $this->getTable()->getBehavior(static::HOST_BEHAVIOR_NAME)->getParameter('class_name');\n }", "title": "" }, { "docid": "5db1d44578008d95e401def83589ff23", "score": "0.6734402", "text": "public function name() : string\n {\n return (new \\ReflectionClass($this))->getShortName();\n }", "title": "" }, { "docid": "def7eda1928cd469c6f4a834d8f690d8", "score": "0.67328954", "text": "public function getClass() : string\n\t{\n\t\treturn static::$class;\n\t}", "title": "" }, { "docid": "64c2068c7937f8df235360c3b5aec604", "score": "0.67094165", "text": "final public function getName()\n {\n if (null !== $this->name) {\n return $this->name;\n }\n\n $name = get_class($this);\n $pos = strrpos($name, '\\\\');\n\n return $this->name = false === $pos ? $name : substr($name, $pos + 1);\n }", "title": "" }, { "docid": "f79625dbc2734f81746afa1303b6499d", "score": "0.6706654", "text": "public function getName() {\n return strtolower(substr(get_class($this), strlen(get_parent_class($this))));\n }", "title": "" }, { "docid": "cd78c76ca4055bce289818baf2df9193", "score": "0.6689918", "text": "protected static function getTargetByClassName()\n {\n $parts = explode('\\\\', get_called_class());\n\n return \\Includes\\Utils\\Converter::convertFromCamelCase(lcfirst(array_pop($parts)));\n }", "title": "" }, { "docid": "77a8d406d93e86a213e0ef0d6107e8fe", "score": "0.6679829", "text": "public static function getClassName($class)\n {\n return self::splitClassName($class)[1];\n }", "title": "" }, { "docid": "73474b05b6fddbe278602d77979b6d3f", "score": "0.66770005", "text": "protected function className() {\n\n return Name::className($this->resource(), 'Test');\n \n }", "title": "" }, { "docid": "9fa77e04c3042c5bcbc8281e68ca93cd", "score": "0.6649926", "text": "public static function className()\n {\n return class_basename(static::class);\n }", "title": "" }, { "docid": "b645f0b3ebd4e4783e045b5b422784d4", "score": "0.6642683", "text": "function getClassName(){\n\t\t\treturn is_null($this->_sClassName)?\"PHPReport\":$this->_sClassName;\n\t\t}", "title": "" }, { "docid": "324dfd88ce1363601aa90324beb3d867", "score": "0.66385394", "text": "protected function getPrefixClass()\r\n {\r\n return \"prefix \" . $this->currObj->getClass(null);\r\n }", "title": "" }, { "docid": "4442b5872bac3079cfc7b7b11b9c5ca6", "score": "0.66351694", "text": "abstract public function getClassName();", "title": "" }, { "docid": "4fc2970b17f09209088fc852718c4bae", "score": "0.6617118", "text": "abstract protected static function classFqcn(): string;", "title": "" }, { "docid": "53163a50df60fb59430f30de0e86664b", "score": "0.6601345", "text": "public function getName(): string\n\t{\n\t\treturn substr(strrchr(static::class, '\\\\'), 1);\n\t}", "title": "" }, { "docid": "18df66999d039348425bde9ce6cb62cf", "score": "0.6588149", "text": "public function getClass()\n {\n return $this->_class;\n }", "title": "" } ]
766145d062e4b04224d1b80bd412b4d5
$text = preg_replace("//s", "", $text) ? : $text;
[ { "docid": "91558682bd770ff1e8360bc35b46d981", "score": "0.0", "text": "public function removeImageFromDesc($text)\n {\n $text = strip_tags($text);\n return $text;\n }", "title": "" } ]
[ { "docid": "42ab83292e15d4c36276245314c33df0", "score": "0.65103126", "text": "function whitespace_clean($text)\r\n{\r\n\t$otext = $text;\r\n\t$text = preg_replace('/\\s\\s+/', ' ', $text);\r\n\t\r\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",4);\r\n\t\r\n\treturn trim($text);\t\r\n}", "title": "" }, { "docid": "811119619b37fee0f9e14b0bc7d2511b", "score": "0.64435965", "text": "function stripSpaces($text){\r\n $text=preg_replace('/^\\s+/','',$text);\r\n $text=preg_replace('/\\s+$/','',$text);\r\n return $text;\r\n }", "title": "" }, { "docid": "53b4fccf96341b6d4c61c1978d747f01", "score": "0.6353232", "text": "function removespace($text)\n{\n $text = preg_replace('/[\\t\\n\\r\\0\\x0B]/', '', $text);\n $text = preg_replace('/([\\s])\\1+/', ' ', $text);\n $text = trim($text);\n return $text;\n}", "title": "" }, { "docid": "39ba85f13a18fd92fe1ee460b8d0c38d", "score": "0.6095651", "text": "function remove_whitespaces($word){\n $tmp_word = \"\";\n for($i = 0; $i < strlen($word); $i++){\n if($word[$i] == \"\\s\" or $word[$i] == \"\\t\" or $word[$i] == \" \" or is_one_line_comment($word)){\n continue;\n }\n $tmp_word = $tmp_word . $word[$i];\n }\n return $tmp_word;\n}", "title": "" }, { "docid": "e1e89e5395ee8b7a6516029a869dc5fe", "score": "0.6081944", "text": "function safeTrim (&$text) {\n //we have to do this odd return because in order to pre-process the superglobals we have to call by-reference,\n //but calls that use anonymous variables or function return values will not be by-reference\n return $text = preg_replace ('/^[\\pZ\\p{Cc}\\p{Cf}\\p{Cn}\\p{Cs}]+|[\\pZ\\p{Cc}\\p{Cf}\\p{Cn}\\p{Cs}]+$/u', '', $text);\n}", "title": "" }, { "docid": "014d37d07b33d28ca03407b61b858a6a", "score": "0.60791856", "text": "function trim_and_single_space_string($str) {\r\r\n\treturn preg_replace (\"/( )+/\",\" \",trim($str));\r\r\n}", "title": "" }, { "docid": "014d37d07b33d28ca03407b61b858a6a", "score": "0.60791856", "text": "function trim_and_single_space_string($str) {\r\r\n\treturn preg_replace (\"/( )+/\",\" \",trim($str));\r\r\n}", "title": "" }, { "docid": "dce6415a10fd38d2e22fc6ecc5de71de", "score": "0.60735863", "text": "function removeExtraSpace($text)\n{\n\treturn trim(preg_replace('/\\s\\s+/', ' ', $text));\n}", "title": "" }, { "docid": "e80c69a25875ab729b1226a55039c229", "score": "0.6025141", "text": "function stripTextBuffer($text)\n{\n $text = strstr($text, ': '); //Strip everything preceeding ':'\n $text = str_replace(': ', '', $text); //Strip the ':'\n return $text;\n}", "title": "" }, { "docid": "e8c02c6e98ab5289daa8c8eec1efe4a5", "score": "0.59771705", "text": "function normalise_text($s) {\n return strtolower(trim(preg_replace('/\\s{2,}/', ' ', $s)));\n}", "title": "" }, { "docid": "bee36b52eb40ee874d19b00dcfd10811", "score": "0.5835885", "text": "function strip_whitespace(string $string) : string\n{\n return Str::stripWhitespace($string);\n}", "title": "" }, { "docid": "8b0dc4c61bc84adab831e4a8d797f199", "score": "0.58189654", "text": "function clean_for_aiml_match($text)\r\n{\r\n\t$otext = $text;\r\n\t$text= remove_allpuncutation($text); //was not all before\r\n\t$text= whitespace_clean($text);\r\n\t$text= captialise($text);\r\n\t\r\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",4);\r\n\t\t\r\n\treturn $text;\r\n}", "title": "" }, { "docid": "e36d05b50070ff3003d44f2db8cb1698", "score": "0.57874787", "text": "function collapse_spaces( &$textstr )\n{\n return preg_replace( \"/\\s+/\", \" \", $textstr );\n}", "title": "" }, { "docid": "3230d8e9a685c3357a1ec756a608cf19", "score": "0.5748845", "text": "function test_drop_whitespace_whitespace_only()\n {\n $this->check_wrap(\" \", 6, []);\n }", "title": "" }, { "docid": "98719422fd526a30f89598e055f157a6", "score": "0.57445717", "text": "function removeWhiteSpace($str) {\r\n $str = str_replace(\"&nbsp;\", \"\", $str);\r\n $str = str_replace(\" \", \"\", $str);\r\n return trim($str);\r\n}", "title": "" }, { "docid": "93b6e22a872e6d7c6235ad553e73089b", "score": "0.5734006", "text": "function whitespace_trim($str){\n\t$string = preg_replace('/\\s+/', '', $str);\n\treturn $string;\n}", "title": "" }, { "docid": "83710ae25b7556f6eb2a70d9f2899e0b", "score": "0.5722778", "text": "function checker($s)\n{\n \n $result = str_replace( array( '\\'', '\"',\n ',' , ';', '<', '>', \"%\", \"=\", \"_\"), ' ', $s);\n \n \n return $result;\n}", "title": "" }, { "docid": "7ee286eee44f622c76c56443a5f9d309", "score": "0.5690857", "text": "function StripExtraSpace($s)\r\n{\r\n $newstr = \"\";\r\n for($i = 0; $i < strlen($s); $i++)\r\n {\r\n $newstr = $newstr . substr($s, $i, 1);\r\n if(substr($s, $i, 1) == ' ')\r\n while(substr($s, $i + 1, 1) == ' ')\r\n $i++;\r\n }\r\n return $newstr;\r\n}", "title": "" }, { "docid": "06f2ab2bcd012d5edc76ee8bcc906c0e", "score": "0.56690943", "text": "function wbb_trim($text) {\r\n\tif ($text != '') {\r\n\t\t// removing whitespace may not work with some charsets (like utf - 8, gb2312, etc)\r\n\t\tglobal $removewhitespace;\r\n\t\tif ($removewhitespace == 1) {\r\n\t\t\t$text = str_replace(chr(160), \" \", $text); // remove alt + 0160\r\n\t\t\t$text = str_replace(chr(173), \" \", $text); // remove alt + 0173\r\n\t\t\t$text = str_replace(chr(240), \" \", $text); // remove alt + 0240\r\n\t\t\t$text = str_replace(\"\\0\", \" \", $text); // remove whitespace\r\n\t\t}\r\n\t\t$text = trim($text);\r\n\t}\t\r\n\r\n\treturn $text;\r\n}", "title": "" }, { "docid": "edb28d0b9fdd912a0ae7c5041e44e5af", "score": "0.5666053", "text": "function remove_spaces($Text) {\n$Text = preg_replace(\"/(^\\t+|\\t+$)/\",\"\",$Text);\n$Text = preg_replace(\"/(^\\n+|\\n+$)/\",\"\",$Text);\n$Text = preg_replace(\"/(^\\r+|\\r+$)/\",\"\",$Text);\n$Text = preg_replace(\"/(\\r|\\n|\\t)+/\",\" \",$Text);\n$Text = preg_replace(\"/\\s\\s+/\",\" \",$Text);\n$Text = preg_replace(\"/(^\\s+|\\s+$)/\",\"\",$Text);\n$Text = trim($Text, \"\\x00..\\x1F\");\n$Text = remove_bad_entities($Text);\nreturn $Text; }", "title": "" }, { "docid": "b572761b6661e0c743eee394a9ae4a72", "score": "0.56385404", "text": "function remove_puncutation($text)\r\n{\t\r\n\t$otext = $text;\r\n\t$text = preg_replace('/[^a-zA-Z0-9|+|-|*|\\/|\\.|?|!|Å |Å¡|Ž|ž|À|Ã�|Â|Ã|Ä|Ã…|Æ|Ç|È|É|Ê|Ë|ÃŒ|Ã�|ÃŽ|Ã�|Ñ|Ã’|Ó|Ô|Õ|Ö|Ø|Ù|Ú|Û|Ü|Ã�|Þ|ß|à|á|â|ã|ä|Ã¥|æ|ç|è|é|ê|ë|ì| í|î|ï|ð|ñ|ò|ó|ô|õ|ö|ø|ù|ú|û|ý|þ|ÿ]/i', ' ', $text);\r\n\t\r\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",4);\r\n\t\r\n\treturn $text;\r\n}", "title": "" }, { "docid": "005bf344bb58d1b977178abe2dde5442", "score": "0.56291157", "text": "function clearString($string){\n return preg_replace(\"/\\r\\n|\\r|\\n/\",'<br/>',$string);\n}", "title": "" }, { "docid": "97eb68db821b0e2fe55f74c24884baa7", "score": "0.5627986", "text": "function cleanUpString($str)\r\n{\r\n $string = str_replace(' ', '', $str);\r\n if ($string != \"\" && $string != null && $string != false && $string != \" \") {\r\n $string = str_replace(' ', '', $str);\r\n $string = trim($str, \" \");\r\n $string = strip_tags($str);\r\n $string = ucwords(strtolower($str));\r\n\r\n return $string;\r\n } else {return false;}\r\n}", "title": "" }, { "docid": "c1416b7dc320911353501b70a34e3bca", "score": "0.5623641", "text": "public function cleanText($txt) {\n\n return (empty($txt)) ? '' : preg_replace( \"/\\r\\n|\\r|\\n|\\\"/\", \"\", $txt);\n\n }", "title": "" }, { "docid": "55741e79f01fc4a3ab32279eb7fbca83", "score": "0.5617254", "text": "function clearSpecialChar($text) {\n if($text!=\"\") {\n $text=strtolower($text);\n $code_entities_match = array(' ','--','&quot;','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','\"','<','>','?','[',']','\\\\',';',\"'\",',','.','/','*','+','~','`','=');\n $code_entities_replace = array('','','','','','','','','','','','','','','','','','','','','','','','','','');\n $text = str_replace($code_entities_match, $code_entities_replace, $text);\n }\n return $text;\n }", "title": "" }, { "docid": "55741e79f01fc4a3ab32279eb7fbca83", "score": "0.5617254", "text": "function clearSpecialChar($text) {\n if($text!=\"\") {\n $text=strtolower($text);\n $code_entities_match = array(' ','--','&quot;','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','\"','<','>','?','[',']','\\\\',';',\"'\",',','.','/','*','+','~','`','=');\n $code_entities_replace = array('','','','','','','','','','','','','','','','','','','','','','','','','','');\n $text = str_replace($code_entities_match, $code_entities_replace, $text);\n }\n return $text;\n }", "title": "" }, { "docid": "55741e79f01fc4a3ab32279eb7fbca83", "score": "0.5617254", "text": "function clearSpecialChar($text) {\n if($text!=\"\") {\n $text=strtolower($text);\n $code_entities_match = array(' ','--','&quot;','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','\"','<','>','?','[',']','\\\\',';',\"'\",',','.','/','*','+','~','`','=');\n $code_entities_replace = array('','','','','','','','','','','','','','','','','','','','','','','','','','');\n $text = str_replace($code_entities_match, $code_entities_replace, $text);\n }\n return $text;\n }", "title": "" }, { "docid": "2f76157b15cb0673da731f6d4cde2683", "score": "0.5609251", "text": "function trimwhitespace($text) {\n\t\n\t\t$_blocks_match = \"script|pre|style|textarea\";\n\t\n\t\t// Pull out the blocks\n\t\tpreg_match_all(\"!<($_blocks_match)[^>]+>.*?</($_blocks_match)>!is\", $text, $match);\n\t\t$_blocks = $match[0];\n\t\t$text = preg_replace(\"!<($_blocks_match)[^>]+>.*?</($_blocks_match)>!is\", '@@@XNYO:TRIM@@@', $text);\n\t\n\t\t// clean up all whitespaces from the start of a line to the start of a HTML tag\n\t\t$text = preg_replace('/^[\\s]+?</m', '<', $text);\n\t\n\t\t// remove multiple lines/empty lines\n\t\t$text = preg_replace('/>[\\s\\t\\n]{2,}?</m', \">\\n<\", $text);\n\t\n\t\t// replace blocks\n\t\tforeach($_blocks as $curr_block)\n\t\t\t$text = preg_replace(\"!@@@XNYO:TRIM@@@!\",$curr_block,$text,1);\n\t\n\t\treturn $text; \n\t}", "title": "" }, { "docid": "e153c53e2a68fa7aff8db47666c2bff8", "score": "0.5596905", "text": "public function remove_white_space($string) {\n\t\t\treturn preg_replace('/\\s+/', '', $string);\n\t\t}", "title": "" }, { "docid": "875b09d77af8762c80699ed1009b250c", "score": "0.5596222", "text": "function cleanText(&$textToClean) {\n $textToClean = trim($textToClean);\n // drops all non utf-8 characters\n $textToClean = iconv(\"UTF-8\", \"UTF-8//IGNORE\", $textToClean);\n $textToClean = mb_strtolower($textToClean);\n\n\n $textToClean = preg_replace('/\\s+/', ' ', $textToClean);\n return $textToClean;\n }", "title": "" }, { "docid": "e6ffe1c16c536ee5f74578bd67be0b0a", "score": "0.55582815", "text": "function test_drop_whitespace_false()\n {\n # SF patch #1581073\n $text = \" This is a sentence with much whitespace.\";\n $this->check_wrap(\n $text,\n 10,\n [\n \" This is a\",\n \" \",\n \"sentence \",\n \"with \",\n \"much white\",\n \"space.\"\n ],\n array('drop_whitespace' => False)\n );\n }", "title": "" }, { "docid": "ae84b25509f8fd2a56ec10d6d7919a89", "score": "0.55571944", "text": "protected function removeWhitespace($content)\n {\n return preg_replace('`\\s+`', '', $content);\n }", "title": "" }, { "docid": "95a9d7a7af28291df091266697837da5", "score": "0.5544724", "text": "function clean_string($string){\n\t//return preg_replace('/[ \\t]+/', ' ', $string);\n\treturn preg_replace('/[ \\t]+/', ' ', preg_replace('/\\s*$^\\s*/m', \"\\n\", $string));\n}", "title": "" }, { "docid": "f112448f6dc26c595a7eb146563c7c54", "score": "0.5541408", "text": "public function testClean() {\n\t\t$string = new String(' titon framework' . PHP_EOL);\n\t\t$string->clean();\n\n\t\t$this->assertEquals('titon framework', $string->value());\n\t}", "title": "" }, { "docid": "43d80ed2f172e821aa997e9aa231384b", "score": "0.5524161", "text": "public function testCorrectConversion(){\n $text = ' abc 123 ';\n $var = \\sergiolch\\helper\\super_trim($text);\n $this->assertTrue($var == 'abc 123');\n unset($var);\n }", "title": "" }, { "docid": "054f401593caf87bb0f4c87593d912bc", "score": "0.5520786", "text": "private function cleanText(string $text): string\n {\n $text = preg_replace('/[\\t\\f\\r]/', '', $text);\n $text = preg_replace('/<br[^>]*>/', PHP_EOL, $text);\n $text = preg_replace('/<a[^>]*iconusername[^>]*>[^<]*<img[^>]*title=\"([^\"]+)\"[^>]*>[^<]*<\\/a>/', '$1', $text);\n $text = preg_replace('/<(\\/?[bisu])(?: [^>]*)?>/', '[$1]', $text);\n $text = preg_replace('/<[^>]+>/', '', $text);\n $text = preg_replace('/^[\\t\\n\\f\\r]*|[\\t\\n\\f\\r]*$/', '', $text);\n $text = preg_replace(\"/( *\\n){3,}/\", PHP_EOL . PHP_EOL, $text);\n $text = preg_replace('/;([^ ])/', '; $1', $text);\n $text = preg_replace('/^\\n+/', '', $text);\n $text = preg_replace('/\\[(\\/?[bisu])]/', '<$1>', $text);\n $text = preg_replace('/&nbsp;/', ' ', $text);\n\n $text = explode(PHP_EOL, $text);\n $text = array_map('trim', $text);\n $text = implode(PHP_EOL, $text);\n\n $text = trim($text, \"\\n\\r \\t\");\n\n return $text;\n }", "title": "" }, { "docid": "275ad55f20110f581da456b850eb7a44", "score": "0.551712", "text": "function clean( $text ) {\n return htmlentities2( $text );\n }", "title": "" }, { "docid": "8929a877da2c7145a594eaaf1b020113", "score": "0.55090314", "text": "function remove_allpuncutation($text)\r\n{\r\n\t$otext = $text;\r\n\t$text = preg_replace('/[^a-zA-Z0-9|+|-|\\*|Å |Å¡|Ž|ž|À|Ã�|Â|Ã|Ä|Ã…|Æ|Ç|È|É|Ê|Ë|ÃŒ|Ã�|ÃŽ|Ã�|Ñ|Ã’|Ó|Ô|Õ|Ö|Ø|Ù|Ú|Û|Ü|Ã�|Þ|ß|à|á|â|ã|ä|Ã¥|æ|ç|è|é|ê|ë|ì|í|î|ï|ð|ñ|ò|ó|ô|õ|ö|ø|ù|ú|û|ý|þ|ÿ]/is', ' ', $text);\r\n\t\r\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",4);\r\n\t\r\n\treturn $text;\r\n}", "title": "" }, { "docid": "5b0613c9ce09eb680995dfedc4396115", "score": "0.5504344", "text": "static function blankNewlines( $text )\n {\n return preg_replace( \"/\\r\\n|\\r|\\n/\", ' ', $text );\n }", "title": "" }, { "docid": "f1ead5f56f4bb455f88a529d7c9b4e09", "score": "0.55015606", "text": "function test_drop_whitespace_false_whitespace_only()\n {\n $this->check_wrap(\" \", 6, [\" \"], array('drop_whitespace' => False));\n }", "title": "" }, { "docid": "4fa24d2556744611f40ff8f650e5973d", "score": "0.54889274", "text": "function clean_shortanswer($val)\n{\n\t$val = preg_replace(\"/\\s{3,}/is\",\"\",$val);\n\t$val = substr($val,0,1000);\n\treturn $val;\n}", "title": "" }, { "docid": "ac50838831fc0836d393eabf2dd4e6bb", "score": "0.54611695", "text": "function stripBBCode($text_to_search) {\r\n $pattern = '|[[\\/\\!]*?[^\\[\\]]*?]|si';\r\n $replace = '';\r\n return preg_replace($pattern, $replace, $text_to_search);\r\n}", "title": "" }, { "docid": "127275df6e0ef7cdb6d5cbcb9dabf52c", "score": "0.5448595", "text": "function wp_kses_no_null( $string, $options = null )\n{\n if ( !isset( $options[ 'slash_zero' ] ) ) {\n $options = array( 'slash_zero' => 'remove' );\n }\n\n $string = preg_replace( '/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]/', '', $string );\n if ( 'remove' == $options[ 'slash_zero' ] ) {\n $string = preg_replace( '/\\\\\\\\+0+/', '', $string );\n }\n\n return $string;\n}", "title": "" }, { "docid": "17599230bf79203fe155698fa3435f7a", "score": "0.54434514", "text": "function remove_empties($content){\n\t$array = array(\n\t'<p>['\t\t=>\t'[',\n\t']</p>'\t\t=>\t']',\n\t']<br />' \t=>\t']'\t\n\t);\n\treturn strtr($content,$array);\n\t}", "title": "" }, { "docid": "324a3143523d08e92fe461a2540ddc68", "score": "0.5416812", "text": "function minify_text($txt) {\n\t\n\t\t// Compress whitespace.\n\t\t$txt = preg_replace('/\\s+/', ' ', $txt);\n\t\t// Remove comments.\n\t\t$txt = preg_replace('/\\/\\*.*?\\*\\//', '', $txt);\n\t\t\n\t\treturn $txt;\n\t\n\t}", "title": "" }, { "docid": "c79183e1ccbeb8a2409e7f5fd847187c", "score": "0.5387396", "text": "function verification($texte)\n{\n\t#$texte = strip($texte);\n\t$texte = htmlspecialchars($texte);\n\t$texte = htmlentities($texte);\n\t$texte = trim($texte);\n\n\treturn $texte;\n}", "title": "" }, { "docid": "d2db2b15a95d2902fbfee296a34df721", "score": "0.5386795", "text": "function safetext ($text) {\n\t\t$text = preg_replace(\"/[^a-z0-9_-]/i\", \"\", $text);\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "6a3207fbd92e1d01d642188089a92dc6", "score": "0.53840715", "text": "function remove_specialchars($str){\n\t\n\t$myreg = \"/[^a-z0-9 ]+/i\";\t\t\t\t\t\n\t$keyword = preg_replace($myreg,\" \",$str);\n\t\n\tif(str_word_count($keyword)>1){\n\t\t$keyword = preg_replace(\"/\\s+/\",\" \",$keyword);\n\t}\n\t\n\treturn $keyword;\n}", "title": "" }, { "docid": "d8bd360bc776a09d254c725780d68f5a", "score": "0.53828317", "text": "function mb_trim($string)\n {\n return mb_ereg_replace('^\\s*([\\s\\S]*?)\\s*$', '\\1', $string);\n }", "title": "" }, { "docid": "f65c9452c86eff41a803323a5a987583", "score": "0.53515214", "text": "public function clearText($text) {\n $text = trim($text);\n return $this->mysqli->real_escape_string($text);\n }", "title": "" }, { "docid": "281e6ab00f90d515bfe476d0beea569e", "score": "0.5342927", "text": "function unsquare($text,$replace=''){\n\n\treturn preg_replace('/\\[\\-*\\w+\\\\-*]$/i', $replace, $text);\n}", "title": "" }, { "docid": "13f09ce5b8680c579ad1a88bff210275", "score": "0.5342742", "text": "public function check_empty($str='') {\n\t\tif(strlen(trim($str))==0) $str = '&nbsp;';\n\t\treturn trim($str);\n\t}", "title": "" }, { "docid": "85d275c2e48050eef045ea8e0519e48d", "score": "0.53340536", "text": "function unhtmlnlsafe ($text) {\n\t\t$text = preg_replace(\"/<br \\/>/i\", '', $text);\n\t\t$text = $this->unhtmlsafe();\n\t}", "title": "" }, { "docid": "edb04bfdc6aeb43a14c729f325b4de99", "score": "0.53339636", "text": "function remove_password_text( $text ) {\n\t\tif ( $text == 'Lost your password?' ) {\n\t\t\t$text = '';\n\t\t}\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "3f163ba19d7fd1f6014fc81c51b068ba", "score": "0.53310764", "text": "function strip_saltos($str){\n\t$str = ereg_replace( chr(13) , \"\" , $str );\n\t$str = ereg_replace( chr(10) , \"\" , $str );\n\treturn $str;\n}", "title": "" }, { "docid": "a97dc6bcda519bd43f24e2696e31c913", "score": "0.53161335", "text": "private function _munge_whitespace(string $text): string\n {\n #macro PHP_TEXT_WRAPPER_DEBUG; echo PHP_EOL. str_repeat('-', 50). ' _munge_whitespace '. str_repeat('-', 50). PHP_EOL. PHP_EOL;\n #macro PHP_TEXT_WRAPPER_DEBUG; echo \"\\t_munge_whitespace -> text = \" . json_encode($text) . PHP_EOL;\n\n if ($this->expand_tabs) {\n #macro PHP_TEXT_WRAPPER_DEBUG; echo '$this->tab_size = '.$this->tab_size.PHP_EOL;\n $text = StringUtils::expandTabs($text, $this->tab_size);\n #macro PHP_TEXT_WRAPPER_DEBUG; echo \"\\t_munge_whitespace -> expand_tabs -> text = \" . json_encode($text) . PHP_EOL;\n }\n\n if ($this->replace_whitespace) {\n $text = strtr($text, $this->unicode_whitespace_trans);\n #macro PHP_TEXT_WRAPPER_DEBUG; echo \"\\t_munge_whitespace -> replace_whitespace -> text = \" . json_encode($text) . PHP_EOL;\n }\n\n return $text;\n }", "title": "" }, { "docid": "471943f0250ea7cac8970f5be09bd986", "score": "0.53109276", "text": "function _stripp($data) {\r\n\t\t$data = preg_replace('`^\\s*<p[^>]*>\\s*`', '', $data);\r\n\t\t$data = preg_replace('`\\s*</p[^>]*>\\s*$`', '', $data);\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "2774257c1bbbc2d8f850025c4a188e18", "score": "0.53030115", "text": "function test_drop_whitespace_leading_whitespace()\n {\n # followed by non-whitespace).\n # SF bug #622849 reported inconsistent handling of leading\n # whitespace; let's test that a bit, shall we?\n $text = \" This is a sentence with leading whitespace.\";\n $this->check_wrap(\n $text,\n 50,\n [\" This is a sentence with leading whitespace.\"]\n );\n $this->check_wrap(\n $text,\n 30,\n [\" This is a sentence with\", \"leading whitespace.\"]\n );\n }", "title": "" }, { "docid": "c81661615b15df00fa9742db2bd79286", "score": "0.53006685", "text": "function remove_comment($word){\n if(has_comment($word)){\n $before_comment = \"/.*(?=#)/\";\n preg_match($before_comment, $word, $match);\n return $match[0];\n }\n else{\n return $word;\n }\n}", "title": "" }, { "docid": "2032839673d58a5ae44d5b40bcf1abb6", "score": "0.5299027", "text": "function strip( $input )\n {\n return $input;\n }", "title": "" }, { "docid": "63658e484c585d1977e589548cb8095d", "score": "0.52936596", "text": "function firstSentence($text)\n{\n\t$text = preg_replace(\"/<br>/i\", \" \", $text);\n\t$text = preg_replace(\"/<.*?>/\", \"\", $text);\n\t$pos = strpos($text, \". \");\n\treturn ($pos) ? substr($text, 0, $pos + 1) : $text;\n}", "title": "" }, { "docid": "670193183701ae39dc957868a7b93065", "score": "0.5292289", "text": "public function __invoke($str)\n {\n return (preg_match(\"#\\s#\", $str)) ? false : true;\n }", "title": "" }, { "docid": "35bb95169e36f61c4b2c5649ab0a02ba", "score": "0.52908427", "text": "function stripSlashesString($s){\r\n\t//$slashes = array (\"\\\", \"/\");\r\n\r\n\t//return str_replace($slashes, \"\", $s);\r\n\r\n}", "title": "" }, { "docid": "8e35c8f63b3565c8be37fee83a4784c2", "score": "0.52813995", "text": "function delete_double_spaces($string) {\n\n \t\twhile (strpos($string, \" \")) $string = str_replace(\" \", \" \", $string);\n\n \t\treturn $string;\n\n \t}", "title": "" }, { "docid": "62809a4141c894ea17cd21a463f549c6", "score": "0.5277264", "text": "function trimIfString($value) {\n return is_string($value) ? trim($value) : $value;\n }", "title": "" }, { "docid": "d379d227a92c3f287fb9e19aff5edb32", "score": "0.5275993", "text": "function swearFilter($text) {\n\t$text = str_replace(\"fuck\", \"****\", $text);\n\t$text = str_replace(\" cunt \", \" **** \", $text);\n\treturn $text;\n}", "title": "" }, { "docid": "16a3f5f9e57d52daafa254bc95e102f8", "score": "0.52720475", "text": "function remove_leading_slash($input) {\r\n\twhile (substr($input,0,1) == \"/\") $input = substr($input,1);\r\n\treturn $input;\r\n}", "title": "" }, { "docid": "0d832427228458897c1f8968191bb114", "score": "0.5270751", "text": "public function cleanText($text = '')\n {\n $text = array_udiff(explode(' ', $text), $this->stopWords, 'strcasecmp');\n\n return implode(' ', $text);\n }", "title": "" }, { "docid": "9321cd6fa2556b0c133ce008a7edb979", "score": "0.5261048", "text": "function bb_unspacefy_and_trim($st) {\n\t//$whole_match = $st[0];\n\t$captured = $st[1];\n\t$unspacefied = preg_replace(\"/\\[ (.*?)\\ ]/\", \"[$1]\", $captured);\n\n\treturn $unspacefied;\n}", "title": "" }, { "docid": "3b7f87130b9d98936997dee9ed318afd", "score": "0.5257949", "text": "function isWhitespace($str)\n {\n $str = trim($str);\n if (strlen($str) == 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1e2a8ee24edfd68567d536e740f62ac6", "score": "0.5256672", "text": "public static function cleanText($thetext){\r\n //lowercaseify\r\n $thetext=strtolower($thetext);\r\n\r\n //remove any html\r\n $thetext = strip_tags($thetext);\r\n\r\n //replace all line ends with empty strings\r\n $thetext = preg_replace('#\\R+#', '', $thetext);\r\n\r\n //remove punctuation\r\n //see https://stackoverflow.com/questions/5233734/how-to-strip-punctuation-in-php\r\n // $thetext = preg_replace(\"#[[:punct:]]#\", \"\", $thetext);\r\n //https://stackoverflow.com/questions/5689918/php-strip-punctuation\r\n $thetext = preg_replace(\"/[[:punct:]]+/\", \"\", $thetext);\r\n\r\n //remove bad chars\r\n $b_open=\"“\";\r\n $b_close=\"”\";\r\n $b_sopen='‘';\r\n $b_sclose='’';\r\n $bads= array($b_open,$b_close,$b_sopen,$b_sclose);\r\n foreach($bads as $bad){\r\n $thetext=str_replace($bad,'',$thetext);\r\n }\r\n\r\n //remove double spaces\r\n //split on spaces into words\r\n $textbits = explode(' ',$thetext);\r\n //remove any empty elements\r\n $textbits = array_filter($textbits, function($value) { return $value !== ''; });\r\n $thetext = implode(' ',$textbits);\r\n return $thetext;\r\n }", "title": "" }, { "docid": "74ece060f3abb201ef815524c6925a69", "score": "0.52560854", "text": "function trim_string(string $data){\n $data = strip_tags($data);\n $data = stripslashes($data);\n $data = trim($data);\n\n return $data;\n}", "title": "" }, { "docid": "1ac7c0e670a10e2a9af7243cb10fde5f", "score": "0.5243703", "text": "function trim($str) {\n\t\treturn preg_replace('/^[\\pZ\\pC]+|[\\pZ\\pC]+$/u','',$str);\n\t}", "title": "" }, { "docid": "292ada0800cb2bee1cee9dd7bd95656f", "score": "0.52382195", "text": "function strongClean($str)\n \t{\n\t\t$str = preg_replace(\"/[\\\\s]+/\", \" \", $str);\n \n\t\treturn addslashes($str);\n\t}", "title": "" }, { "docid": "81f9bcdbce1337e2f714f356427a05b6", "score": "0.5233157", "text": "function stripslash($text) {\n\tif (QUOTES_GPC) $text = stripslashes($text);\n\treturn $text;\n}", "title": "" }, { "docid": "8f0ebcd50034c4bafef5511734924ace", "score": "0.5231989", "text": "function stripinput($text) {\n\tif (QUOTES_GPC) $text = stripslashes($text);\n\t$search = array(\"\\\"\", \"'\", \"\\\\\", '\\\"', \"\\'\", \"<\", \">\", \"&nbsp;\");\n\t$replace = array(\"&quot;\", \"&#39;\", \"&#92;\", \"&quot;\", \"&#39;\", \"&lt;\", \"&gt;\", \" \");\n\t$text = str_replace($search, $replace, $text);\n\treturn $text;\n}", "title": "" }, { "docid": "b898d492079da8aabc2f31c54ca2f412", "score": "0.52302396", "text": "function safe_ponctuation($str){\n $str = str_replace(' ?', '&nbsp;?', $str);\n $str = str_replace(' !', '&nbsp;!', $str);\n $str = str_replace('« ', '«&nbsp;', $str);\n $str = str_replace(' »', '&nbsp;»', $str);\n return $str;\n}", "title": "" }, { "docid": "e30afdf7b6572ad10fcc390d3c5722ca", "score": "0.522512", "text": "function quitarBlancos($varchar){\n\treturn trim($varchar);\n}", "title": "" }, { "docid": "d3e78822d5221b399e69529dbfc81313", "score": "0.52021134", "text": "function contientEspace($chaine){\n\t\t$retour = false;\n\t\tif(preg_match(\"/ /i\", $chaine)){\n\t\t\t$retour = true;\n\t\t}\n\t\treturn $retour;\n\t}", "title": "" }, { "docid": "65d49cdae389ce220710e54120856449", "score": "0.5195292", "text": "function str_replace_once($search, $replace, $text){ \r\n $pos = strpos($text, $search); \r\n return $pos!==false ? substr_replace($text, $replace, $pos, strlen($search)) : $text; \r\n}", "title": "" }, { "docid": "60b7be436a8f07211e6c07fbdd267f98", "score": "0.51939386", "text": "public static function checkEmpty( $content ) {\n\t\t$empty_str = preg_replace( '/(<p>)+/', '', $content );\n\t\t$empty_str = preg_replace( '/(<\\/p>)+/', '', $content );\n\t\t$empty_str = str_replace( '&nbsp;', '', $content );\n\t\n\t\treturn $empty_str;\n\t}", "title": "" }, { "docid": "b2366e58f3f9af8031bf77056ff15752", "score": "0.5185668", "text": "public static function cleanTextRss($text)\r\n\t{\r\n\t\t// $text = preg_replace( \"']*>.*?'si\", '', $text );\r\n\t\t/* Remove this line to leave URL's intact */\r\n\t\t/* $text = preg_replace( '/]*>([^<]+)<\\/a>/is', '\\2 (\\1)', $text ); */\r\n\t\t$text = preg_replace('//', '', $text);\r\n\t\t$text = preg_replace('/{.+?}/', '', $text);\r\n\t\t$text = preg_replace('/ /', ' ', $text);\r\n\t\t//$text = preg_replace('/&/', ' ', $text);\r\n\t\t$text = preg_replace('/\"/', ' ', $text);\r\n\t\t/* add the second parameter to strip_tags to ignore the tag for URLs */\r\n\t\t$text = strip_tags($text, '');\r\n\t\t$text = stripcslashes($text);\r\n\t\t$text = htmlspecialchars($text);\r\n\t\t//$text = htmlentities( $text );\r\n\t\t\r\n\t\treturn $text;\r\n\t}", "title": "" }, { "docid": "c7eff6fd3886bb55ef197410f62242cd", "score": "0.5185093", "text": "function empty_widget_title($title)\n{\n return $title == '&nbsp;' ? '' : $title;\n}", "title": "" }, { "docid": "448d4ecabdd55dd25d57420ebced5ac6", "score": "0.51832926", "text": "function trimBrNotation(&$str){\r\n\t//1、str_replace \r\n\t//$str = str_replace(array(\"/r/n\", \"/r\", \"/n\"), \"\", $str); \r\n\t//2、re \r\n\t//$str = preg_replace('//s*/', '', $str); \t \r\n\t//3、php_eol variable \r\n\t$str = str_replace(PHP_EOL, '', $str); \r\n}", "title": "" }, { "docid": "9300784ce89acf57fd3ea380287c0719", "score": "0.51788545", "text": "function clean($string){ \r\n\r\n\t$var = htmlentities($string);\r\n\r\n\treturn trim($var);\r\n}", "title": "" }, { "docid": "849010285d59d39f10d0bb9ce14afe53", "score": "0.51775604", "text": "private function _cleanText($text) {\n $text = $this->htmlToText($text);\n\n //Clean out all the stopwords\n foreach ($this->stopwords as $stopword)\n $text = str_replace(' '.$stopword.' ', ' ', $text);\n\n //Clean out the escape characters\n $text = preg_replace('/(&)((?:[a-z][a-z]+))(;)/is', ' ', $text);\n $text = preg_replace('/(&)(#)(\\\\d+)(;)/is', ' ', $text);\n\n //Clean out all the spaces\n $text = preg_replace('!\\s+!', ' ', $text);\n\n $text = trim($text);\n\n return $text;\n }", "title": "" }, { "docid": "a9fca08cf7256fb082c0ddf15c98ab80", "score": "0.51767606", "text": "function cleanText( $text )\n\t{\n\t\t$bbcode = & JCommentsFactory::getBBCode();\n\t\t\n\t\t$text = $bbcode->filter($text, true);\n\t\t$text = str_replace('<br />', ' ', $text);\n\t\t$text = preg_replace('/(\\s){2,}/i', '\\\\1', $text);\n\t\t$text = preg_replace(\"'<script[^>]*>.*?</script>'si\", '', $text);\n\t\t$text = preg_replace('/<a\\s+.*?href=\"([^\"]+)\"[^>]*>([^<]+)<\\/a>/is', '\\2 (\\1)', $text);\n\t\t$text = preg_replace('/<!--.+?-->/', '', $text);\n\t\t$text = preg_replace('/{.+?}/', '', $text);\n\t\t$text = preg_replace('/&nbsp;/', ' ', $text);\n\t\t$text = preg_replace('/&amp;/', ' ', $text);\n\t\t$text = preg_replace('/&quot;/', ' ', $text);\n\t\t$text = strip_tags($text);\n\t\t$text = htmlspecialchars($text);\n\t\t$text = html_entity_decode($text);\n\t\t\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "b48d5a70cfdf5211d9dee5f51c6a2ae8", "score": "0.5160762", "text": "function queEspace($chaine){\n\t\t$chaineT = str_replace(\" \", \"\", $chaine);\n\t\tif(empty($chaineT)){\n\t\t\t$chaine=\"interdit\";\n\t\t}\n\t\treturn $chaine;\n\t}", "title": "" }, { "docid": "19d429f76598a76f4a63630469e8e462", "score": "0.51576734", "text": "function is_blank($string)\n{\n ensure_string($string, SUBJECT_FOR_FIRST_ARGUMENT);\n\n return preg_match('/^\\s*$/u', $string) === 1;\n}", "title": "" }, { "docid": "a32a65a3be16ee2e477a87970c87e553", "score": "0.51571894", "text": "function cleanString ($string){\n $string = preg_replace(\"/[^\\w\\s]+/u\", \"\", $string);\n //removes numbers\n $string = preg_replace(\"/\\d+/u\", \"\", $string);\n return $string;\n}", "title": "" }, { "docid": "a32a65a3be16ee2e477a87970c87e553", "score": "0.51571894", "text": "function cleanString ($string){\n $string = preg_replace(\"/[^\\w\\s]+/u\", \"\", $string);\n //removes numbers\n $string = preg_replace(\"/\\d+/u\", \"\", $string);\n return $string;\n}", "title": "" }, { "docid": "adeea1ba1879105cecf3b4097f76dc09", "score": "0.5154369", "text": "function common_sanitize_spaces($str='') {\n\t\t$str = \\common_utf8($str);\n\t\treturn \\trim(\\preg_replace('/\\h{1,}/u', ' ', $str));\n\t}", "title": "" }, { "docid": "c9533d8a0f75532dfc42f1fffc230215", "score": "0.5145857", "text": "function strip($text)\n {\n return strip_tags($text, '<p><strong><em><strike><br><hr><ul><ol><li><span><img>');\n }", "title": "" }, { "docid": "e355979d6bfe068eed722dc81ec0c2ff", "score": "0.514435", "text": "function common_sanitize_whitespace($str='', $multiline=false) {\n\t\t$newlines = $multiline ? 2 : 0;\n\t\treturn v_sanitize::whitespace($str, $newlines);\n\t}", "title": "" }, { "docid": "5ae0291761bb2fcb3def6f3b0d1a451e", "score": "0.5141038", "text": "function clean($string) {\n $string = preg_replace(\"/\\W\\s+/\", ' ', $string);\n $string = preg_replace(\"/-+/\", ' ', $string);\n $string = trim($string, '');\n return $string;\n}", "title": "" }, { "docid": "6f4537a737b9c43e923572e8ef0c0ded", "score": "0.5138704", "text": "function phpJSO_strip_junk (&$str, $whitespace_only = false)\n{\n\t// Remove unneeded spaces and semicolons\n\t$find = array\n\t(\n\t\t'/([^a-zA-Z0-9_$]|^)\\s+([^a-zA-Z0-9_$]|$)/s', // Unneeded spaces between tokens\n\t\t'/([^a-zA-Z0-9_$]|^)\\s+([a-zA-Z0-9_$]|$)/s', // Unneeded spaces between tokens\n\t\t'/([a-zA-Z0-9_$]|^)\\s+([^a-zA-Z0-9_$]|$)/s', // Unneeded spaces between tokens\n\t\t'/([^a-zA-Z0-9_$]|^)\\s+([^a-zA-Z0-9_$]|$)/s', // Unneeded spaces between tokens\n\t\t'/([^a-zA-Z0-9_$]|^)\\s+([a-zA-Z0-9_$]|$)/s', // Unneeded spaces between tokens\n\t\t'/([a-zA-Z0-9_$]|^)\\s+([^a-zA-Z0-9_$]|$)/s', // Unneeded spaces between tokens\n\t\t'/[\\r\\n]/s', // Unneeded newlines\n\t\t\"/\\t+/\" // replace tabs with spaces\n\t);\n\t// Unneeded semicolons\n\tif (!$whitespace_only)\n\t{\n\t\t$find[] = '/;(\\}|$)/si';\n\t}\n\t$replace = array\n\t(\n\t\t'$1$2',\n\t\t'$1$2',\n\t\t'$1$2',\n\t\t'$1$2',\n\t\t'$1$2',\n\t\t'$1$2',\n\t\t'',\n\t\t' ',\n\t\t'$1',\n\t);\n\t$str = preg_replace($find, $replace, $str);\n}", "title": "" }, { "docid": "3c25963d8c3324d817b828109ee940c4", "score": "0.51265013", "text": "function cleanEditorText ($text, $texttype = NULL) {\n\t// If we are using a plain text-field convert any linereturns to <br /> tags\n\t// Make sure that we have the content formatted correctly.\n\t\t\n\tinclude (\"sniffer.inc.php\");\n\t\n\t// If we just have a text box, replace new lines with <br /> tags\n\t// If the user didn't specify \"html\" as the texttype.\n\tif (!$supported && $texttype != 'html') {\n\t\t$text = htmlbr($text);\n\t}\n\t// This is a hack, but HTMLAREA adds a \\n at the begining of the text.\n\t// Let remove it instead of wading through all of the htmlarea code.\n\telse if ($supported) {\n\t\t$text = preg_replace(\"/$\\n/\", \"\", $text);\n\t}\n\t\n\treturn $text;\n}", "title": "" }, { "docid": "daf3db750330725c7573853fd2fbfa45", "score": "0.511913", "text": "function remove_spaces($string) {\n\t\treturn str_replace(' ', '', $string);\n\t}", "title": "" }, { "docid": "723be3bf0706e42217eedc53272e7b77", "score": "0.5115125", "text": "function isEmpty($str){\r\n\tif($str==null || $str==' '){\r\n\t\treturn 1;\r\n\t}else return 0;\r\n}", "title": "" }, { "docid": "4406a4fb78aa938ba46e1275186472b1", "score": "0.5113781", "text": "function stripslash( $text ) {\n if ( QUOTES_GPC ) {\n $text = stripslashes( $text );\n }\n\n return $text;\n}", "title": "" }, { "docid": "ba2b94ebbd16a0c76873f654c8f5e25c", "score": "0.5112833", "text": "function isSpace( $str ) {\n\tswitch( $str ) {\n\t case \" \":\n\t case \"。。\": return True;\n\t} // Endo of switch\n\treturn False;\n}", "title": "" } ]
e6693e1b6c4c714aad6f29c573a9c157
Inscription pour le chauffeur et le client
[ { "docid": "9b8f17b775b26453b295652ded3833db", "score": "0.5914114", "text": "public function inscription(){\n if(Input::get('type') == 'driver') Session::put('inscription_driver', 'true');\n return view('customer.inscription_commune');\n }", "title": "" } ]
[ { "docid": "e5ae6a71056d788ef42e9fc1f5b89ab1", "score": "0.70025307", "text": "public function inscription () {\n if (key_exists('inscriptionEnCours', $_SESSION)) {\n $constructeur = new ConstructeurUtilisateur($this->utilisateurs, $_SESSION['inscriptionEnCours'][GestionAuthentification::DONNEES_REF]);\n $constructeur->setErreur($_SESSION['inscriptionEnCours'][GestionAuthentification::ERREUR_REF]);\n } else {\n $constructeur = new ConstructeurUtilisateur($this->utilisateurs, array());\n }\n $this->vue->creationPageInscription($constructeur);\n }", "title": "" }, { "docid": "bdef77ced2896b42ee515d9fa5262885", "score": "0.6559416", "text": "public function affichageInscriptionEchouee () {\n $url = $this->routeur->getURLPageInscription();\n $this->routeur->POSTredirect($url, \"Inscription impossible, veuillez corriger les erreurs\");\n }", "title": "" }, { "docid": "416e19739726e8be4abb1fcd9e86afe6", "score": "0.6476768", "text": "function inscription_client($prenom,$nom,$email,$mdp,$adresse,$cp,$ville,&$err) {\n\n\trequire (\"modele/connectBD.php\");\n\n\ttry{\n\t\t$req = $bdd->prepare('SELECT * FROM client WHERE prenom = :prenom AND nom = :nom');\n\t\t$req->execute(array(\n\t\t\t\t'prenom' => $prenom,\n\t\t\t\t'nom' => $nom\n\t\t\t));\n\t}\n\tcatch(Exception $e)\n\t{\n die('Erreur : '.$e->getMessage());\n\t}\t \n\n\t$donnees=$req->fetchAll();\n\tif(count($donnees) > 0){\n\t\t$req->closeCursor();\n\t\t$err=\"Utilisateur déjà existant\";\n\t\treturn false;\n\t} \n\n\ttry{\n\t\t$req = $bdd->prepare('SELECT * FROM client WHERE email = :email');\n\t\t$req->execute(array(\n\t\t\t\t'email' => $email\n\t\t\t));\n\t}\n\tcatch(Exception $e)\n\t{\n die('Erreur : '.$e->getMessage());\n\t}\t \n\n\t$donnees=$req->fetchAll();\n\tif(count($donnees) > 0){\n\t\t$req->closeCursor();\n\t\t$err=\"Adresse mail déjà utilisée\";\n\t\treturn false;\n\t} \n\n\t//Ajout de l'utilisateur s'il n'existe pas déjà dans la base\n\n\ttry{\n\t\t$req = $bdd->prepare('INSERT INTO `client`(`email`, `password`, `nom`, `prenom`, `adresse`, `codepostal`, `ville`) VALUES (:email,:mdp,:nom,:prenom,:adresse,:cp,:ville)');\n\t\t$req->execute(array(\n\t\t\t\t'nom' => $nom,\n\t\t\t\t'prenom' => $prenom,\n\t\t\t\t'mdp' => $mdp,\n\t\t\t\t'email' => $email,\n\t\t\t\t'adresse' => $adresse,\n\t\t\t\t'cp' => $cp,\n\t\t\t\t'ville' => $ville\n\t\t\t));\n\t}\n\tcatch(Exception $e)\n\t{\n die('Erreur : '.$e->getMessage());\n\t}\t\n\n\treturn true;\n\n}", "title": "" }, { "docid": "78843e7a8b0e1a3ad608be1ca8583d32", "score": "0.6152069", "text": "public function inscription() {\n\n $this->render(\"inscription\");\n }", "title": "" }, { "docid": "e1f45eaedeecee042de319ab50fd3711", "score": "0.6144771", "text": "public function affichageInscriptionReussie () {\n $url = $this->routeur->getURLPageAccueil();\n $this->routeur->POSTredirect($url, \"Inscription r?ussie\");\n }", "title": "" }, { "docid": "fc6ac51dc2acb7c80406e46a98d38b57", "score": "0.6089522", "text": "public function inscription(){\n // Je checke la validité des données\n $error = $this->validateur(false);\n \n if(empty($error)){\n // Si c'est bon je créé une requete préparée d'insertion \n $sql = \"INSERT INTO `user` (`email`, `nom`, `mdp`) VALUES (:email, :nom, :mdp) \";\n // En choisisant de faire une requete préparée, j'évite les attaques par injection sql\n $req = database::$_conn->prepare($sql);\n // Il doit forcement y avoir autant de bindValue ou bindParam que de valeur à remplacer dans la requete\n $req->bindValue(\":email\", $this->email);\n $req->bindValue(\":nom\", $this->nom);\n $req->bindValue(\":mdp\", $this->cryptMdp($this->mdp));\n // Si la requete se passe bien\n if($req->execute()) { \n // Je renvoi true\n return true;\n } else {\n // Sinon cela veux dire que l'email rentré existe déjà en bdd\n return \"L'email est déjà connu de nos services !\";\n }\n } else {\n // Dans tous les autres cas je renvoi les erreurs\n return $error;\n }\n }", "title": "" }, { "docid": "8c4bb2b50df8825fe8df4136972915ea", "score": "0.60543156", "text": "public function dataSubscribe()\n {\n // get phone number from cipher\n Session::forget('phone');\n $chiper = Session::get('chiper');\n $URL = ETISALAT_SYSTEM . \"/getPhone?param=\" . $chiper;\n $dataPhoneNo = $this->get_content($URL);\n $checkPhone = trim('2' . $dataPhoneNo); // add 2\n session(['dataPhoneNo' => $dataPhoneNo]);\n\n // susbscription api to that number\n $URL = ETISALAT_TIBCO_SUBSCRIPTION . \"/subscriber.php?phone=\" . $dataPhoneNo;\n $result = $this->get_content($URL); // 1= SUCCESS else ERROR\n $result = preg_replace('/\\s+/', '', $result); // to remove extra space created by soap request\n\n if ($result == \"1\") { // SUCCESS\n // make susbcriber login from web\n $URL = ETISALAT_SYSTEM . \"/setActiveWebLogin?phone=\" . $checkPhone;\n $result = $this->get_content($URL);\n\n session(['MSISDN_ETISALAT' => $dataPhoneNo, 'Status' => 'active']);\n return redirect(Etisalat_Bundle_Route);\n } else {\n // $request->session()->flash('failed', 'فشلت العملية');\n session(['Status' => \"فشلت العملية\"]);\n return back();\n }\n }", "title": "" }, { "docid": "cea7c481eee14eac1d25d78b08d19303", "score": "0.60386616", "text": "public function inscription($id){\n\n\t\t$courManager = New CourManager();\n\t\t$cour = $courManager->find($id);\n\n\t\t$userManager = New UtilisateurManager();\n\t\t$etudiant = $userManager->findEleve();\n\n\t\t$userFormateur = New UtilisateurManager();\n\t\t$formateur = $userFormateur->findFormateur();\n\n\t\t$messagesManager = new MessageManager();\n\t\t$messages = $messagesManager->getMessage();\n\t\t$this->show('admin/inscription',[\n\t\t\t'cour' => $cour, \n\t\t\t'organisedThemes' => $this->getOrganisedThemes() , \n\t\t\t'messages' => $messages , \n\t\t\t'etudiant' => $etudiant ,\n\t\t\t'formateur'=> $formateur]);\n\n\t}", "title": "" }, { "docid": "559015e9c09e5a3c7ae48d3a0d2cfde0", "score": "0.5926023", "text": "function envoyer_inscription($desc, $nom, $mode, $options=array()) {\n\n\t$contexte = array_merge($desc,$options);\n\t$contexte['nom'] = $nom;\n\t$contexte['mode'] = $mode;\n\n\t$message = recuperer_fond('emails/mail_inscription_rapide',$contexte);\n\t$from = (isset($options['from'])?$options['from']:null);\n\t$head = null;\n\treturn array(\"\", $message,$from,$head);\n}", "title": "" }, { "docid": "0a66c25d2fc5d7da15ea5c9129f865f6", "score": "0.58713573", "text": "public function affiche()\n {\n echo \" Le client \" .$this->getNom().\" \" .$this->getPrenom(). \" a \". $this->getCompte()->getMontant().\"€ sur son compte \".$this->getCompte()->getNumero().\" et \".$this->getLivret()->getMontant().\"€ sur son livret \" .$this->getLivret()->getNumero().\"\\n\";\n }", "title": "" }, { "docid": "ca1cacae9854ea8e52287c8bed9d22c2", "score": "0.5856881", "text": "public function sinscrire() {\n // $validate = false;\n\n $errors = [];\n\n if (isset($_POST['formInscription'])) {\n $data = array();\n $returns = $this->validateFormInscription($_POST);\n $errors = $returns['errors'];\n extract($returns['forms']);\n $data['errors'] = $errors;\n $data['post'] = $_POST;\n\n if (sizeof($errors) !== 0) {\n\n $this->redirect(\"index.php?p=inscription\", $data);\n } else {\n //tous les champs sont validés insertion base de donnée\n //\n $password = password_hash($password, PASSWORD_BCRYPT);\n //niveau access=0 l'inscription doit etre valider par l'adminstrareur et change le niveauAccess vers statut 1\n $user = new Utilisateur($nom, $prenom, $login, $password, $email, '0');\n //generer le token de confirmation \n $token = $this->generateToken();\n $user->setConfirmationToken($token);\n\n\n $res = $this->TableUtilisateur->inscrire($user);\n\n if (is_array($res)) {//login existe deja ou niveau invalide\n foreach ($res as $key => $value) {\n\n // $data['errors'][$key]=$value;\n $errors[$key] = $value;\n }\n } else if ($res === true) {//si retour d'insertion est true\n //detruire les variables de session erreur et formulaire s'il existe\n unset($_SESSION[\"errors\"]);\n unset($_SESSION[\"post\"]);\n unset($data);\n //--------toodo envoi de message \n $id = $this->pdo->lastInsertId();\n $message = \"Bonjour \\n\\n\n Afin de confirmer votre inscription sur notre site veuillez cliquer sur ce lien:\\n\\n\n http://localhost/Bourse/index.php?p=confirmInsciption&id=\" . $id . \"&token=\" . $token;\n\n\n // $this->sendEmail($email,\"Confirmation d'inscription sur notre site\",$message);\n //test\n header(\"location:index.php?p=confirmInsciption&id=\" . $id . \"&token=\" . $token);\n die();\n $data['success'] = \"inscription effectué vous allez recevoir un mail de confirmation \";\n } else {//$res==false\n $errors['Errorinscription'] = \"Probleme d'nscription veuillez reesayer une autre fois \";\n }\n\n\n $data['errors'] = $errors;\n\n //envoi des messages \n $this->redirect(\"index.php?p=inscription\", $data);\n }\n } else {\n $this->redirect();\n }\n }", "title": "" }, { "docid": "487fbe67a167f71be6cf98efcafb9c6f", "score": "0.5758045", "text": "function actionChangeClientData(){\r\n $id = $_POST['idclient'];\r\n $name = $_POST['name'];\r\n $istoch = $_POST['istoch'];\r\n $mail = $_POST['mail'];\r\n $callmen = $_POST['callmen'];\r\n $tp2 = $_POST['tp2'];\r\n $tp3 = $_POST['tp3'];\r\n\r\n $res = Clients::updateParam($id,'name',$name);\r\n if($res){\r\n $res2 = $mail!=''?Clients::updateParam($id,'email',$mail):true;\r\n if($res2){\r\n //найти внутренний номер менеджера\r\n $users = Users::getUsersByParam('user_login',$callmen);\r\n $callnum = $users[0]['internal'];\r\n $res3 = Clients::updateParam($id,'callmen',$callnum);\r\n if($res3){\r\n $res4 = $tp2!=''?Clients::updateParam($id,'phone2',$tp2):true;\r\n if($res4){\r\n $res5 = $tp3!=''?Clients::updateParam($id,'phone3',$tp3):true;\r\n if($res5){\r\n $res6 = Clients::updateParam($id,'istochnik',$istoch);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n echo isset($res6)?$res6:'';\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "774161a1e620ddeff9970609813e99ea", "score": "0.57516825", "text": "public function setInscription()\r\n {\r\n // si le formulaire est envoyé j'entre dans la condition\r\n // si non j'affiche la vue du formulaire dans else\r\n\r\n /**\r\n * @todo : il faut créer un ProfilModel pour stocker ces infos !\r\n * $this-> nom n'existe pas dans un controller ! (les autres non plus !)\r\n */\r\n\r\n $this->nom = $this->verif->verfNomPrenom(@$_POST[\"nom\"]);\r\n $this->prenom = $this->verif->verfNomPrenom(@$_POST[\"prenom\"]);\r\n $this->infos = @$_POST[\"infos\"];\r\n $this->image = @$_POST[\"image\"];\r\n $this->email = $this->verif->verfEmail(@$_POST[\"email\"]);\r\n\r\n\r\n // affiche les message\r\n if (isset($_POST['email'])) {\r\n $message = \"<center class='alert alert-danger'>Inscription n'est pas pris en compte <br>\";\r\n if (!$this->email) {\r\n $message .= \"mail incorrect <br>\";\r\n }\r\n if (!$this->nom) {\r\n $message .= \"nom incorrect <br>\";\r\n }\r\n $message .= \"</center>\";\r\n }\r\n\r\n if ($this->email && $this->nom && $this->prenom) {\r\n $this->mdp = password_hash($_POST[\"mdp\"], PASSWORD_DEFAULT);\r\n if ($profil->create()) {\r\n echo $message = \"<center class='alert alert-info>Inscription est pris en compte </center>\";\r\n } else {\r\n include(\"view/inscription.php\");\r\n }\r\n }\r\n // si le frmulaire n'est pas envoyer\r\n // j'affiche la vue du formulaire\r\n else {\r\n include(\"view/inscription.php\");\r\n }\r\n }", "title": "" }, { "docid": "fca461bb9eca0538d109d297f54b9c1f", "score": "0.57419443", "text": "public function Inscription(Request $request)\n {\n $this->validate($request, [\n 'first_name' => 'required|max:30',\n 'last_name' => 'required|max:30',\n 'email' => 'required|email|unique:users|max:60',\n 'password' => 'required|max:60',\n ]);\n\n // On vérifie si l'adresse email est celle d'un étudiant UIR ou non\n if (strpos($request->email, 'uir.ac.ma') !== false) {\n $user_clone = Cloned::where('email', $request->email)->first();\n\n if ($user_clone) {\n return response()->json(['statut' => 'existant'], 200);\n }\n\n $uir_student = 1;\n } else {\n $uir_student = 0;\n }\n\n // On crée le nouvel utilisateur à inscrire\n $user = new User();\n\n $user->first_name = $request->first_name;\n\n $user->last_name = $request->last_name;\n\n $user->email = $request->email;\n\n $user->password = Hash::make($request->password);\n\n $user->api_token = str_random(60);\n\n $user->uir_student = $uir_student;\n\n $user->save();\n\n // On comence le rassemblement de statistiques sur l'utilisateur\n $stat = new Stat();\n $stat->user_id = $user->id;\n $stat->last_login = date('Y-m-d H:i');\n $stat->total_connexions = 1;\n $stat->last_ip = '0.0.0.0';\n $stat->save();\n\n // // On renseigne le degrès de validité de l'email au niveau de la BDD\n // $this->MailCheck($user);\n\n return response()->json(['status' => 'success', 'user' => $user], 201);\n }", "title": "" }, { "docid": "5b4b4576c37a1b3f5c78e5dbe8663fad", "score": "0.5736877", "text": "public function creationPageInscription (ConstructeurUtilisateur $constructeur) {\n $this->titre = \"Inscription\";\n $message_erreur = $constructeur->getErreur();\n $this->contenu .= \"<form action='\" . $this->routeur->getURLInscription() . \"' method='POST'>\";\n $this->contenu .= \"<label> Login : <input type='text' name='\" . ConstructeurUtilisateur::LOGIN_REF . \"' value='\" . htmlspecialchars($constructeur->getLogin(), ENT_QUOTES|ENT_SUBSTITUTE|ENT_HTML5, 'UTF-8') . \"'/> </label>\";\n $this->contenu .= $constructeur->getErreur()[ConstructeurUtilisateur::LOGIN_REF];\n $this->contenu .= \"<label> Password : <input type='password' name='\" . ConstructeurUtilisateur::PASSWORD_REF . \"' value='\" . htmlspecialchars($constructeur->getPassword(), ENT_QUOTES|ENT_SUBSTITUTE|ENT_HTML5, 'UTF-8') . \"'/> </label>\";\n $this->contenu .= $constructeur->getErreur()[ConstructeurUtilisateur::PASSWORD_REF];\n $this->contenu .= \"<label> Pr?nom : <input type='text' name='\" . ConstructeurUtilisateur::PRENOM_REF . \"' value='\" . htmlspecialchars($constructeur->getPrenom(), ENT_QUOTES|ENT_SUBSTITUTE|ENT_HTML5, 'UTF-8') . \"'/> </label>\";\n $this->contenu .= $constructeur->getErreur()[ConstructeurUtilisateur::PRENOM_REF];\n $this->contenu .= \"<label> Nom : <input type='text' name='\" . ConstructeurUtilisateur::NOM_REF . \"' value='\" . htmlspecialchars($constructeur->getNom(), ENT_QUOTES|ENT_SUBSTITUTE|ENT_HTML5, 'UTF-8') . \"'/> </label>\";\n $this->contenu .= $constructeur->getErreur()[ConstructeurUtilisateur::NOM_REF];\n $this->contenu .= \"<button type='submit'>Inscription</button>\";\n $this->contenu .= \"</form>\";\n $this->contenu .= \"<a href='\" . $this->routeur->getURLPageAccueil() .\"'> Annuler </a>\";\n }", "title": "" }, { "docid": "5ed85ca8365e0a1609aaf5a737f09015", "score": "0.57363886", "text": "public function inscription($email, $login, $nom, $prenom, $motdepasse)\n{\n $db = $this->_db;\n\n $nom = htmlspecialchars($nom);\n $login = htmlspecialchars($login);\n $prenom = htmlspecialchars($prenom);\n $email = htmlspecialchars($email);\n $motdepasse = htmlspecialchars($motdepasse);\n\n $droit = 1;\n\n $_nom = trim($nom);\n $_login = trim($login);\n $_prenom = trim($prenom);\n $_email = trim($email);\n $_motdepasse = trim($motdepasse);\n $cryptage = password_hash($_motdepasse, PASSWORD_BCRYPT);\n \n\n $loginexistant = \"SELECT `login` FROM utilisateurs WHERE login = '$_login'\";\n $verification = $db->query($loginexistant);\n $emailexistant = \"SELECT `email` FROM utilisateurs WHERE email = '$_email'\";\n $verification2 = $db->query($emailexistant);\n\n\n\n\n if($verification2->fetch(PDO::FETCH_ASSOC) == 0 ){\n if($verification->fetch(PDO::FETCH_ASSOC) == 0 ){\n $requete = $db->prepare(\"INSERT INTO `utilisateurs` (`email`, `login`, `nom`, `prenom`, `password`, `id_droit`) VALUES ('$_email', '$_login', '$_nom', '$_prenom', '$cryptage', '$droit')\");\n $requete->execute();\n echo 'Bienvenue !';\n }else{\n echo 'Cette identifiant éxiste déjà';\n }\n }else{\n echo 'Cette email est déja utilisé';\n }\n }", "title": "" }, { "docid": "6567c2b9d608171bafdd777370c543e1", "score": "0.57310456", "text": "public function directSubscribeAction()\n {\n session(['OpID' => Etisalat_Bundle_Route]);\n $Request = Request::capture();\n $dataPhoneNo = $Request->phone;\n $checkPhone = trim('2' . $dataPhoneNo); // add 2\n // echo $dataPhoneNo ; die;\n // susbscription api to that number\n $URL = ETISALAT_TIBCO_SUBSCRIPTION . \"/subscriber.php?phone=\" . $dataPhoneNo;\n $result = $this->get_content($URL); // 1= SUCCESS else ERROR\n $result = preg_replace('/\\s+/', '', $result); // to remove extra space created by soap request\n\n if ($result == \"1\") { // SUCCESS\n // make susbcriber login from web\n $URL = ETISALAT_SYSTEM . \"/setActiveWebLogin?phone=\" . $checkPhone;\n $result = $this->get_content($URL);\n\n session(['MSISDN_ETISALAT' => $dataPhoneNo, 'Status' => 'active']);\n return redirect(Etisalat_Bundle_Route);\n } else {\n // $request->session()->flash('failed', 'فشلت العملية');\n session(['Status' => \"فشلت العملية\"]);\n return redirect(Session::get('OpID') . '/login');\n }\n }", "title": "" }, { "docid": "c8314b93d6363a9be6d676d16657be28", "score": "0.57088625", "text": "function InscripcionConvocatoria($idConvocatoria){\n\n\t\tif($this->session->userdata('usuario') != '' && $this->session->userdata('rol') == 'estudiante' )\n\t\t{\n\t\t\t$idEstudiante = $this->EmprendedorModel->recupera_id($this->session->userdata('usuario'));\n\t\t\tif($this->EmprendedorModel->InscripcionConvocatoria($idConvocatoria,$idEstudiante[0]->Id))\n\t\t\t{\n\t\t\t\t$session_data = $this->session->userdata();\n\t\t\t\t$session_data['convocatoria'] = $idConvocatoria;\n\t\t\t\t$this->session->set_userdata($session_data);\n\t\t\t\tredirect(base_url() . 'EmprendedorController/Enter');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect(base_url() . 'Emprendedor/Login'); \n\t\t}\n\t}", "title": "" }, { "docid": "7115f3ace0030ebe01602409cf99e78b", "score": "0.5705039", "text": "public function onOpen(ConnectionInterface $conn) {\r\n// $conn->user->Id = '12';\r\n $this->clients->attach($conn);\r\n \r\n //obteniendo el id del usuario\r\n// $conn->send('la conexion enviada es '.$conn->resourceId);\r\n echo \"Conexion Nueva! ({$conn->resourceId})\\n\";\r\n }", "title": "" }, { "docid": "031b808e235589382d7c44c85d0c30e8", "score": "0.5682449", "text": "public function addClient($Civilite, $Password, $Nom, $Prenom, $Email, $Mobile, $Adresse, $CodePostal, $Ville)\n {\n $Civilite = strip_tags($Civilite);\n $Nom = strip_tags($Nom);\n $Prenom = strip_tags($Prenom);\n $Email = strip_tags($Email);\n $Mobile = strip_tags($Mobile);\n $Adresse = strip_tags($Adresse);\n $CodePostal = strip_tags($CodePostal);\n $Ville = strip_tags($Ville);\n $Password= sha1(md5(sha1(md5($Password))));\n $sql = \"INSERT INTO clients (Civilite, Password, Nom,Prenom,Email,Mobile,Adresse,CodePostal,Ville) VALUES ( :Civilite, :Password, :Nom, :Prenom, :Email, :Mobile, :Adresse, :CodePostal, :Ville)\";\n \n $query = $this\n ->db\n ->prepare($sql);\n $query->execute(array(\n ':Civilite' => $Civilite,\n ':Password' => $Password,\n ':Nom' => $Nom,\n ':Prenom' => $Prenom,\n ':Email' => $Email,\n ':Mobile' => $Mobile,\n ':Adresse' => $Adresse,\n ':CodePostal' => $CodePostal,\n ':Ville' => $Ville\n ));\n \n }", "title": "" }, { "docid": "3c274e8795b18252e5c537c1cb42035c", "score": "0.56744367", "text": "public function envoiMailInscription() {\n $mail = $_POST['mail'];\n\n if (!preg_match(\"#^[a-z0-9._-]+@(hotmail|live|msn).[a-z]{2,4}$#\", $mail)) {\n $passage_ligne = \"\\r\\n\";\n } else {\n $passage_ligne = \"\\n\";\n }\n\n //=====Déclaration des messages au format texte et au format HTML.\n $message_txt = \"Bonjour \" . $_POST['prenom'] . \", \\n\n Nous vous confirmons votre inscription sur notre site. \\n\n Votre identifiant est votre adresse mail : \" . $_POST['mail'] . \"\\n\n Vous pouvez désormais prendre rendez-vous auprès de nos spécialistes.\\n\n L'équipe de Pf-consult\\n\";\n\n $message_html = \"\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\\\"utf-8\\\">\n <title>Confirmation de votre inscription</title>\n <style>\n @import url(http://fonts.googleapis.com/css?family=Lato:300,400,700);\n * { padding: 0; margin: 0; text-decoration: none; color: black; font-family: \\'Lato\\', sans-serif; list-style: none;}\n h1 { color: #4d4959; font-variant: small-caps;}\n #content { width: 50%; margin:auto;}\n #content div { margin: 25px;}\n </style>\n </head>\n <body>\n <!-- CONTENT -->\n <div id=\\\"content\\\">\n <h1>Confirmation de votre inscription</h1>\n <div>\n <p>Bonjour \" . $_POST['prenom'] . \" </p>\n <p>Nous vous confirmons votre inscription sur notre site.</p>\n <p>Votre identifiant est votre adresse mail : \" . $_POST['mail'] . \"</p>\n <p>Vous pouvez désormais prendre rendez-vous auprès de nos spécialistes.</p>\n <p id=\\\"signature\\\">L'équipe de Pf-consult</p>\n </div>\n </div>\n </body>\n </html>\n \";\n //==========\n\n //=====Création de la boundary\n $boundary = \"-----=\".md5(rand());\n //==========\n\n //=====Définition du sujet.\n $sujet = \"Confirmation de votre inscription\";\n //=========\n\n //=====Création du header de l'e-mail.\n $header = \"From: \\\"Pf-consult\\\"<noreply@pf-consult.com>\".$passage_ligne;\n $header.= \"Reply-to: \\\"Pf-consult\\\" <noreply@pf-consult.com>\".$passage_ligne;\n $header.= \"MIME-Version: 1.0\".$passage_ligne;\n $header.= \"Content-Type: multipart/alternative;\".$passage_ligne.\" boundary=\\\"$boundary\\\"\".$passage_ligne;\n //==========\n\n //=====Création du message.\n $message = $passage_ligne.\"--\".$boundary.$passage_ligne;\n //=====Ajout du message au format texte.\n $message.= \"Content-Type: text/plain; charset=\\\"ISO-8859-1\\\"\".$passage_ligne;\n $message.= \"Content-Transfer-Encoding: 8bit\".$passage_ligne;\n $message.= $passage_ligne.$message_txt.$passage_ligne;\n //==========\n $message.= $passage_ligne.\"--\".$boundary.$passage_ligne;\n //=====Ajout du message au format HTML\n $message.= \"Content-Type: text/html; charset=\\\"ISO-8859-1\\\"\".$passage_ligne;\n $message.= \"Content-Transfer-Encoding: 8bit\".$passage_ligne;\n $message.= $passage_ligne.$message_html.$passage_ligne;\n //==========\n $message.= $passage_ligne.\"--\".$boundary.\"--\".$passage_ligne;\n $message.= $passage_ligne.\"--\".$boundary.\"--\".$passage_ligne;\n //==========\n\n //=====Envoi de l'e-mail.\n mail($mail,$sujet,$message,$header);\n //==========\n }", "title": "" }, { "docid": "4d7d7da7cc72ee868e27702574814700", "score": "0.56545734", "text": "public function enregistrer(){\n\n $connect = new \\model\\DbConnect();\n $db = $connect->getConnexion();\n\n\n //formater la requete et essayerde lier les donnees declarees et les donnees de la base de donnee\n $req= $db->prepare(\"INSERT INTO `clientphysique`(`idClientPhysique`, `nom`, `prenom`, `telephone`,\n `genre`, `email`, `adresse`, `profession`, `salarie`, `salaire_actuel`, `nom_employeur`, `cni`)\n VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?)\");\n $resultat=$req->execute(array(\n $this->getNom(),\n $this->getPrenom(),\n $this->getTelephone(),\n $this->getGenre(),\n $this->getEmail(),\n $this->getAdresse(),\n $this->getProfession(),\n $this->getSalarie(),\n $this->getSalaireActuel(),\n $this->getNom(),\n $this->getCni(),\n\n\n ));\n return $resultat;\n \n }", "title": "" }, { "docid": "521b73d1aada6d58c96db3a2ed421554", "score": "0.5653461", "text": "public function alerteCorrespondance(){\n\n \t// si on trouve une correspondance : appel du swift mailer pour prévenir les gens concernés\n \techo \"Envoi du mail de correspondances ...<br>\";\n\n }", "title": "" }, { "docid": "a627604d41d0a4b4961c9bfdb6b06190", "score": "0.56518507", "text": "public function ctrRegistroClientes(){\n\n\t\tif(isset($_POST[\"regUsuario\"])){\n\n\t\t\tif(preg_match('/^[a-zA-ZñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"regUsuario\"]) &&\n\t\t\t preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"regEmail\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"regPassword\"])){\n\n\t\t\t \t$encriptar = crypt($_POST[\"regPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n\t\t\t \t$encriptarEmail = md5($_POST[\"regEmail\"]);\n\n\t\t\t \t$login = explode(\" \", $_POST[\"regUsuario\"]);\n\t\t\t $datos = array(\n\t\t\t \"nombre\"=>$_POST[\"regUsuario\"],\n\t\t\t \"apellido\"=>\"\",\n\t\t\t \"tipo_documento\"=>\"\",\n\t\t\t \"num_documento\"=>$_POST[\"regNumDocumento\"],\n\t\t\t \"direccion\"=>\"\",\n\t\t\t \"cargo\"=>\"7\",\n\t\t\t \"ciudad\"=>\"2\",\n\t\t\t \"telefono\"=>\"\",\n\t\t\t \"email\"=>$_POST[\"regEmail\"],\n\t\t\t \"loginUsuario\"=>$login[0],\n\t\t\t \"passUsuario\"=>$encriptar,\n\t\t\t \"fotoUsuario\"=>\"vistas/img/usuarios/default/default.jpg\"\n\t\t\t );\n\n\n\n\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t$respuesta = ModeloUsuarios::mdlRegistroUsuario($tabla, $datos, $datos[\"fotoUsuario\"]);\n\n\t\t\t\tif($respuesta == \"1\"){\n\n\t\t\t\t\t$url = Ruta::ctrRuta();\n\t\t\t\t\t/*=============================================\n\t\t\t\t\tVERIFICACIÓN CORREO ELECTRÓNICO\n\t\t\t\t\t=============================================*/\n\n\t\t\t\t\tdate_default_timezone_set(\"America/Lima\");\n\n\t\t\t\t\t$mail = new PHPMailer;\n\n\t\t\t\t\t$mail->CharSet = 'UTF-8';\n\n\t\t\t\t\t$mail->isMail();\n\n\t\t\t\t\t$mail->setFrom('soporte@inkahosts.com', 'Talentus Technology');\n\n\t\t\t\t\t$mail->addReplyTo('soporte@inkahosts.com', 'Talentus Technology');\n\n\t\t\t\t\t$mail->Subject = \"Por favor verifique su dirección de correo electrónico\";\n\n\t\t\t\t\t$mail->addAddress($_POST[\"regEmail\"]);\n\n\t\t\t\t\t$mail->msgHTML('<div style=\"width:100%; background:#eee; position:relative; font-family:sans-serif; padding-bottom:40px\">\n\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t\t<img style=\"padding:20px; width:10%\" src=\"'.$url.'vistas/img/plantilla/logo.png\">\n\n\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t<div style=\"position:relative; margin:auto; width:600px; background:white; padding:20px\">\n\n\t\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t\t<img style=\"padding:20px; width:15%\" src=\"http://talentustechnology.com/talentus/vistas/img/ /email.png\">\n\n\t\t\t\t\t\t\t<h3 style=\"font-weight:100; color:#999\">GRACIAS POR REGISTRARSE EN EL SISTEMA</h3>\n\n\t\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t\t<h4 style=\"font-weight:100; color:#999; padding:0 20px\">Podra solicitar un servicio desde este enlance</h4>\n\n\t\t\t\t\t\t\t<a href=\"'.$url.'solicitar/'.$encriptarEmail.'\" target=\"_blank\" style=\"text-decoration:none\">\n\n\t\t\t\t\t\t\tSolicitar Servicio\n\n\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t\t<h5 style=\"font-weight:100; color:#999\">Si no se inscribió en esta cuenta, puede ignorar este correo electrónico y la cuenta se eliminará.</h5>\n\n\t\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>');\n\n\t\t\t\t\t$envio = $mail->Send();\n\n\t\t\t\t\tif(!$envio){\n\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡ERROR!\",\n\t\t\t\t\t\t\t\t text: \"¡Ha ocurrido un problema enviando verificación de correo electrónico a '.$_POST[\"regEmail\"].$mail->ErrorInfo.'!\",\n\t\t\t\t\t\t\t\t type:\"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\thistory.back();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡OK!\",\n\t\t\t\t\t\t\t\t text: \"¡Por favor revise la bandeja de entrada o la carpeta de SPAM de su correo electrónico '.$_POST[\"regEmail\"].' para verificar la cuenta!\",\n\t\t\t\t\t\t\t\t type:\"success\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\thistory.back();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\techo '<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t title: \"¡ERROR!\",\n\t\t\t\t\t\t\t text: \"¡Error al registrar el usuario, no se permiten caracteres especiales!\",\n\t\t\t\t\t\t\t type:\"error\",\n\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\thistory.back();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "47b2f3861ceecb8fc6d25146894b2c51", "score": "0.56332517", "text": "public function inscription(Request $request, Application $app){\r\n $membre = new \\Entity\\Membre;\r\n $inscriptionForm = $app['form.factory'] -> create(\\Form\\Type\\InscriptionType::class, $membre);\r\n\r\n $inscriptionForm -> handleRequest($request);\r\n\r\n if($inscriptionForm -> isSubmitted() && $inscriptionForm -> isValid()){\r\n\r\n // JS Vérification de la présence de l'email dans la base :\r\n $email = $membre -> getUsername();\r\n\r\n $id = $app['dao.membre'] -> findByUsername($email);\r\n\r\n // Gestion de la présence de l'email dans la base, et renvoi vers la connexion avec un message adapté et l'email prérempli :\r\n if(!is_null($id)){\r\n\r\n return $app['twig']->render('connexion.html.twig', array(\r\n 'title' => 'Connexion',\r\n 'error' => $app['security.last_error']($request),\r\n 'erreur' => 'Vous avez déjà un compte, vous pouvez vous connecter !',\r\n 'last_username' => $email,\r\n )\r\n );\r\n }\r\n else{\r\n $salt = substr(md5(time()), 0, 23);\r\n $membre -> setSalt($salt);\r\n\r\n $password = $membre -> getPassword();\r\n\r\n $password_encode = $app[\"security.encoder.bcrypt\"]->encodePassword($password, $membre->getSalt());\r\n\r\n $membre -> setPassword($password_encode);\r\n\r\n $app['dao.membre'] -> save($membre);\r\n $app['session'] -> getFlashBag() -> add('success', 'Votre inscription a bien été prise en compte !');\r\n\r\n // Adrien - Redirection suite à l'inscription\r\n return $app->redirect('/');\r\n }\r\n }\r\n\r\n $inscriptionFormView = $inscriptionForm -> createView();\r\n\r\n $params = array(\r\n 'title' => 'Inscription',\r\n 'inscriptionForm' => $inscriptionFormView,\r\n 'erreur' => '',\r\n );\r\n\r\n return $app['twig']->render('inscription.html.twig', $params);\r\n }", "title": "" }, { "docid": "3e8b0354b547d903a98ce92234c18f81", "score": "0.5591652", "text": "function clientes($conexion, $nombre, $tipo_doc, $documento, $gamil, $password, $rol, $telefono)\r\n{\r\n $salida = \"\";\r\n $sql = \"INSERT INTO `re_covid19`.`clientes` (`nombre_cliente`, `id_tipo_documento`, `documento`, `email`, `password`, `id_rol`, `telefono`)\";\r\n $sql.= \"VALUES ('$nombre', '$tipo_doc', '$documento', '$gmail', '$password', '$rol', '$telefono');\";\r\n $insert = mysqli_query($conexion, $sql);\r\n \r\n if( mysqli_num_rows($insert) > 0 )\r\n {\r\n $salida = 1;\r\n }else{\r\n $salida = 0;\r\n }\r\n\r\n return $salida;\r\n}", "title": "" }, { "docid": "b794652415db7d8a57ffb554d30b15f1", "score": "0.5587966", "text": "public function addClientSalarie(Client_salarie $client_salarie)\n\t\t{\n\t\t\t$req = $this->_db->prepare('INSERT INTO client_salarie (nom, \n\t\t\tprenom, profession,salaire_actuel, nom_entreprise, adresse_entreprise,\n\t\t\t identifiant_entreprise, numero_CNI, id_client) \n VALUES(:nom, :prenom, :profession, :salaire_actuel, :nom_entreprise, \n\t\t\t:adresse_entreprise,\n\t\t\t:identifiant_entreprise,:cni,:id_client)');\n\n\t\t\t$req->execute(array(\n 'nom' => $client_salarie->getNom(),\n 'prenom' => $client_salarie->getPrenom(),\n\t\t 'profession' => $client_salarie->getProfession(),\n\t\t\t'salaire_actuel' => $client_salarie->getSalaire_actuel(),\n\t\t\t'nom_entreprise' => $client_salarie->getNom_entreprise(),\n\t\t\t'adresse_entreprise' => $client_salarie->getAdresse_entreprise(),\n\t\t\t'identifiant_entreprise' => $client_salarie->getIdentifiant_entreprise(),\n 'cni' => $client_salarie->getCni(),\n\t\t\t 'id_client' => $client_salarie->getId_client()\n\t\t\t));\n\n\t\t\t$req->closeCursor();\n\n//info client salarie depuis la base de donnee\n\t\t//\tnom`, `prenom`, `profession`, `salaire_actuel`, `nom_entreprise`, \n\t\t\t//`adresse_entreprise`, `identifiant_entreprise`, `numero_CNI`, `id_client\n\t\t}", "title": "" }, { "docid": "3f6daa7869c0abc8a042a07534d93a91", "score": "0.5579876", "text": "static function postInscription(){\r\n $form = new Form();\r\n if ($form->check_post_raw_values_not_empty(['nom', 'prenom', 'pseudo', 'mail', 'pass', 'pass2'])){\r\n\r\n $nom = $_POST['nom'];\r\n $prenom = $_POST['prenom'];\r\n $pseudo = $_POST['pseudo'];\r\n $mail = $_POST['mail'];\r\n $pass = $_POST['pass'];\r\n $pass2 = $_POST['pass2'];\r\n\r\n if (preg_match(\"/[a-zA-Z0-9]{1,20}/\", $nom) && preg_match(\"/[a-zA-Z0-9]{1,20}/\", $prenom) && preg_match(\"/[a-zA-Z0-9]{1,20}/\", $pseudo)){\r\n\r\n if (strlen($pseudo) >= 5){\r\n\r\n if ($pass == $pass2){\r\n $pseudo_count = Utilisateur::getUserExist($pseudo);\r\n if (!$pseudo_count){\r\n $mail_count = Utilisateur::getMailExist($mail);\r\n if (!$mail_count){\r\n if (filter_var($mail, FILTER_VALIDATE_EMAIL)){\r\n $code = '';\r\n \r\n for ($i = 0; $i < 4; $i++){\r\n $s = rand(0,9);\r\n $code .= $s;\r\n }\r\n \r\n $user = new Utilisateur([\r\n 'nom' => $nom,\r\n 'prenom' => $prenom,\r\n 'pseudo' => $pseudo,\r\n 'mail' => $mail,\r\n 'pass' => md5(sha1($pass)),\r\n 'confirm_key' => $code\r\n ]);\r\n $user->utilisateur_create();\r\n \r\n $u = Utilisateur::getUserByPseudo($pseudo, md5(sha1($pass)));\r\n $_SESSION['pseudo'] = $pseudo;\r\n mkdir(\"profils/\".$pseudo, 0700); //Création d'un dossier au nom de l'utilisateur\r\n MailController::confirm_inscription($u, $code);\r\n header('location:'.BASEURL.'home/confirm');\r\n exit;\r\n }\r\n else{\r\n $_SESSION['error_inscription'] = 'L\\'adresse mail rentrée n\\'a pas un format correct';\r\n \r\n $_SESSION['value_nom_insc'] = $nom;\r\n $_SESSION['value_prenom_insc'] = $prenom;\r\n $_SESSION['value_pseudo_insc'] = $pseudo;\r\n $_SESSION['value_mail_insc'] = $mail;\r\n $_SESSION['value_pass_insc'] = $pass;\r\n $_SESSION['value_pass2_insc'] = $pass2;\r\n \r\n header('location:'.BASEURL.'home/signUp');\r\n exit;\r\n }\r\n }\r\n else{\r\n $_SESSION['error_inscription'] = 'Cette adresse mail est déjà associée à un autre compte';\r\n \r\n $_SESSION['value_nom_insc'] = $nom;\r\n $_SESSION['value_prenom_insc'] = $prenom;\r\n $_SESSION['value_pseudo_insc'] = $pseudo;\r\n $_SESSION['value_mail_insc'] = $mail;\r\n $_SESSION['value_pass_insc'] = $pass;\r\n $_SESSION['value_pass2_insc'] = $pass2;\r\n \r\n header('location:'.BASEURL.'home/signUp');\r\n exit;\r\n }\r\n }\r\n else{\r\n $_SESSION['error_inscription'] = 'Ce nom d\\'utilisateur n\\'est pas disponible';\r\n \r\n $_SESSION['value_nom_insc'] = $nom;\r\n $_SESSION['value_prenom_insc'] = $prenom;\r\n $_SESSION['value_pseudo_insc'] = $pseudo;\r\n $_SESSION['value_mail_insc'] = $mail;\r\n $_SESSION['value_pass_insc'] = $pass;\r\n $_SESSION['value_pass2_insc'] = $pass2;\r\n \r\n header('location:'.BASEURL.'home/signUp');\r\n exit;\r\n }\r\n }\r\n else{\r\n $_SESSION['error_inscription'] = 'Les mots de passe doivent être identiques';\r\n \r\n $_SESSION['value_nom_insc'] = $nom;\r\n $_SESSION['value_prenom_insc'] = $prenom;\r\n $_SESSION['value_pseudo_insc'] = $pseudo;\r\n $_SESSION['value_mail_insc'] = $mail;\r\n $_SESSION['value_pass_insc'] = $pass;\r\n $_SESSION['value_pass2_insc'] = $pass2;\r\n \r\n header('location:'.BASEURL.'home/signUp');\r\n exit;\r\n }\r\n }\r\n else{\r\n $_SESSION['error_inscription'] = 'Le nom d\\'utilisateur doit posséder au moins 5 caractères';\r\n \r\n $_SESSION['value_nom_insc'] = $nom;\r\n $_SESSION['value_prenom_insc'] = $prenom;\r\n $_SESSION['value_pseudo_insc'] = $pseudo;\r\n $_SESSION['value_mail_insc'] = $mail;\r\n $_SESSION['value_pass_insc'] = $pass;\r\n $_SESSION['value_pass2_insc'] = $pass2;\r\n \r\n header('location:'.BASEURL.'home/signUp');\r\n exit;\r\n }\r\n\r\n }\r\n else{\r\n $_SESSION['error_inscription'] = 'Les caractères spéciaux ne sont pas autorisés';\r\n \r\n $_SESSION['value_nom_insc'] = $nom;\r\n $_SESSION['value_prenom_insc'] = $prenom;\r\n $_SESSION['value_pseudo_insc'] = $pseudo;\r\n $_SESSION['value_mail_insc'] = $mail;\r\n $_SESSION['value_pass_insc'] = $pass;\r\n $_SESSION['value_pass2_insc'] = $pass2;\r\n\r\n header('location:'.BASEURL.'home/signUp');\r\n exit;\r\n }\r\n\r\n }\r\n else{\r\n $_SESSION['error_inscription'] = 'Tous les champs doivent être remplis';\r\n\r\n $_SESSION['value_nom_insc'] = $_POST['nom'];\r\n $_SESSION['value_prenom_insc'] = $_POST['prenom'];\r\n $_SESSION['value_pseudo_insc'] = $_POST['pseudo'];\r\n $_SESSION['value_mail_insc'] = $_POST['mail'];\r\n $_SESSION['value_pass_insc'] = $_POST['pass'];\r\n $_SESSION['value_pass2_insc'] = $_POST['pass2'];\r\n\r\n header('location:'.BASEURL.'home/signUp');\r\n exit;\r\n }\r\n \r\n }", "title": "" }, { "docid": "d9a0bdc54b2abf20fd7756fc88719f42", "score": "0.55603284", "text": "abstract public function registerClient();", "title": "" }, { "docid": "c8381a8cbdf2faef4e2f66e58e55f359", "score": "0.555915", "text": "function inscription_liste_mc($flux='',$api,$listId,$email,$donnees_auteur,$email_type='',$optin,$update_existing=true,$replace_interests=false,$send_welcome=false){\n\t\n\t$retval = $api->listSubscribe($listId, $email,$donnees_auteur,$email_type,$optin,$update_existing,$replace_interests,$send_welcome);\n\n\t\n\tif ($api->errorCode){\n\t\tspip_log('inscription_liste','squirrel_chimp_lists');\n\t\t$messageErreur = _T('scl:api_errorcode').\"<br/><b>\".$api->errorCode.\"</b><br/>\".$api->errorMessage;\n\t\tif (autoriser('defaut')){\n\n\t\t\t$flux['data'] = array('message_erreur' => \"Plugin Squirrels Love Chimps $messageErreur\");\n\t\t\tspip_log(\"Admin $messageErreur\",'squirrel_chimp_lists');\n\t\t\treturn $flux;\n\t\t} // fin message pour admin\n\t\telse {\n\t\t\tspip_log(__LINE__,'squirrel_chimp_lists');\n\t\t\t// que le spiplog si on est juste un user\n\t\t\tspip_log(\"$messageErreur\",'squirrel_chimp_lists');\n\t\t\treturn $flux;\n\t\t} // autoriser\n\t} else {\n\t\tspip_log(__LINE__,'squirrel_chimp');\n\t\t$message_ok .=\"<br/><br/>\"._T('scl:demande_inscription_envoyee_ok', array('email' => \"$email\"));\n\t\tif($optin){\n\t\t\t$message_ok .=\"<br/>\"._T('scl:demande_inscription_envoyee1', array('email' => \"$email\"));\n\t\t\t$message_ok .=\"<br/>\"._T('scl:demande_inscription_envoyee2');\n\t\t\t$message_ok .=\"<br/><i>\"._T('scl:demande_inscription_envoyee3').\"</i>\";\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t$flux['data']['message_ok']=$message_ok ;\n\n}\n\t\t\treturn $flux;\n}", "title": "" }, { "docid": "ddafb770abdbf169e1b7b368f2da98f6", "score": "0.5539528", "text": "public function __construct(Inscription $inscription)\n {\n $this->inscription = $inscription;\n }", "title": "" }, { "docid": "e40c2811a7d0cbdf53e5c1d145921ec1", "score": "0.55328804", "text": "public function subscribe($client_id, $type_id) {\n \n return $this->save(['client_id'=>$client_id,'type_id'=>$type_id]);\n \n }", "title": "" }, { "docid": "9f35c509cf5484c42961800296eca3bf", "score": "0.5491314", "text": "function inscription () {\n\t\n\t$login = isset($_POST['login1'])?$_POST['login1']:\"\";\n\t$pass = isset($_POST['pass1'])?$_POST['pass1']:\"\";\n\t\n\n\trequire ('M/user_bd.php');\n\t\n\t\n\tif($login != null && $pass !=null){\n\t\tif (inscription_bd()){\n\t\t$echoLogin=\"Inscription réussie\";\n\t\t}\n\t\telse $echoLogin=\"raté !!!!!!!!!!!!!!!!!!\";\t\n\t}\n\telse {\n\t\t\t$echoLogin=\"raté\";\t\t\t\n\t\t}\n\trequire ('V/page.tpl');\n}", "title": "" }, { "docid": "1956930165bfeb72c2059f927a221a18", "score": "0.54750466", "text": "function wsOnMessage($clientID, $message, $messageLength, $binary) {\n\tglobal $Server;\n\tif (is_numeric($message[0])==true || ctype_alpha($message[0])==true)\n\t{\n\t\t$bdd = new PDO('mysql:host=localhost;dbname=domotique;charset=utf8', 'root', '');\n\t\t$reponse = $bdd->query(\"UPDATE prise SET IDWeb = '$clientID' WHERE Mac ='$message'\");\n\t\t$Server->log(\"Enregistrement a ladresse : $message de l ID : $clientID\");\n\t}\n\n\t\n\t//Si on envoie addresse mac et et message envoief4:b5\n\tif($message[0]=='#')\n\t{\n\t\t$Mac= substr($message, 1, 19);\n\t\t$bdd = new mysqli(\"localhost\", \"root\", \"\", \"domotique\");\n\t\t$reponseID = $bdd->query(\"SELECT IDWeb FROM prise WHERE Mac ='$Mac'\");\n\t\t$reponseBool = $bdd->query(\"SELECT EtatBool1, EtatBool2, EtatBool3,EtatBool4 ,EtatBool5 FROM prise WHERE Mac='$Mac'\");\n\t\t$IDrecup = $reponseID->fetch_row();\t\t\n\t\t$Etatrecup = $reponseBool->fetch_row();//Envoyer les donnes sout forme d'un octet\n\t\t$Donne=\"$Etatrecup[0]$Etatrecup[1]$Etatrecup[2]$Etatrecup[3]$Etatrecup[4]\";//Concatenation de la chaine de donne\n\t\t$Server->wsSend($IDrecup[0], \"$Donne\");\n\t\t$Server->log(\"Information Envoyer: $Donne\");\n\t}\n}", "title": "" }, { "docid": "f19de18d4c0e49b8a5def0031ea6bea3", "score": "0.5456931", "text": "public function ajouterInscription($conn){\n $requette=$conn->query(\"SELECT CURRENT_DATE()\");\n $resultat=$requette->fetch(PDO::FETCH_NUM);\n $date=$resultat[0];\n ////attributs de l'inscription\n $NomEtudiant=$this->_NomEtudiant;\n $PrenomEtudiant=$this->_PrenomEtudiant;\n $EmailEtudiant=$this->_EmailEtudiant;\n $MotDePasseEtudiant=$this->_MotDePasseEtudiant;\n $MotDePasseEtudiantConfirm=$this->_MotDePasseEtudiantConfirm;\n $SexeEtudiant=$this->_SexeEtudiant;\n $CodeUniversite=$this->_CodeUniversite;\n $NomUtilisateur=$this->_NomUtilisateur;\n $CleActivation=$this->_CleActivation;\n\n $conn->exec(\"insert into inscription(NomEtudiant,PrenomEtudiant,EmailEtudiant,MotDePasseEtudiant,MotDePasseEtudiantConfirm,SexeEtudiant,CodeUniversite,DateInscription,NomUtilisateur,CleActivation,EtatCompte) values (' $NomEtudiant','$PrenomEtudiant','$EmailEtudiant','$MotDePasseEtudiant','$MotDePasseEtudiantConfirm','$SexeEtudiant','$CodeUniversite','$date','$NomUtilisateur','$CleActivation', 0)\");\n return $conn->lastInsertId();\n }", "title": "" }, { "docid": "7562a7a36412be790c5d1cbecaa32937", "score": "0.5454348", "text": "function Buscar_Cliente($nit,$nom){\n $respuesta = new xajaxResponse();\n $ClsCli = new ClsCliente();\n //pasa a mayusculas\n\t\t$nom = trim($nom);\n\t\t$nit = trim($nit);\n //--\t\t\n //decodificaciones de tildes y Ñ's\n\t\t$nom = utf8_decode($nom);\n\t\t$nit = utf8_decode($nit);\n\t//--------\n\t//$respuesta->alert(\"$nit,$nom\");\n if($nom != \"\" || $nit != \"\"){\n\t\t$cont = $ClsCli->count_cliente('',$nit,$nom);\n\t\tif($cont>0){\n\t\t\t$contenido = tabla_lista_clientes($nit,$nom);\n\t\t\t$respuesta->assign(\"resultProv\",\"innerHTML\",$contenido);\n\t\t\t$respuesta->script(\"cerrar();\");\n\t\t}else{\n\t\t\t$msj = '<span>No se registran datos con estos criterios de busqueda!!!</span><br><br>';\n\t\t\t$msj.= '<input type = \"button\" class = \"boton\" value = \"Aceptar\" onclick=\"cerrar();\" />';\n\t\t\t$respuesta->assign(\"lblparrafo\",\"innerHTML\",$msj);\n\t\t}\n\t}\n \t\t\n return $respuesta;\n}", "title": "" }, { "docid": "8ef8f9fe377687a0bee2e157ce4230b9", "score": "0.5446409", "text": "public function inscription() {\n #On vérifie que l'utilisateur a bien entré un pseudo et un mot de passe\n if(isset($_POST['pseudo']) && isset($_POST['password'])) {\n $data->menu['Home'] = \"index.php\";\n $data->menu['A Propos'] = \"index.php?action=aPropos\";\n $size = 480;\n $data->menu['Voir Photos'] = \"index.php?controller=photo&action=First&imgId=1&size=$size\";\n #On appele la fonction createUser de utilisateurDAO pour créer le nouvel utilisateur dans la base de donnée\n $this->utilisateurDAO->createUser($_POST['pseudo'], $_POST['password']);\n #On crée un message pour informer l'utilisateur\n $data->logMessage = \"Nouvel Utilisateur créé.\";\n if(isset($_SESSION['id'])) {\n $data->menuHeader['Identification'] = \"index.php?controller=login&action=index\";\n $data->menuHeader['S\\'inscrire'] = \"index.php?controller=inscription&action=index\";\n } else {\n $data->menuHeader['Déconnexion'] = \"index.php?controller=login&action=deconnexion\";\n }\n $data->content = \"homeView.php\";\n require_once 'view/mainView.php';\n #Si l'utilisateur n'a pas entré un pseudo ou un mot de passe\n #On le redirige vers le formulaire en lui indiquant l'erreur avec un message\n } else {\n $data->menu['Home'] = \"index.php\";\n $data->menu['A Propos'] = \"index.php?action=aPropos\";\n $size = 480;\n $data->menu['Voir Photos'] = \"index.php?controller=photo&action=First&imgId=1&size=$size\";\n #Message d'erreur à afficher à l'utilisateur\n $data->messageErreur = \"Veuillez entrez un pseudo et un mot de passe\";\n if(isset($_SESSION['id'])) {\n $data->menuHeader['Identification'] = \"index.php?controller=login&action=index\";\n $data->menuHeader['S\\'inscrire'] = \"index.php?controller=inscription&action=index\";\n } else {\n $data->menuHeader['Déconnexion'] = \"index.php?controller=login&action=deconnexion\";\n }\n $data->content = \"inscriptionView.php\";\n require_once 'view/mainView.php';\n }\n }", "title": "" }, { "docid": "ff54d4a3eb63785cb1b4785cfd97e874", "score": "0.54360586", "text": "public function inscribirse()\n {\n }", "title": "" }, { "docid": "56f74738c20e9116067e297df0431761", "score": "0.5428276", "text": "function invocar_autenticacion_por_tipo()\n\t{\n if (! $this->redirect_hecho){\n\t\t$this->chequear_autenticaciones_centralizadas();\n }\n\t}", "title": "" }, { "docid": "7a8e6f096a1b0153593df7554192648f", "score": "0.5425436", "text": "public function affichageDeconnexionEchouee () {\n $url = $this->routeur->getURLPageAccueil();\n $this->routeur->POSTredirect($url, \"D?connexion impossible\");\n }", "title": "" }, { "docid": "2c2a76e08f3fbc9c25016e4ea519d5d7", "score": "0.54220474", "text": "function ctl_afficher_page_nouveau_client()\n {\n \n afficher_page_nouveau_client();\n }", "title": "" }, { "docid": "02396ad0ca2ce65832be3adb0d542d6b", "score": "0.5418272", "text": "public static function insertarCliente(){\n\n\t\tif(isset($_POST[\"insertarCi\"])){\n\n\t\t\t$validoEmail = '/^[A-z0-9\\\\._-]+@[A-z0-9][A-z0-9-]*(\\\\.[A-z0-9_-]+)*\\\\.([A-z]{2,6})$/';\n\t\t\tif(preg_match('/^[0-9]+$/',$_POST[\"insertarCi\"]) &&\n\t\t preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/',$_POST[\"insertarNombre\"]) &&\n\t\t \t preg_match($validoEmail,$_POST[\"insertarCorreo\"]) &&\n\t\t \t preg_match('/^[0-9]+$/',$_POST[\"insertarTelefono\"])){\n\n\t\t\t\t\t$datos = array(\"ci\"=>$_POST[\"insertarCi\"],\n\t\t\t\t\t\t\t\t\t\"nombre\"=>$_POST[\"insertarNombre\"], \n\t\t\t\t\t\t\t\t\t\"correo\" => $_POST[\"insertarCorreo\"],\n\t\t\t\t\t\t\t\t\t \"telefono\" => $_POST[\"insertarTelefono\"]);\n\n\t\t\t\t\t$respuesta = ModeloCliente::insertarCliente($datos);\n\t\t\t\t\t\n\n\t\t\t\t\tif($respuesta == \"ok\") {\n\n\t\t\t\t\t\techo \"<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t type: 'success',\n\t\t\t\t\t\t\t\t title: 'El cliente ha sido guardado correctamente',\n\t\t\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t\t\t confirmButtonText: 'Cerrar'\n\t\t\t\t\t\t\t\t }).then((result) =>{\n\n\t\t\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\t\t\twindow.location = 'index.php?ruta=cliente';\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t</script>\";\n\n\t\t\t\t }\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t\t title: \"¡El cliente no puede ir vacío o llevar caracteres especiales!\",\n\t\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t }).then((result) => {\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"index.php?ruta=cliente\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t \t</script>';\n\n\t\t\t }\n\n\t\t\t\n\n\t\t }\n\n\t\t\t\n\n\t\t}", "title": "" }, { "docid": "6c27b44693de43221254b8f9b68657e6", "score": "0.54118586", "text": "abstract public function addClient($data);", "title": "" }, { "docid": "c74a729a7dd77177a09c90cd8330d947", "score": "0.5379197", "text": "public function connexion () {\n if (key_exists('connexionEnCours', $_SESSION)) {\n $authentification = new GestionAuthentification($this->utilisateurs, $_SESSION['connexionEnCours'][GestionAuthentification::DONNEES_REF], $this->vue);\n $authentification->setErreur($_SESSION['connexionEnCours'][GestionAuthentification::ERREUR_REF]);\n } else {\n $authentification = new GestionAuthentification($this->utilisateurs, array(), $this->vue);\n }\n $this->vue->creationPageConnexion($authentification);\n }", "title": "" }, { "docid": "1e21e2600f60c0bb108f99bd1401c320", "score": "0.53763723", "text": "public function Connexion_client($champs, $where) //methode pour se connecter à l'espace membre\n {\n $this->ModeleAffichage-> renseigner(\"client\");\n $resultats = $this->ModeleAffichage-> selectWhere($champs, $where);\n\n return $resultats;\n }", "title": "" }, { "docid": "42c8194ab5f7c1dab4bfdf9dff22e12f", "score": "0.5373215", "text": "public function insertCliente() {\n\n $sql = new Sql();\n\n try {\n \n $sql->query(\"CALL sp_cliente_insert(:CLIENTE)\", array(\n ':CLIENTE'=>$this->getNome()\n\n ));\n\n }catch (Exception $e) {\n echo \"Erro : \". $e->getMessage();\n }\n }", "title": "" }, { "docid": "43410a491edd80fcbdc55bd62e4d7d30", "score": "0.53580105", "text": "function enregistrer()\r\n\t{\r\n \tglobal $prefixe;\r\n\t\t\r\n\t\t// Initialisation du message :\r\n\t\t$this->message=\"\";\r\n\t\t\r\n\t\t// Verification de l'existance de la table :\r\n\t\t$test_table=true;\r\n\t\t$liste_des_tables=array();\r\n \t$table_sql=requete_sql(\"SHOW tables;\");\r\n\t while($table_temp=tableau_sql($table_sql)) \r\n\t {\r\n\t \tarray_push($liste_des_tables,$table_temp[0]);\r\n\t }\r\n\t if (!in_array($this->table,$liste_des_tables))\r\n \t{\r\n \t\techo _TABLE.$this->table._INEXISTANTE_POUR_LA_CLASSE.$this->classe;\r\n \t\t$test_table=false;\r\n \t}\r\n \t\r\n \tif ($test_table==true)\r\n \t{\r\n \t\t// Enregistrement en base :\t \t\t\r\n\t \t\tif (isset($this->identifiant) && is_numeric($this->identifiant) && intval($this->identifiant)== $this->identifiant) \r\n\t \t\t{\r\n\t \t\t\t// Initialisation de la requete :\r\n\t \t\t\t$sql_requete_update=\"UPDATE $this->table SET \";\r\n\t \t\t\tforeach ($this->champs as $valeur)\r\n\t \t\t\t{\r\n\t \t\t\t\t// Concatenation champ = valeur :\r\n\t \t\t\t\tif (isset($this->$valeur) && !is_array($this->$valeur) && $valeur!=\"id\".$this->classe)\r\n\t \t\t\t\t{\r\n\t \t\t\t\t\t$sql_requete_update=$sql_requete_update.\"$valeur='\".$this->$valeur.\"', \";\r\n\t \t\t\t\t}\r\n\t \t\t\t}\r\n\t \t\t\t$sql_requete_update=substr($sql_requete_update,0,-2);\r\n\t \t\t\t\r\n\t \t\t\t// Clause WHERE :\r\n\t \t\t\t$sql_requete_update=$sql_requete_update.\" WHERE \".$this->champ_identifiant.\"='\".$this->identifiant.\"';\";\r\n\t \t\t\t\r\n\t \t\t\t// Lancement de la mise a jour de l objet correspondant :\r\n\t\t\t\t$sql_resultat=requete_sql($sql_requete_update);\r\n\t \t\t\treturn $this->identifiant;\r\n\t \t}\r\n\t \t\telseif (!isset($this->identifiant)) \r\n\t \t\t{\r\n\t \t\t\t// Test des champs obligatoires :\r\n\t \t\t\t$test_champs_obligatoires=true;\r\n\t \t\t\t\r\n\t \t\t\tif (isset($this->champs_obligatoires) && is_array($this->champs_obligatoires))\r\n\t \t\t\t{\r\n\t \t\t\t\tforeach ($this->champs_obligatoires as $champoblig)\r\n\t \t\t\t\t{\r\n\t \t\t\t\t\tif (!isset($this->$champoblig) || $this->$champoblig==\"\") \r\n\t \t\t\t\t\t{\r\n\t \t\t\t\t\t\tif ($test_champs_obligatoires==true)\r\n\t \t\t\t\t\t\t{\r\n\t \t\t\t\t\t\t\t$this->message.=_IL_MANQUE_UN_CHAMP_OBLIGATOIRE;\r\n\t\t\t \t\t\t\t\t$this->message.=_CLASSE_CHAMPS_MANQUANT.$this->classe._CLASSE_CHAMPS_MANQUANT_FIN;\r\n\t\t\t \t\t\t\t\t$this->message.=_LES_CHAMPS_OBLIGATOIRES_MANQUANT_SONT_LES_SUIVANTS;\r\n\t\t\t \t\t\t\t\t$this->message.=\"<ul>\";\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t\t$test_champs_obligatoires=false;\r\n\t\t\t \t\t\t\t$this->message.=\"<li>\".$champoblig.\"</li>\";\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\tif ($test_champs_obligatoires==false)\r\n\t \t\t\t\t\t{\r\n\t \t\t\t\t\t\t$this->message.=\"</ul>\";\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t}\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t// Test des champs uniques :\r\n\t \t\t\t$test_champs_uniques=true;\r\n\t \t\t\t\r\n\t \t\t\tif (isset($this->champs_uniques) && is_array($this->champs_uniques))\r\n\t \t\t\t{\r\n\t \t\t\t\tforeach ($this->champs_uniques as $champuniq)\r\n\t \t\t\t\t{\r\n\t \t\t\t\t\tif ((isset($this->$champuniq) || $this->$champuniq!=\"\") && in_array($champuniq,$this->champs)) \r\n\t \t\t\t\t\t{\r\n\t \t\t\t\t\t\t$sql=\"select * FROM $this->table WHERE \".$champuniq.\"='\".$this->$champuniq.\"'\";\r\n\t\t\t\t\t\t\t$requete=requete_sql($sql);\r\n\t\t\t\t\t\t\t$qte=compte_sql($requete);\r\n\t\t\t\t\t\t\tif ($qte!=0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$test_champs_uniques=false;\r\n\t \t\t\t\t\t\t\t$this->message.=\"<p><span>\"._LA_VALEUR.$this->$champuniq._POUR_LE_CHAMP.$champuniq._EXISTE_DEJA.\"</span></p><a href=\\\"javascript:history.go(-1)\\\">\"._RETOUR.\"</a>\";\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t}\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t// Initialisation de la requete :\r\n\t \t\t\tif ($test_champs_obligatoires==true && $test_champs_uniques==true)\r\n\t \t\t\t{\r\n\t \t\t\t\t$sql_requete_insert1=\"INSERT INTO $this->table (\";\r\n\t\t \t\t\tforeach ($this->champs as $valeur)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\t// Concatenation champ1,champ2 et 'valeur1','valeur2' :\r\n\t\t \t\t\t\tif (isset($this->$valeur) && !is_array($this->$valeur) && $valeur!=\"id\".$this->classe)\r\n\t\t \t\t\t\t{\r\n\t\t \t\t\t\t\t$sql_requete_insert1=$sql_requete_insert1.\"$valeur,\";\r\n\t\t \t\t\t\t\t$sql_requete_insert2=$sql_requete_insert2.\"'\".$this->$valeur.\"',\";\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t}\r\n\t\t \t\t\t$sql_requete_insert1=substr($sql_requete_insert1,0,-1).\") VALUES (\";\r\n\t\t \t\t\t$sql_requete_insert2=substr($sql_requete_insert2,0,-1).\");\";\r\n\t\t \t\t\t$sql_requete_insert=$sql_requete_insert1.$sql_requete_insert2;\r\n\t\t \t\t\t \t\t\t\r\n\t\t \t\t\t// Lancement de la creation de l objet correspondant :\r\n\t\t \t\t\t$sql_resultat=requete_sql($sql_requete_insert);\r\n\t\t \t\t\t$this->identifiant=id_insere_sql();\r\n\t\t \t\t\treturn $this->identifiant;\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t\t\tif ($this->message!=\"\") \r\n\t\t\t{\r\n\t\t\t\techo $this->message;\r\n\t\t\t}\r\n \t}\r\n }", "title": "" }, { "docid": "deaee7428d6957271676b65f7bd7602b", "score": "0.5347417", "text": "function insertU($iuser)\r\n\t\t{\r\n\t\t\tif($this->con->conectar()==true)\r\n\t\t\t{\r\n\t\t\t\treturn mysql_query(\"INSERT INTO clientes (nombre, apellidos, usuario, contrasena, fecha_nacimiento, nombre_calle, numero_exterior, numero_interior, entre_calle1, entre_calle2, descripcion_vivienda, ciudad) VALUES ('\".$iuser['0'].\"','\".$iuser['1'].\"','\".$iuser['2'].\"','\".$iuser['3'].\"','\".$iuser['4'].\"','\".$iuser['5'].\"','\".$iuser['6'].\"','\".$iuser['7'].\"','\".$iuser['8'].\"','\".$iuser['9'].\"','\".$iuser['10'].\"','\".$iuser['11'].\"')\");\r\n\t\t\t}\t\r\n\t\t}", "title": "" }, { "docid": "97bbd422367823db301e74e6786435de", "score": "0.53419954", "text": "public function __construct()\n {\n date_default_timezone_set('Europe/Lisbon');\n include(\"dados_conexao.php\");\n\n //& Alterar aqui depois os dados para a consulta no BD \n $this->tempoMenu = 7200; //Tempo entre a última mensagem e a possibilidade de enviar o menu novamente\n $idInstancia = 1;\n $this->idInstancia = $idInstancia;\n\n //Recebe o corpo do Json enviado pela instância\n $json = file_get_contents('php://input');\n $decoded = json_decode($json, true); //Decodifica\n\n //Grava o JSON-body no arquivo de debug\n ob_start();\n var_dump($decoded);\n $input = ob_get_contents();\n ob_end_clean();\n\n //Coloca para salvar todas as requisições recebidas em um arquivo de log\n //file_put_contents('inputs.log', $input . PHP_EOL, FILE_APPEND);\n\n\n\n //() Verifica SE É uma mensagem recebida \n if (isset($decoded['Type']) && ($decoded['Type'] == 'receveid_message' || $decoded['Type'] == 'receveid_audio_message')) {\n $RemoteJid = $decoded['Body']['Info']['RemoteJid'];\n $RemoteJidArray = explode(\"@\", $RemoteJid);\n $numero = $RemoteJidArray[0];\n $this->numerocliente = $numero;\n $this->numeroCliente = $numero;\n $tipoNumero = $RemoteJidArray[1];\n $idMensagemWhats = $decoded['Body']['Info']['Id'];\n $timestamp = $decoded['Body']['Info']['Timestamp'];\n $mensagem = $decoded['Body']['Text'];\n $this->stringMensagemAtual = $mensagem;\n\n\n //( Busca informações da instância CHATPRO no banco de dados \n $this->consultaInstancia($idInstancia);\n\n //() Verifica se NÃO É uma mensagem recebida de um número ou GRUPO \n if ($tipoNumero == 's.whatsapp.net') {\n\n //( Verifica se a hora atual está dentro do horário de atendimento\n if ($this->horarioAtendimento() == true) { //Dentro do horário de atendimento\n\n //( Consulta o contato no BD \n $sql = \"SELECT * FROM tbl_contatos WHERE numero = $numero AND id_instancia = $idInstancia\";\n $query = mysqli_query($conn['link'], $sql);\n $consultaContato = mysqli_fetch_array($query, MYSQLI_ASSOC);\n $numRow = mysqli_num_rows($query);\n\n if (!$query) {\n $this->logSis('ERR', \"Mysql Connect Erro: \" . mysqli_error($conn['link']));\n exit(0);\n }\n\n if ($numRow != 0) { //( O CONTATO EXISTE NO BANCO DE DADOS \n $this->id_contato = $consultaContato['id_contato'];\n $this->idContato = $consultaContato['id_contato'];\n $nome = $consultaContato['nome'];\n $email = $consultaContato['email'];\n $fase = $consultaContato['fase'];\n $teste = $consultaContato['teste'];\n } else { //( O CONTATO NÃO EXISTE \n $this->primeirocontato = true;\n\n //CONTATO NÃO EXISTE \n //( Insere o contato no banco de dados \n $sql = \"INSERT INTO tbl_contatos(id_instancia, numero, lista_0, teste, created_at) VALUES ('$idInstancia', '$numero', 1, 0, NOW())\";\n $resultado = mysqli_query($conn['link'], $sql);\n $this->id_contato = mysqli_insert_id($conn['link']);\n if ($resultado != '1') {\n $this->logSis('ERR', 'Insert Contatos. Erro: ' . $resultado . mysqli_connect_error());\n }\n }\n\n //( Insere a interação que foi recebida no BD \n $resultado = $this->inserirInteracao($this->idInstancia, 0, $this->id_contato, '', '', '', '', '', '', '', $idMensagemWhats, $mensagem, 1);\n\n if ($resultado == '1') {\n\n $mensagem = explode(' ', trim($decoded['Body']['Text']));\n $palavra = mb_strtolower($mensagem[0], 'UTF-8');\n\n if ($this->primeirocontato == true) { //( Se for o primeiro contato\n $texto = utf8_encode($this->msg_inicial) . \"\\n\";\n $this->envioMenuRaiz($numero, $texto);\n //& Partir daqui, precisa entender se o menu raiz é um menu de produtos.\n } else {\n //( Consulta a última interação enviada pra ver se foi a solicitação de nome \n $ultimaInteracao = $this->verificaInteracao($idInstancia, $this->id_contato);\n $tempoParaUltimaInteracao = $this->difDatasEmHoras($ultimaInteracao['dataEnvio'], date(\"Y-m-d H:i:s\"));\n\n $this->resposta($numero, $decoded, $ultimaInteracao);\n }\n } else {\n $this->logSis('ERR', 'Erro ao tentar inserir a interação');\n }\n } else { //fora do horário de atendimento\n\n $this->sendMessage(\"ForaHorario\", $numero, utf8_encode($this->msg_fora_horario), \"\");\n }\n }\n }\n }", "title": "" }, { "docid": "7fed6e89ffbca143153cf09f60745335", "score": "0.5325979", "text": "function inscription($id, $nmdp, $nmdpbis)\n\t{\n\t\t$var=false;\n\t\tif(strcmp($_SESSION['id'], \"david\") != 0){\n\t\t\theader(\"Location:accueil.php\");\n\t\t}\n\t\t\n\t\tif (isset($nmdp) AND isset($nmdpbis) AND isset($id))\n\t\t{\n\t\t\t// If it's ok, we recover the variables and we cipher the password\n\t\t\tif(strcmp($nmdp, $nmdpbis)==0){\n\t\t\t\t$pass=$id.$nmdp;\n\t\t\t $mdp=hash('sha512', $pass);\n\t\t\t $inser=$id . \" \" . $mdp . \"\\n\";\t\t\t \n\t\t\t $fp=fopen(\"fichiers/log.txt\", \"a+\");\n\t\t\t \n\t\t\t $stop=0;\n\t\t\t $lines=file(\"fichiers/log.txt\");\n\t\t\t foreach ($lines as $value){\n\t\t\t\t\t$usr = explode(\" \", $value, 2);\n\t\t\t\t\tif(strcmp($usr[0], $id) == 0){\n\t\t\t\t\t\t$stop=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($stop==0){\n\t\t\t\t\tfwrite($fp, $inser);\n\t\t\t\t\techo \"Gazier crée\";\n\t\t\t\t\t$var=true;\n\t\t\t\t}else{\n\t\t\t\t\techo \"Ce nom d'utilisateur est déjà enregistré\";\n\t\t\t\t\t$var=1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo \"Mots de passes differents\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"Veuillez renseigner les champs\";\n\t\t}\n\t\treturn $var;\n\t}", "title": "" }, { "docid": "b783d7d5113171889a8bc3b44e1f644e", "score": "0.5325363", "text": "public function subscribe()\r\n\t{\n\t\t//turn off the automatic themeing stuff. Where we're going we don't need themes.\n\t\t$this->template = '';\n\t\t$this->auto_render = FALSE;\n\t\t\n\t\t//are they logged?\n\t\tif(!$this->logged_in)\n\t\t{\n\t\t\techo json_encode(array('status'=>'error'));\n\t\t\treturn;\n\t\t}\n\t\t//get the user id\n\t\t$user_id = $_SESSION['auth_user']->id;\n\t\t\n\t\t//did they give us a incident_id\n\t\tif(isset($_GET['incident_id']) AND intval($_GET['incident_id']) != 0)\n\t\t{\n\t\t\t//get the incident id\n\t\t\t$incident_id = intval($_GET['incident_id']);\n\n\t\t\t//is this a valid incident_id?\n\t\t\t$incident = ORM::factory('incident', $incident_id);\n\t\t\t\n\t\t\tif(!$incident->loaded)\n\t\t\t{\n\t\t\t\techo json_encode(array('status'=>'error'));\r\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//does this subscription already exists\n\t\t\t$subscription = ORM::factory('incidentdeltanotify')\n\t\t\t\t->where('user_id', $user_id)\n\t\t\t\t->where('incident_id', $incident_id)\n\t\t\t\t->find();\n\t\t\tif($subscription->loaded)\n\t\t\t{\n\t\t\t\techo json_encode(array('status'=>'already exists'));\r\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t//ok so let's subscribe this mother\n\t\t\t$subscription = ORM::factory('incidentdeltanotify');\n\t\t\t$subscription->user_id = $user_id;\n\t\t\t$subscription->incident_id = $incident_id;\n\t\t\t$subscription->save();\n\t\t\t\n\t\t\techo json_encode(array('status'=>'success', 'user_id'=>$user_id, 'incident_id'=>$incident_id));\r\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo json_encode(array('status'=>'error'));\r\n\t\t\treturn;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "0bee9373a7f77dd36bed560e87deb2c4", "score": "0.5313709", "text": "function __construct() {\n require_once Parametre::$MVC_BASE.'/mini_modules/mod_inscription/controleur/Cont_inscription.php';\n $this->control = new Cont_inscription();\n \n if(isset($_GET[\"action\"]) && !empty($_GET[\"action\"])){\n $action = $_GET[\"action\"]; \n }else{\n $action =\"\";\n }\n \n \n switch ($action) {\n case \"\":\n $this->control->aff_inscription();\n \n break;\n case \"enr_inscription\":\n $this->control->action_enr();\n \n break;\n\n default:\n $this->control->aff_inscription();\n break;\n }\n }", "title": "" }, { "docid": "99a463b5dfa349cc457ebaceaa5481e3", "score": "0.5309587", "text": "function date_inscription_afficher_contenu_objet($flux){\n\tif ($flux['args']['type']=='auteur'\n\t\tAND $id_auteur = $flux['args']['id_objet']\n\t\tAND $date_inscription = sql_getfetsel('date_inscription','spip_auteurs','id_auteur='.intval($id_auteur))\n\t){\n\t\t$date_inscription = ($date_inscription == '0000-00-00 00:00:00') ? _T('date_inscription:non_renseignee') : affdate($date_inscription);\n\t\t$flux['data'] .= \"<div class='champ afficher afficher_date_inscription'>\"\n\t\t\t. \"<strong class='label'>\" . _T('date_inscription:date_inscription') . \" : </strong>\"\n\t\t\t. \"<div class='valeur'>\" . propre($date_inscription) . \"</div></div>\";\n\t}\n\treturn $flux;\n}", "title": "" }, { "docid": "22495860612f194930947acae452fb2a", "score": "0.5308169", "text": "public function inscription(){\n\n require('Views/frontend/inscription.php');\n }", "title": "" }, { "docid": "e4b7b6fc1116f2e4b5141875275eebd2", "score": "0.5302102", "text": "public function connexion_responsable() {\n self::verifierJeton('formCo');\n // on teste l'existence de nos variables et aussi si elles ne sont pas vides\n if ((isset($_POST['identifiant']) && !empty($_POST['identifiant'])) && (isset($_POST['mp']) && !empty($_POST['mp']))) {\n $data = $this->modeleConnexion->get_responsableBD(htmlspecialchars($_POST[\"identifiant\"]));\n // si on obtient une réponse, alors l'utilisateur est un membre\n if (!empty($data)) {\n // on teste les deux mots de passe\n if (password_verify(htmlspecialchars($_POST['mp']), $data['motDePasse'])) {\n\n $_SESSION['monid'] = $data['idResp'];\n $_SESSION['identifiant'] = $data['identifiant'];\n echo '<script>window.location.replace(\"index.php?module=etudiant&action=listeEtudiant\")</script>';\n }\n else {\n throw new formCoException('Les mots de passe saisis sont différents !');\n }\n }\n // si on ne trouve aucune réponse, le visiteur s'est trompé soit dans son login, soit dans son mot de passe\n else {\n throw new formCoException('Compte non reconnu : l\\'identifiant ou le mot de passe est incorrect');\n }\n }\n else {\n throw new formCoException('Au moins un des champs est vide !');\n }\n }", "title": "" }, { "docid": "86c808b1b541737c5a6d21916cfdab5a", "score": "0.52996063", "text": "public function affichageConnexionEchouee () {\n $url = $this->routeur->getURLPageConnexion();\n $this->routeur->POSTredirect($url, \"Connexion impossible, veuillez corriger les erreurs\");\n }", "title": "" }, { "docid": "a4de9d237f9e6f822698acd64745972c", "score": "0.5293564", "text": "public function recuperaClient($num, $mail = null) {\n //$num=\"999\";\n\n if (empty($mail))\n $mail = \"nuul@nuul\" . time();\n $mail = strtolower($mail);\n\n $query = \"\nSELECT client.`client_id`,`client_nom`,`client_conflictes`,`client_email`,`client_mobil`,`client_telefon`,`client_dni`,`client_cp`,`client_localitat`,`client_adresa`,`client_cognoms`,reserves.id_reserva AS id_reserva_grup,\" . T_RESERVES . \".id_reserva AS id_reserva, reserves.data as data_grup, \" . T_RESERVES . \".data AS data,\n(reserves.id_reserva OR reservestaules.id_reserva) as reservat\n\nFROM client \n\t\tLEFT JOIN reserves ON client.client_id=reserves.client_id AND reserves.data>=NOW()AND (reserves.estat=1 OR reserves.estat=2 OR reserves.estat=3 OR reserves.estat=7 OR reserves.estat=100)\n\t\tLEFT JOIN \" . T_RESERVES . \" ON client.client_id=\" . T_RESERVES . \".client_id AND \" . T_RESERVES . \".data>=NOW()\n\n\tWHERE client_mobil='$num' \n\tOR LOWER(client_email)='$mail'\n\t\n\tORDER BY id_reserva_grup DESC , id_reserva DESC , client.client_id DESC\";\n\n // echo $query;\n $Result1 = mysqli_query($this->connexioDB, $query) or die(((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n\n if (mysqli_num_rows($Result1) == 0)\n return 'false';\n\n $row['err'] = FALSE;\n $row = mysqli_fetch_array($Result1);\n if ($row['reservat']) {\n if ($row['id_reserva_grup'])\n $row['data'] = $row['data_grup'];\n $row['data'] = $this->cambiaf_a_normal($row['data']);\n $row['err'] = \"20\";\n }\n\n //GARJOLA\n if ($this->garjola($num, $mail)) {\n if ($row['id_reserva_grup'])\n $row['data'] = $row['data_grup'];\n $row['data'] = $this->cambiaf_a_normal($row['data']);\n //$row['err']=\"21\".\" $num $mail\";\n $row['err'] = \"21\";\n }\n /* TRAMPA PER FER PROVES!!!!\t */\n if ($num == \"999212121\") {\n $row['reservat'] = $row['id_reserva_grup'] = $row['id_reserva'] = 0;\n $row['err'] = null;\n }\n return json_encode($row);\n }", "title": "" }, { "docid": "3e8fb5421ed5548a983a320fef1392ff", "score": "0.52917385", "text": "public function cad_cliente($nome,$telefone){\n $stmt = $this->conn->prepare(\"INSERT INTO clientes(nome, telefone) values(?, ?)\");\n $stmt->bind_param(\"ss\", $nome, $telefone);\n $result = $stmt->execute();\n $stmt->close(); \n return true;\n }", "title": "" }, { "docid": "ce0c24239b2702475152ee6a5113c38f", "score": "0.5282122", "text": "function Grabar_Cliente($nit,$nom,$direc,$tel1,$tel2,$mail){\n $respuesta = new xajaxResponse();\n $ClsCli = new ClsCliente();\n //pasa a mayusculas\n\t\t$nom = trim($nom);\n\t\t$direc = trim($direc);\n\t\t$tel1 = trim($tel1);\n\t\t$tel2 = trim($tel2);\n\t//--------\n\t//decodificaciones de tildes y Ñ's\n\t\t$nom = utf8_decode($nom);\n\t\t$direc = utf8_decode($direc);\n\t//--------\n\t//pasa a minusculas\n\t\t$mail = strtolower($mail);\n\t//--------\n if($nit != \"\" && $nom != \"\" && $direc != \"\"){\n\t\t$id = $ClsCli->max_cliente();\n\t\t$id++; /// Maximo codigo de Cliente\n\t\t//$respuesta->alert(\"$id\");\n\t\t$sql = $ClsCli->insert_cliente($id,$nit,$nom,$direc,$tel1,$tel2,$mail); /// Inserta Cliente\n\t\t//$respuesta->alert(\"$sql\");\n\t\t$rs = $ClsCli->exec_sql($sql);\n\t\tif($rs == 1){\n\t\t\t$msj = '<span>Registros guardados Satisfactoriamente!!!</span><br><br>';\n\t\t\t$msj.= '<input type = \"button\" class = \"boton\" value = \"Aceptar\" onclick=\"cerrar();cerrarPromt();\" />';\n\t\t\t$respuesta->assign(\"lblparrafo\",\"innerHTML\",$msj);\n\t\t\t$respuesta->assign(\"cli\",\"value\",$id);\n\t\t\t$respuesta->assign(\"nit\",\"value\",$nit);\n\t\t\t$respuesta->assign(\"nom\",\"value\",$nom);\n\t\t}else{\n\t\t\t$msj = '<span>Error de Conexion...</span><br><br>';\n\t\t\t$msj.= '<input type = \"button\" class = \"boton\" value = \"Aceptar\" onclick=\"cerrar();\" />';\n\t\t\t$respuesta->assign(\"lblparrafo\",\"innerHTML\",$msj);\n\t\t}\n\t}\n \n return $respuesta;\n}", "title": "" }, { "docid": "c136caca77c9b150046cb080e69aa116", "score": "0.52803624", "text": "function Notifica($IDnickname,$nickname,$op,$tipo,$ref,$cat,$IDoggetto,$IDdest,$nickdest){\n$ip = $_SERVER['REMOTE_ADDR'];\n$data = date(\"Y-m-d H:i:s\");\n\n $sql = \"INSERT INTO notifiche (IDnickname,nickname,operazione,tipo,ref,cat,ip,data,IDoggetto,IDdest,nickdest) values ({$IDnickname},'{$nickname}','{$op}','{$tipo}','{$ref}','{$cat}','{$ip}','{$data}',{$IDoggetto},{$IDdest},'{$nickdest}')\";\n\t $result = mysql_query($sql) or die(\"Errore [Notifica] [Funzione Notifica]: \".mysql_errno().\" - \".mysql_error());\n\n\t $notifiche = EseguiQuery(\"SELECT * FROM centronotifiche WHERE nickname = '\".$nickdest.\"'\",2,\"\");\n\t \n\t if ($notifiche != null){\n\t foreach($notifiche as $k => $n) {}\n\t $numlog = $n['notifiche'] + 1;\n\t $sql = \"UPDATE centronotifiche SET notifiche = {$numlog} where nickname = '\".$nickdest.\"'\";\n $result = mysql_query($sql);\t\n\t } else {\n\t \n\t $sql = \"INSERT INTO centronotifiche (nickname,IDnickname,notifiche) values ('{$nickdest}',{$IDdest},1)\";\n\t $result = mysql_query($sql);\n\t \n\t }\n\t \n\t \n}", "title": "" }, { "docid": "0b80c83d442d83d197d63897cfe1199e", "score": "0.527855", "text": "function inserir($camps){\n\t\t//$this->unClient.noms=.$camps[0] etc.....\n\t\tif($this->con->conectar()==true){\n\t\t\t//print_r($camps);\n\t\t\t//echo \"INSERT INTO Client (noms, ciutat, sexe, telefon, data_neix) VALUES ('\".$camps[0].\"', '\".$camps[1].\"','\".$camps[2].\"','\".$camps[3].\"','\".$camps[4].\"')\";\n\t\t\treturn mysql_query(\"INSERT INTO Client (noms, ciutat, sexe, telefon, data_neix) VALUES ('\".$camps[0].\"', '\".$camps[1].\"','\".$camps[2].\"','\".$camps[3].\"','\".$camps[4].\"')\");\n\t\t}\n\t}", "title": "" }, { "docid": "bbc226c769580ad42863db5dec575300", "score": "0.52742976", "text": "private function controlInitInscription($dataInscripction){\n $timestamp = $dataInscripction['fechaIni']['timestamp'];\n $fechaInicio = new DateTime();\n $fechaInicio->setTimestamp($timestamp);\n\n $isTodayOpen = ControlDate::getInstance()->isToday($fechaInicio);\n // IMPORTANTE: cuando es false no se imprime valor en la pantalla de la consola\n if($isTodayOpen){\n $idInscription = $dataInscripction['id'];\n $repository = $this->em->getRepository(Inscripcion::class);\n $inscription = $repository->find($idInscription);\n // buscamos la competencia para actualizar su estado\n $repositoryComp = $this->em->getRepository(Competencia::class);\n $competencia = $repositoryComp->findOneBy(['inscripcion' => $inscription]);\n // actualizamos el estado de la competencia\n $this->changeStatusCompetition($competencia, Constant::ESTADO_COMP_INSCRIPCION_ABIERTA);\n // mandamos la notificacion al topico\n $this->sendNotificationInitInscription($competencia);\n $this->publishNewCloud($competencia);\n }\n }", "title": "" }, { "docid": "986758600b4792bf6713e98e9a5415db", "score": "0.527085", "text": "public function affichageModificationEchouee () {\n $url = $this->routeur->getURLPageAccueil();\n $this->routeur->POSTredirect($url, \"Vous devez ?tre connect? pour modifier vos informations\");\n }", "title": "" }, { "docid": "4db2e058f489d4ee7dd5064c6d52745c", "score": "0.52508277", "text": "public function recuperacao(){\t\t\t\n\t\t\t$usuario = Container::getModel('Usuario');\n\n\t\t\t$usuario->__set('email', $_GET['email']);\n\t\t\t$emailCadastrado = $usuario->recuperarConta();\n\n\t\t\tif($emailCadastrado != 0){\n\t\t\t\t\t// ###################COLOCAR NA WEB PARA FUNCIONAR, AINDA NÃO TESTADO###################\n\n\t\t\t\t\t// chave\n\t\t\t\t\t$chave = md5(rand());\n\n\t\t\t\t\t// chave no bd\n\t\t\t\t\t$usuario->__set('chave_recuperacao', $chave);\n\t\t\t\t\t$usuario->enviarChave();\n\n\t\t\t\t\t// envio de email\n\t\t\t\t\t// $de = \"facilitaUDF@gmail.com\";\n\t\t\t\t\t// $titulo = \"Recuperação de conta na Bambu\";\n\t\t\t\t\t// $msg = \"<h3>Olá \".$emailCadastrado['nome'].\"</h3> <br/><br/> <p>Foi requisitada a alteração da senha na sua conta Bambu,<br/> confirme a alteração neste link <a href='\"./recuperar_email?chave=$chave.\"'>RECUPERAR CONTA</a></br/><p>LINK DIRETO</p><br/> caso não tenha sido você o solicitante, por favor desconsidere este email.</p><p>Não responda esse email</p>\";\n\n\t\t\t\t\t// // use wordwrap() if lines are longer than 70 characters\n\t\t\t\t\t// $msg = wordwrap($msg,70);\n\n\t\t\t\t\t// $headers = \"From: \".$_GET['email'].\"\\r\\n\".\"CC: \".$_GET['email'];\n\n\t\t\t\t\t// mail($de,$titulo,$msg,$headers);\n\t\t\t}\n\t\t\t$this->render('/msg_recuperar');\n\t\t}", "title": "" }, { "docid": "e6b57c6621aee910378a7c38624fc323", "score": "0.52478814", "text": "public function enviarPeticion( $comando ) {\n\n SocketClass::client_reply($comando);\n\n}", "title": "" }, { "docid": "895c34e68068f813add5e4126ef5037e", "score": "0.52330214", "text": "function mostrar_Client($id){\n\t\t//$this->unClient.id=.$id etc.....\n\n\t\tif($this->con->conectar()==true){\n\t\t\treturn mysql_query(\"SELECT * FROM Client WHERE id=\".$id);\n\t\t}\n\t}", "title": "" }, { "docid": "49ce85e66e54d8af93e6da1863fb92ac", "score": "0.5232222", "text": "public function newAction( Request $request ) {\n\n\t\t\t// Utilisateur non connecté\n\t\t\tif ( !$this->userLogged() ) {\n\t\t\t\t$client = new Client();\n\t\t\t\t$form = $this->createForm( 's4smithe\\VitrineBundle\\Form\\Type\\ClientType', $client );\n\t\t\t\t$form->handleRequest( $request );\n\n\t\t\t\tif ( $form->isSubmitted() && $form->isValid() ) {\n\t\t\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t\t\t$user = $em->getRepository( 's4smitheVitrineBundle:Client' )\n\t\t\t\t\t\t->findOneBy(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'mail' => $client->getMail(),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\tif( !$user ) {\n\t\t\t\t\t\t$em->persist( $client );\n\t\t\t\t\t\t$em->flush();\n\n\t\t\t\t\t\t$this->setSessionUser( $client->getId() );\n\n\t\t\t\t\t\treturn $this->redirectToRoute(\n\t\t\t\t\t\t\t'client_listCommande'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$message = array(\n\t\t\t\t\t\t'type' => 'warning',\n\t\t\t\t\t\t'title' => \"Inscription impossible\",\n\t\t\t\t\t\t'message' => 'L\\'email saisie est déjà associé à un compte utilisateur'\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->getRequest()->getSession()->getFlashBag()->add(\n\t\t\t\t\t\t'message', $message\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t\treturn $this->render(\n\t\t\t\t\t's4smitheVitrineBundle:Client:register.html.twig',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'client' => $client,\n\t\t\t\t\t\t'form' => $form->createView()\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Utilisateur connecté\n\t\t\t} else {\n\t\t\t\treturn $this->redirectToRoute( 'client_listCommande' );\n\t\t\t}\n\n\n\t\t}", "title": "" }, { "docid": "f05dd7bcb18cee56730359014a1d8aef", "score": "0.5215864", "text": "function comprobarClienteDuplicado() {\n\t\tif($this->id_cliente == NULL) {\n\t\t\t$consulta = sprintf(\"select id_cliente from clientes where nombre=%s and activo=1\",\n\t\t\t\t$this->makeValue($this->nombre, \"text\"));\n\t\t} else {\t\n\t\t\t$consulta = sprintf(\"select id_cliente from clientes where nombre=%s and activo=1 and id_cliente<>%s\",\n\t\t\t\t$this->makeValue($this->nombre, \"text\"),\n\t\t\t\t$this->makeValue($this->id_cliente, \"int\"));\n\t\t}\n\t\t$this->setConsulta($consulta);\n\t\t$this->ejecutarConsulta();\n\t\tif($this->getNumeroFilas() == 0) {\n\t\t\treturn false;\t\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "68a0754cac17c20c5cf0b0fb807cd7e4", "score": "0.52091986", "text": "function script_inscription_pseudo($donnees){\n\tglobal $db;\n\t$pseudo = $donnees[crypter('register_pseudo')];\n\t$echo='false';\n\t$sql_rep = SELECT('utilisateurs', array('pseudo'=>$pseudo));\n\tif(!empty($sql_rep)){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t};\n}", "title": "" }, { "docid": "5bb54c940810c9fff2cb8be343c08576", "score": "0.520475", "text": "public function addUser(){\n\n\t\tif(!empty($_POST)){\n\t\t\tif (!empty($_POST['nom']) && !empty($_POST['prenom']) && !empty($_POST['naissance']) \n\t\t &&!empty($_POST['ident']) &&!empty($_POST['pass']) && !empty($_POST['pass-test'])\n\t\t && !empty($_POST['adresse']) && !empty($_POST['postal']) && !empty($_POST['ville']) \n\t\t && !empty($_POST['mail'])) {\n\t\t\t$tab = array(\n\t\t\t\t'nom'=> htmlspecialchars($_POST['nom']),\n\t\t 'prenom'=> htmlspecialchars($_POST['prenom']),\n\t\t 'naissance'=> htmlspecialchars($_POST['naissance']),\n\t\t \t'ident'=> htmlspecialchars($_POST['ident']),\n\t\t 'pass'=> sha1($_POST['pass']),\n\t\t 'pass-test'=> sha1($_POST['pass-test']),\n\t\t 'adresse'=> htmlspecialchars($_POST['adresse']),\n\t\t 'postal'=> htmlspecialchars($_POST['postal']),\n\t\t 'ville'=> htmlspecialchars($_POST['ville']),\n\t\t 'mail'=> htmlspecialchars($_POST['mail'])\n\t\t\t\t);\n\t\t\t\n\t\t\t \t$check = new Model_Connection();\n\t\t\t \t$verif = $check -> isIdentExists($tab['ident']);\n\n\t\t\t \t\tif (empty($verif)){\n\n\t\t\t\t\t \tif($tab['pass']==$tab['pass-test']){\n\t\t\t\t\t\t\t\t$inscribe = new Model_Connection();\n\t\t\t\t\t\t\t\t$inscription = $inscribe ->getInscribe($tab);\n\t\t\t\t\t\t\t\t$_SESSION['ident'] = $tab['ident'];\n\t\t\t\t\t\t\t\trequire_once($_SERVER['DOCUMENT_ROOT'].'/fantasy/views/header.php');\n\t\t\t\t\t\t\t\treturn $_SESSION;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\telse if (empty($_SESSION['ident'])){\n\t\t\t\t\t\t\t\t$message = 'Les mots de passe saisis sont differents';\n\t\t\t\t\t\t\t\trequire_once($_SERVER['DOCUMENT_ROOT'].'/fantasy/views/header.php');\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\t\telse{\n\t\t\t$message=\"pour accéder à nos services, veuillez-vous inscrire\";\n\t\t\trequire_once($_SERVER['DOCUMENT_ROOT'].'/fantasy/views/connection/inscription.php');\n\t\t\t}\n\t}", "title": "" }, { "docid": "df7bb1bde786c7c19cf68b91a817f27a", "score": "0.52026105", "text": "public function encender( ) {\n\n $comando=$this->comandos1[DaoControl::$ENCENDER];\n $comando=$this->procesarComando($comando,\"\");\n\n $this->setEstado(self::$ON);\n $this->encendido=1;\n $this->guardarEstado();\n $respuesta=$this->enviarComando($comando);\n\t//echo \"respuesta en dispositivo:\".$respuesta;\n return $respuesta;\n\n }", "title": "" }, { "docid": "01d6a6cccf9858f48afcfae30e4ff740", "score": "0.51973325", "text": "function inscription($login, $firstname, $lastname, $passwd, $email, $phone, $birth)\n{\n $conn = co_bd();\n $passwd = hash(\"SHA512\", mysqli_real_escape_string($conn, $passwd));\n $login = mysqli_real_escape_string($conn, $login);\n $firstname = mysqli_real_escape_string($conn, $firstname);\n $lastname = mysqli_real_escape_string($conn, $lastname);\n $email = mysqli_real_escape_string($conn, $email);\n $phone = mysqli_real_escape_string($conn, $phone);\n $birth = mysqli_real_escape_string($conn, $birth);\n $sql = \"INSERT INTO users (login, firstname, lastname, passwd, email, phone, birth)\n VALUES ('$login', '$firstname', '$lastname', '$passwd', '$email', '$phone', '$birth')\";\n if (mysqli_query($conn, $sql) === TRUE)\n echo \"bienvenu chez nous \" . $login . \"\\n\";\n mysqli_close($conn);\n}", "title": "" }, { "docid": "49c1d60735da589f6bee1703fe0580f9", "score": "0.5194249", "text": "private /*String*/ function getSubscribeContent() {\n\t\n\t\t$subAero = false;\n\t\t$subAmbi = false;\n\t\t$subAuto = false;\n\t\t$subBio = false;\n\t\t$subCine = false;\n\t\t$subCivi = false;\n\t\t$subEle = false;\n\t\t$subElettronica = false;\n\t\t$subEne = false;\n\t\t$subFisi = false;\n\t\t$subGesti = false;\n\t\t$subInfo = false;\n\t\t$subMate = false;\n\t\t$subMateri = false;\n\t\t$subMecca = false;\n\t\t$subTele = false;\n\t\t$subCom = false;\n\t\t\n\t\t$request = new Request(\"SubscribeRequestHandler\", READ);\n\t\t$request->addArgument(\"application\", APPLICATION_NAME.\"_ADMIN\");\n\t\t$request->addArgument(\"userID\", $_SESSION['user']->id);\n\t\t\n\t\t$responsejSon = $request->send();\n\t\t$responseObject = json_decode($responsejSon);\n\t\tif($responseObject->status == 200) {\n\t\t\t$res = $responseObject->dataObject->subscriptions;\n\t\t\tforeach( $res as $value ){\n\t\t\t\tif (strrpos($value, \"AreaAerospaziale\") !== false){\n\t\t\t\t\t$subAero = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaAmbientale\") !== false){\n\t\t\t\t\t$subAmbi = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaAutoveicolo\") !== false){\n\t\t\t\t\t$subAuto = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaBiomeccania\") !== false){\n\t\t\t\t\t$subBio = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaCinema\") !== false){\n\t\t\t\t\t$subCine = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaCivile\") !== false){\n\t\t\t\t\t$subCivi = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaElettrica\") !== false){\n\t\t\t\t\t$subEle = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaElettronica\") !== false){\n\t\t\t\t\t$subElettronica = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaEnergetica\") !== false){\n\t\t\t\t\t$subEne = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaFisica\") !== false){\n\t\t\t\t\t$subFisi = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaGestionale\") !== false){\n\t\t\t\t\t$subGesti = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaInformatica\") !== false){\n\t\t\t\t\t$subInfo = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaMatematica\") !== false){\n\t\t\t\t\t$subMate = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaMateriali\") !== false){\n\t\t\t\t\t$subMateri = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaMeccanica\") !== false){\n\t\t\t\t\t$subMecca = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"AreaTelecomunicazioni\") !== false){\n\t\t\t\t\t$subTele = true;\n\t\t\t\t}\n\t\t\t\tif (strrpos($value, \"commentGroup\") !== false){\n\t\t\t\t\t$subCom = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t?>\n\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm1\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Aerospaziale\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm2\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Ambientale\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm3\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Autoveicolo\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm4\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Biomeccania\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm5\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Cinema\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm6\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Civile\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm7\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Elettrica\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm8\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Elettronica\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm9\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Energetica\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm10\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Fisica\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm11\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Gestionale\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm12\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Informatica\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm13\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Matematica\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm14\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Materiali\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm15\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Meccanica\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm16\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"Area\", \"Telecomunicazioni\", KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\t\t\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm1.submit();\">Sottoscrivere ai testi di Aereospaziale</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm2.submit();\">Sottoscrivere ai testi di Ambientale</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm3.submit();\">Sottoscrivere ai testi di Autoveicolo</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm4.submit();\">Sottoscrivere ai testi di Biomeccania</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm5.submit();\">Sottoscrivere ai testi di Cinema</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm6.submit();\">Sottoscrivere ai testi di Civile</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm7.submit();\">Sottoscrivere ai testi di Elettrica</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm8.submit();\">Sottoscrivere ai testi di Elettronica</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm9.submit();\">Sottoscrivere ai testi di Energetica</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm10.submit();\">Sottoscrivere ai testi di Fisica</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm11.submit();\">Sottoscrivere ai testi di Gestionale</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm12.submit();\">Sottoscrivere ai testi di Informatica</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm13.submit();\">Sottoscrivere ai testi di Matematica</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm14.submit();\">Sottoscrivere ai testi di Materiali</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm15.submit();\">Sottoscrivere ai testi di Meccanica</a>\n\t\t<a type=\"button\" data-theme=\"e\" href=\"#\" onclick=\"document.getSubscribeForm16.submit();\">Sottoscrivere ai testi di Telecomunicazioni</a>\n\t\t\n\n\t\t<form action=\"\" method=\"post\" name=\"getSubscribeForm17\">\n\t\t\t<input name=\"application\" value=\"<?= APPLICATION_NAME.\"_ADMIN\" ?>\" type=\"hidden\" />\n\t\t\t<input name=\"method\" value=\"subscribe\" type=\"hidden\" />\n\t\t\t<input name=\"numberOfOntology\" value=\"1\" type=\"hidden\"/>\n\t\t\t<input name=\"ontology0\" value=\"<?= urlencode(json_encode(new MDataBean(\"commentGroup\", APPLICATION_NAME, KEYWORD))); ?>\" type=\"hidden\" >\n\t\t</form>\n\t\t<br />\n\t\t<br />\n\t\t<br />\n\t\t<a type=\"button\" data-theme=\"b\" href=\"#\" onclick=\"document.getSubscribeForm17.submit();\" >Sottoscrivere ai commenti</a>\n\n\t<?php }", "title": "" }, { "docid": "696851dd404966a18dad2762a3f7de38", "score": "0.5193895", "text": "function aceptar_solicitud($id_conversacion){\n\n\t\t$estado = 'Aceptada';\n\n\t\t$conexión = new Conexion();\n\n\t\t$cadena_conexion = $conexión->Conectar();\n\n\t\t$stmt = $cadena_conexion->prepare(\"UPDATE contacto_chat SET estado =:estado WHERE id_conversacion = :id_conversacion\");\n\n\t\t$stmt->bindParam(':id_conversacion',$id_conversacion);\n\t\t$stmt->bindParam(':estado',$estado);\n\n\n\t\tif($stmt->execute()){\n\t\t\treturn true;\n\t\t\t\t\n\t\t}\n\n\t\telse{\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "8a95c22ed2eabe0c35f62403f3ea2f07", "score": "0.51932204", "text": "function get_IDpage_gestion_ClubByAdmin_Tournois(){\n\treturn \"25175\"; //=> Sur le serveur \n\t/// \\attention l'ID retournée doit existé\n}", "title": "" }, { "docid": "3de86488bf3f3bc0e1a16aa29282aa5d", "score": "0.51889366", "text": "function script_inscription_testchangeremail($donnees){\n\tglobal $db;\n\t$email = $donnees[crypter('changeremail_nemail')];\n\t$autreuser['cle'] = decrypter($donnees[crypter('changeremail_cleuser')]);\n\t$echo = true;\n\t\n\t$req = $db->prepare('SELECT * FROM utilisateurs WHERE email=? AND cleUtilisateur<>?');\n\t$req->execute(array($email, $autreuser['cle'])); \n\twhile($row = $req->fetch()){$echo = false;}\n\t\n\treturn $echo;\n}", "title": "" }, { "docid": "45670a602f875c3bc82f959d4c678dcb", "score": "0.51847756", "text": "public function activarNuestroSonido() {\n\n self::$mesaMezclas->encender(MesaMezclas::$CANAL2,\"aux2\");\n\n }", "title": "" }, { "docid": "9f8fd15884debf5ca742066b254e6637", "score": "0.5169482", "text": "function displayInscription ($affichage) {\n switch ($affichage) {\n case 2 : \n echo '\n Merci de votre inscription. Cependant, il reste une dernière étape.\n Il vous reste à vérifier votre adresse mail.';\n break;\n default : \n $maxYear= date(\"Y\") - 18;\n $minYear= date(\"Y\") - 100;\n $nowDay= date(\"d\");\n $nowMonth= date(\"m\");\n $maxDate=date(\"Y-m-d\", strtotime(\"\".$maxYear.\"-\".$nowMonth.\"-\".$nowDay.\"\"));\n $minDate=date(\"Y-m-d\", strtotime(\"\".$minYear.\"-\".$nowMonth.\"-\".$nowDay.\"\"));\n echo '\n <!--INSCRIPTION-->\n <form id=\"Inscription\" class=\"Identification\" method=\"post\" action=\"traitement_inscription.php\">\n <label>\n <select name=\"choixgenre\" class=\"genre\" required>\n <option value=\"'.null.'\">-- Genre* --</option>\n <option>Homme</option>\n <option>Femme</option>\n <option>Autre</option>\n </select>\n </label>\n <label>\n <input name=\"nom\" class=\"identif2\" type=\"text\" placeholder=\"Nom*\" required/>\n </label>\n <label>\n <input name=\"prenom\" class=\"identif2\" type=\"text\" placeholder=\"Prénom*\" required/>\n </label>\n <label>\n <input name=\"date_de_naissance\" class=\"identif2\" type=\"date\" placeholder=\"Date de naissance*\" pattern=\"(0[1-9]|1[0-9]|2[0-9]|3[01]).(0[1-9]|1[012]).[0-9]{4}\" max=\"'.$maxDate.'\" min=\"'.$minDate.'\" required/>\n </label>\n <label>\n <input name=\"email\" class=\"identif2\" type=\"email\" placeholder=\"Adresse email*\" required/>\n </label>\n <label>\n <input name=\"password\" class=\"identif2\" id=\"new_password\" type=\"password\" placeholder=\"Mot de passe*\" pattern=\"(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,}\" title=\"Le mot de passe doit contenir au mois 8 caractère, dont une majuscule, un chiffre\" required/>\n </label>\n <label>\n <input name=\"confirm_password\" class=\"identif2\" id=\"confirm_password\" type=\"password\" placeholder=\"Confirmez votre mot de passe*\" pattern=\"(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,}\" title=\"Le mot de passe doit contenir au mois 8 caractère, dont une majuscule, un chiffre\" required/>\n </label>\n <label>\n <input name=\"numero_de_permis\" class=\"identif2\" type=\"text\" placeholder=\"Numéro de permis\"/>\n </label>\n <label>\n <input name=\"numero_auto_ecole\" class=\"identif2\" type=\"text\" placeholder=\"Numéro d\\'auto école* (Nombre à 4 chiffres)\" pattern=\"[0-9]{4}\" title=\"Nombre à 4 chiffres\" required/>\n </label>\n <label>\n <input type=\"radio\" class=\"CGU\" name=\"choice\" value=\"oui\" required/> J\\'ai lu et j\\'accepte les <br/><a class=\"link_CGU\" href=#popup_CGU>mentions légales & CGU </a>\n </label>\n <button type=\"submit\" name =\"forminscription\" class=\"valider\">Valider</button>\n </form>';\n break;\n \n }\n}", "title": "" }, { "docid": "be5ac08ffecb6c369d2a0875c06c0904", "score": "0.51656455", "text": "function add_client($username, $password, $firstname, $lastname,\n $address, $city, $postalcode, $homephone,\n $cellphone, $sin, $dob, $regionid, $physician,\n $payment, $status, $residenceid, $proxyid) {\n global $db;\n\n $query = 'SELECT client.Username \n FROM client\n WHERE client.Username = :username';\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username);\n $statement->execute();\n $client = $statement->fetch();\n $statement->closeCursor();\n\n if (is_null($client)) {\n $query = 'INSERT INTO client VALUES\n (:username, :password, :firstname, :$lastname, :address,\n :city, :postalcode, :homephone, :cellphone, :sin, :dob,\n :regionid, :physician, :payment, :status, :residenceid,\n :proxyid)';\n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username);\n $statement->bindValue(':password', $password);\n $statement->bindValue(':firstname', $firstname);\n $statement->bindValue(':lastname', $lastname);\n $statement->bindValue(':address', $address);\n $statement->bindValue(':city', $city);\n $statement->bindValue(':postalcode', $postalcode);\n $statement->bindValue(':homephone', $homephone);\n $statement->bindValue(':cellphone', $cellphone);\n $statement->bindValue(':sin', $sin);\n $statement->bindValue(':dob', $dob);\n $statement->bindValue(':regionid', $regionid);\n $statement->bindValue(':physician', $physician);\n $statement->bindValue(':payment', $payment);\n $statement->bindValue(':status', $status);\n $statement->bindValue(':residenceid', $residenceid);\n $statement->bindValue(':proxyid', $proxyid);\n $statement->execute();\n $statement->closeCursor();\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "8695aedc1782b62e67b7db933cc66072", "score": "0.5165302", "text": "function registro_cliente($conexion,$nombre,$documento,$telefono,$email,$contrasena)\n{\n $sql_cliente = \"INSERT INTO CLIENTE (NOMBRE,DOCUMENTO,TELEFONO,EMAIL,PASS,tipo_cliente_id) VALUES ('$nombre','$documento','$telefono','$email','$contrasena',1)\";\n\n $query_cliente = mysqli_query($conexion,$sql_cliente);\n\n if($query_cliente)\n {\n echo \"true\";\n }\n else\n {\n $errors[]=\"No se registro de forma correcta el empleado\" . mysqli_error($con);\n echo \"false\";\n }\n}", "title": "" }, { "docid": "4c44c18ee2a409b41670d2c503ffec3c", "score": "0.5161922", "text": "function AddSubscriber($type, $nom, $email) {\n global $ss;\n // Prepare data\n $row = array (\n \"GDH\" => date('ymd-His', time()),\n \"TYPE\" => $type,\n \"NOM\" => $nom,\n \"EMAIL\" => $email\n );\n \n // Write data\n if ($ss->addRow($row)) echo 1;\n else echo 0;\n}", "title": "" }, { "docid": "44b6d0146b0c6589eafa77ec631f3c7e", "score": "0.5160506", "text": "public function inscriptionAction(Request $request){\n\t\t//On le redirige vers layout_inscription_1.html.twig\n\t\t//Si l'utilisateur arrive par GET et que la variable de session utilisateur_inscription existe\n\t\t//On le redirige vers le layout inscription en cours grâce au champ caché etape_inscription \n\t\t//Si l'utilisateur arrive par GET et que la variable de session utilisateur_inscription existe\n\t\t//et que la variable GET etape_precedente == 1 On le redirige vers le layout inscription en cours -1\n\t\t//grâce au champ caché etape_inscription \n\t\t//Si l'utilisateur arrive par POST on alimente la variable de session utilisateur_inscription\n\t\t//puis on redirige vers layout_inscription en cours + 1 grâce au champ caché etape_inscription \n\t\t//Si l'utilisateur arrive par POST et que l'étape en cours == 4 on persiste + flush l'utilisateur\n\t $formData = new Utilisateur(); // Your form data class. Has to be an object, won't work properly with an array.\n\n\t $flow = $this->get('PTRO.form.flow.createUtilisateur'); // must match the flow's service id\n\t $flow->bind($formData);\n\n\t // form of the current step\n\t $form = $flow->createForm();\n\t if ($flow->isValid($form)) {\n\t $flow->saveCurrentStepData($form);\n\n\t if ($flow->nextStep()) {\n\t // form for the next step\n\t $form = $flow->createForm();\n\t } else {\n\t // flow finished\n\t $em = $this->getDoctrine()->getManager();\n\t $em->persist($formData);\n\t $em->flush();\n\n\t $flow->reset(); // remove step data from the session\n\n\t return $this->redirect($this->generateUrl('ptro_rencontres_homepage')); // redirect when done\n\t }\n\t\t}\n\n\t return $this->render('PTRORencontresBundle:Rencontres:layout_inscription.html.twig', array(\n\t 'form' => $form->createView(),\n\t 'flow' => $flow,\n \t\t));\n\t /*\n\t\t$utilisateur = new Utilisateur();\n\t\t$form = $this->get('form.factory')->create(UtilisateurType::class, $utilisateur);\n\n\n\t\tif($request->isMethod('POST')){\n\n\t\t}\n\n\t\treturn $this->render('PTRORencontresBundle:Rencontres:layout_inscription_1.html.twig', array(\"form\" => $form->createView()));\n\t*/\n\t}", "title": "" }, { "docid": "b64935dc068bf96ca7731ff5a31add21", "score": "0.5151039", "text": "static public function ctrCrearCliente( $crud){\n\n\t\tif(isset($_POST[\"nuevoCliente\"])){\n\n\t\t\t\n\t\t\tif(!preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoCliente\"]) &&$crud ){\n\t\t\t \techo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El nombre del cliente no puede llevar caracteres especiales o ir vacio!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t}).then(function(result){\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\twindow.location = \"clientes\";\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t</script>';\n\t\t}\n\n\t\t\t\t\tif(!preg_match('/^[0-9]+$/', $_POST[\"nuevoDocumentoId\"]) &&$crud ) {\n\t\t\t \techo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El Documento del cliente no puede llevar caracteres especiales o ir vacio!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t}).then(function(result){\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\twindow.location = \"clientes\";\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t</script>';\n\t\t}\n\n\t\t\t\t\tif(!preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"nuevoEmail\"]) &&$crud){\n\t\t\t \techo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El correo del cliente no puede llevar caracteres especiales o ir vacio!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t}).then(function(result){\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\twindow.location = \"clientes\";\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t</script>';\n\t\t}\n\n\n\t\t\t\t\tif(!preg_match('/^[()\\-0-9 ]+$/', $_POST[\"nuevoTelefono\"]) &&$crud){\n\t\t\t \techo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡El teléfono del cliente no puede llevar caracteres especiales o ir vacio!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t}).then(function(result){\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\twindow.location = \"clientes\";\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t</script>';\n\t\t}\n\n\n\n\t\t\t\t\tif(!preg_match('/^[#\\.\\-a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevaDireccion\"]) &&$crud){\n\t\t\t \techo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"¡La dirección del cliente no puede llevar caracteres especiales o ir vacio!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t}).then(function(result){\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\twindow.location = \"clientes\";\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t</script>';\n\t\t}\n\n\n\n\n/*\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevoCliente\"]) &&\n\t\t\t preg_match('/^[0-9]+$/', $_POST[\"nuevoDocumentoId\"]) &&\n\t\t\t preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"nuevoEmail\"]) && \n\t\t\t preg_match('/^[()\\-0-9 ]+$/', $_POST[\"nuevoTelefono\"]) && \n\t\t\t preg_match('/^[#\\.\\-a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nuevaDireccion\"]))*/\n\n\t\t\t \t$tabla = \"cliente\";\n\n\t\t\t \t$datos = array(\"nombre\"=>$_POST[\"nuevoCliente\"],\n\t\t\t\t\t \"documento\"=>$_POST[\"nuevoDocumentoId\"],\n\t\t\t\t\t \"email\"=>$_POST[\"nuevoEmail\"],\n\t\t\t\t\t \"telefono\"=>$_POST[\"nuevoTelefono\"],\n\t\t\t\t\t \"direccion\"=>$_POST[\"nuevaDireccion\"],\n\t\t\t\t\t \"tipo_doc_id\"=>$_POST[\"nuevoTipoDocIdentidad\"]);\n\n\t\t\t\t\t\n\t\t\t \t$respuesta = ModeloClientes::mdlIngresarCliente($tabla, $datos);\n\n\n\tif(is_numeric($respuesta) ) {\n\n\nif($crud)\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\tswal({\n\t\t\t\t\t\t type: \"success\",\n\t\t\t\t\t\t title: \"El cliente ha sido guardado correctamente\",\n\t\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\twindow.location = \"clientes\";\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t</script>';\n\n\n\t\t\t\t\telse echo $respuesta;\n\n\t\t\t\t}\n\n\t\t\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "ec3f60808767c2c8dedb87a859008a5d", "score": "0.5136454", "text": "public function directSubscribe()\n {\n Session::forget('dataPhoneNo');\n session(['OpID' => Etisalat_Bundle_Route]);\n $Request = Request::capture();\n $dataPhoneNo = $Request->phone;\n $checkPhone = trim('2' . $dataPhoneNo); // add 2\n\n session(['phone' => $dataPhoneNo, 'OpID' => Etisalat_Bundle_Route, 'Status' => 'تأكيد العملية']);\n return redirect(Session::get('OpID') . '/login');\n }", "title": "" }, { "docid": "5b4d0c3f160e03a56be03e2aa34ec620", "score": "0.5136212", "text": "function envoyer_semaine($row_semaine){\r\r\n\t$lien = $_SERVER['HTTP_HOST'].'/dev/produitForm.php?republier=1&id='.$row_semaine['id'];\r\r\n\t$destinataire = $row_semaine['email'];\r\r\n\t$objet = \"Votre produit vient d'étres périmé.\" ;\r\r\n\t$message = '<html>\r\r\n\t<head>\r\r\n\t<title>Votre produit vient d\\'étres périmé</title>\r\r\n\t</head>\r\r\n\t<body>\r\r\n\t<p>Bonjour '.$row_semaine['prenom'].' '.$row_semaine['nom'].'</p>\r\r\n\t<p>Le produit <strong>'.$row_semaine['titre'].'</strong> vient d\\'étres périmé au bout d\\'une semaine, Veuillez le republier on cliquant sur ce lien <a href=\"'.$lien.'\">'.$lien.'</a></p>\r\r\n\t<p></p>\r\r\n\t<p><strong>L\\'&Eacute;quipe Magasinducoin.com</strong></p>\r\r\n\t</body>\r\r\n\t</html>\r\r\n\t';\r\r\n\r\r\n\r\r\n\t/* Si l’on veut envoyer un mail au format HTML, il faut configurer le type Content-type. */\r\r\n\t$headers = \"MIME-Version: 1.0\\n\";\r\r\n\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\n\";\r\r\n\t\r\r\n\t/* Quelques types d’entêtes : errors, From cc's, bcc's, etc */\r\r\n\t$headers .= \"From: Magasin Du Coin <belgaila6@hotmail.com>\\n\";\r\r\n\t\r\r\n\t\r\r\n\t// On envoi l’email\r\r\n\tif ( mail($destinataire, $objet, $message, $headers) ) die( \"Envoi du mail réussi.\");\r\r\n\telse die( \"Echec de l’envoi du mail.\");\r\r\n}", "title": "" }, { "docid": "d5ae4129e4a1cd557b7c2adc1c80d910", "score": "0.51309294", "text": "public function affichageConnexionReussie () {\n $url = $this->routeur->getURLPageAccueil();\n $this->routeur->POSTredirect($url, \"Connexion r?ussie\");\n }", "title": "" }, { "docid": "fb81ff17fca41c716bfb1ea19400aa13", "score": "0.5123265", "text": "function afficherclient()\r\n\t{\r\n\t\t$sql=\"SElECT * From user\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry\r\n\t\t{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e)\r\n {\r\n die('Erreur: '.$e->getMessage());\r\n }\r\n\t}", "title": "" }, { "docid": "c1bc6c51c58c3f7417da928f0e936bbd", "score": "0.51196146", "text": "public function accueil () {\n if (key_exists(GestionAuthentification::UTILISATEUR_REF, $_SESSION)) {\n $authentification = new GestionAuthentification($this->utilisateurs, unserialize($_SESSION[GestionAuthentification::UTILISATEUR_REF])->getArray(), $this->vue);\n } else {\n $authentification = new GestionAuthentification($this->utilisateurs, array(), $this->vue);\n }\n $this->vue->creationAccueil($authentification);\n $this->afficheGalerie();\n }", "title": "" }, { "docid": "093d66882db4ffd6f67224bea15b2005", "score": "0.5119027", "text": "public function validerInscriptions_action(){\n //do action\n load_model(\"UserModel\",\"User\");\n $les_users = $this->UserModel->readAll(); \n foreach ($les_users as $id_user => $user) {\n if(isset($_POST[\"CBvalid_$id_user\"])) {\n $user->setAccountValid(1);\n }else{\n $user->setAccountValid(0); \n }\n $this->UserModel->update($user);\n }\n\n // relaod : \n $this->validerInscriptions();\n }", "title": "" }, { "docid": "e1ac556cd01045baccad22d3653c8ccd", "score": "0.5117994", "text": "public function enfocar() {\n\n $comando=$this->comandos1[\"enfocar\"];\n $comando= $this->procesarComando($comando,self::$FOCN);\n $this->enviarComando($comando);\n\n }", "title": "" }, { "docid": "d772996b23471f20ecf1fd687aeb54f0", "score": "0.51156306", "text": "function subscribe() {\n\t// echo \"<br>\";\n}", "title": "" }, { "docid": "a8e5922b5b9a4a7b1f129cfd1587dec7", "score": "0.51155615", "text": "function insertarClientes($nombrecompleto,$cuil,$dni,$direccion,$telefono,$email,$observaciones) { \r\n$sql = \"insert into dbclientes(idcliente,nombrecompleto,cuil,dni,direccion,telefono,email,observaciones) \r\nvalues ('','\".utf8_decode($nombrecompleto).\"','\".utf8_decode($cuil).\"','\".utf8_decode($dni).\"','\".utf8_decode($direccion).\"','\".utf8_decode($telefono).\"','\".utf8_decode($email).\"','\".utf8_decode($observaciones).\"')\"; \r\n$res = $this->query($sql,1); \r\nreturn $res; \r\n}", "title": "" }, { "docid": "6f561d936b9278ba4965fb4163443d11", "score": "0.5112375", "text": "function ESCRIBIR_CUADERNO($correo_from,$correo_to,$texto){\n\t\n\t$datos_from = SUBTRAER_INFORMACION($correo_from);\n\t\n\t$descriptor_cuaderno_obtener = fopen(\"../cuaderno/$correo_to\",\"r\");\t\t\n\t\n\twhile(!feof($descriptor_cuaderno_obtener)){\n\t\t\n\t\t$pre=fgets($descriptor_cuaderno_obtener);\n\t\t\n\t\t$cuaderno = $cuaderno.$pre;\n\t}\n\t\n\t\n\t$intro_correo =\"<<-$correo_from\";\n\t\n\t$intro=\"$datos_from[0]-$datos_from[1]->>\";\n\t\n\t$descriptor_cuaderno=fopen(\"../cuaderno/$correo_to\",\"w\");\n\t\n\tfwrite($descriptor_cuaderno,trim($intro_correo).\"\\n\");\n\tfwrite($descriptor_cuaderno,trim($intro).\"\\n\");\n\t\n\t$contar=0;\n\t\n\t$valor=80;\n\t\n\tfor($a=0;$a<1000;$a++){\n\t\t\n\t\t\n\t\tif(isset($texto[$a])){\n\t\t\t\n\t\t\tif($contar==$valor){\n\t\t\t\t\n\t\t\t\tfwrite($descriptor_cuaderno,\"\\n\");\n\t\t\t\t$valor=($valor+80); $a=($a-1);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tfwrite($descriptor_cuaderno,\"$texto[$a]\");\n\t\t\t\t\n\t\t\t}\n\t\t\t$contar=($contar+1);\n\t\t\t\n\t\t}else{}\n\t\t\n\t}\n\t\n\t\n\tfwrite($descriptor_cuaderno,\"\\n\");\n\tfwrite($descriptor_cuaderno,\"--------------------------------\\n\");\n\tfwrite($descriptor_cuaderno,\"$cuaderno\");\n\tfclose($descriptor_cuaderno);\n\t\n\t\n}", "title": "" }, { "docid": "79b923a036a8c6ad80778c73d7e8b279", "score": "0.5106436", "text": "function convierteCliente($nombres, $opcion){\r\n switch(strtoupper($opcion)){\r\n case 'L':\r\n //Pone las palabra en miniscula\r\n foreach($nombres as $nombre){\r\n echo strtolower($nombre).\" \"; \r\n }\r\n break;\r\n case 'U':\r\n //Pone las palabra en mayuscula\r\n foreach($nombres as $nombre){\r\n echo strtoupper($nombre).\" \";\r\n }\r\n break;\r\n case 'M':\r\n //Pone la primera letra en mayuscula\r\n foreach($nombres as $nombre){\r\n echo ucwords($nombre).\" \";\r\n }\r\n break;\r\n default:\r\n echo \"Ninguna de las opcion prueba otra vez\";\r\n }\r\n }", "title": "" }, { "docid": "d447676aa04f453d8cd2deb20fec22d5", "score": "0.509932", "text": "function subscribe($ch,$cb)\n {\n if (is_string($ch)) $ch = array($ch);\n return parent::subscribe($ch,$cb);\n }", "title": "" }, { "docid": "c868f186ffcf96a007cbcb4f54923903", "score": "0.509848", "text": "public function ctrIngresoUsuario()\n\t{\n\t\tif (isset($_POST[\"ingEmail\"])) {\n\t\t\tif(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingEmail\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingClave\"])){\n\n\t\t\t\t$encriptar = crypt($_POST[\"ingClave\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t$tabla=\"usuario\";\n\t\t\t\t$item=\"CorreoUsu\";\n\t\t\t\t$valor=$_POST[\"ingEmail\"];\n\t\t\t\t$respuesta=ModeloUsuarios::mdlMostrarUsuario($tabla,$item,$valor);\n\n\t\t\t\tif ($respuesta[\"CorreoUsu\"]==$_POST[\"ingEmail\"] && $respuesta[\"claveUsu\"]==$encriptar) {\n\t\t\t\t\t\n\t\t\t\t\tif ($respuesta[\"verificacion\"]==1) {\n\t\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡NO HA VERIFICADO SU CORREO ELECTRÓNICO!\",\n\t\t\t\t\t\t\t\t text: \"¡Por favor revise la bandeja de entrada o la carpeta de SPAM de su correo para verififcar la dirección de correo electrónico '.$respuesta[\"CorreoUsu\"].'!\",\n\t\t\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t confirmButtonColor: \"#e040fb\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\t\t if (isConfirm) {\t \n\t\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\t$_SESSION[\"validarSession\"]=\"ok\";\n\t\t\t\t\t\t$_SESSION[\"idUsuario\"]=$respuesta[\"idUsuario\"];\n\t\t\t\t\t\t$_SESSION[\"nombre\"]=$respuesta[\"NombreUsu\"];\n\t\t\t\t\t\t$_SESSION[\"apellido\"]=$respuesta[\"ApellidoUsu\"];\n\t\t\t\t\t\t$_SESSION[\"foto\"]=$respuesta[\"fotoUsu\"];\n\t\t\t\t\t\t$_SESSION[\"email\"]=$respuesta[\"CorreoUsu\"];\n\t\t\t\t\t\t$_SESSION[\"dni\"]=$respuesta[\"DNI\"];\n\t\t\t\t\t\t$_SESSION[\"clavePE\"]=$respuesta[\"claveUsu\"];\n\t\t\t\t\t\t$_SESSION[\"modo\"]=$respuesta[\"modo\"];\n\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\twindow.location=localStorage.getItem(\"rutaActual\");\n\t\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t title: \"¡ERROR AL INGRESAR!\",\n\t\t\t\t\t\t\t text: \"¡Por favor revisa que el email exista o la contraseña coincida con la registrada!\",\n\t\t\t\t\t\t\t type:\"error\",\n\t\t\t\t\t\t\t confirmButtonText: \"Ok\",\n\t\t\t\t\t\t\t confirmButtonColor: \"#e040fb\",\n\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\thistory.back();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n\t\t\t\t}\n\n\n\t\t\t}else{\n\t\t\t\techo '<script> \n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡ERROR!\",\n\t\t\t\t\t\t\t\t text: \"¡Error al ingresar al sistema, no se permiten caracteres especiales!\",\n\t\t\t\t\t\t\t\t type:\"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\twindow.location=localStorage.getItem(\"rutaActual\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t</script>';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bcef181a6f86f94b5a22de10a7090ed1", "score": "0.509754", "text": "function portal_contenidoII($conexion){\n\t\techo \"<p class='enfasis'>Buzón</p>\";\n\t\t$uv = ultimaVisita($conexion);\n\t\tbuzon_portalInbox($conexion,$uv);\n\t}", "title": "" }, { "docid": "af26597d57796f6c694dac3401c350ed", "score": "0.5097386", "text": "public function acheter($id_produit,$id_utilisateur){\n if (!$this->Sama_model->est_dans_achat($id_produit)) {// si c'est pas encore acheté\n $this->Sama_model->ajouter_achat($id_utilisateur,$id_produit);\n }\n redirect('index.php/Mon_controleur/');// on aurait pu donner un message\n }", "title": "" }, { "docid": "fe54d6c2482740bca5d9e4973cd80d76", "score": "0.5094185", "text": "Protected function writeClients($list){ \n //CLients in 4 Variable schreiben\n \n $n = 0;\n setValue($this->GetIDForIdent(\"Client1\"),''); \n setValue($this->GetIDForIdent(\"Client2\"),''); \n setValue($this->GetIDForIdent(\"Client3\"),''); \n setValue($this->GetIDForIdent(\"Client4\"),''); \n foreach ($list as $key => $value) {\n \n if($n == 0){\n $this->setValue(\"Client1\", $value);\n }\n elseif($n == 1){\n $this->setValue(\"Client2\", $value);\n }\n elseif($n == 2){\n $this->setValue(\"Client3\", $value);\n }\n elseif($n == 3){\n $this->setValue(\"Client4\", $value);\n } \n $n = $n + 1;\n }\n \n \n }", "title": "" }, { "docid": "d4b205b09c336a280ebd0c901c41016a", "score": "0.5087269", "text": "private function _saveClient()\n {\n $result = $this->_link->query(\"INSERT INTO `Client` (`name`, `email`) VALUE (\" .\n $this->_sqlStr($this->_name) . \",\" .\n $this->_sqlStr($this->_email) . \")\");\n $id = $this->_link->insert_id;\n if ($result === false) {\n $id = $this->_link->query(\"SELECT `id_client` FROM `Client` WHERE \" .\n \"`email` = \" . $this->_sqlStr($this->_email));\n $row = $id->fetch_row();\n $id = array_pop($row);\n }\n return $id;\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "fb7a297f6ec70199027244d655812441", "score": "0.0", "text": "public function edit(Setting $setting)\n {\n return view('admin.settings.edit', ['settings' => $setting]);\n }", "title": "" } ]
[ { "docid": "5a5e25617e1019b0143435d1dcee143b", "score": "0.7874048", "text": "public function edit(Resource $resource) {\n $resource = Resource::find($resource->id);\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.78550774", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1ff9b967571a69048601f797857ac47d", "score": "0.73630536", "text": "public function edit($resource)\n {\n throw new NotSupportingFormException('Current collection has no support for the edit form.');\n }", "title": "" }, { "docid": "f66128bcb2c9ae0f04bda448b36d1ea3", "score": "0.7304177", "text": "public function action_edit()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->redirect(Route::url('supplier', array('action' => 'new')));\n\t\t} // if\n\n\t\t$model = ORM::factory('Supplier')->where('id', '=', $id)->find();\n\n\t\t$this->content = View::factory('supplier/form', array(\n\t\t\t'title' => __('Edit supplier \":supplier\"', array(':supplier' => $model->company)),\n\t\t\t'supplier' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('supplier', array('action' => 'save', 'id' => $id))\n\t\t));\n\t}", "title": "" }, { "docid": "a6d17bc99368cf15347d963b4a54b8cb", "score": "0.72696465", "text": "public function edit($id)\n {\n $this->authorize('update', $this->resource->getModel());\n\n $this->data['data'] = $this->resource->findById($id);\n $this->data['attributes'] = $this->resource->getAttributes();\n $this->data['routeUrl'] = route($this->module->getName().'.update', $id);\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "1e6b8a74cda64a99e6e6466577d76d2f", "score": "0.7234951", "text": "public function edit($id)\n {\n $resource = AclResource::find($id);\n\n if (!$resource) {\n return Redirect::route('acl.resource.index')->withErrors('记录不存在, 请先创建');\n }\n\n return view('Admin.acl.resource.form')->withResource($resource);\n }", "title": "" }, { "docid": "fc7a52b0df8bda8ac30893be852d1863", "score": "0.71763575", "text": "public function edit($id)\n {\n $resources = Resources::findOrFail($id);\n return view('Backend/Resources/editResource', compact('resources'));\n }", "title": "" }, { "docid": "249b9ac88f9aafdb17c5a7306cf6b6c7", "score": "0.70568776", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n $model = $this->resource;\n $providers = User::whereType('provider')->orderby('name')->get();\n $categories = Category::where('parent_id', 0)->get();\n $isEdit = true;\n if (is_null($resource)) {\n return redirect()->route('resources.index');\n }\n\n return view('backend.resources.edit', compact('model', 'resource', 'providers', 'categories', 'isEdit'));\n }", "title": "" }, { "docid": "c255d729fa42f0248fba1ee54f13f6eb", "score": "0.70553356", "text": "public function edit()\n {\n // show view\n return view('admin/product/edit')\n -> with('product', Product::find(Input::get('id')));\n }", "title": "" }, { "docid": "a843a929a9e78ec732c8ae4feef35927", "score": "0.70016015", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n if (is_null($resource) || (Auth::user()->id != $resource->author_id)) {\n return redirect()->route('resources.create');\n }\n return view(\n 'resources.edit',\n ['resource' => $resource ]\n );\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70006657", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "e696e47d677bec983660ef15b297afa5", "score": "0.6963453", "text": "public function edit(ResourceInterface $resource)\n\t{\n if(Auth::user()->can('edit',$resource)) {\n $variables = [];\n $variables['extends'] = Config::get('roles::extends');\n $variables['resource'] = $resource;\n $response = View::make('roles::resource.edit', $variables);\n } else {\n $errors = new MessageBag();\n $errors->add('error', trans('roles::resource.edit permission denied'));\n $response = Redirect::back()->withErrors($errors);\n }\n\n return $response;\n\t}", "title": "" }, { "docid": "f63e50b2035a4ef854d8b740f3db22d1", "score": "0.6944645", "text": "public function editForm($id)\n\t{\n\t\t$region = \\App\\Region::find($id);\n \t\t\t\n \t\n\t\treturn view('region/editForm',array('region'=>$region));\n\t}", "title": "" }, { "docid": "c0ca6d3bd6305ff71d6c76321811b1bc", "score": "0.69353485", "text": "public function edit()\n {\n return view('kontraktor::edit');\n }", "title": "" }, { "docid": "7a2fce152c2e7ee4b6d45eb755a98f48", "score": "0.6893516", "text": "public function edit($id)\n {\n $titulo = 'Cursos';\n $subtitulo = 'Editando os dados do professor';\n $professor = Professor::find($id);\n\n $action = route('professores.update', $professor->id);\n\n return view('admin.professores.form_professor', compact('professor', 'action','titulo','subtitulo'));\n }", "title": "" }, { "docid": "e292b670ed6fb92f93f41ebc0c959c87", "score": "0.6882936", "text": "public function editAction()\n { \n $profile_id = $this->_getParam('profile');\n $this->_includeForm($profile_id);\n }", "title": "" }, { "docid": "34a8fc606e2e5031dcfc0be2c4eda232", "score": "0.6881411", "text": "function resource($resource_id)\n\t{\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t# Check that it exists (in case of URL editing in the browser)\n\t\tif ($q -> num_rows() == 0) \n\t\t{ \n\t\t\t$data['title'] = \"No such resource\"; $data['heading'] = \"Resource not found\"; \n\t\t\t$data['error'] = \"There is no resource with the ID $resource_id. Tough mazoomas.\n\t\t\t\t\t\t\t\tPlease choose another resource to edit.\"; \n\t\t\t$data['message'] = \"\";\n\t\t\t$this -> load -> view('resourcedb/database_error_view', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resource_title = $q -> row() -> title;\n\t\t\t$data['title'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['heading'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['resource__id'] = $resource_id; \n\t\t\t\n\t\t\t# Get the user ID to save as record editor\n\t\t\t$user_id = $this->ion_auth->user()->row()-> id;\n\t\t\t# Set messages for the view file\n\t\t\t$data['title'] = 'Global health repository: edit resource';\n\t\t\t$data['heading'] = 'Edit resource';\n\t\t\t# Set user message and error as blanks, to prevent PHP warning if one or t'other isn't set\n\t\t\t$data['message'] = \"\"; $data['error'] = \"\";\n\t\t\t\n\t\t\t# Populate form elements.\n\t\t\t# Get full resource record first \n\t\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\n\t\t\t# -- SUBJECTS ---\n\t\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t\t# by existing resources\n\t\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t\t$old_subjects_ary = array();\n\t\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t\t}\n\t\t\t# Pass currently attached subjects to the view page\n\t\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\t\t\n\t\t\t\n\t\t\t# -- ORIGINS --\n\t\t\t$data['origins_query'] = $this -> ResourceDB_model -> get_origins();\n\n\t\t\t# -- RESOURCE TYPES ---\n\t\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types();\n\t\t\t\n\t\t\t# -- TAGS --\n\t\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t\t$old_tags_ary = array();\n\t\t\tforeach ($tags_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t\t}\n\t\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\t\n\t\t\t# ==== FORM VALIDATION ======\n\t\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t\t# validation rules, hence a rul for all elements below. See CI Forum thread at:\n\t\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t\t# sqare brackets, as just checking for the title existing would always \n\t\t\t# return true - we need to check that the edited title exists or not. \n\t\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean|callback_title_check[$resource_title]\");\n\t\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\t\n\t\t\t\n\t\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t\t# (re)populate with user data\n\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t{\n\t\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t\t$this -> load -> view('resourcedb/editview', $data);\n\n\t\t\t}\n\t\t\t# If form validates, update record\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Get form values for fields in RESOURCE table\n\t\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t\t# DATETIME data type\n\t\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\t\n\t\t\t\t$record_data = array (\n\t\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t\t'creator' => $_POST['creator'], \n\t\t\t\t\t\t\t\t'source' => $_POST['source'], \n\t\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t\t'metadata_created' => $now, \n\t\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t\t'notes' => $_POST['notes']\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t# Run update query in model\n\t\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\t\n\t\t\t\t# TAGS\n\t\t\t\t# First, get tag(s) user's inserted. Get cleaned field text...\n\t\t\t\t$tags = $this -> security -> xss_clean($_POST['tags']);\n\t\t\t\t# ...then split string by the semicolon delimiter...\n\t\t\t\t$tags_ary = explode(';', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from reource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> keyword_num;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t\t\n\t\t\t\t# SUBJECTS\n\t\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t\t# empty array so as not to generate a runtime error\n\t\t\t\tif (isset($_POST['subjects']))\n\t\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\t\telse\n\t\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t\t{\n\t\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t# Set messages etc for the result page\n\t\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t\t# Load results page with data array\n\t\t\t\t$this->load->view('resourcedb/edit_result_view', $data);\n\t\t\t} // end if validates\n\t\t} // end else \n\t\t\n\t}", "title": "" }, { "docid": "dae5724ce6ffe9f8168d9376dad37a3c", "score": "0.68776023", "text": "public function edit($id)\n\t{\n return View::make('clerks.edit');\n\t}", "title": "" }, { "docid": "8d1e7e6a0adf154febe8b2162826c974", "score": "0.687279", "text": "public function edit()\n {\n return view('employee::edit');\n }", "title": "" }, { "docid": "56e50a150ef946fc5f8f9a4336ac22c4", "score": "0.687256", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n $serviceProviders = ServiceProvider::getServideProvidersByCurrentUser();\n\n return view('resources.edit', compact('resource','serviceProviders'));\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.6859945", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "2eb64c6122690d9bd44bef3e37f29ae1", "score": "0.68540037", "text": "public function edit($id)\n\t{\n return View::make('formularios.edit');\n\t}", "title": "" }, { "docid": "0ebc42a2c069d423feda158807f26b6e", "score": "0.68417704", "text": "public function edit($id)\n\t{\n\t\t$product = Product::findOrFail($id);\n\t\treturn view('admin.product.form', compact('product'));\n\t}", "title": "" }, { "docid": "e849bb86c22e491ed440629e1cb932c0", "score": "0.68406576", "text": "public static function edit_form()\n {\n $user = Users::findOne($_SESSION['user']);\n\n View::make('user/edit.html', array('user' => $user));\n }", "title": "" }, { "docid": "f4e108d9c623dad5e9c0bf37e72c018e", "score": "0.68275845", "text": "public function edit($id)\n {\n $model = Kamar::find($id);\n return view('backend.kamar.form',[\n 'model'=>$model,\n 'update'=>true\n ]);\n }", "title": "" }, { "docid": "53b816599a714759eada473e1669b37a", "score": "0.6820256", "text": "public function action_edit() {\n $id = $this->request->param('id');\n // Validate id\n if (!(Valid::not_empty($id) && Valid::numeric($id))) {\n Session::instance()->set('feedbackMessage', array('Invalid supplier id.'));\n $this->redirect ('supplier/findAll');\n }\n \n // Get the supplier to edit\n $repo = new Repository_Supplier();\n $supplier = $repo->get($id);\n\n // The id do not refer to a valid supplier\n if (!is_object($supplier)) {\n Session::instance()->set('feedbackMessage', array('Invalid supplier id.'));\n $this->redirect ('supplier/findAll');\n }\n\n $view = View::factory('supplier/supplier')\n ->set('supplier', $supplier)\n ->set('submitAction', 'supplier/update')\n ->set('pageName', 'Edit Supplier');\n \n $this->template->title = __('Edit Supplier');\n $this->template->content = $view;\n }", "title": "" }, { "docid": "b809b5f4d9b19fe4e64b0a804c260af6", "score": "0.6819058", "text": "public function edit(Article $article)\t\t//show a view to edit an resource\n\t{\n\t\treturn view('articles.edit', ['article' => $article]);\n\t\t//show.php에서 수정하기 버튼을 누르면 edit.php라는 view로 연결된다.\n\t}", "title": "" }, { "docid": "7bbf6d07f503a6053d1acc0618190289", "score": "0.6808986", "text": "public function edit($id)\n\t{\n\t\t$form_field = FormField::findOrFail($id);\n $forms = Form::all();\n $inputs = InputType::getInputTypeList();\n\t\treturn view('form_fields.edit', compact('form_field','forms','inputs'));\n\t}", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "473907cd032774e632ea528635229c87", "score": "0.6778619", "text": "public function edit($id)\n {\n // Get the resource\n $object = $this->api()->show($id);\n\n // Get the form options\n $options = method_exists($this, 'formOptions') ? $this->formOptions($object) : [$this->package => $object];\n\n // Render edit view\n return $this->modal('edit', $options);\n }", "title": "" }, { "docid": "d6495d04a5e03f110ae6c217d9781bb9", "score": "0.6769503", "text": "public function editAction()\n {\n $entity = $this->getUser();\n\n $editForm = $this->createEditForm($entity);\n\n return $this->render('ObjectsKarasBundle:Contact:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "443a24b8da09b0254ac060ac7ebcd487", "score": "0.67667174", "text": "public function EditForm() {\n\t\treturn $this()->formForModel(self::ActionName);\n\t}", "title": "" }, { "docid": "8ca6a3fffdb80c62aabbae4f640f1300", "score": "0.6762604", "text": "public function edit()\n {\n return view('mobileapi::edit');\n }", "title": "" }, { "docid": "2001fffae750ada7415691f3d6806e42", "score": "0.67607874", "text": "public function edit($id)\n {\n return view(\"front/employee/edit\");\n }", "title": "" }, { "docid": "42e7fe6b6312ec2fd12370e91e58bba7", "score": "0.67601913", "text": "public function edit()\n {\n return view('fepage::edit');\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "21678750d7f108aafc004364ba1a5179", "score": "0.6744123", "text": "public function edit($id, Request $oRequest)\n {\n $oItem = $this->oRepository\n ->getFillFromView($this->sPath.'/form')\n ->find($id);\n \n $sPageTitle = $this->sName;\n \n $aRepositories = Dataflow::getRepositories();\n \n return view($this->sPath.'/form', compact('oItem','sPageTitle', 'aRepositories'));\n }", "title": "" }, { "docid": "fba9cdde4084bf4830e5a2ea66fabfc3", "score": "0.6742783", "text": "public function edit($resource, $id)\n {\n $model = CRMConfigHelper::getModel($resource);\n $isColor = $model->isColor || false;\n $lists = $model->all();\n $data = $model->find($id);\n return view('crm::config.index', compact('resource', 'lists', 'data', 'isColor'));\n }", "title": "" }, { "docid": "595bca04db144887247b5ddae1c28ad1", "score": "0.6738425", "text": "public function edit($id)\n {\n $form = Form::find($id);\n return view('admin.editForm', compact('form'));\n }", "title": "" }, { "docid": "ef5010f7c6f6d428af2acec52a7d8840", "score": "0.673721", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_enquete_opcao\n\t\t$fbf_enquete_opcao = FbfEnqueteOpcao::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_enquete_opcao\n\t\t$this->layout->content = View::make('fbf_enquete_opcao.edit')\n->with('fbf_enquete_opcao', $fbf_enquete_opcao);\n\t}", "title": "" }, { "docid": "3283f390a233a9c8e1fdb85b649e4532", "score": "0.6729257", "text": "public function editAction()\n\t{\n\t\t$id = $this->request->get('id');\n\n\t\t// get the user from the database\n\t\t$user = Users::findFirst($id);\n\n\t\t// validate no fields are empty\n\t\tif(empty($user)) {\n\t\t\tdie(\"The user selected does not exist\");\n\t\t}\n\n\t\t// send data to the view\n\t\t$this->view->user = $user;\n\t}", "title": "" }, { "docid": "001dd3f38242708d4c2962fb34afcaae", "score": "0.6728129", "text": "public function edit($id)\n {\n // if(!auth()->user()->can('edit-'.$module) && !auth()->user()->hasAnyRole('SuperAdmin|Admin')){\n // abort(403);\n // }\n $model = $this->model;\n if(null == $options =json_decode($model->options)){\n $options = [];\n }\n\n $resource = $this->get_resource_with_relations($id);\n\n return view('admin-panel::shop.'.$this->module.'.create_edit', [ \n 'resource' => $resource, \n 'module' => $this->module, \n 'options' => ['slug', 'ckeditor', 'languages', 'thumbnail'],\n 'additional_options' => [\n // [\n // 'type' => 'editor',\n // 'label' => 'Short Description',\n // 'name' => 'short_description',\n // 'location' => 'default',\n // ],\n [\n 'type' => 'image',\n 'label' => 'Logo',\n 'name' => 'logo',\n 'location' => 'righ-sidebar'\n ]\n ],\n 'languages' => $this->languages, \n 'order' => isset($resource) ? $resource->order : $this->CRUD->getMaxOrderNumber(),\n ]);\n }", "title": "" }, { "docid": "0c8ed2ee69abf13db25af738101ab386", "score": "0.6722425", "text": "public function edit($id)\n {\n $this->data['product'] = Product::findOrFail($id);\n $this->data['categories'] = Category::arrayForSelect();\n $this->data['mode'] = 'edit';\n $this->data['headline'] = 'Update Product Information';\n\n return view('products.form', $this->data);\n }", "title": "" }, { "docid": "637fbe7fc2e9d34d1cb401f6515c23ae", "score": "0.6707887", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n return view(\"{$this->view}.form\", compact('model'));\n }", "title": "" }, { "docid": "8114d9dc60ee481ddec4f3eee676caa9", "score": "0.67022294", "text": "public function edit($modelInstance)\n {\n //Retrieve the model instance\n $modelInstance = Otter::getModelInstance($modelInstance, $this->modelName, $this->resourceRouteKeyName);\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resource = $this->resource;\n $resourceFields = json_encode($resource::fields());\n $resourceId = $modelInstance->{$modelInstance->getRouteKeyName()};\n $relationalFields = json_encode(Otter::getRelationalFields($resource, $modelInstance));\n\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['update']) ? $resource::validations()['client']['update'] : null;\n $validationFields = json_encode($validationRules);\n\n return view('otter::pages.edit', compact('allResourceNames', 'prettyResourceName', 'resourceId', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\n }", "title": "" }, { "docid": "eb05ed4b194d950755a7fbf5ca2e5f0c", "score": "0.67013955", "text": "public function edit()\n {\n return view('mgtrafico::edit');\n }", "title": "" }, { "docid": "c7ffdd26e9089a22d4871a4030407d80", "score": "0.66876835", "text": "public function edit()\n {\n return view('mgproyectosproductor::edit');\n }", "title": "" }, { "docid": "5d00016db02a20e9d4b01dced690ae3c", "score": "0.66855204", "text": "public function edit()\n {\n return view('tender::edit');\n }", "title": "" }, { "docid": "09281d67cb4365afcde07c8a8c05582d", "score": "0.668469", "text": "public function edit($id)\n {\n //\n if(!Gate::allows('isEmployee') && !Gate::allows('isAdmin'))\n {\n abort(404,\"soory\");\n }\n\n $sponserform = Sponserform::find($id);\n \n \n //return the view ans pass in the variable\n //dd($id);\n return view('sponserforms.edit')->withSponserform($sponserform);\n }", "title": "" }, { "docid": "3a01012946e59416d948f2e41720412b", "score": "0.66846806", "text": "public function edit()\n {\n return view('wahana::edit');\n }", "title": "" }, { "docid": "2d91be15ec2cb984fbc95cca2d3f2c8e", "score": "0.6673119", "text": "public static function edit()\n {\n\n $templateName = 'edit';\n $templateVars = [\"isSubmitted\" => !empty($_POST[self::getEntityClass()])];\n\n if ($templateVars[\"isSubmitted\"]) { // if we arrived here by way of the submit button in the edit view\n $entity = self::getEntity();\n EntityUtil::setFromArray($entity, $_POST[self::getEntityClass()]);\n\n if (self::getEntity()->isValid()) {\n $templateName = null; // null template will redirect to default action\n } else {\n $templateVars[\"errors\"] = self::getEntity()->getErrors();\n }\n }\n\n // template remains \"edit\" if no POST user parameters, or if user parameters in POST are invalid\n self::render($templateName, $templateVars);\n }", "title": "" }, { "docid": "269ffc48bd221192472c5da183031582", "score": "0.66713", "text": "public function editAction(Question $question) {\n\t\t$this->view->assign('question', $question);\n\t}", "title": "" }, { "docid": "d58aeddc51a32d8c85adcbf8fc206a39", "score": "0.66662043", "text": "public function editAction($id)\n {\n $this->initializeScaffolding();\n\n $this->beforeRead();\n $this->view->record = $this->scaffolding->doRead($id);\n $this->afterRead();\n\n $this->beforeEdit();\n $this->view->form = $this->scaffolding->getForm($this->view->record);\n $this->afterEdit();\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "f564301fc41fe27ab49da6b7c3dd6bea", "score": "0.66622895", "text": "public function edit($id){\n $product = Product::find($id);\n\n //load form view\n return view('products.edit', ['product' => $product]);\n }", "title": "" }, { "docid": "9bbc99aca2aa030dd44476fbe3540b28", "score": "0.66615427", "text": "public function edit($id)\n {\n $metadata = Metadata::find($id);\n $source = $this->source();\n $category = $this->category();\n $subcategory = $this->subcategory();\n $subject = $this->subject();\n $record = $this->record();\n $media = $this->media();\n $language = $this->language();\n $location = $this->location();\n return view('website.form', compact('metadata', 'source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\n }", "title": "" }, { "docid": "1d05f8aa41e8f09497a449a4c46adc6b", "score": "0.66520095", "text": "public function edit($id)\n {\n $data = Form::find($id);\n return View('edit',compact('data'));\n }", "title": "" }, { "docid": "008b71c2b4f88bc4f5b81d1ab75bfb19", "score": "0.6641717", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AreasBundle:Reactivos')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Reactivos entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AreasBundle:Reactivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f4bffb1a26d526c70f624cd8ee655531", "score": "0.66296065", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormBundle:Formations')->find($id);\n\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Formations entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n\n return $this->render('FormBundle:Formations:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "e7cc901cf8767e9c3d3e64b75713843f", "score": "0.66294926", "text": "public function frontEdit($id)\n {\n $resource = Resource::findOrFail($id);\n $countries = Countries::all();\n $cities = City::orderby('name')->get();\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\n $isEdit = true;\n\n return view('frontend.resources.edit', compact(\n 'resource', 'countries', 'cities', 'categories', 'isEdit'\n ));\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "a674d7a119925eea9e883dc29ae826c4", "score": "0.66260767", "text": "public function show($id)\n {\n $this->authorize('view', $this->resource->getModel());\n\n $this->data['attributes'] = $this->resource->getAttributes();\n $this->data['data'] = $this->resource->findById($id);\n $this->data['routeUrl'] = route($this->module->getName().'.update', $id);\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "6d258b4e5796ae72422c103b9cfeea0a", "score": "0.6624084", "text": "public function edit($id)\n\t{\n\t\t$resources = $this->resourcesRepository->find($id);\n\n\t\tif(empty($resources))\n\t\t{\n\t\t\tFlash::error('Resources not found');\n\n\t\t\treturn redirect(route('resources.index'));\n\t\t}\n\n\t\treturn view('resources.edit')->with('resources', $resources);\n\t}", "title": "" }, { "docid": "1ca9fd6ddbbabc198259116a33d90512", "score": "0.66192096", "text": "public function editForm()\n {\n $trader = App::get('database')->select('users', 'id', $_GET['id']);\n return view('traders.edit', compact('trader'));\n }", "title": "" }, { "docid": "3c0278ba2842e73f7154906855c3a6d3", "score": "0.6619196", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$Empresas = Empresas::find($id);\n\t\treturn\\View::make('EMPRESAS/UpdateEmpresas',compact('Empresas'));\n\n\t}", "title": "" }, { "docid": "89950828e722c727dfc18a4d54701a6a", "score": "0.6618409", "text": "public function edit($id) {\n $viewData = $this->getDefaultViewData();\n\n $viewData[\"equipment\"] = Equipment::find($id);\n $viewData[\"mode\"] = \"edit\";\n\n return view(\"pages.equipments.form\", $viewData);\n }", "title": "" }, { "docid": "6089f3b15fb30da8161f0e824d5ef80d", "score": "0.6609523", "text": "public function edit($id)\n {\n // Get the employee\n $employee = Employee::findOrFail($id);\n\n // View\n return view('admin/employee/edit', [\n 'employee' => $employee\n ]);\n }", "title": "" }, { "docid": "bf327f0deebd5c98011f095a58a3e3d7", "score": "0.66089773", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('task.form');\n\t\t$form->task = Task::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\TaskController@update', $form->task->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "2c37007f9d48092fc6a698887b6348d0", "score": "0.6607414", "text": "public function editForm ()\n {\n /**\n * Ist ein User eingeloggt?\n */\n if (User::isLoggedIn()) {\n /**\n * Eingeloggten User aus der Datenbank abfragen.\n */\n $user = User::getLoggedInUser();\n\n /**\n * View laden und User übergeben.\n */\n View::load('account-edit', [\n 'user' => $user\n ]);\n } else {\n /**\n * Ist kein User eingeloggt, leiten wir auf den Login weiter.\n */\n header(\"Location: login\");\n }\n }", "title": "" }, { "docid": "0bd8987bba756d36c76437f581237452", "score": "0.6607211", "text": "public function editAction()\r\n {\r\n $this->redirectPlugin()->redirectToLogout();\r\n $id = $this->params()->fromRoute('sess', NULL);\r\n $em = $this->entityManager;\r\n if ($id == NULL) {\r\n $this->redirect()->toRoute('offer/default', array(\r\n 'action' => 'view-all'\r\n ));\r\n }\r\n $id = \\strip_tags($id);\r\n $offerInfoForm = NULL;\r\n $offerPremiumForm = NULL;\r\n $offerObjetForm = NULL;\r\n $OfferInfo = $em->find('Offer\\Entity\\Offer', $id);\r\n // $offerInfoForm->bind($OfferInfo);\r\n $userInfo = $this->identity();\r\n \r\n $view = new ViewModel(array(\r\n 'offerInfo' => $OfferInfo,\r\n 'userInfo' => $userInfo\r\n ));\r\n \r\n return $view;\r\n }", "title": "" }, { "docid": "b7de458feabfdbd5872a54ecaa070f4c", "score": "0.6604974", "text": "public function edit($id)\n {\n $employee = EmployeeManagement::find($id);\n return view('EmployeeManagement::edit')->with(['employee' => $employee]);\n }", "title": "" }, { "docid": "dfbae1c76e8376876e167bfdda34a588", "score": "0.66006404", "text": "public function edit($entity);", "title": "" }, { "docid": "b24ebc55abfc21b1300f6153dbc6f292", "score": "0.6599799", "text": "public function edit($id)\n\t{\n\t\t$data = $this->getModel()->find($id);\n\t\treturn view($this->path.'.edit', ['data' => $data]);\n\t}", "title": "" }, { "docid": "019074af2cef1b756dc42a7596b8ecb8", "score": "0.65966266", "text": "public function edit(Person $person)\n\t{\n\t\treturn view('admin.people.form', ['person' => $person]);\n\t}", "title": "" }, { "docid": "bc783a8d888232c3357e49ff894937dd", "score": "0.6593036", "text": "public function edit($id)\n {\n $consultorio = Consultorio::find($id);\n return view('admin.consultorios.edit')->with('consultorio', $consultorio);\n }", "title": "" }, { "docid": "876276aa312111f9e43f28258cc4a178", "score": "0.65904295", "text": "public function edit($id)\n {\n return view('update');\n }", "title": "" }, { "docid": "645e2c6f1254ac9ce28e10a3140607e8", "score": "0.65895754", "text": "public function edit($id) {\n $item = Employee::find($id);\n return view('admin/employees/update')->with(['item' => $item]); \n }", "title": "" }, { "docid": "ced00a3017255bbcbba274e84e79e0e1", "score": "0.6589034", "text": "function editRecord() {\n\t\t$this->checkPermission();\n\t\t$this->loadRecord();\n\t\treturn $this->getEditForm();\n\t}", "title": "" }, { "docid": "148f2b795f1a0e6fbe96ee1b1579717f", "score": "0.6588934", "text": "public function edit()\n {\n // return view('api::edit');\n }", "title": "" }, { "docid": "28ae32f996d436e7cae8c79ced9fa5f4", "score": "0.65878385", "text": "public function edit($formID) {\n $form = Form::findOrFail($formID,['id','title','questions']);\n return view('create',compact('form'));\n }", "title": "" }, { "docid": "2e49b594eaa39cc083c2b2d9105a18a7", "score": "0.6584271", "text": "public function editAction()\r\n {\r\n $objectManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\r\n\r\n // Create the form and inject the ObjectManager\r\n $form = new $this->formEdit($objectManager);\r\n\r\n // Create a new, empty entity and bind it to the form\r\n $repository = $this->getEm()->getRepository($this->entity);\r\n $id = $this->params()->fromRoute('id', 0);\r\n\r\n $entity = $repository->find($id);\r\n\r\n $form->bind($entity);\r\n\r\n $request = $this->getRequest();\r\n\r\n if ($request->isPost()) {\r\n\r\n $form->setData($request->getPost());\r\n\r\n if ($form->isValid()) {\r\n\r\n $service = $this->getServiceLocator()->get($this->service);\r\n $service->update($entity);\r\n\r\n $this->flashMessenger()->setNamespace('Tenil')->addSuccessMessage('Atualizado com sucesso!');\r\n\r\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller, 'action' => 'edit', 'id' => $id ));\r\n }\r\n }\r\n\r\n return new ViewModel(array('form' => $form));\r\n\r\n }", "title": "" }, { "docid": "a43a0eba451e269dc212e1398a18e1d4", "score": "0.6581375", "text": "public function edit($id)\n\t{\n\t\t$specialization = Specialization::find($id);\n\t \n\t \n\t\treturn view('admin.specialization.edit', compact('specialization'));\n\t}", "title": "" }, { "docid": "db98a716aa6be23df73999f55c3166b2", "score": "0.65789884", "text": "public function edit($id)\n {\n //\n $infor = Information::find($id);\n return view('admin.infor.edit', compact('infor'));\n }", "title": "" }, { "docid": "50dbef337fda507081f20e53f9045886", "score": "0.65770215", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('TopGamesBundle:Plataforma')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Plataforma entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('TopGamesBundle:Plataforma:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "1458051dfc97d0a20c103d39be5d2324", "score": "0.65739626", "text": "public function edit()\n {\n return view('website::edit');\n }", "title": "" }, { "docid": "1a75786a7e2eadb5eb40fa30d9a98768", "score": "0.6573916", "text": "public function edit($id)\n {\n return view('enquirymanager::edit');\n }", "title": "" }, { "docid": "22f1fcbffb0684b40a93604cf8cd30a5", "score": "0.656882", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n $formMethod = 'PATCH';\n $formRoute = ['news.update',$model->id];\n return view($this->view.'form',[\n 'model'=>$model,\n 'formMethod'=>$formMethod,\n 'formRoute'=>$formRoute,\n ]);\n }", "title": "" }, { "docid": "67eababb666f337f38209bfc208267d6", "score": "0.6568242", "text": "public function edit($id)\n {\n $this->authorize(__FUNCTION__);\n\n $specie = Specie::find($id);\n\n return view('species.form')->with(['specie' => $specie]);\n }", "title": "" }, { "docid": "2c9bd3ce4e86603f0963a10ed0087fe1", "score": "0.65671444", "text": "public function edit($id)\n {\n $role = $this->role_model->findOrFail($id);\n $data = [\n 'title' => \"Role Form\",\n 'method' => \"PUT\",\n 'role' => $role\n ];\n return view('admin.role.role_form', $data);\n }", "title": "" }, { "docid": "39a2aa07572165164181b1e275b08f5c", "score": "0.65579695", "text": "public function edit(InstanceFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "fd5bf8e7777e72f95481869ab3143c03", "score": "0.65569633", "text": "public function edit($id)\n\t{\n\t\t// get the autor\n\t\t$autor = Autor::find($id);\n\n\t\t// show the edit form and pass the autor\n\t\t$this->layout->content = View::make('autor.edit')\n\t\t\t->with('autor', $autor);\n\t}", "title": "" }, { "docid": "92a9dd66c4fe3f411f884f62eaa039c8", "score": "0.6552419", "text": "public function edit($id)\n\t{\n\t\t$company = Company::find($id);\n\t \n\t \n\t\treturn view('admin.company.edit', compact('company'));\n\t}", "title": "" }, { "docid": "b2253141b6b8bfb4cd1e7d881bde781f", "score": "0.6548214", "text": "public function edit($id)\n {\n return view('installer::edit');\n }", "title": "" }, { "docid": "52d1a92c9ab22807eff7e836435b8795", "score": "0.6546999", "text": "public function edit($id)\n {\n $product = $this->products->findOrFail($id);\n\n return view('admin.products.form',compact('product'));\n }", "title": "" }, { "docid": "56a3247a313557a3b9e0c9473676be1b", "score": "0.65466416", "text": "public function edit()\r\r {\r\r $this->page_title->push(lang('outlet_edit'));\r\r $this->data['pagetitle'] = $this->page_title->show();\r\r\r /* Breadcrumbs :: Common */\r\r $this->breadcrumbs->unshift(1, lang('outlet_edit'), 'admin/client/company/outlet/edit');\r\r\r /* Breadcrumbs */\r\r $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\r\r /* Data */\r\r $this->data['error'] = NULL;\r\r $this->data['charset'] = 'utf-8';\r\r $this->data['form_url'] = 'admin/client/company/outlet/update';\r\r\r /* Load Template */\r\r $this->template->admin_render('admin/companies/outlets/edit', $this->data);\r\r\r }", "title": "" }, { "docid": "979ed1c77f9a8a6cd0408a320f9f8224", "score": "0.6544806", "text": "public function edit($id)\n {\n $form = Form::where('id',$id)->first();\n $job = Job::where('id',$form->job_id)->first();\n $this->authorize('edit', $form);\n\n if($form)\n return view('appl.recruit.form.createedit')\n ->with('stub','Update')\n ->with('job',$job)\n ->with('recaptcha',true)\n ->with('form',$form);\n else\n abort(404);\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "a9e5e1e472a583973d842c5ab7383d94", "score": "0.0", "text": "public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::table('users')->insert([\n 'name' => '梁李良',\n 'email' => 'liang569874@163.com',\n 'password' => bcrypt('Linux3306'),\n 'created_at' =>\\Carbon\\Carbon::now(),\n 'updated_at' =>\\Carbon\\Carbon::now(),\n ]);\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => 'alan@alan.fr',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => 'alice@alice.fr',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => 'admin@admin.fr',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "339f34d479d82d76bcfcf9f30b60c215", "score": "0.7941445", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Category::class, 50)->create();\n factory(\\App\\Tag::class, 50)->create();\n\n //factory(\\App\\Post::class, 20)->create();\n factory(App\\Post::class, 50)->create()->each(function (App\\Post $post) {\n //se relaciona un post con un tag\n $post->tags()->attach([\n rand(1, 17), //el primer post se relaciona con las primeras cinco etiquetas\n rand(17, 36),\n rand(36, 50),\n ]);\n });\n\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c1a66cf4f77ef258e5c305c72f0cb9e1", "score": "0.7886635", "text": "public function run()\n {\n\n\n\n \t$this->call([\n \t\tUserSeeder::class,\n \t\tGenreSeeder::class,\n \t\tAuthorSeeder::class,\n \t\tBookSeeder::class,\n\n \t]);\n\n\n \n \t//$imageUrl=$faker->imageUrl(640, 480);\n\n // $books =\\App\\Models\\Book::factory()->count(30)->create()->each(function ($book) {\n // // Seed the relation with one address\n // $isConfirmed = \\App\\Models\\Book::factory()->make();\n // $book->isConfirmed()->save($isConfirmed);\n // });\n \n\n\n }", "title": "" }, { "docid": "f576f30907ef7a35342b08cfa6974d30", "score": "0.78835493", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 5)->create();\n factory(App\\Model\\Album::class, 50)->create();\n factory(App\\Model\\Audio::class, 300)->create();\n }", "title": "" }, { "docid": "9114ae89fdf7d0584d56fd6bee28868b", "score": "0.7876554", "text": "public function run()\n {\n $this->call(DatabaseSeeder::class);\n DB::table('posts')->insert([\n 'title' => Str::random(10),\n 'body'=>Str::random(10).'@email.com',\n 'category_id' =>Int::random(10),\n\n ]);\n\n // $faker=Faker::create();\n // for ($i=0; $i <10 ; $i++) {\n // // code...\n // $post=new App\\Post();\n // $post->title=$faker->sentence;\n // $post->body=$faker->paragraph;\n // $post->category_id=$faker->rand(1,3);\n // $post->save();\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "012af9c3ac169cef32ec988d61a7f6aa", "score": "0.7833385", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for($i = 0; $i < 10; $i++) {\n DB::table('products')->insert([\n 'title' => $faker->text(30),\n 'description' => $faker->text(200),\n 'count' => $faker->randomDigit(1)\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "bfdaf9f1ed8a7212b4598d692bcc1654", "score": "0.7826624", "text": "public function run()\n {\n\n Student::factory(10)->create();\n Teacher::factory(10)->create();\n Post::factory(10)->create();\n Comment::factory(10)->create();\n Category::factory(10)->create();\n CategoryPost::factory(10)->create();\n // đẩy dữ liệu\n // $this->call([\n // StudentTableSeeder::class,\n // TeacherTableSeeder::class,\n // ]);\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => 'forge405@gmail.com',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "33db14990dd20205cbf0ed23ac91d8a5", "score": "0.7797709", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Models\\Blog\\Category::class,10)->create();\n factory(\\App\\Models\\Blog\\Post::class,100)->create();\n $this->call(PostsCategoriesTableSeeder::class);\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => 'echivambo@psi.org.mz',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => 'enhacudima@psi.org.mz',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "7d4a8acce261539d99f3a600a7fded39", "score": "0.7794814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Stocks\n $stocks = factory(Stock::class, 5)->create();\n\n $categories = factory(Category::class, 10)->create();\n\n $products = factory(Product::class, 500)->create();\n\n $products->each(function (Product $product) use ($categories, $stocks) {\n $randomCategories = $categories->random(3);\n $randomStocks = $stocks->random(rand(1, 3));\n\n $product->categories()->attach($randomCategories->pluck('id'));\n\n // associate with stocks\n foreach ($randomStocks as $stock) {\n $product->stocks()->attach($stock->id, [\n 'products_count' => rand(10, 100)\n ]);\n }\n });\n\n // Empty categories\n factory(Category::class, 5)->create();\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "3d653e15cd03e74996be098cff42dfca", "score": "0.77792233", "text": "public function run()\n {\n \\App\\Models\\Admin::factory(10)->create();\n \\App\\Models\\User::factory(10)->create();\n\n Book::create(\n [\n \"title\" => \"Self Discipline\",\n \"author\" => \"Shawn Norman\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 50,\n ]\n );\n\n Book::create(\n [\n \"title\" => \"Atomic Habits\",\n \"author\" => \"James Clear\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 20,\n ]);\n\n Book::create(\n [\n \"title\" => \"The Last Thing He Told Me\",\n \"author\" => \"Laura Dave\",\n \"publisher\" => \"Google\",\n \"year\" => 2021,\n \"stock\" => 10,\n ]\n );\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "defbf35392fe9a4d769e6b94f0fcd99b", "score": "0.7768574", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\tPost::truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\t\tforeach(range(1, 30) as $index)\n\t\t{\n\t\t\t// MYSQL\n\t\t\t$userId = User::orderBy(DB::raw('RAND()'))->first()->id;\n\n\t\t\t// SQLITE\n\t\t\t// $userId = User::orderBy(DB::raw('random()'))->first()->id;\n\n\t\t\tPost::create([\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'title' => $faker->name($gender = null|'male'|'female'),\n\t\t\t\t'body' => $faker->catchPhrase\n\t\t\t]);\n\t\t}\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "ba321352baa0a7b54b30247f8156bf1a", "score": "0.7756539", "text": "public function run()\n {\n $this->seedUser();\n $this->seedCategoryAndPosts();\n }", "title": "" }, { "docid": "8a59a3aa3c368b2105f5ed2aed066fcd", "score": "0.77556384", "text": "public function run()\n {\n // $this->call(DummyDataSeeder::class);\n\n factory(App\\Models\\UserProfile::class, 100)->create();\n factory(App\\Models\\HikingGroup::class, 100)->create();\n factory(App\\Models\\Announce::class, 100)->create();\n factory(App\\Models\\EntryInfo::class, 100)->create();\n factory(App\\Models\\HikingPlan::class, 100)->create();\n factory(App\\Models\\HikingRecord::class, 100)->create();\n factory(App\\Models\\LocationMemo::class, 100)->create();\n factory(App\\Models\\Notification::class, 100)->create();\n factory(App\\Models\\RadiogramLog::class, 100)->create();\n factory(App\\Models\\Recruitment::class, 100)->create();\n factory(App\\Models\\UserPosition::class, 100)->create();\n }", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "645884083d11c19908303f183869ea48", "score": "0.7750386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::truncate();\n Athlete::truncate();\n Trainer::truncate();\n Plan::truncate();\n Subscription::truncate();\n TrainerPlan::truncate();\n Profile::truncate();\n Routine::truncate();\n Training::truncate();\n Calendar::truncate();\n TrainingRoutine::truncate();\n\n $cantidad_users = 30;\n $cantidad_athletes = 20;\n $cantidad_trainers = 10;\n $cantidad_profiles = 60;\n $cantidad_plans = 5;\n $cantidad_subscriptions = 20;\n $cantidad_trainer_plans = 30;\n $cantidad_routines = 30;\n $cantidad_trainings = 60;\n $cantidad_calendars = 100;\n $cantidad_training_routines = 120;\n\n factory(User::class, $cantidad_users)->create();\n factory(Athlete::class, $cantidad_athletes)->create();\n factory(Trainer::class, $cantidad_trainers)->create();\n factory(Profile::class, $cantidad_profiles)->create();\n factory(Plan::class, $cantidad_plans)->create();\n factory(Subscription::class, $cantidad_subscriptions)->create();\n factory(TrainerPlan::class, $cantidad_trainer_plans)->create();\n factory(Routine::class, $cantidad_routines)->create();\n factory(Training::class, $cantidad_trainings)->create();\n factory(Calendar::class, $cantidad_calendars)->create();\n factory(TrainingRoutine::class, $cantidad_training_routines)->create();\n\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> 'jperez@gmail.com',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "42daa4f7485840fe27f640e7e7069e40", "score": "0.77378654", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([UsuarioSeed::class]);\n $this->call([CategoriasSeed::class]);\n $this->call([ExperienciaSeeder::class]);\n }", "title": "" }, { "docid": "f70d3c8ab2d963dc7360a2749f67f6b7", "score": "0.7736429", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n Course::factory(3)->create();\n assignament::factory(9)->create();\n exercise::factory(6)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => 'test@gmail.com',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => 'test2@gmail.com',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "a8c4b0faab2536f6924d6a6f05f50027", "score": "0.77278227", "text": "public function run()\n {\n $faker = Factory::create('fr_FR');\n $categories = ['Animaux', 'Nature', 'People', 'Sport', 'Technologie', 'Ville'];\n foreach ($categories as $category) {\n DB::table('categories')->insert([\n 'name' => $category,\n 'created_at' => $faker->date('Y-m-d H:i'),\n 'updated_at' => $faker->date('Y-m-d H:i'),\n ]);\n }\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "cf809e1e51d295f713f0e1311ce8c5b4", "score": "0.77200127", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(BatimentsSeeder::class);\n $this->call(FormationsSeeder::class);\n $this->call(TypeformationsSeeder::class);\n eleves::factory()->count(50)->create();\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => 'seyii@seyi.com',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "70fbcb2aeac3103c8556e273a1ea07ef", "score": "0.7712306", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'nome' => \"Felipe Gustavo Braiani Santos\",\n 'siape' => 2310754,\n 'password' => bcrypt('2310754'),\n 'perfil' => '3'\n ]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Mecânica\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Informática\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Eletrotécnica\"]);\n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@drea.com',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "78e5684a917cd4cdf2b47769a09f01c1", "score": "0.76985985", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n DB::table('news')->insert([\n 'title' => $faker->text(10),\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now(),\n 'resume' => $faker->text(70),\n 'pics' => $faker->imageUrl(),\n 'content' => $faker->text( 1000 ),\n 'author' => $faker->name,\n 'isPublished' => rand(0,1)\n ]);\n }", "title": "" }, { "docid": "a3ead8af61223146f6e3fdec15b00904", "score": "0.7697128", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([QuizSeeder::class]);\n $this->call([AnswererSeeder::class]);\n $this->call([SectionSeeder::class]);\n $this->call([QuestionSeeder::class]);\n $this->call([AnswerSeeder::class]);\n $this->call([OptionSeeder::class]);\n $this->call([OptionColSeeder::class]);\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::truncate();\n \n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => 'admin@gmail.com',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => 'tomaslanda1989@gmail.com',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "d821e4330d8dabc502854ce12d329af5", "score": "0.7686517", "text": "public function run()\n {\n $this->call(ColorsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(SexesTableSeeder::class);\n $this->call(SizesTableSeeder::class);\n\n $this->call(User_StatusesTableSeeder::class);\n\n $this->call(SubcategoriesTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n\n $this->call(ProductsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n // factory(\\App\\Product::class, 62)->create();\n factory(\\App\\User::class, 25)->create();\n factory(\\App\\Cart::class, 99)->create();\n }", "title": "" }, { "docid": "29695a5ff1fa3c45993913799e105323", "score": "0.76861745", "text": "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\t$dateset = new Seed(self::TABLE_NAME);\n\n\t\tforeach ($dateset as $rows) {\n\t\t\t$records = [];\n\t\t\tforeach ($rows as $row)\n\t\t\t\t$records[] = [\n\t\t\t\t\t'id'\t\t\t=> $row->id,\n\t\t\t\t\t'created_at'\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t\t'updated_at'\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t\t'sport_id'\t\t=> $row->sport_id,\n\t\t\t\t\t'country_id'\t=> $row->country_id,\n\t\t\t\t\t'gender_id'\t\t=> $row->gender_id,\n\n\t\t\t\t\t'name'\t\t\t=> $row->name,\n\t\t\t\t\t'external_id'\t=> $row->external_id ?? null,\n\t\t\t\t\t'logo'\t\t\t=> $row->logo ?? null,\n\t\t\t\t];\n\n\t\t\tinsert(self::TABLE_NAME, $records);\n\t\t}\n\t}", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "bdd67eaf9bb5c705971ec25aad3d2bf9", "score": "0.76768607", "text": "public function run()\n {\n $faker = Faker\\Factory::create('es_ES');\n\n DB::table('empresas')->delete();\n for ($cantidadEmpresas = 0; $cantidadEmpresas != 6; $cantidadEmpresas++) {\n DB::table('empresas')->insert(array(\n 'nombre' => $faker->company,\n 'direccion' => $faker->address,\n 'email' => $faker->companyEmail,\n 'url' => $faker->url,\n 'telefono' => $faker->numberBetween(600000000,699999999),\n 'created_at' => date('Y-m-d H:m:s'),\n 'updated_at' => date('Y-m-d H:m:s'),\n ));\n }\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => 'admin@admin.fr',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', 'plj@un.or.id'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "2fab92d52cf4ab60077a0d038a745f5b", "score": "0.7660352", "text": "public function run()\n {\n Model::unguard();\n\n $this->call(DatabaseCleaner::class);\n\n $faker = Faker\\Factory::create();\n\n $admin = User::create([\n 'first_name' => 'Admin',\n 'last_name' => 'Admin',\n 'email' => 'admin@admin.com',\n 'password' => bcrypt('admin'),\n 'remember_token' => str_random(10),\n ]);\n\n $userBirthdate = new UserMeta([\n 'created_by' => $admin->id,\n 'field_name' => 'birth_date',\n 'field_type' => 'date',\n 'date_value' => $faker->date,\n ]);\n\n $userPostalcode = new UserMeta([\n 'created_by' => $admin->id,\n 'field_name' => 'zip_code',\n 'field_type' => 'string',\n 'string_value' => $faker->postcode,\n ]);\n\n $admin->meta()->saveMany([$userBirthdate, $userPostalcode]);\n\n $this->call(GroupsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(LanguagesTableSeeder::class);\n $this->call(ContentTypesTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ContentsTableSeeder::class);\n $this->call(RoutesTableSeeder::class);\n\n Model::reguard();\n }", "title": "" }, { "docid": "d4833208ba9ca3bb97bd734168301979", "score": "0.7659574", "text": "public function run()\n {\n $this->call(ReligionsTableSeeder::class);\n $this->call(SubjectsTableSeeder::class);\n $this->call(BuildingsTableSeeder::class);\n $this->call(ScholarshipsTableSeeder::class);\n $this->call(GradesTableSeeder::class);\n $this->call(CollegesTableSeeder::class);\n $this->call(DepartmentsTableSeeder::class);\n factory('App\\Faculty', 500)->create();\n // factory('App\\Student', 1000)->create();\n factory('App\\Room', 140)->create();\n $this->call(CurriculaTableSeeder::class);\n $this->call(CurriculumSubjectsTableSeeder::class);\n $this->call(StudentsTableSeeder::class); \n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'pablo.nolasco@live.com']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" }, { "docid": "238c2f72ceeb9562de5b8c8c51d03b78", "score": "0.76563185", "text": "public function run()\n {\n Model::unguard();\n DB::table('fruits')->delete();\n $fruits = [\n ['name' => 'apple', 'color' => 'green', 'weight' => 150, 'delicious' => true],\n ['name' => 'banana', 'color' => 'yellow', 'weight' => 116, 'delicious' => true],\n ['name' => 'strawberries', 'color' => 'red', 'weight' => 12, 'delicious' => true],\n ];\n // Loop through fruits above and create the record in DB\n foreach ($fruits as $fruit) {\n Fruit::create($fruit);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "61310d9d27579cb1fe2adbef75513d38", "score": "0.76559335", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\Admin::class)->create([\n \"email\" => \"alice@gmail.com\",\n \"name\" => \"Alice\"\n ]);\n factory(App\\User::class)->create([\n \"email\" => \"bob@gmail.com\",\n \"name\" => \"Bob\"\n ]);\n factory(App\\User::class)->create([\n \"email\" => \"charlie@gmail.com\",\n \"name\" => \"Charlie\"\n ]);\n\n $this->call([\n CategorySeeder::class,\n PostSeeder::class,\n CategoryPostSeeder::class\n ]);\n }", "title": "" }, { "docid": "ffea41874cbc07a545de1bafbfa4ff18", "score": "0.76557875", "text": "public function run()\n {\n // $faker = Faker::create() ;\n // foreach (range(1,10) as $index) {\n // // We are now inserting fake data values and credentials into the database \n\n // DB::table('users')->insert([\n // 'name' => str_random(10) ,\n // 'email' => str_random(10).'@gmail.com' ,\n // 'password' => bcrypt('secret')\n // ])\n // }\n $this->call(SendCardsTableSeeder::class);\n $this->call(CardCategoriesTableSeeder::class);\n $this->call(ComplementaryCardsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "6571121bae7932bef4e75b44130c0200", "score": "0.7654159", "text": "public function run()\n {\n Book::create([\n 'user_id' => 1,\n 'title' => 'harry potter 1',\n 'description' => 'harry potter',\n ]);\n\n Book::create([\n 'user_id' => 1,\n 'title' => 'harry potter 2',\n 'description' => 'harry potter',\n ]);\n\n Book::create([\n 'user_id' => 1,\n 'title' => 'harry potter 3',\n 'description' => 'harry potter',\n ]);\n\n Book::create([\n 'user_id' => 1,\n 'title' => 'harry potter 4',\n 'description' => 'harry potter',\n ]);\n }", "title": "" }, { "docid": "b9cbd65c0ad3a0c375171c28c8688d01", "score": "0.76536846", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n FreeCause::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n Freecause::create([\n 'title' => $faker->sentence,\n 'number' => $faker->phoneNumber,\n 'judgment_date' => $faker->date,\n 'judgment_text' => 'innocent',\n 'court_name' => 'alex',\n 'judicial_chamber' => 'chamber',\n 'considration_text' => 'considration',\n 'type' => 'new',\n 'is_public' => 0,\n 'lawyer_id' => 2,\n 'status' => 1,\n 'related_cause_number' => 2,\n 'user_id' => 8,\n ]);\n }\n }", "title": "" }, { "docid": "aa8c1e52ec82900fb89b340f2d60d9b8", "score": "0.765117", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //Model::unguard();\n factory(App\\User::class, 10)->create();\n factory(App\\Organisation::class, 10)->create();\n factory(App\\Catalog::class, 9)->create();\n factory(App\\CatalogItem::class, 30)->create();\n factory(App\\Workplace::class, 9)->create();\n factory(App\\Workplace_soft::class, 30)->create();\n factory(App\\Budget::class, 50)->create();\n factory(App\\License::class, 50)->create();\n factory(App\\Contract::class, 50)->create();\n $this->call(RoleTableSeeder::class);\n\n\n //Model::reguard();\n }", "title": "" }, { "docid": "9c36a41315c56187bb677602b3709ffa", "score": "0.76483905", "text": "public function run()\n { \n $faker = \\Faker\\Factory::create();\n \n /**\n * Creates dummy Users and for each of them\n * creates 5 articles \n * \n */\n factory(User::class, 50)->create()->each(function($user) use ($faker){\n for ($i=0; $i < 5; $i++) {\n Article::create([\n 'user_id' => $user->id,\n 'title' => $faker->sentence,\n 'content' => $faker->paragraphs(3,true),\n ]);\n }\n });\n\n /**\n * Creates a User with the credentials:\n * enail: me@mygraphqlapp.com\n * password: secret\n * \n */ \n User::create([\n 'name' => $faker->name,\n 'email' => 'me@mygraphqlapp.com',\n 'password' => bcrypt('secret')\n ]);\n }", "title": "" }, { "docid": "28708952c33a599f47466229824bdec3", "score": "0.7648328", "text": "public function run()\n {\n \t// DB::table('dogs')->delete();\n\n $dogs = array(\n \tarray('name' => 'Shilo', 'gender' => 'female', 'age' => 9, 'created_at' => new DateTime, 'updated_at' => new DateTime),\n \tarray('name' => 'Honu', 'gender' => 'male', 'age' => 4, 'created_at' => new DateTime, 'updated_at' => new DateTime),\n \tarray('name' => 'Gunner', 'gender' => 'male', 'age' => 3, 'created_at' => new DateTime, 'updated_at' => new DateTime),\n \tarray('name' => 'Rupert', 'gender' => 'male', 'age' => 9, 'created_at' => new DateTime, 'updated_at' => new DateTime)\n );\n\n // Uncomment the below to run the seeder\n DB::table('dogs')->insert($dogs);\n }", "title": "" }, { "docid": "1ea2b96b314017c9eff1d6fcbf2fe5f1", "score": "0.76481557", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'id' => 1,\n 'name' => 'lofike',\n 'email' => 'm4rtin.t@gmail.com',\n 'password' => '$2y$10$bmeekV4dbnP0lJR8LEeIX.Nk.TgSI0/pSVCUktovtrua.QO6vWdna',\n 'remember_token' => NULL,\n 'created_at' => '2016-12-21 09:27:20',\n 'updated_at' => new DateTime()\n ]);\n DB::table('shows')->insert([\n 'id' => 1,\n 'title' => 'Video Title',\n 'description' => \"Long description of the video\",\n 'image_link' => \"http://www.daisuki.net/content/dam/pim/daisuki/en/ONEPUNCHMAN/13161/movie.jpg\",\n 'video_link' => \"http://www.daisuki.net/hk/en/anime/watch.ONEPUNCHMAN.13156.html\"\n ]);\n }", "title": "" }, { "docid": "ad4f7bdbd62b9b41a1ecb75f8b1bbfcb", "score": "0.7648151", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\Prouduct::class,20)->create();\n factory(App\\Category::class,5)->create();\n\n $categories = Category::all();\n Prouduct::all()->each(function ($product) use ($categories) {\n $product->categories()->attach(\n $categories->random(2)->pluck('id')->toArray()\n );\n });\n }", "title": "" } ]
b19218303e9548e50615a86e940ec0b1
Test that if the store insert query fails an exception is thrown.
[ { "docid": "a9e525765bdd21793078f34a41381ba6", "score": "0.79429877", "text": "public function testFailedStoreQueryThrowsException()\n {\n $mock = new Mock();\n $pdo = $mock->PDO();\n\n $analyser = new Analyse();\n $analyser->setPdoConnection($pdo);\n $analyser->setSchema(Helper::getExampleSchemaString());\n $analyser->setFile(Helper::getExampleCSVLocation());\n $analyser::openFile();\n $analyser::setCsvHeaderColumns();\n\n $this->expectException(\\Exception::class);\n $this->expectExceptionMessage('Could not insert row 1 into the database.');\n\n $postgresqlStore = new PostgresqlStore();\n\n $mock->expectPdoFailedExecute($pdo);\n $postgresqlStore->store('tableName', 'id');\n }", "title": "" } ]
[ { "docid": "94c0c4c88934ab376c4a9d90e3fcee30", "score": "0.7335975", "text": "public function testCreateNewTransactionThrowsExceptionIfInsertFails()\n {\n $mockInsert = $this->getMockBuilder('\\MongoDB\\InsertOneResult')\n ->disableOriginalConstructor()\n ->setMethods(['isAcknowledged'])\n ->getMock();\n $mockInsert\n ->expects($this->once())\n ->method('isAcknowledged')\n ->will($this->returnValue(false));\n\n $mockTransactionLog = $this->getMock('\\Tripod\\Mongo\\TransactionLog', array('insertTransaction'), array(), '', false, true);\n $mockTransactionLog->expects($this->once())\n ->method('insertTransaction')\n ->will($this->returnValue($mockInsert));\n\n /* @var $mockTransactionLog \\Tripod\\Mongo\\TransactionLog */\n try {\n $mockTransactionLog->createNewTransaction('transaction_1', array(), array(), 'mydb', 'mycollection');\n $this->fail(\"Exception should have been thrown by createNewTransaction\");\n } catch ( Exception $e){\n $this->assertContains('Error creating new transaction:', $e->getMessage());\n }\n }", "title": "" }, { "docid": "5e239750fae232ddd6d23aa587a4ab99", "score": "0.69774884", "text": "public function testPdoExceptionHandlingOnInsert()\n {\n $user = new User(\"Mariano\", new Email(\"email@email.com\"));\n $user->setPassword(new Password('12345678'));\n $connection = $this->getMockedPdo();\n $connection->method('prepare')\n ->willThrowException(new PDOException());\n $dataMapper = new PdoUserMapper($connection);\n $this->expectException(MapperException::class);\n $dataMapper->createUser($user);\n $this->expectException(MapperException::class);\n $dataMapper->updateUser($user);\n }", "title": "" }, { "docid": "5b6de0ee52e3f07ef617bd4cd65ff68e", "score": "0.6946466", "text": "public function testInsertExistingPokemon()\n {\n $inserted = $this->insertData();\n $this->assertTrue($inserted);\n\n $inserted = $this->insertData();\n $this->assertFalse($inserted);\n }", "title": "" }, { "docid": "3abe2d0bd3719de97a2ad5e1113383c8", "score": "0.6910455", "text": "public function testInsert() {\n }", "title": "" }, { "docid": "915faf7d06f40ebb2b5f09406addb40c", "score": "0.6894035", "text": "public function testRawInsertWithError()\n {\n $set = \"'name', 'email') values ('jansen', 'jansen@test.com')\";\n\n $expected = false;\n\n $r = $this->_object->rawInsert('users', $set);\n $this->assertFalse($r);\n\n $sql = \"select * from users\";\n\n $actual = $this->_object->fetchRows($sql);\n\n $this->assertEquals($expected, end($actual));\n }", "title": "" }, { "docid": "915faf7d06f40ebb2b5f09406addb40c", "score": "0.6894035", "text": "public function testRawInsertWithError()\n {\n $set = \"'name', 'email') values ('jansen', 'jansen@test.com')\";\n\n $expected = false;\n\n $r = $this->_object->rawInsert('users', $set);\n $this->assertFalse($r);\n\n $sql = \"select * from users\";\n\n $actual = $this->_object->fetchRows($sql);\n\n $this->assertEquals($expected, end($actual));\n }", "title": "" }, { "docid": "c808a3d98fbfb9bdc61e2653352ef0c8", "score": "0.6886833", "text": "public function testInsert(): void\n {\n if ($this->getDatabasePlatform() instanceof PostgreSQLPlatform) {\n self::markTestIncomplete('PostgreSQL requires PK specified in SQL to use autoincrement');\n }\n\n $this->m->insert(['name' => 'Joe']);\n self::assertSame(3, $this->m->executeCountQuery());\n }", "title": "" }, { "docid": "73f67e90dc30fb6cb303fc89090f1c57", "score": "0.68556494", "text": "public function test_insert_fail_3()\n {\n $response = $this->post('/api/product/add');\n\n $response->assertStatus(500);\n }", "title": "" }, { "docid": "a64c9a1993cb891c0453dcdae280c3e8", "score": "0.68454945", "text": "public function test_insert_fail_2()\n {\n $response = $this->post('/api/product/add', []);\n\n $response->assertStatus(500);\n }", "title": "" }, { "docid": "25e83200ef598a937ff1c98b038f850d", "score": "0.67677313", "text": "public function testInsertInvalidFavoritePlayer() {\n\t\t//create a new favoritePlayer and insert it into mySQL\n\t\t$favoritePlayer = new FavoritePlayer(SprotsTest::INVALID_KEY, SprotsTest::INVALID_KEY);\n\t\t$favoritePlayer->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "d843c0a5193a7c7ca28b2f5cf1c90384", "score": "0.6757259", "text": "public function testCreateAndExecuteTransactionWithTransactionException()\n {\n $writeCollections = [$this->collection1->getName()];\n $readCollections = [$this->collection2->getName()];\n $action = '\n function () {\n var db = require(\"internal\").db;\n db.' . $this->collection1->getName() . '.save({ test : \"hello\" });\n\n /* will abort and roll back the transaction */\n throw \"doh!\";\n }';\n\n $transaction = new Transaction($this->connection);\n $transaction->setWriteCollections($writeCollections);\n $transaction->setReadCollections($readCollections);\n $transaction->setAction($action);\n\n $e = null;\n try {\n $transaction->execute();\n } catch (ServerException $e) {\n }\n $details = $e->getDetails();\n\n static::assertTrue(\n $e->getCode() === 500 && strpos($details['exception'], 'doh!') !== false,\n 'Did not return code 500 with message doh!, instead returned: ' . $e->getCode() . ' and ' . $details['errorMessage']\n );\n }", "title": "" }, { "docid": "9b7adfc839e8db0dcf48874677c6229e", "score": "0.6754089", "text": "public function testInsertInvalidFavorite() {\n\n\n\t\t$dispensaryFavorite = new DispensaryFavorite($this->profile->getProfileId(), $this->dispensary->getDispensaryId());\n\t\t$dispensaryFavorite->insert($this->getPDO(), $this->profile->getProfileId(), $this->dispensary->getDispensaryId());\n\n\t\t// insert again and wath it fail\n\t\t$dispensaryFavorite->insert($this->getPDO(), $this->profile->getProfileId(), $this->dispensary->getDispensaryId());\n\n\t}", "title": "" }, { "docid": "c55e528e4216bad32a745d221e56875f", "score": "0.6739992", "text": "public function testCommitException()\n {\n $this->setExpectedException('PDOException');\n\n $this->_object->commit();\n }", "title": "" }, { "docid": "006ee4dd365a213904c1ec378500e755", "score": "0.6683947", "text": "public function testError(): void {\n try {\n $result = Database::query('select devil from hell', true);\n $this->assertFalse($result);\n } catch (Exception $e) {\n $error = Database::error();\n\n $this->assertStringStartsWith('Table', $error);\n $this->assertStringEndsWith(\"doesn't exist\", $error);\n }\n }", "title": "" }, { "docid": "0ff71c3259473923f73b6197c98cb72c", "score": "0.65984213", "text": "public function test_insert_fail_5()\n {\n $response = $this->post('/api/product/add', [\n \"name\" => \"name_from_test\"\n ]);\n\n $response->assertStatus(500);\n }", "title": "" }, { "docid": "5f104311b0cff4a80a3340278271a8ee", "score": "0.65933925", "text": "public function testInsertReturnsAValidTableRecordId()\r\n {\r\n $name = 'test_insert_table';\r\n $content = 'test content is this';\r\n\r\n $this->_createTable( $name );\r\n\r\n $query = \"INSERT INTO $name ( test_name ) VALUES ( \";\r\n $query .= \"?\";\r\n $query .= \" )\";\r\n\r\n $id = self::$db->insert( $query, [ $content ] );\r\n\r\n $this->assertNotFalse( $id );\r\n $this->assertTrue( 1 === $id );\r\n }", "title": "" }, { "docid": "300d8ce695416f383294584170877d37", "score": "0.6580448", "text": "public function testInsert()\n {\n }", "title": "" }, { "docid": "a38908eb7497d38b82d9de032873ff1b", "score": "0.6574757", "text": "public function testExecuteInvalid()\n {\n $this->expectException(InvalidQueryException::class);\n\n $source = $this->factory->selector('data', 'nonodetype');\n $constraint = null;\n $orderings = [];\n $columns = [];\n\n $query = $this->factory->createQuery($source, $constraint, $orderings, $columns);\n $query->execute();\n }", "title": "" }, { "docid": "973189038368d79c3e691507ef61b1cc", "score": "0.65326315", "text": "public function testInsertInvalidVendor() {\n\t\t// create a vendor with a non null notificationId and watch it fail\n\t\t$vendor = new Vendor(InventoryTextTest::INVALID_KEY,$this->VALID_contactName, $this->VALID_vendorEmail, $this->VALID_vendorName, $this->VALID_vendorPhoneNumber);\n\t\t$vendor->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "14efbe9ffb675aa1cd6a73b5012c5a2d", "score": "0.6516824", "text": "public function testInsertInvalidVideoQueue() {\n\t\t// zeroth, ensure the VideoQueue and mySQL class are sane\n\t\t$this->assertNotNull($this->videoQueue);\n\t\t$this->assertNotNull($this->mysqli);\n\t\t// first, set the video id and queue id to an invented value that should never insert in the first place\n\t\t$this->videoQueue->setVideoId(42);\n\t\t$this->videoQueue->setQueueId(42);\n\t\t// second, try to insert the VideoQueue and ensure the exception is thrown\n\t\t$this->expectException(\"mysqli_sql_exception\");\n\t\t$this->videoQueue->insert($this->mysqli);\n\t\t// third, set the VideoQueue to null to prevent tearDown() from deleting a VideoQueue that never existed\n\t\t$this->videoQueue = null;\n\t}", "title": "" }, { "docid": "8a5669dce4bda8f8e4fc400e7cc598a9", "score": "0.6516429", "text": "public function testInsertInvalidCohort() {\n\t\t// create a Cohort with a non null cohort id and watch it fail\n\t\t$cohort = new Cohort(AaaaTest::INVALID_KEY, $this->VALID_COHORTAPPLICATIONID);\n\t\t$cohort->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "13c856d3dcaedff38a3a6db1df22033a", "score": "0.6501388", "text": "public function testInsertInvalidProfile() {\n\t\t//create a profile with a non null profie id and watch it fail\n\t\t$profile = new Profile(RootsTableTest::INVALID_KEY, $this->VALID_ACTIVATEFUZZY, $this->VALID_FUZZYMAIL, $this->VALID_FUZZYNAME, $this->VALID_HASHTHEFUZZY, $this->VALID_FUZZYLASTNAME, $this->VALID_CALLINGFUZZY, $this->VALID_SALTYFUZZY, $this->VALID_STRIPEYFUZZY, $this->VALID_WHATFUZZY, $this->VALID_USERFUZZY);\n\t\t$profile->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "c4e969f879ca11f0a1fa2287f69735c2", "score": "0.64961874", "text": "public function testStatementExceptionShouldContainErrorCode()\n {\n $sql = \"SELECT * FROM *\";\n try {\n $stmt = $this->_db->query($sql);\n $this->fail('Expected to catch Zend_Db_Statement_Exception');\n } catch (Zend_Exception $e) {\n $this->assertTrue(is_int($e->getCode()));\n }\n }", "title": "" }, { "docid": "b90e8a4b67dcb5d3e338c06938c57465", "score": "0.6493727", "text": "public function testInsert()\n {\n\n /*\n $id = $this->getDbAdapter()->insert(\n 'bugs',\n array(\n 'description' => 'random'\n )\n );*/\n }", "title": "" }, { "docid": "594d3b132114b5de88de3138207aca41", "score": "0.648963", "text": "public function testLastInsertId()\n {\n $this->setExpectedException('PHPUnit_Framework_Error');\n\n $this->_object->lastInsertId();\n }", "title": "" }, { "docid": "7ca174e1404138b799fdf079b92c1bfa", "score": "0.64870477", "text": "public function testInsertInvalidEventImage(): void {\n\n\t\t// create a event image with a non null event image Id and watch it fail\n\t\t$eventImage = new eventImage( OurVibeTest::INVALID_KEY, OurVibeTest::INVALID_KEY);\n\t\t$eventImage->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "ea257537b732320625fcfe2a9553a41b", "score": "0.64853686", "text": "public function testInsertInvalidProduct() {\n\t\t// create a product with a non null Product and watch it fail\n\t\t$product = new Product(InventoryTextTest::INVALID_KEY, $this->vendor->getVendorId(), $this->VALID_description,\n\t\t\t$this->VALID_leadTime, $this->VALID_sku, $this->VALID_title);\n\t\t$product->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "29e067ad11a68ef0687afa9f61c2bef3", "score": "0.6468187", "text": "public function testProductUpsertWithoutProduct()\n {\n $this->setExpectedException('NostoException');\n $this->service->upsert();\n }", "title": "" }, { "docid": "46b26017d22c98df8b275a00b4fb54b2", "score": "0.6465948", "text": "public function testCreateAndExecuteTransactionWithTransactionErrorUniqueConstraintOnSave()\n {\n if (isCluster($this->connection)) {\n // don't execute this test in a cluster\n return;\n }\n\n $writeCollections = [$this->collection1->getName()];\n $readCollections = [$this->collection2->getName()];\n $action = '\n function () {\n var db = require(\"internal\").db;\n db.' . $this->collection1->getName() . '.save({ _key : \"hello\" });\n db.' . $this->collection1->getName() . '.save({ _key : \"hello\" });\n }';\n\n $transaction = new Transaction($this->connection);\n $transaction->setWriteCollections($writeCollections);\n $transaction->setReadCollections($readCollections);\n $transaction->setAction($action);\n\n $e = null;\n try {\n $transaction->execute();\n } catch (ServerException $e) {\n }\n $details = $e->getDetails();\n $expectedCutDownMessage = 'unique constraint violated';\n static::assertTrue(\n $e->getCode() === 400 && strpos(\n $details['errorMessage'],\n $expectedCutDownMessage\n ) !== false,\n 'Did not return code 400 with first part of the message: \"' . $expectedCutDownMessage . '\", instead returned: ' . $e->getCode() . ' and \"' . $details['errorMessage'] . '\"'\n );\n }", "title": "" }, { "docid": "a1c4f470581b8496ab85d233c7549dca", "score": "0.6464511", "text": "public function testInsert()\n {\n $inserted = $this->insertData();\n\n $this->assertTrue($inserted);\n\n $pokemonData = array(\n PokemonsContract::COLUMN_NAME => $this->pokemonName,\n PokemonsContract::COLUMN_URL => $this->pokemonUrl\n );\n\n $this->assertDatabaseHas(PokemonsContract::TABLE_NAME, $pokemonData);\n }", "title": "" }, { "docid": "7070cbbba5fafbc35e3c6063610bd5f7", "score": "0.6453801", "text": "public function test_insert_fail_1()\n {\n $response = $this->post('/api/product/add', [\n \"name\" => \"name_from_test\",\n \"description\" => \"desc\",\n \"price\" => 51,\n \"image\" => \"https://image.makewebeasy.net/makeweb/0/VmQjDdvOw/DefaultData/iphone_12_blue.png\",\n \"categories\" => []\n ]);\n\n $response->assertStatus(500);\n }", "title": "" }, { "docid": "c55aa05ef7c6a4c6092fe9db59de6a20", "score": "0.6452247", "text": "function insertOrDie($table, $params, $message = '') {\n $insert = $this->buildInsert($table, $params);\n $res = $this->query($insert);\n if (!$res) {\n //TRANS: %1$s is the description, %2$s is the query, %3$s is the error message\n $message = sprintf(\n __('%1$s - Error during the database query: %2$s - Error is %3$s'),\n $message,\n $insert,\n $this->error()\n );\n if (isCommandLine()) {\n throw new \\RuntimeException($message);\n } else {\n echo $message . \"\\n\";\n die(1);\n }\n }\n return $res;\n }", "title": "" }, { "docid": "51fff4faf17ee70b18fc88af9b74c005", "score": "0.64521223", "text": "public function testInsertInvalidImageTag() {\n\t\t// create a imageTag with a non null tag id and watch it fail\n\t\t$imageTag = new ImageTag(FlekTest::INVALID_KEY, $this->tag->getTagId());\n\t\t$imageTag->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "6e28a55a306b28e44ab6a94e3f22d2f6", "score": "0.64263475", "text": "public function testBeginTransactionException()\n {\n $this->setExpectedException('PDOException');\n\n $this->_object->beginTransaction();\n $this->_object->beginTransaction();\n }", "title": "" }, { "docid": "0c59a83d6ff5c04de45ba1a676d51152", "score": "0.6411535", "text": "public function testPersistWithValidationFailedException(): void\n {\n $this->expectException(EntityValidationFailedExceptionStub::class);\n\n $this->getEntityManager()->persist(new EntityWithValidationStub());\n $this->getEntityManager()->flush();\n }", "title": "" }, { "docid": "8d9465351350a835d520db0fb832611a", "score": "0.6406976", "text": "public function testInsert()\n {\n $inserted = $this->insertData();\n\n $this->assertTrue($inserted);\n\n $pokemonData = array(\n PokemonProfilesContract::COLUMN_NAME => $this->pokemonName,\n );\n\n $this->assertDatabaseHas(PokemonProfilesContract::TABLE_NAME, $pokemonData);\n }", "title": "" }, { "docid": "72bc0b9ebd1fa9fd2e47ab948ea54cfc", "score": "0.6381453", "text": "public function testInsertInvalidImage() {\n//create a Image with a non null image id\n\t\t$image = new Image(PetRescueAbqTest::INVALID_KEY, $this->post->getPostId(),$this->VALID_CLOUD_ID);\n\t\t$image->insert($this->getPDO());\n\n\t}", "title": "" }, { "docid": "d53de6c83d928aa596d0bd51e5a1f065", "score": "0.6379665", "text": "public function testWrongFieldAddException1(): void\n {\n $datasource = new DataSource($this->createDriverMock());\n $this->expectException(DataSourceException::class);\n $datasource->addField('field', 'type');\n }", "title": "" }, { "docid": "1ae74e4ef0aa14cbef03d045b44e185a", "score": "0.63786834", "text": "public function testInsertInvalidEvent(){\n\t\t//create an Event with a non null event id and watch it fail\n\t\t$event = new Event(CrumbTrailTest::INVALID_KEY, $this->truck->getTruckId(), $this->VALID_EVENTEND, $this->VALID_EVENTLOCATION, $this->VALID_EVENTSTART); //again, is truck the right thing to reference here? or should it say getEventTruckId\n\t\t$event->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "b79f886d7544e77001e315202898a797", "score": "0.6378572", "text": "public function testWrongFieldAddException3(): void\n {\n $datasource = new DataSource($this->createDriverMock());\n $this->expectException(DataSourceException::class);\n $datasource->addField('field');\n }", "title": "" }, { "docid": "bcdd325dd5d921537e88c2c44d8e49c0", "score": "0.63625205", "text": "public function testRollback()\n {\n $connection = $this->getQueryBuilderConnection();\n\n $before = $connection->getOneField(\n 'SELECT count(1) AS counter FROM querybuilder_tests',\n [],\n 'counter'\n );\n\n try {\n $connection->transaction(function() use ($connection) {\n $connection\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n 'id' => 1234,\n 'languageId' => 1,\n 'field' => 'pppp',\n ]\n )\n ->execute();\n\n throw new \\Exception('Test exception');\n });\n } catch (\\Exception $e) {\n // It's ok now to not have anything here\n }\n\n $after = $connection->getOneField(\n 'SELECT count(1) AS counter FROM querybuilder_tests',\n [],\n 'counter'\n );\n\n $this->assertEquals($before, $after);\n }", "title": "" }, { "docid": "c28f8717b8101941b04316c2bcaee342", "score": "0.6334693", "text": "public function testRecordInsertion() {\n\n // Get the current count of records\n $query = $this->con->query(\"Select * from blog\");\n $result = $query->fetchAll(PDO::FETCH_COLUMN);\n $prev_count = count($result);\n\n $title = 'Test' . rand();\n $content = 'Test content' . rand();\n $query = $this->con->query(\"insert into blog(id,title,content) values(null,'$title','$content')\");\n\n //Assert the current count\n $query = $this->con->query(\"Select * from blog\");\n $result = $query->fetchAll(PDO::FETCH_COLUMN);\n $this->assertEquals($prev_count + 1, count($result));\n }", "title": "" }, { "docid": "0fb2cc553c5b36f99b341594ab0f0300", "score": "0.6330107", "text": "public function test_insert_fail_4()\n {\n $response = $this->post('/api/product/add', [\n \"name\" => \"name_from_test\",\n \"description\" => \"desc\",\n \"price\" => 51,\n \"image\" => \"\",\n \"categories\" => [1]\n ]);\n\n $response->assertStatus(500);\n }", "title": "" }, { "docid": "e07f9b281db6a6a9d85577a37be303f6", "score": "0.63268137", "text": "public function testCreateInsertStatementOnAlreadyPersistedEntity() \n {\n $entity = new SomeEntity();\n $entity->setId(1337);\n $entity->setAttributeA('foo');\n $entity->setAttributeB('bar');\n $entity->setAttributeC('baz');\n StatementFactory::createInsertStatement(\n EntityMappingsRegistry::getEntityMapping(\n 'TiBeN\\\\Framework\\\\Tests\\\\Fixtures\\\\Entity\\\\SomeEntity'\n ),\n $entity\n );\n }", "title": "" }, { "docid": "7619a0ad1abdbf29fb118260c108ef7b", "score": "0.63262093", "text": "public function testInsertInvalidMessage() {\n\t\t//create message with non-null id, and hope it fails\n\t\t$message = new Message(BreadBasketTest::INVALID_KEY, $this->listing->getListingId(), $this->organization->getOrgId(), $this->VALID_MESSAGE_TEXT);\n\t\t$message->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "14ffa89cde387ec73b15efb0290dde3f", "score": "0.63105696", "text": "public function createInsertWithWrongArgument()\n {\n $this->mySqlQueryBuilder->createInsert(array('foo' => new stdClass()));\n }", "title": "" }, { "docid": "d634f648cfcda535720f8fcc0bb107b6", "score": "0.63055086", "text": "public function testFindWithException()\n {\n $this->expectException(\\Exception::class);\n $this->expectExceptionMessage(\"Can't find SQL statement with ID a.id.that.is.not.available\");\n\n $this->sqlStatementRepository->load('a.id.that.is.not.available');\n }", "title": "" }, { "docid": "0a30968739ff06bd3b23b3fe986c9d30", "score": "0.6274673", "text": "public function testWrongFieldAddException2(): void\n {\n $datasource = new DataSource($this->createDriverMock());\n $this->expectException(DataSourceException::class);\n $datasource->addField('field', '', 'type');\n }", "title": "" }, { "docid": "15bd1021c4236d31168808e0d0bca0cb", "score": "0.6266637", "text": "public function testInsertValidEvent(){\n\t\t//count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"event\");\n\n\t\t//create a new Event and insert into mySQL\n\t\t$event = new Event(null, $this->truck->getTruckId(), $this->VALID_EVENTEND, $this->VALID_EVENTLOCATION,$this->VALID_EVENTSTART); //getTruckId or getEventTruckId??\n\t\t$event->insert($this->getPDO());\n\n\t\t//grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoEvent = Event::getEventByEventId($this->getPDO(), $event->getEventId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"event\"));\n\t\t$this->assertEquals($pdoEvent->getEventTruckId(),$this->truck->getTruckId());\n\t\t$this->assertEquals($pdoEvent->getEventEnd(),$this->VALID_EVENTEND);\n\t\t$this->assertEquals($pdoEvent->getEventLocation(), $this->VALID_EVENTLOCATION);\n\t\t$this->assertEquals($pdoEvent->getEventStart(), $this->VALID_EVENTSTART);\n\t}", "title": "" }, { "docid": "2967d02e51a13a5c9187cd71f243e79a", "score": "0.625809", "text": "public function testLogException()\r\n {\r\n// $user->email = \"test@test.com\";\r\n// $user->password = \"asdf\";\r\n// $user->save();\r\n//\r\n// $project = new Project();\r\n// $project->name = \"demo project\";\r\n// $project->url = \"http://abc.com\";\r\n// $project->project_key = Str::random(64,\"alnum\");\r\n// $project = $user->projects()->insert($project);\r\n\r\n\r\n $this->assertTrue(true);\r\n }", "title": "" }, { "docid": "64f6e486221795eac20d0ea51e13f1f3", "score": "0.6244368", "text": "private function insertRows ()\n {\n $db = $this->getDefaultAdapter();\n $db->query(\"\");\n\n try {} catch (Exception $e) {\n throw new Zend_Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "bf90645ed76f6793a329f78e88f1e9d3", "score": "0.6230442", "text": "public function testSaveExeption()\n {\n $comment = $this->getMockBuilder(\\Magento\\NegotiableQuote\\Api\\Data\\CommentInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n $comment->expects($this->any())->method('getEntityId')->willReturn(1);\n $this->commentResource->expects($this->once())\n ->method('saveCommentData')->willThrowException(new \\Exception());\n $this->logger->expects($this->once())->method('critical');\n $this->expectException(\\Magento\\Framework\\Exception\\CouldNotSaveException::class);\n $this->assertEquals(false, $this->commentRepository->save($comment));\n }", "title": "" }, { "docid": "0079688d5bce20232a3557ab3d5f33ec", "score": "0.6229385", "text": "public function testInsertInvalidCategory() {\n\t\t// create a Category with a non null category id and watch it fail\n\t\t$category = new Category(CartridgeCodersTest::INVALID_KEY, $this->VALID_CATEGORYNAME);\n\t\t$category->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "b9d2e74dc4a8f9d46c449903763f7a0b", "score": "0.62284076", "text": "public function testValidQuestionInsert(){\n\t\t$numRows = $this->getConnection()->getRowCount(\"question\");\n\n\t\t//create the question object\n\t\t$question = new Question(generateUuidV4(), $this->VALID_Question, $this->VALID_QUESTION_ID, $this->VALID_QUESTION_CONTENT, $this->VALID_QUESTION_VALUE);\n\t\t//insert the question object\n\t\t$question->insert($this->getPDO());\n\n\t\t//grab the data from MySQL and enforce that it meets expectations\n\t\t$pdoQuestion = Question::getQuestionByQuestionId($this->getPDO(), $question->getQuestionId());\n\t\t$this->assertEquals($numRows +1, $this->getConnection()->getRowCount(\"question\"));\n\t\t$this->assertEquals($pdoQuestion->getQuestionId(), $question->getQuestionId());\n\t\t$this->assertEquals($pdoQuestion->getQuestionContent(), $question->getQuestionContent());\n\t\t$this->assertEquals($pdoQuestion->getQuestionValue(), $question->getQuestionValue);\n\t}", "title": "" }, { "docid": "4d6dc4393c5fc51c69d16926d0c67b74", "score": "0.62207896", "text": "function testFailsOnException () {\n\t}", "title": "" }, { "docid": "3104ff57d3dbd48b41977eaa1787473a", "score": "0.6217631", "text": "public function testInsertInvalidProfile(): void {\n\t\t// create a Profile with a non null profile id and watch it fail\n\t\t$profile = new Profile(\"5\", $this->district->getDistrictId(), $this->VALID_PROFILE_ACTIVATION_TOKEN, $this->VALID_PROFILE_ADDRESS1, $this->VALID_PROFILE_ADDRESS2, $this->VALID_PROFILE_CITY, null, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_FIRST_NAME, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_LAST_NAME, $this->VALID_PROFILE_RECOVERY_TOKEN, $this->VALID_PROFILE_REPRESENTATIVE, $this->VALID_PROFILE_SALT, $this->VALID_PROFILE_STATE, $this->VALID_PROFILE_USER_NAME, $this->VALID_PROFILE_ZIP);\n\t\t$profile->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "6c9917658516cc2096f587c7684cf1ac", "score": "0.6215534", "text": "public function testInsertInvalidNote() {\n\t\t// create a Note with a non null note id and watch it fail\n\t\t$note = new Note(AaaaTest::INVALID_KEY,$this->VALID_NOTECONTENT, $this->noteType->getNoteTypeId(), $this->application->getApplicationId(), $this->prospect->getProspectId(),$this->VALID_DATE, $this->bridge->getBridgeStaffId());\n\t\t$note->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "ca0149f0e8e2e4e5d3ee413b63a70272", "score": "0.62122697", "text": "public function testInsertInvalidVolunteer() {\n\t\t//create a volunteer with a non null volId and watch it fail\n\t\t$volunteer = new Volunteer(BreadBasketTest::INVALID_KEY, $this->organization->getOrgId(), $this->VALID_EMAIL, $this->VALID_EMAIL_ACTIVATION, $this->VALID_FIRST_NAME, $this->VALID_HASH, $this->VALID_VOL_IS_ADMIN, $this->VALID_LAST_NAME, $this->VALID_PHONE, $this->VALID_SALT);\n\t\t$volunteer->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "abcd5a560db0fb43e005af999d451b56", "score": "0.62055534", "text": "public function test_exception_thrown_when_deleting_bill_fails(): void {\n\t\t$this->table->expects($this->once())->method(\"where\")->willReturnSelf();\n\t\t$this->table->expects($this->once())->method(\"delete\")->willThrowException(\n new Exception(\"test\")\n );\n\n $this->expectException(DatabaseException::class);\n\t\t$this->controller->delete($this->request, $this->response, [\"id\" => null]);\n\t}", "title": "" }, { "docid": "7670317da5263401c840393b8afb1f00", "score": "0.62047064", "text": "public function insertNonEntity()\n {\n $this->dbSerializer->insert($this->mockConnection, new MockNoEntityAnnotationEntity());\n }", "title": "" }, { "docid": "ad4d76a6b5e03b97eb90f7d5db2b87ad", "score": "0.6186038", "text": "public function testFailedConnectionThrowsException()\r\n {\r\n if ( NULL !== self::$db )\r\n {\r\n self::$db->close();\r\n }\r\n\r\n new Database( [ 'handler' => 'sqlite', 'db_name' => NULL ] );\r\n }", "title": "" }, { "docid": "f5e0f780be8c71949717c198032f2439", "score": "0.61843586", "text": "public function testExecuteWithCouldNotSaveException()\n {\n $sharedCatalog = $this->getMockBuilder(\\Magento\\SharedCatalog\\Model\\SharedCatalog::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $exception = new \\Magento\\Framework\\Exception\\CouldNotSaveException(__('exception message'));\n $publicCatalog = $this->prepareExecuteWithExceptions($exception);\n\n $this->duplicatedPublicSharedCatalog->execute($sharedCatalog, $publicCatalog);\n }", "title": "" }, { "docid": "b04ad677dd92eca478fabdea9ebf6199", "score": "0.6176081", "text": "public function testInsertValidFavorite(): void {\n\t\t// count the numbers of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"favorite\");\n\n\t\t// create a new Favorite and insert to into mySQL\n\t\t$favorite = new Favorite($this->post->getPostId(), $this->volunteer->getVolunteerId());\n\t\t$favorite->insert($this->getPDO());\n\n\t// grab the data from mySQL and enforce the fields match our expectations\n\t$pdoFavorite = Favorite::getFavoriteByFavoritePostIdAndFavoriteVolunteerId($this->getPDO(), $this->post->getPostId(),$this->volunteer->getVolunteerId());\n$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"favorite\"));\n$this->assertEquals($pdoFavorite->getFavoritePostId(), $this->post->getPostId());\n$this->assertEquals($pdoFavorite->getFavoriteVolunteerId(), $this->volunteer->getVolunteerId());\n}", "title": "" }, { "docid": "acca059ebce3f378d1c6e924b1624f9c", "score": "0.6173178", "text": "public function testSaveCommentDataException()\n {\n $comment = $this->createMock(\\Magento\\NegotiableQuote\\Model\\Comment::class);\n $this->connection->expects($this->any())\n ->method('insertOnDuplicate')\n ->willThrowException(new \\Exception(''));\n $comment->expects($this->any())->method('getData')->willReturn(['id' => 1, 'comment' => 'submitted']);\n\n $this->expectException(\\Magento\\Framework\\Exception\\CouldNotSaveException::class);\n $this->comment->saveCommentData($comment);\n }", "title": "" }, { "docid": "75c1fe1ca10ed98546689cc79ec33234", "score": "0.616999", "text": "public function testInvalidPrimaryKeyAddition() {\n // Test adding a new invalid field to the primary key.\n $table_name = 'test_table';\n $table_spec = [\n 'fields' => [\n 'test_field' => ['type' => 'int', 'not null' => TRUE],\n ],\n 'primary key' => ['test_field'],\n ];\n $this->schema->createTable($table_name, $table_spec);\n\n $this->expectException(SchemaException::class);\n $this->expectExceptionMessage(\"The 'new_test_field' field specification does not define 'not null' as TRUE.\");\n $this->schema->addField($table_name, 'new_test_field', ['type' => 'int'], ['primary key' => ['test_field', 'new_test_field']]);\n }", "title": "" }, { "docid": "f35686f0c274e7415761fc2d5374e23d", "score": "0.6168672", "text": "public function insert() {\n if(!$this->ttsBeginIsSet) { \n throw new Exception(\"<u>Es wurde keine Transaktion begonnen, daher kann der Datensatz nicht gespeichert werden!</u>\"); \n }\n \n \n if($this->validateWrite()) {\n return $this->doInsert();\n }\n return false;\n }", "title": "" }, { "docid": "7b442457ed0fe15546b00730b2618884", "score": "0.61524314", "text": "public function testInsertValidSocial() : void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"social\");\n\n\t\t$socialId = generateUuidV4();\n\n\t\t$social = new Social( $this->VALID_SOCIAL_ID, $this->VALID_SOCIAL_FOOD_TRUCK_ID_, $this->VALID_SOCIAL_URL);\n\t\t$social->insert($this->getPDO());\n\n\n\t\t// Has syntax errors with colons\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoSocial = Social::getSocialBySocialId($this->getPDO(), $social->getSocialId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"social\"));\n\t\t$this->assertEquals($pdoSocial->getSocialBySocialFoodTruckId(), $socialId());\n\t\t$this->assertEquals($pdoSocial->getSocialBySocialUrl(), $this->VALID_SOCIAL_URL);\n\t}", "title": "" }, { "docid": "fb20fba9abfbd0a73ddb748c9a8bb4f2", "score": "0.6149393", "text": "public function testIsCreatableThrowInvalidArgumentException()\n {\n $this->expectException(\\Xendit\\Exceptions\\InvalidArgumentException::class);\n $params = [\n 'external_id' => 'demo_147580196270'\n ];\n\n EWallets::create($params);\n }", "title": "" }, { "docid": "b0dd7032e99a2f74122fd3cc5fcbd8ab", "score": "0.6122047", "text": "public function testInsertValidProduct() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"product\");\n\n\t\t// create a new Product and insert to into mySQL\n\t\t$product = new Product(null, $this->vendor->getVendorId(), $this->VALID_description, $this->VALID_leadTime, $this->VALID_sku, $this->VALID_title);\n\t\t$product->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoProducts = Product::getProductByProductId($this->getPDO(), $product->getProductId());\n\t\t$this->assertSame($numRows + 1, $this->getConnection()->getRowCount(\"product\"));\n\t\t$this->assertSame($pdoProducts->getVendorId(), $this->vendor->getVendorId());\n\t\t$this->assertSame($pdoProducts->getDescription(), $this->VALID_description);\n\t\t$this->assertSame($pdoProducts->getLeadTime(), $this->VALID_leadTime);\n\t\t$this->assertSame($pdoProducts->getSku(), $this->VALID_sku);\n\t\t$this->assertSame($pdoProducts->getTitle(), $this->VALID_title);\n\t}", "title": "" }, { "docid": "442daaa679a21196f375715ee6e02c14", "score": "0.61210203", "text": "public function testStoreError()\n {\n $routeName = $this->modelPluralName . \".store\";\n $response = $this->post(route($routeName), []);\n $response->assertStatus(Response::HTTP_FOUND);\n $response->assertSessionHasErrors($this->modelFields);\n }", "title": "" }, { "docid": "dc9b055baddd389a4a6bbee58b296213", "score": "0.6116122", "text": "public function testInsertValidAuthor() : void {\n\t\t$numRows = $this->getConnection()->getRowCount(\"author\");\n\n\t\t//insert an author record in the db\n\t\t$authorId = generateUuidV4()->toString();\n\t\t$author = new Author($authorId, $this->VALID_AUTHOR_ACTIVATION_TOKEN, $this->VALID_AUTHOR_AVATAR_URL, $this->VALID_AUTHOR_EMAIL, $this->VALID_AUTHOR_HASH, $this->VALID_AUTHOR_USERNAME);\n\t\t$author->insert($this->getPDO());\n\n\t\t//check count of author records in the db after the insert\n\t\t$numRowsAfterInsert = $this->getConnection()->getRowCount(\"author\");\n\t\tself::assertEquals($numRows + 1, $numRowsAfterInsert);\n\n\t\t//get a copy of the record just inserted and validate the values\n\t\t//make sure the values that went into the record are the same ones that came out.\n\n\n}", "title": "" }, { "docid": "6e1f6a17d03015378bfef74461088b85", "score": "0.6113652", "text": "public function testConnectException()\n {\n $conn = (new Db())->connect('', '');\n }", "title": "" }, { "docid": "a9132067d3c4c445f1d7cea531fe4902", "score": "0.61035234", "text": "public function testInsertValidBeer(): void {\n\t//count the number of rows and save it for later\n\t$numRows = $this->getConnection()->getRowCount(\"beer\");\n\n\t//create a beer and insert it into mySQL\n\t$beerId = generateUuidV4();\n\t$beer = new Beer($beerId,\n\t\t$this->profile->getProfileId(),\n\t\t$this->VALID_BEERABV,\n\t\t$this->VALID_BEERDESCRIPTION,\n\t\t$this->VALID_BEERIBU,\n\t\t$this->VALID_BEERNAME);\n\t$beer->insert($this->getPDO());\n\n\t// grab the data from mySQL and enforce the fields match our expectations\n\t$pdoBeer = Beer::getBeerByBeerId($this->getPDO(), $beer->getBeerId());\n\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"beer\"));\n\t$this->assertEquals($pdoBeer->getBeerId(), $beerId);\n\t$this->assertEquals($pdoBeer->getBeerProfileId(), $this->profile->getProfileId());\n\t$this->assertEquals($pdoBeer->getBeerAbv(), $this->VALID_BEERABV);\n\t$this->assertEquals($pdoBeer->getBeerDescription(), $this->VALID_BEERDESCRIPTION);\n\t$this->assertEquals($pdoBeer->getBeerIbu(), $this->VALID_BEERIBU);\n\t$this->assertEquals($pdoBeer->getBeerName(), $this->VALID_BEERNAME);\n}", "title": "" }, { "docid": "5c223c8b348f1df651f924f31d9de517", "score": "0.6096928", "text": "public function testCreateMethodThrowsExceptionIfSaveFails()\n {\n $id = 'ab43ca3434f324acde';\n $this->modelMock->expects($this->once())\n ->method('save')\n ->will($this->returnValue(false));\n\n $input = [\n 'name' => 'test',\n 'description' => 'A test description'\n ];\n\n $crudService = new CRUDService();\n $crudService->create($this->modelMock, $input, $id);\n }", "title": "" }, { "docid": "9282bb2b3442d7890d7d4944d3058141", "score": "0.60965455", "text": "public function testDatabaseQueryBadStatement() {\n try {\n $db = new \\snac\\server\\database\\DatabaseConnector();\n $db->query(\"NOT A POSTGRES STATEMENT;\", array());\n $this->fail(\"Allowed query a statement that was garbage.\");\n } catch (\\snac\\exceptions\\SNACDatabaseException $e) {\n $message = $e->getMessage();\n $this->assertEquals(\"pg_prepare(): Query failed: ERROR: syntax error at or near \\\"NOT\\\"\\nLINE 1: NOT A POSTGRES STATEMENT;\\n ^\", substr($message, 0));\n }\n\n }", "title": "" }, { "docid": "7fe26044994ba1394b0764bdb05d5846", "score": "0.6082382", "text": "public function test_insert_falla(){\n\t\t$error_esperado = \"Column 'algo' cannot be null\";\n\n\t\t$query = \"insert into test.relacionada2 set algo = null\";\n\t\t$error_actual = $this->dbsetup( $query );\n\t\t\n\t\t$this->assertEquals( $error_esperado, $error_actual, \"cuando se inserta un registro con null deberia fallar\" );\n\t\t\n\t}", "title": "" }, { "docid": "1c8ec2ddecc2c94c03724b7ca0295873", "score": "0.60755306", "text": "public function testValidQuestionInsert(){\n\t\t$numRows = $this->getConnection()->getRowCount(\"question\");\n\n\t\t//create the user object\n\t\t$questionId = generateUuidV4();\n\t\t$question = new Question ($questionId, $this->VALID_QUESTIONCONTENT, $this->VALID_QUESTIONVALUE);\n\t\t//insert the user object\n\t\t$question->insert($this->getPDO());\n\n\n\t\t//grab the data from MySQL and enforce that it meets expectations\n\t\t$pdoQuestion = Question::getQuestionByQuestionId($this->getPDO(), $question->getQuestionId());\n\t\t$this->assertEquals($numRows +1, $this->getConnection()->getRowCount(\"question\"));\n\t\t$this->assertEquals($pdoQuestion->getQuestionId(), $questionId);\n\t\t$this->assertEquals($pdoQuestion->getQuestionContent(),$this->VALID_QUESTIONCONTENT);\n\t\t$this->assertEquals($pdoQuestion->getQuestionValue(), $this->VALID_QUESTIONVALUE);\n\t}", "title": "" }, { "docid": "cf54615c7390b19a472068e137af62f4", "score": "0.60674495", "text": "public function testInsertNotNew()\r\n\t{\r\n\t\t$fk = ForeignKey::model()->findBySql('SELECT * FROM KEY_COLUMN_USAGE '\r\n\t\t. 'WHERE TABLE_SCHEMA = :tableSchema '\r\n\t\t. 'AND TABLE_NAME = :tableName '\r\n\t\t. 'AND COLUMN_NAME = :columnName '\r\n\t\t. 'AND REFERENCED_TABLE_SCHEMA IS NOT NULL', array(\r\n\t\t\t'tableSchema' => 'tabletest',\r\n\t\t\t'tableName' => 'product_order',\r\n\t\t\t'columnName' => 'customer_id'));\r\n\r\n\t\t$fk->insert();\r\n\t}", "title": "" }, { "docid": "efe074e6058f131cbe4a9c5d6a422712", "score": "0.60671866", "text": "public function testInvalidCommand()\n {\n $result = $this->doExecute('xxx');\n $this->assertInstanceOf(\\Exception::class, $result);\n }", "title": "" }, { "docid": "287296708976a5c94bb9070554cc0e44", "score": "0.60637087", "text": "public function testDaoDatabaseInsert()\n\t {\n\t \t$connectionType = \"database\";\n\t \t$testConnection = new TestDao($connectionType);\n\t \t$this->assertEquals($testConnection->getType(), $connectionType);\n\t \t$connectionFlag = true;\n\t \t$testConnection->connect();\n\t \t$this->assertEquals($testConnection->getDB_Connection_Flag(), $connectionFlag);\n\t \t$connectionString = \"This is a database source.\";\n\t \t$this->assertEquals($testConnection->getConnection(), $connectionString);\n\t \t$testConnection->insert();\n\t \t$connectionString = \"Database insert method not complete.\";\n\t \t$this->assertEquals($testConnection->getConnection(), $connectionString);\n\t \t$result = null;\n\t \t$testResultDelete = $testConnection->getResult();\n\t \t$this->assertEquals($testResultDelete, $result);\n\t \t\n\t }", "title": "" }, { "docid": "7668673edd8c6bc75ca384c2be5d2960", "score": "0.6054564", "text": "public function testInsertValidVendor() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"vendor\");\n\n\t\t// create a new Vendor and insert to into mySQL\n\t\t$vendor = new Vendor (null, $this->VALID_contactName, $this->VALID_vendorEmail, $this->VALID_vendorName, $this->VALID_vendorPhoneNumber);\n\t\t$vendor->insert($this->getPDO());\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoVendor = Vendor::getVendorByVendorId($this->getPDO(), $vendor->getVendorId());\n\t\t$this->assertSame($numRows + 1, $this->getConnection()->getRowCount(\"vendor\"));\n\t\t$this->assertSame($pdoVendor->getContactName(), $this->VALID_contactName);\n\t\t$this->assertSame($pdoVendor->getVendorEmail(), $this->VALID_vendorEmail);\n\t\t$this->assertSame($pdoVendor->getVendorName(), $this->VALID_vendorName);\n\t\t$this->assertSame($pdoVendor->getVendorPhoneNumber(), $this->VALID_vendorPhoneNumber);\n\t}", "title": "" }, { "docid": "9d2aeeb6dc08c29fb11ff1fd891d0653", "score": "0.6053799", "text": "public function tryInsert($table = 'test_table') {\n try {\n $this->connection\n ->insert($table)\n ->fields(['id' => mt_rand(10, 20)])\n ->execute();\n return TRUE;\n }\n catch (\\Exception $e) {\n return FALSE;\n }\n }", "title": "" }, { "docid": "e392453a184cc2f3beca631d4cfb7189", "score": "0.6052181", "text": "public function test_ShouldThrowException_IfWarehouseDoesntExists()\n {\n $response = $this->updateWarehouse(-1);\n $this->assertError($response, 500);\n }", "title": "" }, { "docid": "769380ae0e9b3e28460d5d3933d4481b", "score": "0.60507566", "text": "public function testInsertValidImage() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"image\");\n\n\t\t// create a new Image and insert into mySQL\n\n\t\t$image = new Image(null, $this->post->getPostId(), $this->VALID_CLOUD_ID);\n\t\t//$var_dump($image);\n\t\t$image->insert($this->getPDO());\n\n\t\t// GET THE DATA from mysql and ensure they match\n\t\t$pdoImage = Image::getImageByImageId($this->getPDO(), $image->getImageId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"image\"));\n\t\t$this->assertEquals($pdoImage->getImagePostId(), $this->post->getPostId());\n\t\t$this->assertEquals($pdoImage->getImageCloudinaryId(), $this->VALID_CLOUD_ID);\n\n\n\t}", "title": "" }, { "docid": "54e735820c06fa74f5a744802ca967f5", "score": "0.6050383", "text": "public function testInsertCar()\n {\n $data = array(\n 'make' => 'honda',\n 'model' => 'pilot',\n 'year' => '2006',\n\n );\n\n DB::table('car')->insert($data);\n\n //DB::table('car')->where('make', 'honda')->delete();\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "fed048476a6714205fa1a6282a289cf5", "score": "0.60473686", "text": "public function testInsertToTable()\n {\n $this->assertEquals(0, $this->manager->count('Artist', 'slug=\"insert-table-test\"'));\n \n $id = $this->manager->insert('Artist', array(\n 'name'=>'Insert Table Test',\n 'slug'=>'insert-table-test',\n 'artistTypeId'=>1,\n ));\n \n $this->assertGreaterThan(0, $id);\n \n $this->assertEquals(1, $this->manager->count('Artist', 'slug=\"insert-table-test\"'));\n }", "title": "" }, { "docid": "59bb46f380993af35bd206299400b06a", "score": "0.60465044", "text": "public function testInsert()\n {\n $log = new Log();\n $log->token = $this->addToken();\n $log->resource = ' * <br> ';\n\n $this->em->persist($log);\n $this->em->flush();\n\n $this->assertEquals(1, $log->id);\n }", "title": "" }, { "docid": "253b38972ef2017c36f0d7352aecbc17", "score": "0.603888", "text": "public function insert() {\n $this->isEphemeralCheck();\n return $this->insertRecordIntoDatabase('INSERT');\n }", "title": "" }, { "docid": "1b1b63f87a83fe9a5dbf64111faa36c0", "score": "0.6033533", "text": "public function testRollBackException()\n {\n $this->setExpectedException('PDOException');\n\n $this->_object->rollBack();\n }", "title": "" }, { "docid": "929947d1d5b7f40624271297b8239b62", "score": "0.60232186", "text": "public function testModelThrowingQueryExceptionRethrowsRuntimeException()\n {\n $id = 'ab43ca3434f324acde';\n\n $input = [\n 'name' => 'Test',\n 'description' => 'Test description'\n ];\n\n $this->modelMock->expects($this->once())\n ->method('save')\n ->will($this->throwException(new \\Illuminate\\Database\\QueryException('test', [], new \\Exception)));\n\n $crudService = new CRUDService();\n $crudService->create($this->modelMock, $input, $id);\n }", "title": "" }, { "docid": "2697c0624746dddd21f23a4915804d56", "score": "0.6021682", "text": "public function testInsertValidMessage() {\n\t\t//get the count of the number of rows in the database\n\t\t$numRows = $this->getConnection()->getRowCount(\"message\");\n\n\n\t\t//create a new message and insert into mySQL\n\t\t$message = new Message(null, $this->listing->getListingId(), $this->organization->getOrgId(), $this->VALID_MESSAGE_TEXT);\n\t\t$message->insert($this->getPDO());\n\n\t\t//grab data from SQL and ensure it matches\n\t\t$pdoMessage = Message::getMessageByMessageId($this->getPDO(), $message->getMessageId());\n\t\t$this->assertSame($numRows + 1, $this->getConnection()->getRowCount(\"message\"));\n\t\t$this->assertSame($pdoMessage->getListingId(), $this->listing->getListingId());\n\t\t$this->assertSame($pdoMessage->getOrgId(), $this->organization->getOrgId());\n\t\t$this->assertSame($pdoMessage->getMessageText(), $this->VALID_MESSAGE_TEXT);\n\t}", "title": "" }, { "docid": "b4152dff47a9c7eb1806bef8fe62de70", "score": "0.6014142", "text": "public function testExceptionWillOccurWhenSqlExecutionFailedWhenInvokingEnqueue()\n {\n $pdo = $this->getMockOfPDOToFailExecution(array('ABCDE', 99, \"Mock Error Code\"));\n $q4m = $this->getMock(\"Siny\\Q4MBundle\\Queue\\Q4M\", array(\"getPDO\"), array($GLOBALS['SinyQ4MBundle_DSN'], $GLOBALS['SinyQ4MBundle_USER'], $GLOBALS['SinyQ4MBundle_PASSWORD']));\n $q4m->expects($this->any())->method(\"getPDO\")->will($this->returnValue($pdo));\n $q4m->enqueue($this->getTableName(), $this->getFixtureRow(0));\n }", "title": "" }, { "docid": "65fe9272b2dc1954a4b697b8c5e9858e", "score": "0.60092044", "text": "public function testInsert()\n {\n $user= new User();\n $user->name='Tom';\n $user->email='123@mail.com';\n $user->password='123';\n\n $this->assertTrue($user->save());\n }", "title": "" }, { "docid": "841f1ec808ec8f1d66bdf10661d11364", "score": "0.5985203", "text": "public function testInsertInvalidMail(){\n\t\t//create a message with a non null id and watch it fail\n\t\t$mail = new Mail(FlekTest::INVALID_KEY, $this->VALID_MAILSUBJECT, $this->mailSenderId->getProfileId(),$this->mailReceiverId->getProfileId(), $this->VALID_MAILGUNID, $this->VALID_MAILCONTENT);\n\t\t$mail->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "36aab36996d05a83ca42ec7c9c4cf550", "score": "0.5982353", "text": "public function testInsertValidEventImage(): void {\n\t\t$numRows = $this->getConnection()->getRowCount(\"eventImage\");\n\n\t\t// create a new eventImage and insert to into mySQL\n\t\t$eventImage = new EventImage($this->event->getEventId(), $this->image->getImageId());\n\n\t\t//var_dump($eventImage);\n\t\t$eventImage->insert($this->getPDO());\n\n // grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoEventImage = EventImage::getEventImageByEventImageEventIdAndEventImageImageId($this->getPDO(), $this->event->getEventId(), $this->image->getImageId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"eventImage\"));\n\t\t$this->assertEquals($pdoEventImage->getEventImageEventId(), $this->event->getEventId());\n\t\t$this->assertEquals($pdoEventImage->geteventImageImageId(), $this->image->getImageId());\n\t}", "title": "" }, { "docid": "fe0748a59a683ab22486fd56a5cd7989", "score": "0.59781706", "text": "public function testMigrateToNonExistantNumber(): void\n {\n $migrationTableRows = [\n ['migration_number' => 1],\n ];\n $this->mockDb->expects($this->any())->method('fetchRows')->willReturn($migrationTableRows);\n\n $this->expectException(\\InvalidArgumentException::class);\n $this->migrator->migrate(3);\n }", "title": "" }, { "docid": "0e00c80adb18d4517c72f0de191c0e09", "score": "0.5973628", "text": "public function testInsertInvalidRsvp() {\n\t\t// create a Invitee with a non null invitee id and watch it fail\n\t\t$rsvp = new Rsvp(InvitersvpTest::INVALID_KEY, $this->invitee->getInviteeId(), $this->VALID_RSVPBROWSER, $this->VALID_RSVPCOMMENT, $this->VALID_RSVPIPADDRESS, $this->VALID_RSVPNUMPEOPLE);\n\t\t$rsvp->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "d5edfb05f1ebb9c8cceb8afb86e8a3ee", "score": "0.5969012", "text": "public function testInsertValidProfile() : void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t$profile = new Profile($this->VALID_PROFILEID, $this->VALID_PROFILENAME, $this->VALID_PROFILESERVICE);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoProfile = Profile::getProfileByProfileId($this->getPDO(), $profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profile->getProfileId());\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $profile->getProfileName());\n\t\t$this->assertEquals($pdoProfile->getProfileService(), $profile->getProfileService());\n\t}", "title": "" }, { "docid": "59d08b6e9a6e3bbb9552b0b3f811058b", "score": "0.59673315", "text": "public function testMakeExpectedException()\n\t{\n\t\t\\Hybrid\\Memory::make('orm');\n\t}", "title": "" }, { "docid": "1ff08affe55a6f2eabf5a9a81ca1ec79", "score": "0.5966077", "text": "public function testInsertInvalidApplicationCohort() {\n\t\t// create a Placard with a non null applicationCohort id and watch it fail\n\t\t$placard = new ApplicationCohort(AaaaTest::INVALID_KEY, $this->application->getApplicationId(), $this->cohort->getCohortId());\n\t\t$placard->insert($this->getPDO());\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "3c84ada6b5a8d5af726332ddbbb9c053", "score": "0.0", "text": "public function create()\n {\n $user = Auth::user();\n if (!$user->is_admin){\n return response()->json(['message'=>'Only administrators can create a new skill.', 'code'=>403],403);\n }\n\n return response()->json(['message' => 'Skill create.', 'statuses'=>\\App\\Status::all(), 'my_tracks'=>$user->tracks, 'public_tracks'=>Track::all(), 'code'=>201]);\n\n }", "title": "" } ]
[ { "docid": "643f51843534c99b002271c413f71061", "score": "0.7148004", "text": "public function store()\n {\n $this->storage->set($this);\n\n }", "title": "" }, { "docid": "aba977442c12d8193d7ce12cb2a46e96", "score": "0.6693617", "text": "public function store ()\n {\n $this->_update_login ();\n $this->_pre_store ();\n\n if ($this->exists ())\n {\n $this->_update ();\n }\n else\n {\n $this->_create ();\n }\n }", "title": "" }, { "docid": "75600e5d65c2156987ff7cb140e14a4b", "score": "0.6623036", "text": "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6427309", "text": "public function save($resource);", "title": "" }, { "docid": "9181113e9ca478f57b376bb60189432a", "score": "0.6394535", "text": "public function store()\n\t{\n\t\t//\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules);\n\n\t\tif($validator->passes()){\n\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t$constrain->aspectRatio();\n\t\t\t})->save($destinationPath . $fileName);\n\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t$inputs['image'] = $fileName;\n\t\t\t\\App\\Resource::create($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63650924", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "bd7a2528e89d1c3f43656fa9d3a11bc3", "score": "0.63577664", "text": "public function store(StoreResourceRequest $request): JsonResponse\n {\n $resource = new Resource;\n $resource->fill($request->all());\n if ($request->has('url')) {\n $resource->url = $request->file('url')->store('articles', 'article');\n }\n $resource->saveOrFail();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "af1871e1a1f1d758082bcf4ebeab10eb", "score": "0.6356544", "text": "public function saveStorage()\n {\n $this->storage->save($this->getProduct());\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6341731", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
0ff910974d63645c64947083ef0e47db
Return how many artworks this file is part of
[ { "docid": "d083da461360af66e2cf97a47d914a64", "score": "0.7188781", "text": "public function countParentArtworks()\n {\n return count($this->_parentartworks);\n }", "title": "" } ]
[ { "docid": "35f86e9c12202f2c8c97900151a761a3", "score": "0.64777946", "text": "public function count() {\n return count($this->_parts);\n }", "title": "" }, { "docid": "b57965a52ba21c78920134b3c0e913a0", "score": "0.63956785", "text": "protected function getPartsNumber()\n {\n return count($this->explodeParts($this->get()));\n }", "title": "" }, { "docid": "2bc9ebb22892ec8b7232e9e9b7d2a4e3", "score": "0.628614", "text": "public function count()\n {\n return count($this->_contents);\n }", "title": "" }, { "docid": "087e153172addb511d0c419fcf1c701b", "score": "0.6165065", "text": "public function count()\n {\n $count = 0;\n if ($this->content()->has('folders')) {\n $count = $this->content()->get('folders')->count();\n }\n if ($this->content()->has('files')) {\n $count = $this->content()->get('files')->count();\n }\n return $count;\n }", "title": "" }, { "docid": "b33e4fae0a238aeb2fbc609a8906bd8c", "score": "0.6097726", "text": "public function imagesCount() {\n\t\treturn count($this->chapterImages());\n\t}", "title": "" }, { "docid": "8ce0e9630a9ffa221ea6d840630763ec", "score": "0.6096319", "text": "function count_contents() \r\n\t{ \r\n\t\t$total_items = 0;\r\n\t\tif (is_array($this->contents)) \r\n\t\t{\t\t\t\t\r\n\t\t\tforeach ($this->contents as $product_id=>$product) \r\n\t\t\t{\r\n\t\t\t\tif ($product_id == -1)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\r\n\t\t\t\tforeach ($product[\"color\"] as $color=>$quantity)\r\n\t\t\t\t\t$total_items += $quantity;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $total_items;\r\n }", "title": "" }, { "docid": "034275f75405f975588302d472f4241a", "score": "0.6090185", "text": "public function getNumberImages () {}", "title": "" }, { "docid": "5aece4e8b82bd6083c21caf07d9e62fe", "score": "0.6049103", "text": "function getNumFiles() {\n return $this->num_files;\n }", "title": "" }, { "docid": "916fabce99da01092748ea61902f384d", "score": "0.60239905", "text": "function count_contents() {\n\t\t$total_items = 0;\n\t\tif (is_array($this->contents)) {\n\t\t\treset($this->contents);\n\t\t\twhile (list($products_id, ) = each($this->contents)) {\n\t\t\t\t$total_items += $this->get_quantity($products_id);\n\t\t\t}\n\t\t}\n\t\treturn $total_items;\n\t}", "title": "" }, { "docid": "d7b7b59013a647d79df03526e9f63a26", "score": "0.6023897", "text": "public function getContentsCount() {\n return $this->count(self::CONTENTS);\n }", "title": "" }, { "docid": "d7b7b59013a647d79df03526e9f63a26", "score": "0.6023897", "text": "public function getContentsCount() {\n return $this->count(self::CONTENTS);\n }", "title": "" }, { "docid": "398674592d107b6b6f74e084ecdb6cc4", "score": "0.6023236", "text": "public function count(): int\n\t{\n\t\treturn $this->stories->count() ?? 0;\n\t}", "title": "" }, { "docid": "bb94104dcb0caf7051656b294e718267", "score": "0.6015792", "text": "public function getNumberImages() {\n\t}", "title": "" }, { "docid": "67a4ccbeaed89c98e49c757c9fee321b", "score": "0.5965794", "text": "public function get_number_of_thematics()\n {\n $tbl_thematic = Database :: get_course_table(TABLE_THEMATIC);\n $condition_session = '';\n if (!api_get_session_id()) {\n $condition_session = api_get_session_condition(0);\n }\n $course_id = api_get_course_int_id();\n $sql = \"SELECT COUNT(id) AS total_number_of_items\n\t\t FROM $tbl_thematic\n WHERE c_id = $course_id AND active = 1 $condition_session \";\n $res = Database::query($sql);\n $obj = Database::fetch_object($res);\n\n return $obj->total_number_of_items;\n }", "title": "" }, { "docid": "c13f2034a23dde1a668997a6d9bc8dbf", "score": "0.59534234", "text": "public function getFileCount()\n {\n return $this->count(self::FILE);\n }", "title": "" }, { "docid": "52e3a524c12f515c33e11bf3022654cd", "score": "0.5931188", "text": "protected function getTotalEntities()\n\t{\n\t\treturn blx()->assets->getTotalFiles($this);\n\t}", "title": "" }, { "docid": "d57937e957ac04c1c7709fcc288debe3", "score": "0.5883382", "text": "public function getImagel1c3Count() {\n return $this->count(self::IMAGEL1C3);\n }", "title": "" }, { "docid": "5133c0f4bac521a47e7d71dc1a3462fb", "score": "0.5879932", "text": "public function getSavesCount()\n {\n return $this->count(self::SAVES);\n }", "title": "" }, { "docid": "a11cf213def9bbeac37822d436ea7a7d", "score": "0.58673435", "text": "public function count_spec_items()\n {\n $this->db->from('specs');\n\n return $this->db->count_all_results();\n }", "title": "" }, { "docid": "c8c3887874733efe6a8e61efc097c5cd", "score": "0.5864342", "text": "public function countofexercisesets()\n {\n $count = $this->exercisesetsfilter()->count();\n return $count;\n }", "title": "" }, { "docid": "87079fab53d3fc2f36322c1368c79f39", "score": "0.5859994", "text": "public function my_count() {\n\t\t$path = dirname(dirname(__DIR__)) .'/assets/img/uploads';\n\t\t$main = scandir($path);\n\t\tunset($main[0]);\n\t\tunset($main[1]);\n\t\t$counter = 0;\n\n\t\tforeach($main as $k => $v) {\n\t\t\t$child = scandir($path .\"/\".$v);\n\t\t\tforeach($child as $val) {\n\t\t\t\t\n\t\t\t\tif($val != '.' && $val != '..' && $val != '.keep') {\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo \"total images : \". $counter;\n\t\techo \"<br>\";\n\t\techo \"total table records : \" . $this->recipies->total_rows();\n\n\t}", "title": "" }, { "docid": "d2fa2391a86d88aa408cf00322944430", "score": "0.58308095", "text": "public function getNumberOfArticles();", "title": "" }, { "docid": "3142bf134a82cf7636a001859cafb9df", "score": "0.58113885", "text": "public function countFileArray()\n\t{\n\t\treturn intval( count( $this->_fileArray ) );\n\t}", "title": "" }, { "docid": "250ca07abf758eba8e3cfaa88dc79e35", "score": "0.5810399", "text": "public function howMany()\n\t{\n\t\t$spreadsheets = $this->sFileRepo->getPublicSpreadsheetsWithoutSCoreRelation();\n\t\t$pdfs = $this->sFileRepo->getPublicPdfs();\n\n\t\t$counter = 0;\n\n\t\tforeach ($pdfs as $key => $pdf) {\n\t\t\t$flag = false;\n\n\t\t\tforeach ($spreadsheets as $key => $spreadsheet) {\n\t\t\t\tif($pdf->getDiagnosisOf() == $spreadsheet->getDiagnosisOf()) {\n\t\t\t\t\t$flag = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($flag === false) {\n\t\t\t\t// Only get ASS, SUBASS & GRPT levels (upper levels may not contain descriptions tables)\n\t\t\t\tif(($pdf->getSyntaxonCore()->getLevel() == 'ASS') ||\n\t\t\t\t ($pdf->getSyntaxonCore()->getLevel() == 'SUBASS') ||\n\t\t\t\t ($pdf->getSyntaxonCore()->getLevel() == 'GRPT')) {\n\t\t\t\t\t\n\t\t\t\t\t$counter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $counter;\n\t}", "title": "" }, { "docid": "9cb85c3197cd7a6a9fb0ff7637cf6ae2", "score": "0.579022", "text": "public function size()\n {\n return \\count($this->arrFiles);\n }", "title": "" }, { "docid": "34e6e51554c184d44dd313aa370bf679", "score": "0.5783448", "text": "public function getFileCount()\n {\n return count($this->files);\n }", "title": "" }, { "docid": "18153dfae820d4c83ea61c57f69c0314", "score": "0.5781497", "text": "public static function count()\n\t{\n\t\treturn count($this->filesystem->allFiles('/'));\n\t}", "title": "" }, { "docid": "8827461fb8e94c592824666aea8636cd", "score": "0.57604164", "text": "public function getLibraryContentCount()\n {\n // TODO: Implement getLibraryContentCount() method.\n return 0;\n }", "title": "" }, { "docid": "55c8afb5925661eca1ebb8f241863c42", "score": "0.5760213", "text": "public function getNbSketches() {\n return $this->sketches->count();\n }", "title": "" }, { "docid": "57aa462b1eb10fee6c1ae417430ab712", "score": "0.57414603", "text": "function hasArtwork()\n {\n if (!empty($this->_parentartworks))\n { \n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "bf3250b5b34cd92cef9fbd31072a8f04", "score": "0.5729288", "text": "public function countParts() {\n\n foreach($this->product_references->getParts() as $key => $part) {\n $part_counter = 0;\n\n foreach($this->conveyor as $key => $slot) {\n if($slot['part'] == $part) {\n $part_counter++;\n }\n\n }\n\n $result[$part] = $part_counter;\n }\n\n return $result;\n }", "title": "" }, { "docid": "aba6ee04e696dc1732068a8df8558db2", "score": "0.56989145", "text": "public function dimensions(): int;", "title": "" }, { "docid": "a82fe6f80480b8af54df9b98e7bb0d87", "score": "0.5688868", "text": "public function count()\n {\n return sizeOf($this->_legs);\n }", "title": "" }, { "docid": "573f5e01b5e158fe0330d58bc4e187aa", "score": "0.56813765", "text": "public function getWidth() : int\n {\n return $this->file->getWidth();\n }", "title": "" }, { "docid": "183e6fb3e3fffed8863319bc38d5aa78", "score": "0.5673798", "text": "public static function getNumberCatWithArt(){\n return Article::groupBy('categorie_id')\n ->get()\n ->count();\n }", "title": "" }, { "docid": "6d6975d7b456b3b6392e7f17b438e5b8", "score": "0.5673067", "text": "function word_count() {\n ob_start();\n the_content();\n $content = ob_get_clean();\n return sizeof(explode(\" \", $content));\n}", "title": "" }, { "docid": "b71bb64d5502643ad18ef670dd5ca38c", "score": "0.56711924", "text": "function numEntries()\r\n\t{\r\n\t\treturn count($this->getEntries());\r\n\t}", "title": "" }, { "docid": "94ad2ea78e0a471f1fe65973a0132312", "score": "0.56613207", "text": "public function count(): int\n {\n return count($this->collections);\n }", "title": "" }, { "docid": "87d017b354bdd3ebc2311dba5cf76195", "score": "0.5654781", "text": "public function getCartCount() {\n\t\t\t$count = 0;\n\t\t\tif($this->contents != null){\n\t\t\t\tforeach($this->contents as $c){\n\t\t\t\t\t$count += $c->getCount();\n\t\t\t\t}\n\t\t\t} else $count = -1;\n\t\t\treturn $count;\n\t\t}", "title": "" }, { "docid": "bda804bfd21eaff85758d80247a87d90", "score": "0.5652594", "text": "public function count() {\n return $this->getSize();\n }", "title": "" }, { "docid": "56a8360f7601755996124027d7ec9ce5", "score": "0.5643756", "text": "public function countImage()\n\t{\n\t\treturn $this->find(\n\t\t\t\t'//div[contains(@id,\"carousel-thumb\")]' .\n\t\t\t\t'/div[contains(@class,\"thumbnail\")]'\n\t\t\t)->length;\n\t}", "title": "" }, { "docid": "7a5cc909100d415cca2e0e87ddc95bf2", "score": "0.5643286", "text": "public function count(): int\n {\n return count($this->_paths);\n }", "title": "" }, { "docid": "0172385bcc3e6e5ded47560bdab36f81", "score": "0.5633059", "text": "public function count()\n {\n return $this->resolution;\n }", "title": "" }, { "docid": "1fe68e569aa47651e8d1a1b1f7438ff0", "score": "0.5630924", "text": "public function size()\n {\n return Operations::size($this->getArcs());\n }", "title": "" }, { "docid": "d944a6a0351740e1e81009cbb3cbb937", "score": "0.5627562", "text": "public function count()\n {\n return count($this->load());\n }", "title": "" }, { "docid": "98434817b435b1787effece5d5d3a9e7", "score": "0.56194717", "text": "public function getNumberOfEntries() {\n return $this->entries;\n }", "title": "" }, { "docid": "6b02ceb98c6ad54cb2c3c80a69dd93cb", "score": "0.5609417", "text": "public function count()\n {\n return $this->isDir()\n ? count(array_slice(scandir($this->path), 2))\n : count($this->toArray());\n }", "title": "" }, { "docid": "0041ded32c3f735ff3b0586172a9ba58", "score": "0.5606316", "text": "public static function countFiles()\n {\n return self::instance()->countFiles();\n }", "title": "" }, { "docid": "418c30882c7b9bd8fc6ac0ff3e35ed76", "score": "0.5591301", "text": "public function count() {\n return count($this->_icons);\n }", "title": "" }, { "docid": "23c69b0ae1cda241326851f1980f0890", "score": "0.55912393", "text": "public function getEmotionWorldCount();", "title": "" }, { "docid": "f74042dfa2b371082aa4baf8b7c376d9", "score": "0.55901265", "text": "public function getNumWordsContent() {\n\t\treturn str_word_count((Convert::xml2raw($this->owner->Content))); \n\t}", "title": "" }, { "docid": "36ef20248b7034a61b1025793be4fe49", "score": "0.55738086", "text": "function questionCount()\r\n\t{\r\n\t\t$count = 0;\r\n\t\t$q = fopen($this->question_file, \"r\");\r\n\r\n\t\tif(!$q) {\r\n\t\t\techo \"Captcha plugin: Can't open captcha questions file $this->question_file.\";\r\n\r\n\t\t\treturn 0; // Oops\r\n\t\t}\r\n\r\n\t\twhile($line = fgets($q))\r\n\t\t\tif(!strcmp(trim($line), \"--\"))\r\n\t\t\t\t$count++;\r\n\r\n\t\tfclose($q);\r\n\r\n\t\treturn $count;\r\n\t}", "title": "" }, { "docid": "e780bc1930b41ec4fd3eb9dcf7dbc2f6", "score": "0.55723697", "text": "public function count() {\n\t\treturn count($this->readDirectory(null, true));\n\t}", "title": "" }, { "docid": "f6376cf351a079bf9adee3496d6f5cd8", "score": "0.55709237", "text": "public function getIclidedFilesCount(): int\n {\n return $this->startIncludedFiles - $this->endIncludedFiles;\n }", "title": "" }, { "docid": "e5298f4f4bb6afb873dc7cc84e2ef178", "score": "0.55685383", "text": "public function get_articles_number(){\n\t\treturn $this->table_rows(Tables::articles());\n\t}", "title": "" }, { "docid": "bc5317964c6f5341222cf6566fbed824", "score": "0.55474144", "text": "public function getSize()\n {\n return count($this->stones);\n }", "title": "" }, { "docid": "7156e5f49fff1851a6094c472adca274", "score": "0.55430025", "text": "protected function getTotalLine()\n {\n exec(\n \"find ./repo/$this->projectId -name \\\"*\\\" \" .\n \"-path \\\"*.hg\\\" -prune -o -name \\\"*\\\" \" .\n \"-path \\\"*.svn\\\" -prune -o -name \\\"*\\\" \" .\n \"-path \\\"*.git\\\" -prune -o -name \\\"*\\\"\",\n $fileList\n );\n \n $count = 0;\n foreach ($fileList as $file) {\n if (is_file($file) === true) {\n exec(\"wc -l $file\", $arr);\n $out = explode(\" \", $arr[0]);\n $count += (int)$out[0];\n $arr = null;\n }\n }\n return $count;\n }", "title": "" }, { "docid": "8f576674f314e670c53f302b314dec99", "score": "0.55422294", "text": "public function getNbArticles()\n\t{\n\t\t\t$nb_articles = 0;\n\t\t\tforeach ($this->articles as $article){\n\t\t\t\t$nb_articles += $article->getQuantite();\n\t\t\t}\n\t\t\treturn $nb_articles;\n\t}", "title": "" }, { "docid": "6d8bc0dcbb65c48379a3ff9eb491d5c6", "score": "0.55331707", "text": "public function GetObjectCounts()\n {\n return count($this->asteroids) + 1;\n }", "title": "" }, { "docid": "6a85f25456fdbba1184a0f550a2599db", "score": "0.5531312", "text": "function countLines()\n {\n return count(file($this->file));\n }", "title": "" }, { "docid": "0d9eb1725a2201ff1e017cf83782aff8", "score": "0.5528482", "text": "public function getAttachmentCount()\n {\n return count($this->attachmentParts);\n }", "title": "" }, { "docid": "acc51441b187577c09d3d5cf3964ed56", "score": "0.55282885", "text": "public function getNumberOfPages()\n {\n return $this->imagickDocument->getNumberImages();\n }", "title": "" }, { "docid": "5f27869a8002315fe4986222f047f583", "score": "0.55221707", "text": "function countArticles() {\n if (isset($_SESSION['cart']))\n return count($_SESSION['cart']['labelProduct']);\n else\n return 0;\n }", "title": "" }, { "docid": "1f111cf89bb91dfd466022ad9e46f744", "score": "0.5508371", "text": "function tify_wc_cart_contents_count()\n {\n /** @var Functions $functions */\n $functions = app()->get('woocommerce.functions');\n\n return $functions->cartContentsCount();\n }", "title": "" }, { "docid": "c8e08a0d18e2bf955534c14c89d62d01", "score": "0.5507063", "text": "function countPaths() {\n $paths = $this->getPaths();\n return (int) count($pats);\n }", "title": "" }, { "docid": "3893cb4fdf5d25c39edf259f0a5ce9a9", "score": "0.5485837", "text": "function size() {\r\n\t\treturn count ( $this->triples );\r\n\t}", "title": "" }, { "docid": "068fe93f8a513dc3fdae55de709fed57", "score": "0.5480984", "text": "public function count(): int\r\n {\r\n return $this->getLength();\r\n }", "title": "" }, { "docid": "3318f6f3ac70139b20766377cbf816d5", "score": "0.5479958", "text": "public function numTextures() { return $this->_m_numTextures; }", "title": "" }, { "docid": "84e6bbcc8cf0ccafa311722f4e1adbaa", "score": "0.54769963", "text": "public function countSteps() {\n if ($this->cached) {\n $pattern =\"/^\" . $this->run . \"_Cached_([0-9]+_)?IEWPG.txt/\";\n } else {\n $pattern =\"/^\" . $this->run . \"_([0-9]+_)?IEWPG.txt/\";\n }\n $files = scandir($this->testRoot);\n $steps = 0;\n foreach ($files as $file) {\n if (preg_match($pattern, $file)) {\n $steps++;\n }\n }\n return $steps;\n }", "title": "" }, { "docid": "c7af546942ac3a62552c816be34069d6", "score": "0.54757154", "text": "public function getSize()\n {\n $size = 0;\n $this->loadItems();\n foreach ($this->items as $item) {\n $size += $item->getSize();\n }\n\n return $size;\n }", "title": "" }, { "docid": "4828f51e9ff592db3724c85b5ce267c4", "score": "0.54671806", "text": "public function countItems() {\n\t\tparent::countItems();\n\n\t\t$sql = \"SELECT\t\tCOUNT(*) AS count \n\t\t\tFROM\t\twcf\".WCF_N.\"_group\n\t\t\tNATURAL JOIN \twcf\".WCF_N.\"_projectSvn \";\n\t\t$row = WCF::getDB()->getFirstRow($sql);\n\n\t\treturn $row['count'];\n\t}", "title": "" }, { "docid": "e071949e97c5db22bb974462bc59b936", "score": "0.5466983", "text": "public function getObjectCount()\n {\n return $this->metadata->getProperty('Object-Count');\n }", "title": "" }, { "docid": "8e2ab8d892af0abcbfcfa657a6a307c6", "score": "0.54666954", "text": "function getNumberOfUploadFiles() {\n\t\t$ini_array = parse_ini_file ( \"config/dinamo.ini\" );\n\t\t$numFiles = $ini_array [\"number_of_images\"];\n\t\treturn $numFiles;\n\t}", "title": "" }, { "docid": "1148e6d51bf32e9c51a0d35aa7b9c0be", "score": "0.5465555", "text": "public function count(){\n\t\treturn count($this->words);\n\t}", "title": "" }, { "docid": "b6d246858984c2d57fb3cb4cc1738df3", "score": "0.5464823", "text": "function getTotalNumObjects()\r\n\t{\r\n\t\treturn $this->numTotalObjects;\r\n\t}", "title": "" }, { "docid": "d42164ad005c5ce13f110ca233f1eac6", "score": "0.5460738", "text": "public function numChildren()\n\t{\n\t\tif ($this->cmisObject) {\n\t\t\tif ($this->cmisObject->BaseType == 'document') {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\n\t\t// if it's not a document, then lets return an arbitrary number\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "701f5c64de4193fe6eeddacb3b01d4e6", "score": "0.54595816", "text": "public function getImagePageCount()\n {\n return $this->_imagick->getNumberImages();\n }", "title": "" }, { "docid": "d82e05cc827107f0a47e7ebeca38e45c", "score": "0.545225", "text": "public function getLength()\n {\n return count($this->getMatchedPaths());\n }", "title": "" }, { "docid": "fba1b4dfa3100de30b722050a4b64981", "score": "0.5451953", "text": "public function size(): int {\n $properties = $this->loadProperties();\n return count($properties);\n }", "title": "" }, { "docid": "f3ae8698da0a910d10b09ad8f1b24b5e", "score": "0.5445025", "text": "function count()\n {\n return count($this->platforms);\n }", "title": "" }, { "docid": "0222e10587c2d99fa7c5613ab769be17", "score": "0.5442655", "text": "function getTotalObjects() {\n\t\t$query = '\n\t\t\tSELECT COUNT(*) AS Count\n\t\t\t FROM '.system::getConfig()->getDatabase('mofilm_content').'.sources';\n\t\tif ( $this->getEventID() ) {\n\t\t\t$query .= ' WHERE eventID = '.dbManager::getInstance()->quote($this->getEventID());\n\t\t}\n\t\t\n\t\t$oRes = dbManager::getInstance()->query($query);\n\t\t$res = $oRes->fetch();\n\t\tif ( is_array($res) && count($res) > 0 ) {\n\t\t\treturn $res['Count'];\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "70a6b009fd346604ff57350beb532d22", "score": "0.54394233", "text": "public function contar_artistas() {\n\t\treturn $this->db->count_all('artista');\n\t}", "title": "" }, { "docid": "f83d9a2c75878d89d88cd8e5ae8d172c", "score": "0.5439221", "text": "public function getFileCount()\n {\n if ( !isset($this->_fileCount) )\n return false;\n\n return $this->_fileCount;\n }", "title": "" }, { "docid": "972caabb83d80d22af7ee05494ac30b6", "score": "0.54336995", "text": "function get_object_count()\r\n {\r\n return $this->get_browser()->count_announcement_distributions($this->get_condition());\r\n }", "title": "" }, { "docid": "156e78de5f0d551b98b512c0723e78fa", "score": "0.5428392", "text": "function collectionGetSize() {\r\n\t\t$output = array();\r\n\t\t$where = '';\r\n\t\t$where .= build_limit($this->data['start'],$this->data['limit']);\r\n\t\t$query = \"SELECT * FROM `collection` \" . $where;\r\n\t\t$rets = $this->db->query_all($query);\r\n\t\tif ($rets == NULL) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(is_array($rets) && count($rets)) {\r\n\t\t\tforeach($rets as $ret) {\r\n\t\t\t\t$ar = array();\r\n\t\t\t\t$ar['collectionId'] = $ret->collectionId;\r\n\t\t\t\t$ar['collection'] = $ret->code;\r\n\t\t\t\t$code = $ret->code;\r\n\r\n# logic to be changed, need to calculate from the master_log table\r\n\t\t\t\t$query = \"SELECT count(*) ct from `image` WHERE `barcode` LIKE '$code%'\";\r\n\t\t\t\t$re = $this->db->query_one($query);\r\n\t\t\t\t$ar['imaged'] = $re->ct;\r\n\r\n\t\t\t\t$ar['notimaged'] = $ret->collectionSize - $re->ct;\r\n\t\t\t\t$output[] = $ar;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "3cc7a0784cd5177aacdb73be5b7e7605", "score": "0.54248977", "text": "public function itemCount()\n {\n return $this->itemCount;\n }", "title": "" }, { "docid": "bdcda4d2fa645bb61cd85ce6a26c4b2a", "score": "0.54237014", "text": "public function size(): int {\n return $this->count();\n }", "title": "" }, { "docid": "b5310232bbee46ee740a18aa6f488ecf", "score": "0.5422715", "text": "public function getEntryCount()\n {\n $this->reader->seek($this->offset + 4);\n\n return $this->readLong();\n }", "title": "" }, { "docid": "c4d30e8d5bbdfa633441830e201ce6c8", "score": "0.5419225", "text": "public function count()\n {\n return count($this->objects);\n }", "title": "" }, { "docid": "ebdad946333a54e50f8b7474f61245b6", "score": "0.5418456", "text": "public function count() {\n return $this->tabsContent->count();\n }", "title": "" }, { "docid": "1625b0c473287447893b4f3747e0aa68", "score": "0.54180515", "text": "public function getNbArticles()\n { // à compléter \n $total = 0;\n $articles = $this->getContenu();\n foreach ($articles as $article) {\n $total = $total + $article->quantite;\n }\n return $total;\n }", "title": "" }, { "docid": "be2b646940c4f92c3d650e862b81ec3c", "score": "0.5416504", "text": "public function count()\n {\n return count($this->runes) + count($this->instants) + count($this->conjures);\n }", "title": "" }, { "docid": "4da32e55ea5468593202f7c8ded58ea4", "score": "0.5416421", "text": "public function getCount(){\n\t\treturn count($this->elements);\n\t}", "title": "" }, { "docid": "99335b5194853ba555b3385b032b77ec", "score": "0.54158837", "text": "public function count(): int\n {\n return count($this->gitCommitFiles);\n }", "title": "" }, { "docid": "4f7079820a7de442754b6e9d604d13c8", "score": "0.5414917", "text": "public function count() {\n return $this->length();\n }", "title": "" }, { "docid": "0e4c93a76812fed259ea1c71775ae978", "score": "0.54133934", "text": "public function getImageSrcCount()\n {\n return $this->count(self::IMAGE_SRC);\n }", "title": "" }, { "docid": "97514ea26bd5f2998d5f1ce5045b7571", "score": "0.5413288", "text": "function nm_get_cart_contents_count() {\n $cart_count = apply_filters( 'nm_cart_count', WC()->cart->cart_contents_count );\n $count_class = ( $cart_count > 0 ) ? '' : ' jws-count-zero';\n \n\t\treturn '<span class=\"jws-menu-cart-count count' . $count_class . '\">' . $cart_count . '</span>';\n\t}", "title": "" }, { "docid": "23bb921be7a13a04d70648113e83132b", "score": "0.5412415", "text": "public function count () {\n\t\treturn 7;\n\t}", "title": "" }, { "docid": "a3afffe03b42a1ef55262fb5a38ba67a", "score": "0.5411081", "text": "protected function getFileCount()\n {\n exec(\n \"find ./repo/$this->projectId -name \\\"*\\\" \" .\n \"-path \\\"*.hg\\\" -prune -o -name \\\"*\\\" \" .\n \"-path \\\"*.svn\\\" -prune -o -name \\\"*\\\" \" .\n \"-path \\\"*.git\\\" -prune -o -name \\\"*\\\"\",\n $fileList\n );\n\n $count = 0;\n foreach ($fileList as $file) {\n if (is_file($file) === true) {\n ++$count;\n }\n }\n return $count;\n }", "title": "" }, { "docid": "35fbd7bcb3c21df838ff61d177a20b57", "score": "0.5410764", "text": "public function totalRecords()\n {\n return TfStandard::count();\n }", "title": "" } ]
466d87eee4a079ab819b9f3db6620b84
defines the relationship of a loan having many defaultors
[ { "docid": "893f2d122c261d3a8f9395c16e2aeeda", "score": "0.57534593", "text": "public function loanDefauters()\n {\n return $this->hasMany('App\\LoanDefaulter');\n }", "title": "" } ]
[ { "docid": "bead731c5cb1aea15e85e94b84584d00", "score": "0.59555084", "text": "public function initialize()\n {\n $this->hasMany('groep_id', 'Gebruikers', 'groep_id', array('alias' => 'Gebruikers'));\n $this->hasMany('groep_id', 'Groep_permissies', 'groep_id', array('alias' => 'Groep_permissies'));\n }", "title": "" }, { "docid": "528513560f858e9200a0a9e5261f666b", "score": "0.57510734", "text": "function CreateDefaultRelationDefinitionEntity()\n {\n\t\t$result = $this->sendRequest(\"CreateDefaultRelationDefinitionEntity\", array());\n\t\treturn $this->getResultFromResponse($result);\n }", "title": "" }, { "docid": "273c52b9505ebbfa76c9999644ebf4ef", "score": "0.5689061", "text": "public function defineRelations()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "b09e62d2d5992172137767e2692bf2c1", "score": "0.56881356", "text": "public function setRelations() {}", "title": "" }, { "docid": "adee204db10afa371e6b72ba9777a2ab", "score": "0.568431", "text": "public function loans(){\n \treturn $this->hasMany('App\\Loan');\n }", "title": "" }, { "docid": "53b586998ee729bcf547e04e3401d01e", "score": "0.56039643", "text": "public function has_or_relation()\n {\n }", "title": "" }, { "docid": "c1db2eb795145c32e917c62a9a96b28c", "score": "0.5560713", "text": "public function loan(){\n\n \treturn $this->hasMany(Loan::class);\n\n }", "title": "" }, { "docid": "22bacccf42e5ad9bed196d38f4a6e082", "score": "0.5488579", "text": "public function loan(){\n return $this->belongsTo(Loan::class);\n }", "title": "" }, { "docid": "7bc2c1b2cb30c3f19f596afcce91983d", "score": "0.5476329", "text": "public function initialize()\n {\n $this->hasMany('r_id', 'Mxr', 'r_id', array('alias' => 'Mxr'));\n $this->hasMany('r_id', 'Usuarios', 'r_id', array('alias' => 'Usuarios'));\n }", "title": "" }, { "docid": "5c80e4c1ec0609ee7424fd66f089a24b", "score": "0.5472846", "text": "protected static function _relations() {\n\n\t}", "title": "" }, { "docid": "4e6154dae43baa865103104b46eb2d26", "score": "0.5464693", "text": "public function initialize()\n {\n $this->hasMany('id_finalidade', 'App\\Models\\Nfentrada', 'finalidade_nota', array('alias' => 'Nfentrada'));\n }", "title": "" }, { "docid": "037393c640ba88a95ed48bd8c1f4f033", "score": "0.5463276", "text": "public function buildRelations()\n\t{\n $this->addRelation('Aviso', 'Aviso', RelationMap::MANY_TO_ONE, array('aviso_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "c00f9cd9c6c6eec23bcfc0e7f83a4ee9", "score": "0.5447709", "text": "public function defaultExposedRelations() {\n return $this->defaultExposedRelations;\n }", "title": "" }, { "docid": "4c7795a9bef21c21e5bc4e502a66363f", "score": "0.5428771", "text": "public function buildRelations()\n\t{\n $this->addRelation('SftOrganismo', 'SftOrganismo', RelationMap::ONE_TO_MANY, array('id' => 'id_pais', ), 'SET NULL', 'CASCADE');\n $this->addRelation('SftPersona', 'SftPersona', RelationMap::ONE_TO_MANY, array('id' => 'id_paisdocidentificacion', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('GenPaisI18n', 'GenPaisI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', 'CASCADE');\n\t}", "title": "" }, { "docid": "b0b5a68f6a4e78f1900f7bd10d59079f", "score": "0.542723", "text": "public function initialize()\n {\n $this->setSchema(\"mydb\");\n $this->setSource(\"loan_information\");\n $this->hasMany(\"loanid\", \"Paying\", \"loanid\", array('alias' => 'alias_paying')) ;\n $this->hasMany(\"loanid\", \"LoanBy\", \"loanid\", array('alias' => 'alias_loanby')) ;\n $this->hasManyToMany(\n 'loanid',\n 'LoanBy',//table \n 'loanid', 'cid',\n 'Customers',\n 'cid',\n array(\n 'alias' => 'alias_customers'\n )\n );\n }", "title": "" }, { "docid": "32f345d1792a3b2a4b422fd33ddf9c93", "score": "0.5424611", "text": "public function initialize()\n {\n $this->hasMany('id_tipobeneficio', 'Documentosbeneficios', 'id_tipobeneficio', array('alias' => 'Documentosbeneficios'));\n $this->hasMany('id_tipobeneficio', 'Documentosbeneficios', 'id_tipobeneficio', NULL);\n }", "title": "" }, { "docid": "2b4d81c0a7d8d57af1d7ee5d593a6943", "score": "0.5417579", "text": "abstract function relations();", "title": "" }, { "docid": "19f59ecd0dbea0b7be8be81ff0569ef7", "score": "0.5415587", "text": "private function getDefaultHierarchyRelation() {\n $query = $this->db->select();\n $query->from('zanby_groups__hierarchy_relation', 'hierarchy_id')\n ->where('group_id = ?', $this->getGroupId())\n ->where('isdefault = ?', 1);\n $result = $this->db->fetchOne($query);\n return $result;\n }", "title": "" }, { "docid": "7911ccbfc81dd06d93fcdfe1b235017b", "score": "0.5387533", "text": "public function initialize()\n {\n $this->hasMany('tipodocumento_id', 'Curriculum\\Persona', 'persona_tipoDocumentoId', array('alias' => 'Persona'));\n }", "title": "" }, { "docid": "4420a43f44db082f3dcfc3d6e7873cb6", "score": "0.5386449", "text": "public function initRelation()\n {\n // clef etrangère vers classe\n return [];\n }", "title": "" }, { "docid": "06e7e3ddfbc3e8e50c125a341860db18", "score": "0.5377853", "text": "public function palmares() {\n $relation = $this->hasOne(\"Palmares\");\n return $relation;\n }", "title": "" }, { "docid": "7d7b27a085da6188b709472927db34a4", "score": "0.5363534", "text": "public function loanGuarantors()\n {\n return $this->hasMany('App\\LoanGuarantor');\n }", "title": "" }, { "docid": "6d076a10bf7bbc489ac4e596ae28606f", "score": "0.53597075", "text": "public function relations();", "title": "" }, { "docid": "e30057eb72a673c95ab036627cafc547", "score": "0.5359095", "text": "public function initialize()\n {\n $this->belongsTo('depart', 'App\\Models\\Depart', 'id', array('alias' => 'department'));\n $this->hasManyToMany(\n \"depart\",\n 'App\\Models\\Permission',\n \"did\", \"aid\",\n \"App\\Models\\App\",\n \"id\",array('alias'=>'permisn')\n );\n }", "title": "" }, { "docid": "bd77824d0efe34b17b52109382827349", "score": "0.5313814", "text": "public function initialize()\n {\n $this->belongsTo('produtoArea_idprodutoArea', 'App\\Models\\Produtoarea', 'idprodutoArea', array('alias' => 'Produtoarea'));\n $this->belongsTo('cond_pagto_idcond_pagto', 'App\\Models\\CondPagto', 'idcond_pagto', array('alias' => 'CondPagto'));\n $this->belongsTo('produtoArea_idprodutoArea', 'App\\Models\\Produtoarea', 'idprodutoArea', array('foreignKey' => true,'alias' => 'Produtoarea'));\n $this->belongsTo('cond_pagto_idcond_pagto', 'App\\Models\\CondPagto', 'idcond_pagto', array('foreignKey' => true,'alias' => 'CondPagto'));\n }", "title": "" }, { "docid": "67007cbfdca35f6a56c606d7ac6e1f9c", "score": "0.53006035", "text": "public function buildRelations()\n\t{\n $this->addRelation('Local', 'Local', RelationMap::MANY_TO_ONE, array('local_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('ParceiroComissionamento', 'ParceiroComissionamento', RelationMap::ONE_TO_MANY, array('id' => 'parceiro_id', ), 'RESTRICT', null);\n $this->addRelation('ParceiroUsuario', 'ParceiroUsuario', RelationMap::ONE_TO_MANY, array('id' => 'parceiro_id', ), 'RESTRICT', null);\n $this->addRelation('Certificado', 'Certificado', RelationMap::ONE_TO_MANY, array('id' => 'parceiro_id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "06e1e3b0eeedb0a553c007a63bb6b560", "score": "0.5295624", "text": "public static function relations()\n {\n return [\n// 'gender' => ['Gender', 'gender'],\n// 'gender' => 'Gender',\n ];\n }", "title": "" }, { "docid": "3c11557f69b6648923b1ce32873f596e", "score": "0.52767664", "text": "public function initialize()\n {\n $this->hasMany('dependencia_id', 'Curriculum\\Puesto', 'puesto_dependenciaId', array('alias' => 'Puesto'));\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.52645993", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "ba6a04d5199225a287f68da5d34d7519", "score": "0.52632636", "text": "public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }", "title": "" }, { "docid": "08ce0975fffae7289e981b9da1a5f1dc", "score": "0.5253177", "text": "public function personas(){\n\n return $this->morphedByMany(Persona::class, 'cargoable'); //relacion muchos a muchos \"una persona tiene muchos cargos y un cargo tiene muchas personas\"\n }", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5243598", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5243598", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5243598", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5243598", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5243598", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5243598", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "58c4752c7754c5b8414b1c83444c5631", "score": "0.5229193", "text": "public function initialize()\n {\n $this->belongsTo(\"aco_id\", \"Acos\", \"id\", NULL);\n $this->belongsTo(\"user_id\", \"Users\", \"id\", NULL);\n\n }", "title": "" }, { "docid": "8c98f11f22ccd159e948ba2e186f66c4", "score": "0.52265173", "text": "protected function createDefaultPermissionSchema()\n {\n $this->grantAccessToAdmin(Role::where('name', 'Admin')->first())\n ->grantAccessToMedics(Role::where('name', 'Medic')->first())\n ->grantAccessToRecepcionist(Role::where('name', 'Recepcionist')->first());\n }", "title": "" }, { "docid": "b3b1f1107f796e247fa41c2493e0703d", "score": "0.5220944", "text": "public function initialize()\n {\n $this->belongsTo('cd_servico', 'App\\Models\\ServicosOrcamento', 'cd_servico', array('alias' => 'ServicosOrcamento'));\n $this->belongsTo('orcamento_cd_orcamento', 'App\\Models\\Orcamento', 'cd_orcamento', array('alias' => 'Orcamento'));\n $this->belongsTo('cd_servico', 'App\\Models\\ServicosOrcamento', 'cd_servico', array('foreignKey' => true,'alias' => 'ServicosOrcamento'));\n $this->belongsTo('orcamento_cd_orcamento', 'App\\Models\\Orcamento', 'cd_orcamento', array('foreignKey' => true,'alias' => 'Orcamento'));\n }", "title": "" }, { "docid": "632b31f297a367b8a2359cd7368a2134", "score": "0.52024966", "text": "public function menu(): BelongsTo;", "title": "" }, { "docid": "db51d8c3cd16a4249ea933c95b2b8afe", "score": "0.5200971", "text": "public function initialize()\n {\n $this->hasMany('id', 'Archivos', 'cliente', array('alias' => 'Archivos'));\r\n $this->hasMany('id', 'Inventario', 'cliente', array('alias' => 'Inventario'));\r\n $this->hasMany('id', 'Registros', 'cliente', array('alias' => 'Registros'));\n }", "title": "" }, { "docid": "bff66b7141cefd475c75471ed34ac259", "score": "0.5195613", "text": "public function initialize()\n {\n $this->belongsTo('id_deuda', 'NbDeudas', 'id_deuda', array('alias' => 'NbDeudas'));\n $this->belongsTo('id_deuda', 'Nbdeudas', 'id_deuda', array('foreignKey' => true));\n }", "title": "" }, { "docid": "f16acfb512f9125df9863ed79ca0a325", "score": "0.5192824", "text": "public function loanStatuses()\n {\n return $this->belongsTo('App\\LoanStatus');\n }", "title": "" }, { "docid": "6b92858fd99286b718994efbe6b284c3", "score": "0.5189934", "text": "public function buildRelations()\n\t{\n $this->addRelation('Provincie', 'Provincie', RelationMap::MANY_TO_ONE, array('provincie_id' => 'id', ), null, null);\n $this->addRelation('OrganisatieType', 'OrganisatieType', RelationMap::MANY_TO_ONE, array('type_id' => 'id', ), null, null);\n $this->addRelation('Persoon', 'Persoon', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Vervolgactie', 'Vervolgactie', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Kans', 'Kans', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n\t}", "title": "" }, { "docid": "cf07e77c50cf3f6b27864a247d13cb50", "score": "0.5127614", "text": "public function initialize(){\r\n\t\t$this->hasMany(\"deal_id\", \"deal_info\", \"deal_info_option_deal_id\");\r\n\t\t$this->hasMany(\"deal_info_option_deal_id\", \"deal_info\", \"deal_id\");\r\n\t}", "title": "" }, { "docid": "78113752f065c83d7b0d5aa5676d3e1e", "score": "0.51252186", "text": "public function initialize()\n {\n $this->hasMany(\"id\", \"Modules\\Models\\Orders\", \"member_id\", array(\n 'alias' => 'orders'\n ));\n }", "title": "" }, { "docid": "5054b660f839a79d4cad7465e5884920", "score": "0.51205647", "text": "public function initialize()\n {\n $this->belongsTo('cod_usuario', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n $this->belongsTo('cod_chamado', 'App\\Models\\SacChamado', 'cod_chamado', array('alias' => 'SacChamado'));\n $this->belongsTo('cod_usuario', 'App\\Models\\Usuario', 'cd_usuario', array('foreignKey' => true,'alias' => 'Usuario'));\n $this->belongsTo('cod_chamado', 'App\\Models\\SacChamado', 'cod_chamado', array('foreignKey' => true,'alias' => 'SacChamado'));\n }", "title": "" }, { "docid": "ed864ed7bf3260f954a9053895392d2b", "score": "0.5117621", "text": "public function newborns(){\n return $this->HasMany('Newborns');\n }", "title": "" }, { "docid": "9c0671db5cf161c99fed32c1fee51260", "score": "0.51092607", "text": "public function initialize()\n {\n $this->hasMany(\"division_id\", \"Phoenix\\Models\\Academy\", \"division_id\");\n }", "title": "" }, { "docid": "50aae4fc7a9ffa8e88d5d80b25de8cad", "score": "0.5099537", "text": "public function governorate()\n {\n return $this->belongsTo(Governorate::class, 'c_city')->withDefault();\n }", "title": "" }, { "docid": "d864cef3b708f0d848efe8cc848fcdc8", "score": "0.50991845", "text": "public function initialize()\n {\n $this->setSchema(\"realworlddb\");\n $this->belongsTo('followerId', User::class, 'id', ['alias' => 'User']);\n $this->belongsTo('followedId', User::class, 'id', ['alias' => 'User']);\n }", "title": "" }, { "docid": "3f50f9a356ea8dbeee5a144a9784a3d4", "score": "0.5097447", "text": "public function initialize()\n {\n $this->belongsTo('Cd_produto', 'App\\Models\\Produto', 'cd_produto', array('alias' => 'Produto'));\n $this->belongsTo('Cd_produto', 'App\\Models\\Produto', 'cd_produto', array('foreignKey' => true,'alias' => 'Produto'));\n }", "title": "" }, { "docid": "9dc00281af3d6989e06260fc2b2da735", "score": "0.50873387", "text": "public function initialize()\n {\n $this->belongsTo('cd_conn', 'NfeConn', 'idnfe_conn', array('alias' => 'NfeConn'));\n $this->belongsTo('cd_nfe', 'PdvNfe', 'cd_nfce', array('alias' => 'PdvNfe'));\n }", "title": "" }, { "docid": "d0909b3cc1bfe1b1cd1ae4a76952e0d5", "score": "0.50846595", "text": "public function initialize()\n {\n $this->hasMany('grado_id', 'Curriculum\\Formacion', 'formacion_gradoId', array('alias' => 'Formacion'));\n }", "title": "" }, { "docid": "18ff94d9909dfa9954e7bec4d85b0b75", "score": "0.5079301", "text": "abstract function getDefaultEntity();", "title": "" }, { "docid": "4c6c6bc406d6c56ccb08cb9dcbb88563", "score": "0.5073342", "text": "public function initialize()\n {\n $this->hasMany('idusuario', 'Acceso', 'idusuario', array('alias' => 'Acceso'));\n $this->belongsTo('idcondominio', 'Condominio', 'idcondominio', array('alias' => 'Condominio'));\n $this->belongsTo('idtipos_usuario', 'TiposUsuario', 'idtipos_usuario', array('alias' => 'TiposUsuario'));\n $this->belongsTo('idvehiculo', 'Vehiculo', 'idvehiculo', array('alias' => 'Vehiculo'));\n }", "title": "" }, { "docid": "684c5758b60e2a34facbd6e81b37ca98", "score": "0.506985", "text": "abstract protected function getEntitySetWithDefaults();", "title": "" }, { "docid": "1dde40486b3949af2ef4f33706e38879", "score": "0.5067986", "text": "public function MyReferrals()\n\t{\n\t\treturn $this->hasMany('App\\Models\\PointLog', 'reference_id')->whereIn('reference_type', ['App\\Models\\User', 'App\\Models\\Admin', 'App\\Models\\Customer']);\n\t}", "title": "" }, { "docid": "83f440399d3c5b423567f4165dd3c9d0", "score": "0.50657403", "text": "public function loteAceptado() {\n\t\treturn $this->hasOne('App\\Models\\LoteAceptado', 'lote', 'lote');\n\t}", "title": "" }, { "docid": "654afe382fa16c52c31ab6567e36427d", "score": "0.5065038", "text": "public function initialize()\n {\n $this->hasMany(\"province_id\", \"Phoenix\\Models\\Area\", \"province_id\");\n $this->hasMany(\"province_id\", \"Phoenix\\Models\\Academy\", \"province_id\");\n $this->hasMany(\"province_id\", \"Phoenix\\Models\\Members\", \"province_id\");\n }", "title": "" }, { "docid": "956797d52735b9390af3e2789c72299c", "score": "0.50614333", "text": "private function makeRelationBetweenCategoryAndDummyTable() {}", "title": "" }, { "docid": "36c75ab38a8c4f20dd48aff5dc574b27", "score": "0.5056116", "text": "public function initialize()\n {\n $this->belongsTo('deartment_id', 'Departments', 'department_id', array('alias' => 'Departments'));\n $this->belongsTo('institution_id', 'Institution', 'institution_id', array('alias' => 'Institution'));\n }", "title": "" }, { "docid": "a98bd1894e58ad6cacf8dcdeeb05b831", "score": "0.5051888", "text": "public function landlord() : BelongsTo\r\n {\r\n return $this->belongsTo(Landlord::class);\r\n }", "title": "" }, { "docid": "a98bd1894e58ad6cacf8dcdeeb05b831", "score": "0.5051888", "text": "public function landlord() : BelongsTo\r\n {\r\n return $this->belongsTo(Landlord::class);\r\n }", "title": "" }, { "docid": "2899c305ad159983beea3a73049aaf31", "score": "0.5051097", "text": "public function initialize()\n {\n $this->belongsTo('nfsaida_cd_nfsaida', 'App\\Models\\Nfsaida', 'cd_nfsaida', array('alias' => 'Nfsaida'));\n $this->belongsTo('nfsaida_cd_nfsaida', 'App\\Models\\Nfsaida', 'cd_nfsaida', array('alias' => 'Nfsaida'));\n\n }", "title": "" }, { "docid": "65bfe46eae78e0bc723493dc4206f8f9", "score": "0.5038479", "text": "public function settinges()\n {\n return $this->morphedByMany(\\App\\Settings::class, 'userable');\n }", "title": "" }, { "docid": "da50d34b3a7792e80ab020465ce9d177", "score": "0.50257707", "text": "public function initialize()\n {\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_periodo', 'CobPeriodo', 'id_periodo', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_contrato', 'CobActaconteo', 'id_contrato', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_ajuste_reportado', 'CobAjusteReportado', 'id_ajuste_reportado', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actaconteo_persona_facturacion', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona_facturacion', array(\n \t\t\t'reusable' => true\n \t));\n }", "title": "" }, { "docid": "5a5495c324b736331ce1215aec52755a", "score": "0.5018643", "text": "public function hasRelations();", "title": "" }, { "docid": "f45dce3812331908676999d016504e18", "score": "0.5014748", "text": "public function createDefaultRoles()\n {\n Role::firstOrCreate(['name' => 'Admin']);\n Role::firstOrCreate(['name' => 'Guest']);\n Role::firstOrCreate(['name' => 'Medic']);\n Role::firstOrCreate(['name' => 'Recepcionist']);\n }", "title": "" }, { "docid": "82cfece3de33d1b5c83d1b99900f65a6", "score": "0.50145507", "text": "function _setAssociations(){\n\t}", "title": "" }, { "docid": "b4572fe9e56bc0857ee5204d7127481f", "score": "0.50121", "text": "public function setToDefault() {\n $this->addType(ResidentType::all);\n }", "title": "" }, { "docid": "9e090293bb957e34f60386e318e21929", "score": "0.5010599", "text": "public function hasGovernorate(){\n return $this->belongsTo(Governorate::class, 'governorate_id');\n }", "title": "" }, { "docid": "6e0fd459c320fe27149547def346c628", "score": "0.50092304", "text": "public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}", "title": "" }, { "docid": "0b4585e18229e6e63ce7bebc3c3acff2", "score": "0.5008054", "text": "public function buildRelations()\n\t{\n\t\t$this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', null);\n\t\t$this->addRelation('OOBookingType', 'OOBookingType', RelationMap::MANY_TO_ONE, array('oobookingtype_id' => 'id', ), null, null);\n\t\t$this->addRelation('OOEntry', 'OOEntry', RelationMap::ONE_TO_MANY, array('id' => 'oobooking_id', ), 'CASCADE', null, 'OOEntrys');\n\t\t$this->addRelation('OORequest', 'OORequest', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);\n\t}", "title": "" }, { "docid": "d3736dd6be885af6a7a5015e14fa7712", "score": "0.50064373", "text": "public function __construct()\n {\n $this->relationships = array();\n }", "title": "" }, { "docid": "a892fbdf32600efcb5651817da35c25c", "score": "0.50062096", "text": "public function define_relations(){\n $p_factory = ZKAPI_PostTypeFactory::getInstance();\n foreach ($p_factory->get_relations() as $relations) {\n foreach($relations as $relation){\n if($relation['attach_to'] == $this->_post_type){\n $this->_relations[] = $relation;\n }\n }\n }\n }", "title": "" }, { "docid": "a17c02f5566252431303816c00bcfc46", "score": "0.5003226", "text": "public function createDefaultPermissions()\n {\n foreach (Permission::resources as $resource) {\n foreach (Permission::actions as $action) {\n Permission::firstOrCreate(['name' => \"$resource-$action\"]);\n }\n }\n }", "title": "" }, { "docid": "4607345ca3abc2053d5a21ed142ab698", "score": "0.50027347", "text": "public function initialize()\n {\n /*$this->hasOne('id', 'Broadcasters', 'id', NULL);\n $this->hasOne('id', 'Clients', 'id', NULL);\n $this->hasMany('id', 'Credits', 'user_id', NULL);*/\n }", "title": "" }, { "docid": "b6ca4ed203d939f889cf00986e252737", "score": "0.4997291", "text": "public function initialize()\n {\n $this->hasMany('cd', 'ShouhinMrs', 'shu_souko_mr_cd', array('alias' => 'ShouhinMrs'));\n $this->hasMany('cd', 'ShiireMeisaiDts', 'souko_mr_cd', array('alias' => 'ShiireMeisaiDts'));\n $this->hasMany('cd', 'UriageMeisaiDts', 'souko_mr_cd', array('alias' => 'UriageMeisaiDts'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n }", "title": "" }, { "docid": "2c6e0fd863d907d5956e35838cc815bc", "score": "0.49933782", "text": "public function buildRelations()\n\t{\n $this->addRelation('Company', 'Company', RelationMap::MANY_TO_ONE, array('company_id' => 'id', ), null, null);\n $this->addRelation('Connectionprofile', 'Connectionprofile', RelationMap::MANY_TO_ONE, array('connectionprofile_id' => 'id', ), null, null);\n $this->addRelation('Consumerpayment', 'Consumerpayment', RelationMap::ONE_TO_MANY, array('id' => 'lastminute_id', ), null, null);\n $this->addRelation('LastminuteI18N', 'LastminuteI18N', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null);\n $this->addRelation('Coupon', 'Coupon', RelationMap::ONE_TO_MANY, array('id' => 'lastminute_id', ), null, null);\n $this->addRelation('LastminuteTag', 'LastminuteTag', RelationMap::ONE_TO_MANY, array('id' => 'lastminute_id', ), null, null);\n\t}", "title": "" }, { "docid": "312f7f5ad4868eb24a1a333ec8f034da", "score": "0.49895534", "text": "public function demo()\n\t{\n\t\t$ugelId=1;\n\t\t$ugel = $this->Ugel->find('first', array('conditions' => array('id' => $ugelId), 'recursive' => 2));\n\t\t$this->set('ugel', $ugel);\n\n\t\t// Let's use bindModel() to add a new association\n\t // to the Leader model:\n\t /*\n\t $this->Leader->bindModel(\n\t array('hasMany' => array(\n\t 'Principle' => array(\n\t 'className' => 'Principle'\n\t )\n\t )\n\t )\n\t );\n\t\t// Let's remove the hasMany...\n\t\t$this->Leader->unbindModel(\n\t\t\tarray('hasMany' => array('Follower'))\n\t\t);\n\t\t*/\n\t}", "title": "" }, { "docid": "92bc9bd00512762eb57b0c44024353b4", "score": "0.4982748", "text": "public function manager()\n {\n return $this->belongsTo('App\\User','manager_id')->withDefault();\n }", "title": "" }, { "docid": "48d9982346da595ca0af020221a620f5", "score": "0.4970509", "text": "public function initialize()\n {\n $this->hasMany('id', 'DisqueTarif', 'idTarif', array('alias' => 'DisqueTarif'));\n }", "title": "" }, { "docid": "874240634193263b71f3a6f24fa97386", "score": "0.4958376", "text": "public function initialize() {\n\n $this->belongsTo(\"users_id\", \"Aiden\\Models\\Users\", \"id\", [\"alias\" => \"User\"]);\n $this->belongsTo(\"councils_id\", \"Aiden\\Models\\Councils\", \"id\", [\"alias\" => \"Council\"]);\n\n }", "title": "" }, { "docid": "696d4c798b17e9fc4231bdba548d41dd", "score": "0.49562514", "text": "public function buildRelations()\n {\n $this->addRelation('Promociondetalle', 'Promociondetalle', RelationMap::ONE_TO_MANY, array('idpromocion' => 'idpromocion', ), 'CASCADE', 'CASCADE', 'Promociondetalles');\n $this->addRelation('Ventadetalle', 'Ventadetalle', RelationMap::ONE_TO_MANY, array('idpromocion' => 'idpromocion', ), 'CASCADE', 'CASCADE', 'Ventadetalles');\n }", "title": "" }, { "docid": "806a175e60682d423b80b78a20f9ac61", "score": "0.49551195", "text": "public function buildRelations()\n\t{\n $this->addRelation('Role', 'Role', RelationMap::MANY_TO_ONE, array('role_id' => 'id', ), null, null);\n\t}", "title": "" } ]
0e7dfdd1760c2dc416a7f2f7c863fc80
Shortcode : sm_social_icon Function for displaying typer texts.
[ { "docid": "91ba991ce6accdffcadd80efcbb28e80", "score": "0.6905787", "text": "function sam_martin_theme_functions_shortcode_sm_social_icon( $atts ){\n\textract( shortcode_atts( array (\n\t\t'facebook_link' => '',\n\t\t'twitter_link' => '',\n\t\t'dribbble_link' => '',\n\t\t'vimeo_link' => '',\n\t\t'pinterest_link'=> '',\n\t\t'behance_link' => '',\n\t\t'linkedin_link' => '',\n\t\t'github_link' => '',\n\t\t), $atts )\n\t);\n\tob_start();\n\t\n\tif($facebook_link || $twitter_link || $dribbble_link || $vimeo_link || $pinterest_link || $behance_link || $linkedin_link || $github_link):\n\t?>\n\t<div class=\"about-social\">\n\t\t<ul>\n\t\t\t<?php if($facebook_link!=\"\"):?>\n\t\t\t\t<li><a href=\"<?php echo esc_url($facebook_link);?>\"><i class=\"fa fa-facebook\"></i></a></li>\n\t\t\t<?php endif;\n\t\t\t\n\t\t\tif($twitter_link!=\"\"):?>\n\t\t\t\t<li><a href=\"<?php echo esc_url($twitter_link);?>\"><i class=\"fa fa-twitter\"></i></a></li>\n\t\t\t<?php endif;\n\t\t\t\n\t\t\tif($dribbble_link!=\"\"):?>\n\t\t\t\t<li><a href=\"<?php echo esc_url($dribbble_link);?>\"><i class=\"fa fa-dribbble\"></i> </a></li>\n\t\t\t<?php endif;\n\t\t\t\n\t\t\tif($vimeo_link!=\"\"):?>\n\t\t\t\t<li><a href=\"<?php echo esc_url($vimeo_link);?>\"><i class=\"fa fa-vimeo\"></i> </a></li>\n\t\t\t<?php endif;\n\t\t\t\n\t\t\tif($pinterest_link!=\"\"):?>\n\t\t\t\t<li><a href=\"<?php echo esc_url($pinterest_link);?>\"><i class=\"fa fa-pinterest-p\"></i> </a></li>\n\t\t\t<?php endif;\n\t\t\t\n\t\t\tif($behance_link!=\"\"):?>\n\t\t\t\t<li><a href=\"<?php echo esc_url($behance_link);?>\"><i class=\"fa fa-behance\"></i> </a></li>\n\t\t\t<?php endif;\n\t\t\t\n\t\t\tif($linkedin_link!=\"\"):?>\n\t\t\t\t<li><a href=\"<?php echo esc_url($linkedin_link);?>\"><i class=\"fa fa-linkedin\"></i> </a></li>\n\t\t\t<?php endif;\n\t\t\t\n\t\t\tif($github_link!=\"\"):?>\n\t\t\t\t<li><a href=\"<?php echo esc_url($github_link);?>\"><i class=\"fa fa-github\"></i> </a></li>\n\t\t\t<?php endif;?>\n\t\t</ul>\n\t</div>\n\t<?php\n\tendif;\n\t\n\treturn ob_get_clean();\n}", "title": "" } ]
[ { "docid": "cc198bb1563a479708e089fe2f5817c8", "score": "0.7430841", "text": "function twitter_sc($atts){ \n return social_link_sc('Twitter', 'http://twitter.com/', $atts, 'images/icons/social/white/twitter_alt.png' );\n}", "title": "" }, { "docid": "eef272a2e8520752ed0c882655ff7991", "score": "0.72784007", "text": "function pmc_socialLink() {\n\t$social = '';\n\tglobal $pmc_data; \n\t$icons = $pmc_data['socialicons'];\n\tforeach ($icons as $icon){\n\t\t$social .= '<a target=\"_blank\" class=\"'.$icon['class'].'\" href=\"'.$icon['link'].'\" title=\"'.$icon['title'].'\"><img src = \"'.$icon['url'].'\" alt=\"'.$icon['title'].'\"></a>';\t\n\t}\n\n\techo $social;\n}", "title": "" }, { "docid": "2ecea36301c940c48b90d696064936b0", "score": "0.7278217", "text": "function hestia_social_icons() {\n\t\t$enabled_socials = get_theme_mod( 'hestia_enable_sharing_icons', true );\n\t\t$post_link = get_the_permalink();\n\t\t$post_title = get_the_title();\n\n\t\t$social_links = '';\n\t\t$allowed_tags = array(\n\t\t\t'div' => array(\n\t\t\t\t'class' => array(),\n\t\t\t),\n\t\t\t'a' => array(\n\t\t\t\t'href' => array(),\n\t\t\t\t'target' => array(),\n\t\t\t\t'title' => array(),\n\t\t\t\t'rel' => array(),\n\t\t\t\t'class' => array(),\n\t\t\t\t'data-original-title' => array(),\n\t\t\t),\n\t\t\t'i' => array(\n\t\t\t\t'class' => array(),\n\t\t\t),\n\t\t);\n\n\t\tif ( (bool) $enabled_socials === true ) {\n\t\t\t$social_links = ' <div class=\"col-md-6\">\n\t\t\t<div class=\"entry-social\">\n\t\t\t\t<a target=\"_blank\" rel=\"tooltip\"\n\t\t\t\t data-original-title=\"' . esc_attr( 'Share on Facebook', 'hestia-pro' ) . '\"\n\t\t\t\t class=\"btn btn-just-icon btn-round btn-facebook\"\n\t\t\t\t href=\"https://www.facebook.com/sharer/sharer.php?u=' . esc_url( $post_link ) . '\"><i\n\t\t\t\t\t\t\tclass=\"fa fa-facebook\"></i></a>\n\t\t\t\t<a target=\"_blank\" rel=\"tooltip\"\n\t\t\t\t data-original-title=\"' . esc_attr( 'Share on Twitter', 'hestia-pro' ) . '\"\n\t\t\t\t class=\"btn btn-just-icon btn-round btn-twitter\"\n\t\t\t\t href=\"https://twitter.com/home?status=' . wp_strip_all_tags( $post_title ) . ' - ' . esc_url( $post_link ) . '\"><i\n\t\t\t\t\t\t\tclass=\"fa fa-twitter\"></i></a>\n\t\t\t\t<a target=\"_blank\" rel=\"tooltip\"\n\t\t\t\t data-original-title=\" ' . esc_attr( 'Share on Google+', 'hestia-pro' ) . '\"\n\t\t\t\t class=\"btn btn-just-icon btn-round btn-google\"\n\t\t\t\t href=\"https://plus.google.com/share?url=' . esc_url( $post_link ) . '\"><i class=\"fa fa-google\"></i></a>\n\t\t\t</div></div>';\n\t\t}\n\n\t\techo apply_filters( 'hestia_filter_blog_social_icons', wp_kses( $social_links, $allowed_tags ) );\n\t}", "title": "" }, { "docid": "e1d793c36ab154da7f4e77cd44305ca8", "score": "0.7271652", "text": "function twentyseventeen_social_links_icons() {}", "title": "" }, { "docid": "8e9bbfa29045d5ba272570b17d1c59a8", "score": "0.7215346", "text": "function sc_socialicons($atts, $content = null)\n{\n $code = '<span class=\"social-shortcode float-center\"><a href=\"'.get_field('facebook', 'option').'\" target=\"_blank\" class=\"social-icon\">';\n $code .= '<img src=\"'.get_template_directory_uri().'/assets/images/facebook_button.svg\"></a>';\n $code .= '<a href=\"'.get_field('linkedin', 'option').'\" target=\"_blank\" class=\"social-icon\">';\n $code .= '<img src=\"'.get_template_directory_uri().'/assets/images/linkedInicon.svg\"></a>';\n $code .= '<a href=\"'.get_field('twitter', 'option').'\" target=\"_blank\" class=\"social-icon\">';\n $code .= '<img src=\"'.get_template_directory_uri().'/assets/images/twittericon.svg\"></a></span>';\n return $code;\n}", "title": "" }, { "docid": "54cc38ae81d6c07980f2b60aa5e4e118", "score": "0.70247746", "text": "function display_social_media_icons(){\n\t$custom_option = get_option('custom_option_name');\n\n\tif ($custom_option['fb_link']) :\n\t\techo '&nbsp;<a href=\"'.$custom_option['fb_link'].'\" target=\"_blank\"><i class=\"fa fa-facebook-square\"></i></a>&nbsp;';\n\tendif;\n\tif ($custom_option['li_link']) :\n\t\techo '&nbsp;<a href=\"'.$custom_option['li_link'].'\" target=\"_blank\"><i class=\"fa fa-linkedin-square\"></i></a>&nbsp;';\n\tendif;\n\tif ($custom_option['tw_link']) :\n\t\techo '&nbsp;<a href=\"'.$custom_option['tw_link'].'\" target=\"_blank\"><i class=\"fa fa-twitter\"></i></a>&nbsp;';\n\tendif;\n}", "title": "" }, { "docid": "cf52ace9f231e9d682f9947bcf107b3c", "score": "0.6894982", "text": "public function get_social_icons() {\r\n\r\n\t\t$social_icons = array(\r\n\t\t\t'fa-delicious' \t\t=> 'Delicious',\r\n\t\t\t'fa-digg' \t\t\t=> 'Digg',\r\n\t\t\t'fa-dribbble' \t\t=> 'Dribbble',\r\n\t\t\t'fa-facebook' \t\t=> 'Facebook',\r\n\t\t\t'fa-flickr' \t\t=> 'Flickr',\r\n\t\t\t'fa-foursquare' \t=> 'Four Square',\r\n\t\t\t'fa-github' \t\t=> 'Github',\r\n\t\t\t'fa-google-plus'\t=> 'Google+',\r\n\t\t\t'fa-linkedin' \t\t=> 'LinkedIn',\r\n\t\t\t'fa-instagram'\t\t=> 'Instagram',\r\n\t\t\t'fa-pinterest' \t\t=> 'Pinterest',\r\n\t\t\t'fa-reddit' \t\t=> 'Reddit',\r\n\t\t\t'fa-tumblr' \t\t=> 'Tumblr',\r\n\t\t\t'fa-twitch' \t\t=> 'Twitch',\r\n\t\t\t'fa-twitter' \t\t=> 'Twitter',\r\n\t\t\t'fa-vine' \t\t\t=> 'Vine',\r\n\t\t\t'fa-yelp' \t\t\t=> 'Yelp',\r\n\t\t\t'fa-youtube' \t\t=> 'YouTube',\r\n\t\t);\r\n\r\n\t\treturn apply_filters( 'mtsnb_social_icons', $social_icons );\r\n\t}", "title": "" }, { "docid": "bfdd8ff69d58be3e47bc243f66ae1519", "score": "0.68135047", "text": "function green_sc_socials($atts, $content=null){\t\n\tif (green_sc_in_shortcode_blogger()) return '';\n extract(green_sc_html_decode(shortcode_atts(array(\n\t\t// Individual params\n\t\t\"size\" => \"small\",\t// tiny | small | large\n\t\t\"socials\" => \"\",\n\t\t\"custom\" => \"no\",\n\t\t// Common params\n\t\t\"id\" => \"\",\n\t\t\"class\" => \"\",\n\t\t\"animation\" => \"\",\n\t\t\"css\" => \"\",\n\t\t\"top\" => \"\",\n\t\t\"bottom\" => \"\",\n\t\t\"left\" => \"\",\n\t\t\"right\" => \"\"\n ), $atts)));\n\t$css .= green_get_css_position_from_values($top, $right, $bottom, $left);\n\tglobal $GREEN_GLOBALS;\n\t$GREEN_GLOBALS['sc_social_icons'] = false;\n\tif (!empty($socials)) {\n\t\t$allowed = explode('|', $socials);\n\t\t$list = array();\n\t\tfor ($i=0; $i<count($allowed); $i++) {\n\t\t\t$s = explode('=', $allowed[$i]);\n\t\t\tif (!empty($s[1])) {\n\t\t\t\t$list[] = array(\n\t\t\t\t\t'icon'\t=> green_get_socials_url($s[0]),\n\t\t\t\t\t'url'\t=> $s[1]\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (count($list) > 0) $GREEN_GLOBALS['sc_social_icons'] = $list;\n\t} else if (green_sc_param_is_off($custom))\n\t\t$content = do_shortcode($content);\n\tif ($GREEN_GLOBALS['sc_social_icons']===false) $GREEN_GLOBALS['sc_social_icons'] = green_get_custom_option('social_icons');\n\t$output = green_prepare_socials($GREEN_GLOBALS['sc_social_icons']);\n\t$output = $output\n\t\t? '<div' . ($id ? ' id=\"'.esc_attr($id).'\"' : '') \n\t\t\t. ' class=\"sc_socials sc_socials_size_' . esc_attr($size) . (!empty($class) ? ' '.esc_attr($class) : '') . '\"' \n\t\t\t. ($css!='' ? ' style=\"'.esc_attr($css).'\"' : '') \n\t\t\t. (!green_sc_param_is_off($animation) ? ' data-animation=\"'.esc_attr(green_sc_get_animation_classes($animation)).'\"' : '')\n\t\t\t. '>' \n\t\t\t. ($output)\n\t\t\t. '</div>'\n\t\t: '';\n\treturn apply_filters('green_shortcode_output', $output, 'trx_socials', $atts, $content);\n}", "title": "" }, { "docid": "428c2ba071a42114db47728b8260d228", "score": "0.6804746", "text": "function agentevo_social_icons()\n{\n global $_ae;\n $links = $_ae->get_social_links();\n $icons = '';\n\n foreach ($links as $type => $url) {\n\n if ('email' === $type) {\n $url = 'mailto:' . $url;\n $type = 'envelope';\n }\n\n if ('' !== $url) {\n $icons .= '<a class=\"icon-' . $type . '\" href=\"' . $url . '\"></a>';\n }\n }\n\n return '<div class=\"agent-social-icons clearfix\">' . $icons . '</div>';\n}", "title": "" }, { "docid": "8782e22967febc60e830b583c471c3bd", "score": "0.67720187", "text": "public function get_icon() {\n\t\treturn 'eicon-social-icons';\n\t}", "title": "" }, { "docid": "4ec6bbc88610e9822aaca4aa2b499d3f", "score": "0.66942406", "text": "function social_link_sc($service, $link, $atts, $icon){\n extract(shortcode_atts( array(\n 'name' => '',\n ), $atts));\n\n\t$blog_url = get_bloginfo('template_url');\n\n return \"<a href=\\\"$link$name\\\" title=\\\"$name's $service profile\\\"><img src=\\\"$blog_url/$icon\\\"></a>\";\n}", "title": "" }, { "docid": "ce8083f58258b89bc82f780e405aa021", "score": "0.66734076", "text": "function social_icons($atts, $content = null) {\n\t\tglobal $data;\n\n\t\t$twitter = $data['ab_twitter_username'];\n\t\t$facebook = $data['ab_facebook_page_url'];\n\t\t$dribbble = $data['ab_dribbble_username'];\n\t\t$vimeo = $data['ab_vimeo_username'];\n\t\t$tumblr = $data['ab_tumblr_username'];\n\t\t$spotify = $data['ab_spotify_username'];\n\t\t$skype = $data['ab_skype_username'];\n\t\t$linkedin = $data['ab_linkedin_page_url'];\n\t\t$lastfm = $data['ab_lastfm_username'];\n\t\t$googleplus = $data['ab_googleplus_page_url'];\n\t\t$flickr = $data['ab_flickr_page_url'];\n\t\t$youtube = $data['ab_youtube_username'];\n\t\t$behance = $data['ab_behance_username'];\n\t\t$pinterest = $data['ab_pinterest_username'];\n\n\t\t$social_icons = '';\n\n\t\tif ($twitter) {\n\t\t\t$social_icons = $social_icons . '<li class=\"twitter\"><a href=\"http://www.twitter.com/'.$twitter.'\">Twitter</a></li>';\n\t\t}\n\t\tif ($facebook) {\n\t\t\t$social_icons = $social_icons . '<li class=\"facebook\"><a href=\"'.$facebook.'\">Facebook</a></li>';\n\t\t}\n\t\tif ($dribbble) {\n\t\t\t$social_icons = $social_icons . '<li class=\"dribbble\"><a href=\"http://www.dribbble.com/'.$dribbble.'\">Dribbble</a></li>';\n\t\t}\n\t\tif ($vimeo) {\n\t\t\t$social_icons = $social_icons . '<li class=\"vimeo\"><a href=\"http://www.vimeo.com/'.$vimeo.'\">Vimeo</a></li>';\n\t\t}\n\t\tif ($tumblr) {\n\t\t\t$social_icons = $social_icons . '<li class=\"tumblr\"><a href=\"http://www.tumblr.com/'.$tumblr.'\">Tumblr</a></li>';\n\t\t}\n\t\tif ($spotify) {\n\t\t\t$social_icons = $social_icons . '<li class=\"spotify\"><a href=\"http://open.spotify.com/user/'.$spotify.'\">Spotify</a></li>';\n\t\t}\n\t\tif ($skype) {\n\t\t\t$social_icons = $social_icons . '<li class=\"skype\"><a href=\"skype:'.$skype.'\">Skype</a></li>';\n\t\t}\n\t\tif ($linkedin) {\n\t\t\t$social_icons = $social_icons . '<li class=\"linkedin\"><a href=\"'.$linkedin.'\">LinkedIn</a></li>';\n\t\t}\n\t\tif ($lastfm) {\n\t\t\t$social_icons = $social_icons . '<li class=\"lastfm\"><a href=\"http://www.last.fm/user/'.$lastfm.'\">Last.fm</a></li>';\n\t\t}\n\t\tif ($googleplus) {\n\t\t\t$social_icons = $social_icons . '<li class=\"googleplus\"><a href=\"'.$googleplus.'\">Google+</a></li>';\n\t\t}\n\t\tif ($flickr) {\n\t\t\t$social_icons = $social_icons . '<li class=\"flickr\"><a href=\"'.$flickr.'\">Flickr</a></li>';\n\t\t}\n\t\tif ($youtube) {\n\t\t\t$social_icons = $social_icons . '<li class=\"youtube\"><a href=\"http://www.youtube.com/user/'.$youtube.'\">YouTube</a></li>';\n\t\t}\n\t\tif ($behance) {\n\t\t\t$social_icons = $social_icons . '<li class=\"behance\"><a href=\"http://www.behance.net/'.$behance.'\">Behance</a></li>';\n\t\t}\n\t\tif ($pinterest) {\n\t\t\t$social_icons = $social_icons . '<li class=\"pinterest\"><a href=\"http://www.pinterest.com/'.$pinterest.'/\">Pinterest</a></li>';\n\t\t}\n\n\t\treturn '<ul class=\"social-icons\">'. $social_icons .'</ul>';\n\t}", "title": "" }, { "docid": "9d85814a6adbf5b5c391c117614e135b", "score": "0.65899867", "text": "function childtheme_social_icon_fonts() { ?>\n <aside class=\"aside social\">\n <section>\n <ul class=\"social-icons\">\n <li class=\"social-twitter\"><a class=\"icon-twitter\" href=\"http://twitter.com/usabilitydick\" title=\"Twitter\"><span>Twitter</span></a></li>\n <li class=\"social-codepen\"><a class=\"icon-codepen\" href=\"http://codepen.io/scottnix\" title=\"Codpen\"><span>Codepen</span></a></li>\n <li class=\"social-github\"><a class=\"icon-github\" href=\"https://github.com/scottnix\" title=\"Github\"><span>Github</span></a></li>\n <li class=\"social-rss\"><a class=\"icon-rss\" href=\"http://feeds.feedburner.com/snix\" title=\"RSS\"><span>RSS</span></a></li>\n </ul>\n </section>\n </aside>\n<?php }", "title": "" }, { "docid": "dbf65356b36ad2c0b7edb773fae0b094", "score": "0.6479714", "text": "function sam_martin_theme_functions_vc_component_sm_social_icon() {\n\tif ( function_exists( 'vc_map' ) ) {\n\t\tvc_map( array(\n\t\t\t\"name\" => esc_html__( \"Potenza Social Icon\", 'smtf' ),\n\t\t\t\"description\" => esc_html__( \"Potenza Social Icon\", 'smtf'),\n\t\t\t\"base\" => \"sm_social_icon\",\n\t\t\t\"class\" => \"custom_social_icon\",\n\t\t\t\"controls\" => \"full\",\n\t\t\t\"icon\" => 'icon-sam-martin-vc',\n\t\t\t\"category\" => esc_html__('Potenza', 'smtf'),\n\t\t\t\"show_settings_on_create\" => true,\n\t\t\t\"params\" => array(\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\"holder\" => \"div\",\n\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\"heading\" => esc_html__(\"Facebook\", 'smtf'),\n\t\t\t\t\t\"description\" => esc_html__(\"Enter facebook link.\", 'smtf'),\n\t\t\t\t\t\"param_name\" => \"facebook_link\",\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\"holder\" => \"div\",\n\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\"heading\" => esc_html__(\"Twitter\", 'smtf'),\n\t\t\t\t\t\"description\" => esc_html__(\"Enter twitter link.\", 'smtf'),\n\t\t\t\t\t\"param_name\" => \"twitter_link\",\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\"holder\" => \"div\",\n\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\"heading\" => esc_html__(\"Dribbble\", 'smtf'),\n\t\t\t\t\t\"description\" => esc_html__(\"Enter dribbble link.\", 'smtf'),\n\t\t\t\t\t\"param_name\" => \"dribbble_link\",\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\"holder\" => \"div\",\n\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\"heading\" => esc_html__(\"Vimeo\", 'smtf'),\n\t\t\t\t\t\"description\" => esc_html__(\"Enter vimeo link.\", 'smtf'),\n\t\t\t\t\t\"param_name\" => \"vimeo_link\",\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\"holder\" => \"div\",\n\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\"heading\" => esc_html__(\"Pinterest\", 'smtf'),\n\t\t\t\t\t\"description\" => esc_html__(\"Enter pinterest link.\", 'smtf'),\n\t\t\t\t\t\"param_name\" => \"pinterest_link\",\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\"holder\" => \"div\",\n\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\"heading\" => esc_html__(\"Behance\", 'smtf'),\n\t\t\t\t\t\"description\" => esc_html__(\"Enter behance link.\", 'smtf'),\n\t\t\t\t\t\"param_name\" => \"behance_link\",\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\"holder\" => \"div\",\n\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\"heading\" => esc_html__(\"Linkedin\", 'smtf'),\n\t\t\t\t\t\"description\" => esc_html__(\"Enter linkedin link.\", 'smtf'),\n\t\t\t\t\t\"param_name\" => \"linkedin_link\",\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"type\" => \"textfield\",\n\t\t\t\t\t\"holder\" => \"div\",\n\t\t\t\t\t\"class\" => \"\",\n\t\t\t\t\t\"heading\" => esc_html__(\"Github\", 'smtf'),\n\t\t\t\t\t\"description\" => esc_html__(\"Enter github link.\", 'smtf'),\n\t\t\t\t\t\"param_name\" => \"github_link\",\n\t\t\t\t),\n\t\t\t)\n\t\t) );\n\t}\n}", "title": "" }, { "docid": "238ec3192ec6b1c088901bc7fc811e88", "score": "0.639462", "text": "function shop_isle_social_icons() {\n\t\tif ( class_exists( 'Subscribe_And_Connect', false ) ) {\n\t\t\techo '<div class=\"subscribe-and-connect-connect\">';\n\t\t\tsubscribe_and_connect_connect();\n\t\t\techo '</div>';\n\t\t}\n\t}", "title": "" }, { "docid": "0d143d3478a760614034b0c5ecabc5cf", "score": "0.63743556", "text": "function _s_get_addtoany_share_icons( $url = '', $title = '' ) {\n\t\n\tglobal $post;\n\t\n\t$socials = array(\n\t\t\t'facebook' => 'facebook',\n\t\t\t'twitter' => 'twitter',\n 'pinterest' => 'pinterest',\n 'linkedin' => 'linkedin',\n 'google_plus' => 'google_plus'\n \t);\n\t\n\t\n\t$anchor_class = 'a2a_button_'; // a2a_button_\n\t\n\t$list = '';\n\t\n\t\n\t\n\tforeach( $socials as $network => $icon ) {\n\t\t\n\t\t$svg = get_svg( $icon );\n\t\t\n\t\t$list .= sprintf('<li class=\"%1$s\"><a class=\"%2$s%1$s\">%3$s<span class=\"screen-reader-text\">%1$s</span></a></li>', $network, $anchor_class, $svg );\t\n\t\t\n\t}\n\t\t\t\n\treturn sprintf( '<ul class=\"share-icons a2a_kit clearfix\" data-a2a-url=\"%s\" data-a2a-title=\"%s\">%s</ul>', $url, $title, $list );\n}", "title": "" }, { "docid": "eeeb9d192640c5c01e1b23cb1f7607d9", "score": "0.6345341", "text": "public function buttonIcon()\n\t{\n\t\treturn 'twitter';\n\t}", "title": "" }, { "docid": "0923d4711d1abd6b6b3685a493237f30", "score": "0.6312388", "text": "function the_venue_twitter( $link ) {\n if( $link ) {\n echo sprintf( '<a href=\"%s\" class=\"share share-tw\" data-network=\"\"><i class=\"network icon icon-tw\"></i></a>', $link );\n }\n}", "title": "" }, { "docid": "775d9be67164f7fa31f7822e4efefcf7", "score": "0.6266989", "text": "function pmc_socialLinkSingle() {\n\tglobal $pmc_data; \n\t$social = '';\n\t$social ='<div class=\"addthis_toolbox\"><div class=\"custom_images\">';\n\t$social .= '<a class=\"addthis_button_facebook\" ></a>'; \n\t$social .= '<a class=\"addthis_button_twitter\" ></a>'; \n\t$social .= '<a class=\"addthis_button_email\" ></a>'; \n\t$social .='<a class=\"addthis_button_more\"></a></div><script type=\"text/javascript\" src=\"http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f3049381724ac5b\"></script>';\t\n\t$social .= '</div>'; \n\techo $social;\n}", "title": "" }, { "docid": "8c1ae056055b939e26e0d292da42dde9", "score": "0.6261905", "text": "function thyme_social_icons($menu, $args) {\n\t$args = (array)$args;\n\tif ( 'primary' !== $args['theme_location'] )\n\t\treturn $menu;\n\t\n\tob_start();\n\t$mini_logo = get_theme_mod( 'thyme-mini-logo', thyme_get_default_mini_logo() );\n\t$mini_logo_link = sprintf( '<a class=\"mini-logo-link\" href=\"%1$s\"><img class=\"mini-logo\" src=\"%2$s\" alt=\"%3$s\" /></a>', trailingslashit( home_url() ), esc_url( $mini_logo ), get_bloginfo( 'name' ) );\n\n\tif ( $mini_logo ) {\n\t\techo $mini_logo_link; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t}\n\t\n\t\techo '<li class=\"nav-social\">';\n\t\tgenesis_widget_area('nav-social-menu');\n\t\techo '</li>';\n\t$social = ob_get_clean();\n\treturn $menu . $social;\n\t\n}", "title": "" }, { "docid": "bd47567343443fc05fe141f5963ebccc", "score": "0.6260257", "text": "function the_instructor_twitter( $link ) {\n if( $link )\n echo sprintf( '<li><a href=\"%s\" target=\"_blank\" class=\"share share-tw\" data-network=\"\"><i class=\"network icon icon-tw\"></i></a></li>', $link );\n}", "title": "" }, { "docid": "11078e6849b22377ebd5f80c56f30488", "score": "0.6253841", "text": "public function getSocialTypeDescription()\n {\n return BaseController::translate('pxasocialfeed_module.labels.type.' . $this->getSocialType());\n }", "title": "" }, { "docid": "760a8b3f44c30155ab934be54cf194aa", "score": "0.62445194", "text": "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "45414eaf4f3a19898b7840e52f9612a4", "score": "0.62342936", "text": "function social($atts, $content = null) { \n\t\textract(shortcode_atts(array( \n\t\t\t'blog' => '', \n\t\t\t'facebook' => '', \n\t\t\t'twitter' => '', \n\t\t\t'flickr' => '', \n\t\t\t'linkedin' => '', \n\t\t\t'lastfm' => '', \n\t\t\t'aboutme' => '', \n\t\t\t'youtube' => '', \n\t\t\t'vimeo' => '', \n\t\t\t'delicious' => '', \n\t\t\t'digg' => '', \n\t\t\t'posterous' => '', \n\t\t\t'tumblr' => '', \n\t\t\t'dribbble' => '', \n\t\t), $atts));\n\t\t\t\n\t\t$social_karma_line .= $atts['blog'] != '' ? '<a href=\"'.$atts['blog'].'\" class=\"social_blog\" target=\"_blank\">Blog</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['facebook'] != '' ? '<a href=\"http://facebook.com/'.$atts['facebook'].'\" class=\"social_facebook\" target=\"_blank\">Facebook</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['twitter'] != '' ? '<a href=\"http://twitter.com/'.$atts['twitter'].'\" class=\"social_twitter\" target=\"_blank\">Twitter</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['flickr'] != '' ? '<a href=\"http://flickr.com/'.$atts['flickr'].'\" class=\"social_flickr\" target=\"_blank\">Flickr</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['lastfm'] != '' ? '<a href=\"http://www.linkedin.com/in/'.$atts['linkedin'].'\" class=\"social_linkedin\" target=\"_blank\">LinkedIn</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['aboutme'] != '' ? '<a href=\"http://last.fm/user/'.$atts['lastfm'].'\" class=\"social_lastfm\" target=\"_blank\">Last.fm</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['youtube'] != '' ? '<a href=\"http://about.me/'.$atts['aboutme'].'\" class=\"social_aboutme\" target=\"_blank\">About.Me</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['vimeo'] != '' ? '<a href=\"http://www.youtube.com/user/'.$atts['youtube'].'\" class=\"social_youtube\" target=\"_blank\">YouTube</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['delicious'] != '' ? '<a href=\"http://vimeo.com/'.$atts['vimeo'].'\" class=\"social_vimeo\" target=\"_blank\">Vimeo</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['digg'] != '' ? '<a href=\"http://digg.com/'.$atts['digg'].'\" class=\"social_digg\" target=\"_blank\">Digg</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['posterous'] != '' ? '<a href=\"http://'.$atts['posterous'].'.posterous.com/\" class=\"social_posterous\" target=\"_blank\">Posterous</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['tumblr'] != '' ? '<a href=\"http://'.$atts['tumblr'].'.tumblr.com/\" class=\"social_tumblr\" target=\"_blank\">Tumblr</a>&nbsp' : '';\t\n\t\t$social_karma_line .= $atts['dribbble'] != '' ? '<a href=\"http://dribbble.com/'.$atts['dribbble'].'\" class=\"social_dribbble\" target=\"_blank\">Dribbble</a>&nbsp' : '';\t\n\t\t\t\n\t\treturn $content . '&nbsp;<span class=\"social_karma_links\"><span class=\"social_karma_links_bracket1\">'.get_option('social_bracket_1').'&nbsp;</span>' . $social_karma_line . '<span class=\"social_karma_links_bracket2\">'.get_option('social_bracket_2').'</span></span> ';\n\t\n\t}", "title": "" }, { "docid": "a4cf568f15905d23abe4c95a50005fbf", "score": "0.6220812", "text": "private function get_social_title_template()\n {\n }", "title": "" }, { "docid": "a4cf568f15905d23abe4c95a50005fbf", "score": "0.6219896", "text": "private function get_social_title_template()\n {\n }", "title": "" }, { "docid": "fb7bb81243d8014eed49a904ae301367", "score": "0.6201841", "text": "function kapee_template_single_tag_social_share() {\n\t\t\n\t\t$args = array();\n\t\t$args['is_tag_enable'] \t\t= kapee_get_option( 'single-post-tag', 1 );\n\t\t$args['is_share_enable'] \t= kapee_get_option( 'single-post-social-share-link', 1 );\n\t\t$args['social_icons_style'] = kapee_get_option( 'social-sharing-icons-style','icons-bordered' );\n\t\t$args['social_icons_shape'] = kapee_get_option( 'sharing-icons-shape','icons-shape-circle' );\n\t\t$args['social_icons_size'] = kapee_get_option( 'sharing-icons-size','icons-size-default' );\n\t\t\n\t\tkapee_get_template( 'template-parts/single-post/tags-social-share', $args );\t\t\n\t}", "title": "" }, { "docid": "754484130925832af701daf84183ab95", "score": "0.6195694", "text": "function display_social_sharing_buttons() {\n\n $content = \"\";\n\n // Get current page URL\n $crunchifyURL = urlencode(get_permalink());\n $crunchifyTitle = htmlspecialchars(urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8');\n $rawTitle = rawurlencode(html_entity_decode(get_the_title()));\n\n ob_start();\n the_advanced_excerpt('length=12&length_type=words&no_custom=0&finish=sentence&no_shortcode=1&ellipsis=&add_link=0&exclude_tags=p,div,img,b,figure,figcaption,strong,em,i,ul,li,a,ol,h1,h2,h3,h4');\n $excerpt = ob_get_contents();\n ob_end_clean();\n\n $crunchifyDesc = rawurlencode('A story from Latitude 38:') . '%0A%0A' . rawurlencode(html_entity_decode(strip_tags($excerpt)));\n\n // $crunchifyTitle = str_replace( ' ', '%20', get_the_title());\n\n // Get Post Thumbnail for pinterest\n $crunchifyThumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );\n\n // Construct sharing URL without using any script\n $twitterURL = 'https://twitter.com/intent/tweet?text='.$crunchifyTitle.'&amp;url='.$crunchifyURL;\n $facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.$crunchifyURL;\n $emailURL = 'mailto:?subject=From%20Latitude%2038: ' . $rawTitle . '&amp;body=' . $crunchifyDesc . '%0A%0A' . $crunchifyURL . rawurlencode('?utm_source=l38_webshare&utm_medium=email');\n\n\n // Add sharing button at the end of page/page content\n $content .= '<div class=\"social-buttons\">';\n $content .= ' <span class=\"intro\">SHARE ON</span>';\n $content .= ' <a class=\"social-link social-twitter\" href=\"'. $twitterURL .'\" target=\"_blank\" data-gacategory=\"Share\" data-gatitle=\"Twitter\" data-galabel=\"' . get_page_uri() . '\" ><i class=\"fa fa-twitter\"></i><span class=\"social-text\">Tweet</a>';\n $content .= ' <a class=\"social-link social-facebook\" href=\"'.$facebookURL.'\" target=\"_blank\" data-gacategory=\"Share\" data-gatitle=\"Facebook\" data-galabel=\"' . get_page_uri() . '\" ><i class=\"fa fa-facebook\"></i><span class=\"social-text\">Share</a>';\n $content .= ' <a class=\"social-link social-email\" href=\"' . $emailURL . '\" data-gacategory=\"Share\" data-gatitle=\"Email\" data-galabel=\"' . get_page_uri() . '\" ><i class=\"fa fa-envelope\"></i><span class=\"social-text\">Email</a>';\n $content .= '</div>';\n\n echo $content;\n\n}", "title": "" }, { "docid": "6b9c53462bea334c00088d07a122d1f5", "score": "0.61907", "text": "function socials1($twitch, $fb, $yt, $twitter, $linkedIn, $pw1, $pw2){\n $socials = '<div class=\"social\">';\n if ($twitch != null){\n $socials .= '<a href=\"'.$twitch.'\"><i class=\"fa fa-twitch\"></i></a>';\n }\n\n if ($fb != null){\n $socials .= '<a href=\"'.$fb.'\"><i class=\"fa fa-facebook\"></i></a>';\n }\n \n if ($yt != null){\n $socials .= '<a href=\"'.$yt.'\"><i class=\"fa fa-youtube-play\"></i></a>';\n }\n\n if ($twitter != null){\n $socials .= '<a href=\"'.$twitter.'\"><i class=\"fa fa-twitter\"></i></a>';\n }\n\n if ($linkedIn != null){\n $socials .= '<a href=\"'.$linkedIn.'\"><i class=\"fa fa-linkedin\"></i></a>';\n }\n\n if ($pw1 != null){\n $socials .= '<a href=\"'.$pw1.'\"><i class=\"fa fa-globe\"></i></a>';\n }\n\n if ($pw2 != null){\n $socials .= '<a href=\"'.$pw2.'\"><i class=\"fa fa-globe\"></i></a>';\n }\n\n $socials .= '</div>';\n\n return $socials;\n}", "title": "" }, { "docid": "77a09c5ceb9fa6f223f5f2648a996d36", "score": "0.6187809", "text": "function atom_site_icon() {}", "title": "" }, { "docid": "a662b9c999dfa393f05db51d392c54de", "score": "0.61561215", "text": "function get_wke2014_socialmediaicons() {\r\n global $options;\r\n global $default_socialmedia_liste;\r\n $zeigeoption = $options['aktiv-socialmediabuttons'];\r\n\r\n if ($zeigeoption != 1) {\r\n\treturn;\r\n }\r\n $result = '';\r\n $links = '';\r\n $result .= '<div class=\"socialmedia_iconbar\">';\r\n $result .= '<ul class=\"socialmedia\">';\r\n foreach ( $default_socialmedia_liste as $entry => $listdata ) {\r\n $value = '';\r\n $active = 0;\r\n if (isset($options['sm-list'][$entry]['content'])) {\r\n $value = $options['sm-list'][$entry]['content'];\r\n } else {\r\n $value = $default_socialmedia_liste[$entry]['content'];\r\n }\r\n if (isset($options['sm-list'][$entry]['active'])) {\r\n $active = $options['sm-list'][$entry]['active'];\r\n }\r\n if (($active ==1) && ($value)) {\r\n $links .= '<li><a class=\"icon_'.$entry.'\" href=\"'.$value.'\">';\r\n $links .= $listdata['name'].'</a></li>';\r\n\t $links .= \"\\n\";\r\n }\r\n }\r\n\r\n if (strlen($links) > 1) {\r\n\t$result .= $links;\r\n\t$result .= '</ul>';\r\n\t$result .= '</div>';\r\n\techo $result;\r\n } else {\r\n\treturn;\r\n }\r\n\r\n\r\n}", "title": "" }, { "docid": "5b3ed105b4d0236e1cc16b9d195515ea", "score": "0.6150938", "text": "function shiftr_social_media_links( array $socials = [], string $format = 'icon' ) {\n\n $allowed_socials = [\n 'facebook' => [\n 'yoast_key' => 'facebook_site',\n 'prepend' => '',\n 'svg' => '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"11.44\" height=\"22.187\" viewBox=\"0 0 11.44 22.187\"><path d=\"M3.324,22.186V12.263H0V8.32H3.324V5.213C3.324,1.837,5.386,0,8.4,0A27.9,27.9,0,0,1,11.44.156V3.683H9.351c-1.638,0-1.954.78-1.954,1.92V8.32h3.7l-.507,3.943H7.4v9.923\" /></svg>'\n ],\n 'instagram' => [\n 'yoast_key' => 'instagram_url',\n 'prepend' => '',\n 'svg' => '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16.471\" height=\"16.468\" viewBox=\"0 0 16.471 16.468\"><path d=\"M8.163,35.837a4.222,4.222,0,1,0,4.222,4.222A4.215,4.215,0,0,0,8.163,35.837Zm0,6.967a2.745,2.745,0,1,1,2.745-2.745A2.75,2.75,0,0,1,8.163,42.8Zm5.38-7.14a.985.985,0,1,1-.985-.985A.983.983,0,0,1,13.542,35.664Zm2.8,1a4.873,4.873,0,0,0-1.33-3.45,4.906,4.906,0,0,0-3.45-1.33c-1.36-.077-5.435-.077-6.794,0a4.9,4.9,0,0,0-3.45,1.327,4.889,4.889,0,0,0-1.33,3.45c-.077,1.36-.077,5.435,0,6.794a4.874,4.874,0,0,0,1.33,3.45,4.912,4.912,0,0,0,3.45,1.33c1.36.077,5.435.077,6.794,0a4.874,4.874,0,0,0,3.45-1.33,4.906,4.906,0,0,0,1.33-3.45C16.416,42.095,16.416,38.023,16.339,36.664Zm-1.756,8.25a2.779,2.779,0,0,1-1.565,1.565c-1.084.43-3.656.331-4.854.331s-3.774.1-4.854-.331a2.779,2.779,0,0,1-1.565-1.565c-.43-1.084-.331-3.656-.331-4.854s-.1-3.774.331-4.854a2.779,2.779,0,0,1,1.565-1.565c1.084-.43,3.656-.331,4.854-.331s3.774-.1,4.854.331A2.779,2.779,0,0,1,14.582,35.2c.43,1.084.331,3.656.331,4.854S15.012,43.833,14.582,44.913Z\" transform=\"translate(0.075 -31.825)\" /></svg>'\n ],\n 'twitter' => [\n 'yoast_key' => 'twitter_site',\n 'prepend' => 'https://twitter.com/',\n 'svg' => '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"27.946\" height=\"22.697\" viewBox=\"0 0 27.946 22.697\"><path d=\"M25.073,53.738c.018.248.018.5.018.745,0,7.572-5.763,16.3-16.3,16.3A16.185,16.185,0,0,1,0,68.208a11.847,11.847,0,0,0,1.383.071,11.47,11.47,0,0,0,7.111-2.447A5.738,5.738,0,0,1,3.139,61.86a7.223,7.223,0,0,0,1.082.089,6.057,6.057,0,0,0,1.507-.2,5.728,5.728,0,0,1-4.593-5.621v-.071a5.768,5.768,0,0,0,2.589.727,5.736,5.736,0,0,1-1.773-7.66A16.28,16.28,0,0,0,13.76,55.122a6.466,6.466,0,0,1-.142-1.312,5.733,5.733,0,0,1,9.912-3.919,11.276,11.276,0,0,0,3.635-1.383,5.712,5.712,0,0,1-2.518,3.156,11.482,11.482,0,0,0,3.3-.887,12.312,12.312,0,0,1-2.873,2.961Z\" transform=\"translate(0 -48.082)\" /></svg>'\n ],\n 'youtube' => [\n 'yoast_key' => 'youtube_url',\n 'prepend' => '',\n 'svg' => ''\n ],\n 'linkedin' => [\n 'yoast_key' => 'linkedin_url',\n 'prepend' => '',\n 'svg' => '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"21.653\" height=\"21.648\" viewBox=\"0 0 21.653 21.648\"><path d=\"M4.847,53.648H.358V39.2H4.847ZM2.6,37.224A2.612,2.612,0,1,1,5.2,34.6,2.621,2.621,0,0,1,2.6,37.224ZM21.648,53.648H17.169V46.612c0-1.677-.034-3.827-2.334-3.827-2.334,0-2.692,1.822-2.692,3.706v7.156H7.659V39.2h4.305v1.972h.063a4.717,4.717,0,0,1,4.247-2.334c4.542,0,5.378,2.991,5.378,6.876v7.939Z\" transform=\"translate(0 -32)\" /></svg>'\n ]\n ];\n\n $social_links = [];\n\n /**\n * Ckeck if using Yoast SEO.\n */\n $using_yoast = is_plugin_active( 'wordpress-seo/wp-seo.php' );\n\n if ( $using_yoast ) {\n $socials = get_option( 'wpseo_social' );\n } else {\n $socials = get_field( 'social_media', 'option' );\n }\n \n foreach ( $allowed_socials as $social => $options ) {\n $url = ! empty( $socials[ $social ] ) ? $socials[ $social ] : false;\n \n if ( $using_yoast ) {\n $url = ! empty( $socials[ $options['yoast_key'] ] ) ? $socials[ $options['yoast_key'] ] : false;\n }\n\n if ( $url ) {\n if ( ! empty( $options['prepend'] ) ) {\n $url = $options['prepend'] . $url;\n }\n\n $label = 'See us on ' . $social;\n\n if ( $format == 'array' ) {\n $social_links[ $social ] = $url;\n\n } else {\n $social_links[] = sprintf( '<a href=\"%s\" class=\"social-link %s\" aria-label=\"%s\">%s</a>', $url, $social, $label, $options['svg'] );\n }\n }\n }\n\n if ( $format == 'array' ) {\n return $social_links;\n }\n\n printf( '<div class=\"social-media-links\">%s</div>', implode( '', $social_links ) );\n}", "title": "" }, { "docid": "7d87eb62399bc1ac50cc07f631eff682", "score": "0.6146292", "text": "function mts_social_buttons() {\n $mts_options = get_option( MTS_THEME_NAME );\n $buttons = array();\n if ( isset( $mts_options['mts_social_buttons'] ) && is_array( $mts_options['mts_social_buttons'] ) && array_key_exists( 'enabled', $mts_options['mts_social_buttons'] ) ) {\n $buttons = $mts_options['mts_social_buttons']['enabled'];\n }\n if ( ! empty( $buttons ) ) {\n ?>\n <!-- Start Share Buttons -->\n <div class=\"shareit <?php echo $mts_options['mts_social_button_position']; ?>\">\n <?php foreach( $buttons as $key => $button ) { mts_social_button( $key ); } ?>\n </div>\n <!-- end Share Buttons -->\n <?php\n }\n }", "title": "" }, { "docid": "906386071d5d623d00908150423e1947", "score": "0.60834605", "text": "function show_socials() { ?>\n\t\t<?php if(get_options_data('social-media', 'show-socials') == \"yes\") { ?>\n\t\t\t<ul>\n\t\t\t\t<?php if(get_options_data('social-media', 'facebook') !=\"\") { ?>\n\t\t\t\t\t<li><a href=\"<?php echo get_options_data('social-media', 'facebook') ?>\" class=\"facebook\"><?php if(get_options_data('social-media', 'show-social-text') == \"yes\") { ?>facebook<?php } ?></a></li>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if(get_options_data('social-media', 'twitter') !=\"\") { ?>\n\t\t\t\t\t<li><a href=\"<?php echo get_options_data('social-media', 'twitter') ?>\" class=\"twitter\"><?php if(get_options_data('social-media', 'show-social-text') == \"yes\") { ?>twitter<?php } ?></a></li>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if(get_options_data('social-media', 'youtube') !=\"\") { ?>\n\t\t\t\t\t<li><a href=\"<?php echo get_options_data('social-media', 'youtube') ?>\" class=\"youtube\"><?php if(get_options_data('social-media', 'show-social-text') == \"yes\") { ?>youtube<?php } ?></a></li>\n\t\t\t\t<?php } ?>\n\t\t\t\t<?php if(get_options_data('social-media', 'google') !=\"\") { ?>\n\t\t\t\t\t<li><a href=\"<?php echo get_options_data('social-media', 'google') ?>\" class=\"google\"><?php if(get_options_data('social-media', 'show-social-text') == \"yes\") { ?>google+<?php } ?></a></li>\n\t\t\t\t<?php } ?>\n\t\t\t</ul>\n\t\t<?php } //End Show Socials Options\n\t}", "title": "" }, { "docid": "120c8b348e68927a8b4882b7d4722727", "score": "0.6083316", "text": "public function hasSocialIcons()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0069617d4eb5d57f1c0dc23442892839", "score": "0.6057508", "text": "public static function socialMediaMenu(){\n $settings = new Settings();\n $socialMedia = $settings->getSocialMediaSettings();\n\n $mediaMenu = '<div class=\"social text-sm\"><span>Follow Us</span></div>'.\n '<div class=\"social-icons\">';\n foreach($socialMedia as $key => $val){\n $mediaMenu .= '<a href=\"http://'.$val.'\" target=\"_blank\"><i class=\"fab fa-'.$key.'\"></i></a>';\n }\n $mediaMenu .= '</div>';\n return $mediaMenu;\n }", "title": "" }, { "docid": "8a29fe30dd311d331386adc5049fea58", "score": "0.60558087", "text": "function themeists_easy_share_shortcode( $atts )\n\t{\n\n\t\textract( shortcode_atts( array(\n\t\t\t'size' => '',\n\t\t\t'services' => ''\n\t\t), $atts ) );\n\n\t\tglobal $themeists_easy_share;\n\n\t\t$services_wl = array();\n\n\t\tif( $themeists_easy_share->services )\n\t\t\t$services_wl = explode( ',', str_replace( ' ', '', esc_attr( $services ) ) );\n\t\t\n\t\treturn $themeists_easy_share->do_social( esc_attr( $size ), $services_wl );\n\n\t}", "title": "" }, { "docid": "1c9986b250a310ee73585c9d4cda8496", "score": "0.60519683", "text": "public function icon_attr( $args ) {\n\t\t\t\tglobal $fusion_settings;\n\n\t\t\t\tif ( ! empty( $this->args['pinterest_image'] ) ) {\n\n\t\t\t\t\t$image_data = fusion_library()->images->get_attachment_data_by_helper( $this->args['pinterest_image_id'], $this->args['pinterest_image'] );\n\n\t\t\t\t\tif ( $image_data['url'] ) {\n\t\t\t\t\t\t$this->args['pinterest_image'] = $image_data['url'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$description = $this->args['description'];\n\t\t\t\t$link = $this->args['link'];\n\t\t\t\t$title = $this->args['title'];\n\t\t\t\t$image = rawurlencode( $this->args['pinterest_image'] );\n\n\t\t\t\t$attr = [\n\t\t\t\t\t'class' => 'fusion-social-network-icon fusion-tooltip fusion-' . $args['social_network'] . ' fusion-icon-' . $args['social_network'],\n\t\t\t\t];\n\n\t\t\t\t$social_link = '';\n\t\t\t\tswitch ( $args['social_network'] ) {\n\t\t\t\t\tcase 'facebook':\n\t\t\t\t\t\t$social_link = 'https://m.facebook.com/sharer.php?u=' . $link;\n\t\t\t\t\t\t// TODO: Use Jetpack's implementation instead.\n\t\t\t\t\t\tif ( ! wp_is_mobile() ) {\n\t\t\t\t\t\t\t$social_link = 'https://www.facebook.com/sharer.php?u=' . rawurlencode( $link ) . '&t=' . rawurlencode( $title );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'twitter':\n\t\t\t\t\t\t$social_link = 'https://twitter.com/share?text=' . rawurlencode( html_entity_decode( $title, ENT_COMPAT, 'UTF-8' ) ) . '&url=' . rawurlencode( $link );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'linkedin':\n\t\t\t\t\t\t$social_link = 'https://www.linkedin.com/shareArticle?mini=true&url=' . rawurlencode( $link ) . '&title=' . rawurlencode( $title ) . '&summary=' . rawurlencode( $description );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'reddit':\n\t\t\t\t\t\t$social_link = 'http://reddit.com/submit?url=' . $link . '&amp;title=' . $title;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'whatsapp':\n\t\t\t\t\t\t$social_link = 'https://api.whatsapp.com/send?text=' . rawurlencode( $link );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tumblr':\n\t\t\t\t\t\t$social_link = 'http://www.tumblr.com/share/link?url=' . rawurlencode( $link ) . '&amp;name=' . rawurlencode( $title ) . '&amp;description=' . rawurlencode( $description );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'pinterest':\n\t\t\t\t\t\t$social_link = 'http://pinterest.com/pin/create/button/?url=' . rawurlencode( $link ) . '&amp;description=' . rawurlencode( $description ) . '&amp;media=' . $image;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vk':\n\t\t\t\t\t\t$social_link = 'http://vkontakte.ru/share.php?url=' . rawurlencode( $link ) . '&amp;title=' . rawurlencode( $title ) . '&amp;description=' . rawurlencode( $description );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mail':\n\t\t\t\t\t\t$social_link = 'mailto:?subject=' . rawurlencode( $title ) . '&body=' . rawurlencode( $link );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$attr['href'] = $social_link;\n\t\t\t\t$attr['target'] = ( $fusion_settings->get( 'social_icons_new' ) && 'mail' !== $args['social_network'] ) ? '_blank' : '_self';\n\n\t\t\t\tif ( '_blank' === $attr['target'] && 'facebook' !== $args['social_network'] ) {\n\t\t\t\t\t$attr['rel'] = 'noopener noreferrer';\n\t\t\t\t}\n\n\t\t\t\tif ( $fusion_settings->get( 'nofollow_social_links' ) ) {\n\t\t\t\t\t$attr['rel'] = ( isset( $attr['rel'] ) ) ? $attr['rel'] . ' nofollow' : 'nofollow';\n\t\t\t\t}\n\n\t\t\t\t$attr['style'] = ( $args['icon_color'] ) ? 'color:' . $args['icon_color'] . ';' : '';\n\n\t\t\t\tif ( isset( $this->args['icons_boxed'] ) && 'yes' === $this->args['icons_boxed'] && $args['box_color'] ) {\n\t\t\t\t\t$attr['style'] .= 'background-color:' . $args['box_color'] . ';border-color:' . $args['box_color'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( 'yes' === $this->args['icons_boxed'] && $this->args['icons_boxed_radius'] || '0' === $this->args['icons_boxed_radius'] ) {\n\t\t\t\t\tif ( 'round' === $this->args['icons_boxed_radius'] ) {\n\t\t\t\t\t\t$this->args['icons_boxed_radius'] = '50%';\n\t\t\t\t\t}\n\t\t\t\t\t$attr['style'] .= 'border-radius:' . $this->args['icons_boxed_radius'] . ';';\n\t\t\t\t}\n\n\t\t\t\t$attr['data-placement'] = $this->args['tooltip_placement'];\n\t\t\t\t$tooltip = $args['social_network'];\n\t\t\t\tif ( 'youtube' === $tooltip ) {\n\t\t\t\t\t$tooltip = 'YouTube';\n\t\t\t\t} elseif ( 'linkedin' === $tooltip ) {\n\t\t\t\t\t$tooltip = 'LinkedIn';\n\t\t\t\t}\n\n\t\t\t\t$attr['data-title'] = ucfirst( $tooltip );\n\t\t\t\t$attr['title'] = ucfirst( $tooltip );\n\t\t\t\t$attr['aria-label'] = ucfirst( $tooltip );\n\n\t\t\t\tif ( 'none' !== $this->args['tooltip_placement'] ) {\n\t\t\t\t\t$attr['data-toggle'] = 'tooltip';\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\n\t\t\t}", "title": "" }, { "docid": "16b984328fa4b41247a235af1d013444", "score": "0.60442203", "text": "function wtr_social_media(){\r\n\r\n\t\tglobal $post_settings, $wtr_social_media;\r\n\r\n\t\techo '<div class=\"wtrColOneTwo wtrAlignLeft clearfix\">';\r\n\t\t\techo '<ul class=\"wtrQuickContactSocialLinks\">';\r\n\t\t\t\tforeach ( $wtr_social_media as $key => $value) {\r\n\t\t\t\t\t$social_media_link = $post_settings[ $key ];\r\n\t\t\t\t\tif( ! empty( $social_media_link ) ) {\r\n\t\t\t\t\t\techo '<li> <a class=\" wtrAnimate\" href=\"' . esc_url( $social_media_link ) .'\" target=\"_blank\" ><i class=\"' . esc_attr( $value['icon'] ) .'\"></i></a></li>';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\techo '</ul>';\r\n\t\techo '</div>';\r\n\t}", "title": "" }, { "docid": "a7c2c725af8e1a8f6b50ac7dde44a3ea", "score": "0.6033476", "text": "public static function icon($link) {\n static $icons;\n $icons = self::social_icons();\n\n if (strpos($link, 'mailto:') === 0) {\n return 'mail';\n }\n\n $icon = parse_url($link, PHP_URL_HOST);\n $icon = preg_replace('/.*?(plus\\.google|[^\\.]+)\\.[^\\.]+$/i', '$1', $icon);\n $icon = str_replace('plus.google', 'google-plus', $icon);\n\n if (!in_array($icon, $icons)) {\n $icon = 'social';\n }\n\n return $icon;\n }", "title": "" }, { "docid": "a5f1f5b99d1a01418ae3c107f1cdf392", "score": "0.60280704", "text": "function the_instructor_facebook( $link ) {\n if( $link )\n echo sprintf( '<li><a href=\"%s\" target=\"_blank\" class=\"share share-fb\" data-network=\"\"><i class=\"network icon icon-fb\"></i></a></li>', $link );\n}", "title": "" }, { "docid": "ed4deeaf7ad0a67eab6977e1c2cf9098", "score": "0.60273457", "text": "function the_venue_instagram( $link ) {\n if( $link ) {\n echo sprintf( '<a href=\"%s\" class=\"share share-instagram\" data-network=\"\"><i class=\"network icon icon-instagram\"></i></a>', $link );\n }\n}", "title": "" }, { "docid": "50c806a5d18914dbb4097642dc9ecf71", "score": "0.6019656", "text": "public function displayIcon()\n {\n if (get_the_title() == 'Organized To Advise Entrepreneurs') {\n echo $this->bank;\n } elseif (get_the_title() == 'Entrepreneurial Growth Challenges') {\n echo $this->chart;\n } elseif (get_the_title() == 'Managing Working Relationships') {\n echo $this->scale;\n } elseif (get_the_title() == 'Real Estate') {\n echo $this->building;\n } elseif (get_the_title() == 'Pay Only When In Need Of Advice') {\n echo $this->mastercard;\n } elseif (get_the_title() == 'Get First Legal Consultation Free') {\n echo $this->gift;\n } elseif (get_the_title() == 'Prepare Your Business For Growth') {\n echo $this->lineChart;\n } elseif (get_the_title() == 'Corporate Governance') {\n echo $this->umbrella;\n } else {\n echo $this->pie;\n }\n }", "title": "" }, { "docid": "43f418d2f1cb8395df41c2289f8ca2f7", "score": "0.6017512", "text": "function the_instructor_instagram( $link ) {\n if( $link )\n echo sprintf( '<li><a href=\"%s\" target=\"_blank\" class=\"share share-instagram\" data-network=\"\"><i class=\"network icon icon-instagram\"></i></a></li>', $link );\n}", "title": "" }, { "docid": "b79cff3234b2586395b26762adc61791", "score": "0.60037345", "text": "function get_liked_icon() {\r\n\t/* If already using Font Awesome with your theme, replace svg with: <i class=\"fa fa-heart\"></i> */\r\n\t$icon = '<i class=\"fa fa-heart\"></i>';\r\n\treturn $icon;\r\n}", "title": "" }, { "docid": "5aa49c064076ad9de7c2c89eb2353c85", "score": "0.60028183", "text": "function media_footer($class=null, $max=9){\n\t$class.= get_theme_option('social_label') ? ' label' : ' no-label';\n\t$class.= get_theme_option('social_color') ? ' colored' : ' no-color';\n\tif( $social=media_array($max) ){\n\t\treturn '<div class=\"link-icons '.$class.'\">'.implode(' ',$social).'</div>';\n\t}\n}", "title": "" }, { "docid": "ade5caac6661aa071d2c81fa31c58210", "score": "0.60003257", "text": "function fluxus_footer_social_share() {\n $args = array(\n 'id' => 'sharrre-footer',\n 'data-buttons-title' => __( 'Share this page', 'fluxus' )\n );\n $html = fluxus_get_social_share( $args );\n if ( $html ) {\n echo $html;\n }\n}", "title": "" }, { "docid": "98dadbf533579c6b0144422116da16fb", "score": "0.5993923", "text": "function molecular_social() {\r\n\r\n global $social_networks;\r\n $html = \"\";\r\n\t$network_count = 0;\r\n\t$links = array();\r\n\tforeach( $social_networks as $network ){\r\n\t\t$link = get_theme_mod($network);\r\n\t\tif( $link ){\r\n\t\t\t$links[$network] = $link;\r\n\t\t\t$network_count++;\r\n\t\t}\r\n\t}\r\n\tif( $network_count >= 1 ){\r\n\t\t$html .= '<div class=\"molecular_social\">';\r\n\t\tforeach( $links as $network => $link ){\r\n\t\t\t$html .= \"<a target='_blank' class='social-icon fa fa-$network' href='$link'></a>\";\r\n\t\t}\r\n $html .= '</div>';\r\n echo $html;\r\n\t}\r\n}", "title": "" }, { "docid": "ac7c401408846da6855bed1583d046de", "score": "0.5989382", "text": "function woo_slg_can_show_social_link( $social = '' ) {\n\t\n\tglobal $current_user;\n\t\n\t$display = false;\n\t\n\t//user id not found\n\t$user_id\t\t= isset( $current_user->ID ) ? $current_user->ID : '';\n\t\n\tif( !empty( $user_id ) ) {\n\t\t\n\t\t//get primary social api\n\t\t$primary_social\t= get_user_meta( $user_id, 'woo_slg_social_user_connect_via', true );\n\t\t\n\t\t//get currunt social api meta\n\t\t$social_profile = get_user_meta( $user_id, 'woo_slg_social_' . $social . '_data', true );\n\t\t\n\t\t// check current provider is linked or not\n\t\tif ( !$social_profile && $primary_social != $social ) {\n\t\t\t\n\t\t\t$display = true;\n\t\t}\n\t}\n\t\n\treturn apply_filters( 'woo_slg_can_display_social_link', $display, $social );\n}", "title": "" }, { "docid": "29d093c380bc34e5901de5084499e647", "score": "0.5986914", "text": "public function view_social_icon(){\r\n\t\t$socialIconsArray=DB::table('settings')->select('url','title','id')->where('type', '=',\"social_icon\")->get();\t\t\r\n\t\tforeach($socialIconsArray as $icon){\r\n\t\t\t$socialIconList[]=array(\"url\"=>$icon->url,\"title\"=>$icon->title,'id'=>$icon->id);\r\n\t\t}\r\n\t\treturn View('admin.settings.social.view',compact('socialIconList'));\r\n\t}", "title": "" }, { "docid": "aeba5882e145d7a18b09c67bf1b2524c", "score": "0.59853655", "text": "function social_links_formatted($html = null)\n{\n $email = get_theme_option(\"email_address\");\n $facebook = get_theme_option(\"facebook_url\");\n $twitter = get_theme_option(\"twitter_url\");\n $instagram = get_theme_option(\"instagram_url\");\n $youtube = get_theme_option(\"youtube_url\");\n $pinterest = get_theme_option(\"pinterest_url\");\n\n if ($email || $facebook || $twitter || $instagram || $youtube || $pinterest) {\n $html .= '<div class=\"social-media-links\">';\n\n $html .= $email\n ? '<a target=\"_blank\" title=\"Email\" class=\"fa fa-envelope hcard\" href=\"' .\n $email .\n '\"></a>'\n : null;\n $html .= $facebook\n ? '<a target=\"_blank\" title=\"Facebook\" class=\"fab fa-facebook hcard\" href=\"' .\n $facebook .\n '\"></a>'\n : null;\n $html .= $twitter\n ? '<a target=\"_blank\" title=\"Twitter\" class=\"fab fa-twitter hcard\" href=\"' .\n $twitter .\n '\"></a>'\n : null;\n $html .= $instagram\n ? '<a target=\"_blank\" title=\"Instagram\" class=\"fab fa-instagram hcard\" href=\"' .\n $instagram .\n '\"></a>'\n : null;\n $html .= $pinterest\n ? '<a target=\"_blank\" title=\"Pinterest\" class=\"fab fa-pinterest hcard\" href=\"' .\n $pinterest .\n '\"></a>'\n : null;\n $html .= $youtube\n ? '<a target=\"_blank\" title=\"Youtube\" class=\"fab fa-youtube hcard\" href=\"' .\n $youtube .\n '\"></a>'\n : null;\n\n $html .= \"</div>\";\n }\n\n return $html;\n}", "title": "" }, { "docid": "016c202a7e51a6c474c94afaa8e0b783", "score": "0.59848464", "text": "public static function header_social_icons_is_on(){\r\n\t\t$opt_name = 'header_social_icons_display';\r\n\t\t$default = false;\r\n\r\n\t\t$output = landpick_get_option( $opt_name, $default );\r\n\t\t$output = apply_filters( 'landpick/header_social_icons_display', $output );\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "add7c90bc43c175069ee262226edabf4", "score": "0.5984655", "text": "function publisher_shortcode_about_get_icons( $atts ) {\n\n\t\t$output = '';\n\n\t\tif ( ! empty( $atts['link_facebook'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item facebook\"><a href=\"' . esc_url( $atts['link_facebook'] ) . '\" target=\"_blank\"><i class=\"fa fa-facebook\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_twitter'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item twitter\"><a href=\"' . esc_url( $atts['link_twitter'] ) . '\" target=\"_blank\"><i class=\"fa fa-twitter\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_google'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item google-plus\"><a href=\"' . esc_url( $atts['link_google'] ) . '\" target=\"_blank\"><i class=\"fa fa-google\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_instagram'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item instagram\"><a href=\"' . esc_url( $atts['link_instagram'] ) . '\" target=\"_blank\"><i class=\"fa fa-instagram\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_email'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item email\"><a href=\"mailto:' . esc_attr( $atts['link_email'] ) . '\" target=\"_blank\"><i class=\"fa fa-envelope\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_youtube'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item youtube\"><a href=\"' . esc_url( $atts['link_youtube'] ) . '\" target=\"_blank\"><i class=\"item-icon bsfi bsfi-youtube\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_dribbble'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item dribbble\"><a href=\"' . esc_url( $atts['link_dribbble'] ) . '\" target=\"_blank\"><i class=\"fa fa-dribbble\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_vimeo'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item vimeo\"><a href=\"' . esc_url( $atts['link_vimeo'] ) . '\" target=\"_blank\"><i class=\"fa fa-vimeo\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_github'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item github\"><a href=\"' . esc_url( $atts['link_github'] ) . '\" target=\"_blank\"><i class=\"fa fa-github\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_behance'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item behance\"><a href=\"' . esc_url( $atts['link_behance'] ) . '\" target=\"_blank\"><i class=\"fa fa-behance\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_pinterest'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item pinterest\"><a href=\"' . esc_url( $atts['link_pinterest'] ) . '\" target=\"_blank\"><i class=\"fa fa-pinterest\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_telegram'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item telegram\"><a href=\"' . esc_url( $atts['link_telegram'] ) . '\" target=\"_blank\"><i class=\"fa fa-send\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $atts['link_vk'] ) ) {\n\t\t\t$output .= '<li class=\"about-icon-item vk\"><a href=\"' . esc_url( $atts['link_vk'] ) . '\" target=\"_blank\"><i class=\"fa fa-vk\"></i></a>';\n\t\t}\n\n\t\tif ( ! empty( $output ) ) {\n\t\t\treturn '<ul class=\"about-icons-list\">' . $output . '</ul>';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "eb8f5cb6907dbeddccc29f413164290e", "score": "0.5976525", "text": "function top_social_menu($atts, $content = null) {\n\t\tglobal $data;\n\n\t\t$pinterest = $data['ab_pinterest_username'];\n\t\t$twitter = $data['ab_twitter_username'];\n\t\t$facebook = $data['ab_facebook_page_url'];\t\n\t\t$youtube = $data['ab_youtube_username'];\n\t\n\n\t\t$social_icons = '';\n\t\tif ($youtube) {\n\t\t\t$social_icons = $social_icons . '<li id=\"youtube\" ><a href=\"http://www.youtube.com/user/'.$youtube.'\"></a></li>';\n\t\t}\n\t\tif ($facebook) {\t\t\t\n $social_icons = $social_icons . '<li id=\"facebook\"><a href=\"'.$facebook.'\"></a></li>';\t\t\n }\t\t\t\t\n if ($twitter) {\t\t\t\n $social_icons = $social_icons . '<li id=\"twitter\"><a href=\"http://www.twitter.com/'.$twitter.'\"></a></li>';\t\t\n }\n\t\tif ($pinterest) {\n\t\t\t$social_icons = $social_icons . '<li id=\"pinterest\"><a href=\"http://www.pinterest.com/'.$pinterest.'/\"></a></li>';\n\t\t}\n $social_icons = $social_icons . '<li id=\"instagram\"><a href=\"http://instagram.com/mygoodnessg/\"></a></li>';\n \n\t\t$social_icons = $social_icons .'<li id=\"cart\"><a href=\"'.get_bloginfo('siteurl').'/store/cart\"></a></li>\n\t\t\t\t <li id=\"search\">\n\t\t\t\t \t<form method=\"get\" action=\"'.get_bloginfo('url').'\" >\n\t\t\t\t \t<label for=\"search-field\"></label>\n\t\t\t\t \t<input type=\"text\" id=\"search-field\" class=\"email\" name=\"s\" placeholder=\"SEARCH\" />\n\t\t\t\t \t</form>\n\t\t\t\t </li>';\n\t\t\n\n\t\treturn '<div id=\"top-social-media\"><ul>'. $social_icons .'</ul></div>';\n\t}", "title": "" }, { "docid": "2e061552afcd43f3e7d8b905aa777b0b", "score": "0.59530306", "text": "function the_venue_facebook( $link ) {\n if( $link ) {\n echo sprintf( '<a href=\"%s\" class=\"share share-fb\" data-network=\"\"><i class=\"network icon icon-fb\"></i></a>', $link );\n }\n}", "title": "" }, { "docid": "7eabdfeeeaf4008fa4b6e34f1bc59fba", "score": "0.595284", "text": "function rss2_site_icon() {}", "title": "" }, { "docid": "ba9266796decf4630b68984a54e2d4b0", "score": "0.59391534", "text": "public static function social_icons() {\n $icons = [ \"behance\", \"dribbble\", \"facebook\", \"github-alt\", \"github\", \"foursquare\", \"tumblr\", \"whatsapp\", \"soundcloud\", \"flickr\", \"google-plus\", \"google\", \"linkedin\", \"vimeo\", \"instagram\", \"joomla\", \"pagekit\", \"pinterest\", \"twitter\", \"uikit\", \"wordpress\", \"xing\", \"youtube\" ];\n\n return $icons;\n }", "title": "" }, { "docid": "00d812b623fdb0f97466df1e02f1b507", "score": "0.59197974", "text": "public static function get_social_link_svg(/**\n * Filters Twenty Twenty's array of social icons.\n *\n * @since Twenty Twenty 1.5\n *\n * @param array $social_icons Array of default social icons.\n */\n$uri) {}", "title": "" }, { "docid": "fbe8979e8cd0e26bf140a8eb0c808a2a", "score": "0.591253", "text": "function mts_social_button( $button ) {\n $mts_options = get_option( MTS_THEME_NAME );\n switch ( $button ) {\n case 'facebookshare':\n ?>\n <!-- Facebook Share-->\n <span class=\"share-item facebooksharebtn\">\n <div class=\"fb-share-button\" data-layout=\"button_count\"></div>\n </span>\n <?php\n break;\n case 'twitter':\n ?>\n <!-- Twitter -->\n <span class=\"share-item twitterbtn\">\n <a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-via=\"<?php echo esc_attr( $mts_options['mts_twitter_username'] ); ?>\"><?php esc_html_e( 'Tweet', 'best' ); ?></a>\n </span>\n <?php\n break;\n case 'gplus':\n ?>\n <!-- GPlus -->\n <span class=\"share-item gplusbtn\">\n <g:plusone size=\"medium\"></g:plusone>\n </span>\n <?php\n break;\n case 'facebook':\n ?>\n <!-- Facebook -->\n <span class=\"share-item facebookbtn\">\n <div id=\"fb-root\"></div>\n <div class=\"fb-like\" data-send=\"false\" data-layout=\"button_count\" data-width=\"150\" data-show-faces=\"false\"></div>\n </span>\n <?php\n break;\n case 'pinterest':\n ?>\n <!-- Pinterest -->\n <span class=\"share-item pinbtn\">\n <a href=\"http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), 'large' ); echo $thumb['0']; ?>&description=<?php the_title(); ?>\" class=\"pin-it-button\" count-layout=\"horizontal\"><?php esc_html_e( 'Pin It', 'best' ); ?></a>\n </span>\n <?php\n break;\n case 'linkedin':\n ?>\n <!--Linkedin -->\n <span class=\"share-item linkedinbtn\">\n <script type=\"IN/Share\" data-url=\"<?php echo esc_url( get_the_permalink() ); ?>\"></script>\n </span>\n <?php\n break;\n case 'stumble':\n ?>\n <!-- Stumble -->\n <span class=\"share-item stumblebtn\">\n <su:badge layout=\"1\"></su:badge>\n </span>\n <?php\n break;\n }\n }", "title": "" }, { "docid": "cef0b0e1e3158a262264b7380b61e921", "score": "0.58939654", "text": "function letaka_social_sharing_buttons($content) {\n\tglobal $post;\n\tif(is_singular() || is_home()){\n\t\n\t\t// Get current page URL \n\t\t$letakaURL = urlencode(get_permalink());\n \n\t\t// Get current page title\n\t\t$letakaTitle = htmlspecialchars(urlencode(html_entity_decode(get_the_title(), ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8');\n\t\t// $letakaTitle = str_replace( ' ', '%20', get_the_title());\n\t\t\n\t\t// Get Post Thumbnail for pinterest\n\t\t$letakaThumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );\n \n\t\t// Construct sharing URL without using any script\n\t\t$twitterURL = 'https://twitter.com/intent/tweet?text='.$letakaTitle.'&amp;url='.$letakaURL.'&amp;via=Crunchify';\n\t\t$facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.$letakaURL;\n \n\t\t// Based on popular demand added Pinterest too\n\t\t$pinterestURL = 'https://pinterest.com/pin/create/button/?url='.$letakaURL.'&amp;media='.$letakaThumbnail[0].'&amp;description='.$letakaTitle;\n \n\t\t// Add sharing button at the end of page/page content\n\t\t$content .= '<!-- Implement your own superfast social sharing buttons without any JavaScript loading. No plugin required. Detailed steps here: http://crunchify.me/1VIxAsz -->';\n\t\t$content .= '<div class=\"contactSocials\"><h5 class=\"heading heading__sm\">SHARE </h5>';\n\t\t$content .= ' <a href=\"'. $twitterURL .'\" target=\"_blank\"><i class=\"fab fa-twitter\"></i></a>';\n\t\t$content .= '<a href=\"'.$facebookURL.'\" target=\"_blank\"><i class=\"fab fa-facebook-square\"></i></a>';\n\t\t$content .= '</div>';\n\t\t\n\t\treturn $content;\n\t}else{\n\t\t// if not a post/page then don't include sharing button\n\t\treturn $content;\n\t}\n}", "title": "" }, { "docid": "2bb037a000e79c8dcb769680c4783ac5", "score": "0.5885054", "text": "function hair_follow($social_array) {\n\t?>\n\t<ul class=\"social-icons\">\n\t\t<?php\n\t\t\tforeach($social_array as $social) {\n\t\t\t\t$svgFile = TEMPLATEPATH . '/dist/images/_social/' . $social . '.svg';\n\t\t\t\t?>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"<?php the_field($social, \"options\"); ?>\" class=\"social--<?php echo $social; ?>\" target=\"_blank\"><?php echo file_get_contents($svgFile); ?></a>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t}\n\t\t?>\n\n\t</ul>\n\t<?php\n}", "title": "" }, { "docid": "9734c4deb76e3bb7a5327939b0634a08", "score": "0.5864517", "text": "function register_block_core_social_link() {}", "title": "" }, { "docid": "699948a5113ee817b549c0c734de7ece", "score": "0.58596015", "text": "private function get_social_description_template()\n {\n }", "title": "" }, { "docid": "1b2f1a418a98b5cba4d544f8d72e685e", "score": "0.5858375", "text": "public function get_icon()\n {\n return 'fa fa-wordpress';\n }", "title": "" }, { "docid": "699948a5113ee817b549c0c734de7ece", "score": "0.58560264", "text": "private function get_social_description_template()\n {\n }", "title": "" }, { "docid": "966e37e05c5274aac7e48d1541621148", "score": "0.5847625", "text": "function CSM_ConnectTosocailMedai($attr){\r\n\r\n\t$options = shortcode_atts(array(\r\n'type_of_socail_media' =>'Google',\r\n'button_text' => 'Google',\r\n'link_of_social_media'=>'www.google.com'),$attr);\r\n$output = \"<div class='social_box'>\r\n\t<h4>\".$options['type_of_socail_media'].\"</h4>\r\n\t<a href='\".$options['link_of_social_media'].\"'><button>\".$options['button_text'].\"</button></a>\r\n\r\n</div>\";\r\n\r\nreturn $output;\r\n\r\n}", "title": "" }, { "docid": "9af66e70184c49f635c6b6b7e36f5195", "score": "0.5845675", "text": "function woo_slg_social_networks() {\n\n\t$socialnetworks = array(\n\t\t\t\t\t\t\t\t'facebook'\t\t=>\t__( 'Facebook', 'wooslg' ),\n\t\t\t\t\t\t\t\t'twitter'\t\t=>\t__( 'Twitter', 'wooslg' ),\n\t\t\t\t\t\t\t\t'googleplus'\t=>\t__( 'Google+', 'wooslg' ),\n\t\t\t\t\t\t\t\t'linkedin'\t\t=>\t__( 'LinkedIn', 'wooslg' ),\n\t\t\t\t\t\t\t\t'yahoo'\t\t\t=>\t__( 'Yahoo', 'wooslg' ),\n\t\t\t\t\t\t\t\t'foursquare'\t=>\t__( 'Foursquare', 'wooslg' ),\n\t\t\t\t\t\t\t\t'windowslive'\t=>\t__( 'Windows Live', 'wooslg' ),\n\t\t\t\t\t\t\t\t'vk'\t\t\t=>\t__( 'VK', 'wooslg' ),\n\t\t\t\t\t\t\t\t'instagram'\t\t=>\t__( 'Instagram', 'wooslg' ),\n\t\t\t\t\t\t\t\t'amazon'\t\t=>\t__( 'Amazon', 'wooslg' ),\n\t\t\t\t\t\t\t\t'paypal'\t\t=>\t__( 'Paypal', 'wooslg' ),\n\t\t\t\t\t\t\t);\n\n\treturn apply_filters( 'woo_slg_social_networks', $socialnetworks );\n}", "title": "" }, { "docid": "f2b9f70903c2115a5bb3e26bbc9d96e0", "score": "0.5841664", "text": "function alfie_feed_icon(&$variables) {\r\n\t// build the parts\r\n\t$link_text = '<i class=\"fa fa-rss\"></i> ' . t('Subscribe');\r\n\t$link_title = t('Subscribe to !feed-title', array('!feed-title' => $variables['title']));\r\n\t// return the html\r\n\treturn l(\r\n\t\t$link_text,\r\n\t\t$variables['url'],\r\n\t\tarray(\r\n\t\t\t'html' => true,\r\n\t\t\t'attributes' => array(\r\n\t\t\t\t'class' => 'feed-icon',\r\n\t\t\t\t'title' => $link_title\r\n\t\t\t)\r\n\t\t)\r\n\t);\r\n}", "title": "" }, { "docid": "d1c4630221b31dbfa01e39dee5c4c00b", "score": "0.5819002", "text": "private function get_social_image_template()\n {\n }", "title": "" }, { "docid": "d1c4630221b31dbfa01e39dee5c4c00b", "score": "0.5819002", "text": "private function get_social_image_template()\n {\n }", "title": "" }, { "docid": "cdf1a9dc0320130cfb80825731001517", "score": "0.5818909", "text": "function wpdev_icon_shortcode ( $atts ) {\n\treturn '<i class=\"fa fa-'. $atts['icon'] .'\"></i>';\n}", "title": "" }, { "docid": "59c3ad00975f2797edcf61cf11eeb525", "score": "0.5817002", "text": "function green_sc_icon($atts, $content=null){\t\n\tif (green_sc_in_shortcode_blogger()) return '';\n extract(green_sc_html_decode(shortcode_atts(array(\n\t\t// Individual params\n\t\t\"icon\" => \"\",\n\t\t\"color\" => \"\",\n\t\t\"bg_color\" => \"\",\n\t\t\"bg_shape\" => \"\",\n\t\t\"bg_style\" => \"\",\n\t\t\"font_size\" => \"\",\n\t\t\"font_weight\" => \"\",\n\t\t\"align\" => \"\",\n\t\t\"link\" => \"\",\n\t\t// Common params\n\t\t\"id\" => \"\",\n\t\t\"class\" => \"\",\n\t\t\"css\" => \"\",\n\t\t\"top\" => \"\",\n\t\t\"bottom\" => \"\",\n\t\t\"left\" => \"\",\n\t\t\"right\" => \"\"\n ), $atts)));\n\t$css .= green_get_css_position_from_values($top, $right, $bottom, $left);\n\t$css2 = ($font_weight != '' && $font_weight != 'inherit' ? 'font-weight:'. esc_attr($font_weight).';' : '')\n\t\t. ($font_size != '' ? 'font-size:' . esc_attr(green_prepare_css_value($font_size)) . '; line-height: ' . (!$bg_shape || green_sc_param_is_inherit($bg_shape) ? '1' : '1.2') . 'em;' : '')\n\t\t. ($color != '' ? 'color:'.esc_attr($color).';' : '')\n\t\t. ($bg_color != '' ? 'background-color:'.esc_attr($bg_color).';border-color:'.esc_attr($bg_color).';' : '')\n\t;\n\t$output = $icon!='' \n\t\t? ($link ? '<a href=\"'.esc_url($link).'\"' : '<span') . ($id ? ' id=\"'.esc_attr($id).'\"' : '')\n\t\t\t. ' class=\"sc_icon '.esc_attr($icon)\n\t\t\t\t. ($bg_shape && !green_sc_param_is_inherit($bg_shape) ? ' sc_icon_shape_'.esc_attr($bg_shape) : '')\n\t\t\t\t. ($bg_style && !green_sc_param_is_inherit($bg_style) ? ' sc_icon_bg_'.esc_attr($bg_style) : '')\n\t\t\t\t. ($align && $align!='none' ? ' align'.esc_attr($align) : '') \n\t\t\t\t. (!empty($class) ? ' '.esc_attr($class) : '')\n\t\t\t.'\"'\n\t\t\t.($css || $css2 ? ' style=\"'.($css ? 'display:block;' : '') . ($css) . ($css2) . '\"' : '')\n\t\t\t.'>'\n\t\t\t.($link ? '</a>' : '</span>')\n\t\t: '';\n\treturn apply_filters('green_shortcode_output', $output, 'trx_icon', $atts, $content);\n}", "title": "" }, { "docid": "9edcd5185c0430beb9ed065da3e2edbb", "score": "0.58165365", "text": "public function getStrIcon() {\n return \"icon_user\";\n }", "title": "" }, { "docid": "6e51634e5bd96710f12507bd923f43b3", "score": "0.57956016", "text": "public function use_social_templates()\n {\n }", "title": "" }, { "docid": "6e51634e5bd96710f12507bd923f43b3", "score": "0.5793348", "text": "public function use_social_templates()\n {\n }", "title": "" }, { "docid": "0777c9184e25e1c223d33d67c1da6b3c", "score": "0.57872546", "text": "function vantage_premium_show_social_share(){\n\tif( siteorigin_setting('social_share_post') && is_single() ) {\n\t\tsiteorigin_share_render( array(\n\t\t\t'twitter' => siteorigin_setting('social_twitter'),\n\t\t) );\n\t}\n}", "title": "" }, { "docid": "a45432c6aeddc50a553b5dcc47435cc0", "score": "0.578614", "text": "function wp_site_icon() {}", "title": "" }, { "docid": "b61115d96e47e2de56e30a626f38b771", "score": "0.57792246", "text": "function united_social_buttons_below($content) {\n\t$permalink = get_permalink($post->ID);\n\t$title = get_the_title();\n\tif(!is_feed() && !is_home() && !is_page() && 'products' != get_post_type() ) {\n\t\t$content = $content . '<div class=\"social-links\">\n\t<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-count=\"none\" data-url=\"'.$permalink.'\" data-text=\"'.$title.'\">Tweet</a>\n\t<div id=\"fb-root\"></div><fb:like href=\"'.$permalink.'\" layout=\"button_count\" width=\"100\" show_faces=\"false\" font=\"\"></fb:like>\n</div>';\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "f7989cfc122f777cd6f5bfc720aa668b", "score": "0.5778282", "text": "public static function getSocialData()\n {\n $social = array(\n 'facebook' => array(\n 'title' => trans('lang.socials.fb'),\n 'color' => '#3b5999',\n 'icon' => 'fab fa-facebook-f',\n ),\n 'twitter' => array(\n 'title' => trans('lang.socials.twitter'),\n 'color' => '#55acee',\n 'icon' => 'fab fa-twitter',\n ),\n 'linkedin' => array(\n 'title' => trans('lang.socials.linkedin'),\n 'color' => '#0077B5',\n 'icon' => 'fab fa-linkedin-in',\n ),\n 'googleplus' => array(\n 'title' => trans('lang.socials.gplus'),\n 'color' => '#dd4b39',\n 'icon' => 'fab fa-google-plus-g',\n ),\n 'rss' => array(\n 'title' => trans('lang.socials.rss'),\n 'color' => '#ff6600',\n 'icon' => 'fas fa-rss',\n ),\n 'youtube' => array(\n 'title' => trans('lang.socials.youtube'),\n 'color' => '#0077B5',\n 'icon' => 'fab fa-youtube',\n ),\n\n );\n return $social;\n }", "title": "" }, { "docid": "46c299499069bfb7ebd5fbb3a30f8ee4", "score": "0.57754123", "text": "function show_social_icons( $menu, $args ) {\n\n\t$args = (array) $args;\n\tif ( 'primary' !== $args['theme_location'] ) {\n\n\t\treturn $menu;\n\n\t} else {\n\n\t\tob_start();\n\t\tgenesis_widget_area( 'nav-social-menu' );\n\t\t$social = ob_get_clean();\n\t\treturn $menu . $social;\n\n\t}\n\n}", "title": "" }, { "docid": "70a77e1f6815e62fcde16bbc4b702646", "score": "0.57749885", "text": "public function getSocialBtn($type = null, $options = array()) {\n $button = '';\n\n switch ($type) {\n case 'facebook':\n\n $defaults = array(\n 'url' => craft()->request->getHostInfo() . craft()->request->getUrl(),\n 'width' => '150px',\n 'layout' => 'button_count',\n 'action' => 'like',\n 'show-faces' => 'false',\n 'share' => 'false'\n );\n $opts = $this->setOpts($defaults, $options);\n $button = \"<div class=\\\"fb-like\\\" data-href=\". $opts[\"url\"] .\" data-width=\\\"{$opts[\"width\"]}\\\" data-layout=\\\"{$opts[\"layout\"]}\\\" data-action=\\\"{$opts[\"action\"]}\\\" data-show-faces=\\\"{$opts['show-faces']}\\\" data-share=\\\"{$opts['share']}\\\"></div>\";\n\n break;\n\n case 'twitter':\n\n $defaults = array(\n 'url' => craft()->request->getHostInfo() . craft()->request->getUrl(),\n 'size' => '100px',\n 'via' => '',\n 'lang' => 'en',\n 'text' => '',\n 'related' => '',\n 'count' => 'none',\n 'counturl' => craft()->request->getHostInfo() . craft()->request->getUrl(),\n 'hashtags' => '',\n 'opt-out' => 'false'\n );\n $opts = $this->setOpts($defaults, $options);\n $button = \"<a href=\\\"https://twitter.com/share\\\" class=\\\"twitter-share-button\\\" data-size=\\\"{$opts[\"size\"]}\\\" data-via=\\\"{$opts[\"via\"]}\\\" data-url=\\\"{$opts[\"url\"]}\\\" data-lang=\\\"{$opts[\"lang\"]}\\\" data-text=\\\"{$opts[\"text\"]}\\\" data-related=\\\"{$opts[\"related\"]}\\\" data-count=\\\"{$opts[\"count\"]}\\\" data-counturl=\\\"{$opts[\"counturl\"]}\\\" data-hashtags=\\\"{$opts[\"hashtags\"]}\\\" data-dnt=\\\"{$opts[\"opt-out\"]}\\\">Tweet</a>\";\n\n break;\n\n case 'google':\n $defaults = array(\n 'href' => craft()->request->getHostInfo() . craft()->request->getUrl(),\n 'size' => 'standard',\n 'annotation' => 'bubble',\n 'width' => '120px',\n 'align' => 'left',\n 'expandTo' => '',\n 'recommendations' => 'true',\n 'count' => 'true'\n );\n $opts = $this->setOpts($defaults, $options);\n $button = \"<div class=\\\"g-plusone\\\" data-href=\\\"{$opts[\"href\"]}\\\" data-size=\\\"{$opts[\"size\"]}\\\" data-annotation=\\\"{$opts[\"annotation\"]}\\\" data-width=\\\"{$opts[\"width\"]}\\\" data-align=\\\"{$opts[\"align\"]}\\\" expandTo=\\\"{$opts[\"expandTo\"]}\\\" data-recommendations=\\\"{$opts[\"recommendations\"]}\\\" data-count=\\\"{$opts[\"count\"]}\\\"></div>\";\n break;\n\n default:\n $button = null;\n break;\n }\n\n echo $button;\n }", "title": "" }, { "docid": "939dc63d0b004610dd1a4ea4fcab0489", "score": "0.5771202", "text": "function wp_experts_get_socials_share(){?>\r\n <ul>\r\n <?php \r\n global $post;\r\n $cat = get_the_category($post->ID);\r\n if($cat[0]->name == \"Events\" || $cat[0]->name == \"Past Events\"){\r\n ?>\t\r\n <li><span><?php esc_html_e('Share This Event : ', \"wp-experts\"); ?></span></li>\r\n <?php }else{ ?>\r\n <li><span><?php esc_html_e('Share This Article : ', \"wp-experts\"); ?></span></li>\r\n <?php } ?>\r\n <li><a title=\"Facebook\" data-placement=\"top\" data-rel=\"tooltip\" target=\"_blank\" href=\"https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink();?>\"><span class=\"share-box\"><i class=\"fa fa-facebook\"></i></span></a></li>\r\n <li><a title=\"Twitter\" data-placement=\"top\" data-rel=\"tooltip\" target=\"_blank\" href=\"https://twitter.com/home?status=<?php esc_html_e('Check out this article', \"wp-experts\");?>:%20<?php the_title();?>%20-%20<?php the_permalink();?>\"><span class=\"share-box\"><i class=\"fa fa-twitter\"></i></span></a></li>\r\n <li><a title=\"Google Plus\" data-placement=\"top\" data-rel=\"tooltip\" target=\"_blank\" href=\"https://plus.google.com/share?url=<?php the_permalink();?>\"><span class=\"share-box\"><i class=\"fa fa-google-plus\"></i></span></a></li>\r\n<li> <a target=\"_blank\" href=\"https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink();?>&title=&summary=&source=\"><span class=\"share-box\"><i class=\"fa fa-linkedin\" aria-hidden=\"true\"></i></span></a></li>\t\t \r\n <li class=\"social-pinterest\"><a target=\"_blank\" href=\"https://pinterest.com/pin/create/button/?url=<?php the_permalink();?>\"><span class=\"share-box\"><i class=\"fa fa-pinterest\"></i></span></a></li>\r\n </ul>\r\n <?php\r\n}", "title": "" }, { "docid": "3357006180ef35ce840065ffbb05afaa", "score": "0.5765332", "text": "function get_unliked_icon() {\r\n\t/* If already using Font Awesome with your theme, replace svg with: <i class=\"fa fa-heart-o\"></i> */\r\n\t$icon = '<i class=\"fa fa-heart\"></i>';\r\n\treturn $icon;\r\n}", "title": "" }, { "docid": "2622aafd4990654f3a4b695893a9bfd4", "score": "0.57571125", "text": "function hook_na_socialshare_widgets_info() {\n return array(\n 'na_facebooklike',\n 'na_facebooksend',\n 'na_facebookcomment',\n 'na_googleplus',\n 'na_twittershare',\n 'na_twitterfollow',\n );\n}", "title": "" }, { "docid": "f747792f3954296b7825a5e1a16818f9", "score": "0.57523775", "text": "function share_button(){\n // $link = get_the_permalink();\n $link = home_url().'?p='.get_the_ID();\n $title = get_the_title();\n\n if (has_excerpt()) \n $excerpt = get_the_excerpt(); \n else \n $excerpt = $title;\n\n if (strlen($title) > 111)\n $text = substr($title,0,111). '...';\n else\n $text = $title;\n\n $social = [\n 'facebook' => 'https://www.facebook.com/sharer/sharer.php?u='. $link,\n 'twitter' => 'https://twitter.com/intent/tweet?text='. $text .' - '. $link,\n 'linkedin' => 'https://www.linkedin.com/shareArticle?mini=true&url='. $link .'&title='. $title .'&summary='. $excerpt . '&source=https://firma.de',\n 'envelope' => 'mailto:?subject='. $title .'&body='. $excerpt .' - '. $link\n ];\n\n return $social;\n}", "title": "" }, { "docid": "b005bb62e6657453479f89472e92c838", "score": "0.57492095", "text": "function qa_template_share($id){\n\t$url \t= urlencode(get_permalink( $id ));\n\t$title = get_the_title( $id );\n\treturn '<ul class=\"socials-share\"><li><a href=\"https://www.facebook.com/sharer/sharer.php?u='.$url.'&t='.$title.'\" target=\"_blank\" class=\"btn-fb\"><i class=\"fa fa-facebook\"></i></a></li><li><a target=\"_blank\" href=\"http://twitter.com/share?text='.$title.'&url='.$url.'\" class=\"btn-tw\"><i class=\"fa fa-twitter\"></i></a></li><li class=\"ggplus\"><a target=\"_blank\" href=\"https://plus.google.com/share?url='.$url.'\" class=\"btn-gg\"><i class=\"fa fa-google-plus\"></i></a></li></ul>';\n}", "title": "" }, { "docid": "f9f9522b5cd66b5547848c2b402c2eb3", "score": "0.573215", "text": "function icon_name(){\n\tglobal $theme_option_name;\n\t$newspres_setting = wptap_get_settings($theme_option_name);\n\n\tif(isset($newspres_setting['pages_icon']) && !empty($newspres_setting['pages_icon'])){\n\t\techo $newspres_setting['pages_icon'].\".png\";\n\t}\n}", "title": "" }, { "docid": "e79fbe6fa53dd0179e01c2cc4bcd76f1", "score": "0.5718317", "text": "public function get_font_icon() {\n\t\treturn 'link';\n\t}", "title": "" }, { "docid": "bf5f69bfa98771cdc86c0cf045672b38", "score": "0.57013136", "text": "function sc_sg_fa($attr=array()){\n\textract(shortcode_atts(array(\n\t\t'icon' => '',\n\t\t'fixed_width' => 'false',\n\t\t'class' => '',\n\t\t'style' => '',\n\t), $attr));\n\n\tif($icon){\n\t\t$icon = 'fa-'.$icon;\n\t}\n\n\tif($fixed_width=='true'){\n\t\t$class = 'fa-fw '.$class;\n\t}\n\n\t$param_class = trim(\"fa $icon $class\");\n\n\t$param_style = trim(' style=\"'.$style.'\"');\n\n\t$output = '<i class=\"'.$param_class.'\"'.$param_style.'></i>';\n\n\treturn $output;\n}", "title": "" }, { "docid": "788699119c476bfb92a897ea674256de", "score": "0.5687984", "text": "function x_add_social_sharing ( $content ) {\n if ( is_singular('post') ) {\n echo do_shortcode('[share title=\"Share this Post\" facebook=\"true\" twitter=\"true\" google_plus=\"true\" linkedin=\"true\" pinterest=\"true\" reddit=\"true\" email=\"true\"]');\n }\n}", "title": "" }, { "docid": "84c3bb08333d9162bc191ea6adc001ca", "score": "0.56812376", "text": "function header_socials() {\n\t\tif(get_options_data('social-media', 'show-socials-in') == \"header\" || get_options_data('social-media', 'show-socials-in') == \"both\") { echo show_socials(); }\n\t}", "title": "" }, { "docid": "98184a07ec00205aedd739ebbc311113", "score": "0.5670964", "text": "function ppnl_social_profiles() {\n\t$title = get_the_title();\n\techo '<div class=\"social-profiles\">'; \n\n\t\techo '<h3>Contact met ' . $title . '</h3>'; \n\t\tif ( $ppnl_twitter_profile = get_post_meta( get_the_ID(), '_ppnl_twitter_profile', true ) ) {\n\t\t\t// if we're good to go print!\n\t\t\techo '<a target=\"_blank\" class=\"social-profile twitter icon-twitter\" href=\"' . $ppnl_twitter_profile . '\" rel=\"nofollow\">twitter</a>';\n\t\t}\n\t\tif ( $ppnl_facebook_profile = get_post_meta( get_the_ID(), '_ppnl_facebook_profile', true ) ) {\n\t\t\t// if we're good to go print!\n\t\t\techo '<a target=\"_blank\" class=\"social-profile facebook icon-facebook\" href=\"' . $ppnl_facebook_profile . '\" rel=\"nofollow\">facebook</a>';\n\t\t}\n\t\tif ( $ppnl_linkedin_profile = get_post_meta( get_the_ID(), '_ppnl_linkedin_profile', true ) ) {\n\t\t\t// if we're good to go print!\n\t\t\techo '<a target=\"_blank\" class=\"social-profile linkedin icon-linkedin\" href=\"' . $ppnl_linkedin_profile . '\" rel=\"nofollow\">linkedin</a>';\n\t\t}\n\techo '</div>';\n}", "title": "" }, { "docid": "e227f9007c51d1b6d30806be28d0241b", "score": "0.5669407", "text": "function hair_sharer($social_array) {\n\tglobal $post;\n\t?>\n\t<ul class=\"share-icons\">\n\t\t<?php\n\t\t\tforeach($social_array as $social) {\n\t\t\t\t$svgFile = TEMPLATEPATH . '/dist/images/_social/' . $social . '.svg';\n\t\t\t\t?>\n\t\t\t\t<li>\n\t\t\t\t\t<?php if($social == \"facebook\") : ?>\n\t\t\t\t\t\t<a href=\"https://www.facebook.com/dialog/feed?app_id=184683071273&link=<?php echo urlencode(get_permalink($post->ID)); ?>&picture=&name=&caption=%20&description=&redirect_uri=http%3A%2F%2Fwww.facebook.com%2F&display=popup\" target=\"_blank\"><?php echo file_get_contents($svgFile); ?></a>\n\t\t\t\t\t<?php elseif($social == \"twitter\") : ?>\n\t\t\t\t\t\t<a href=\"http://twitter.com/intent/tweet?text=<?php echo urlencode(get_permalink($post->ID)); ?>\"><?php echo file_get_contents($svgFile); ?></a>\n\t\t\t\t\t<?php elseif($social == \"pinterest\") : ?>\n\t\t\t\t\t\t<a href=\"http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=&description=\"><?php echo file_get_contents($svgFile); ?></a>\n\t\t\t\t\t<?php elseif($social == \"tumblr\") : ?>\n\t\t\t\t\t\t<a href=\"hhttp://www.tumblr.com/share/photo?source=&caption=&click_thru=<?php echo urlencode(get_permalink($post->ID)); ?>\"><?php echo file_get_contents($svgFile); ?></a>\n\t\t\t\t\t<?php elseif($social == \"googleplus\") : ?>\n\t\t\t\t\t\t<a href=\"https://plus.google.com/share?url=<?php echo urlencode(get_permalink($post->ID)); ?>\"><?php echo file_get_contents($svgFile); ?></a>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t}\n\t\t?>\n\n\t</ul>\n\t<?php\n}", "title": "" }, { "docid": "21f15d37aea4593f5bc83d13d1d8e831", "score": "0.566256", "text": "public function get_icon()\n {\n return 'far fa-user-circle';\n }", "title": "" }, { "docid": "f91b8c4a3297ccebef2ab752da6109ca", "score": "0.56592894", "text": "function plugin_geticon_mailchimp()\r\n{\r\n return MLCH_URL . '/images/mailchimp.png';\r\n}", "title": "" }, { "docid": "11041958b23998ed6221542613016fa8", "score": "0.56555283", "text": "function _social_widget_twitter_markup($url, $type, $title = NULL, $lang = 'und') {\n $account_via = variable_get_value('easy_social_twitter_account_via');\n $account_related = variable_get_value('easy_social_twitter_account_related');\n $account_related_description = variable_get_value('easy_social_twitter_account_description');\n $type = ($type == EASY_SOCIAL_WIDGET_HORIZONTAL) ? 'horizontal' : 'vertical';\n // Override the data-count attribute to hide the count, if selected.\n if (!($type_show = variable_get_value('easy_social_twitter_count_show'))) {\n $type = 'none';\n }\n\n $data = array(\n // Correct for different language identification strings.\n 'lang' => _easy_social_twitter_langcodes($lang),\n 'type' => $type,\n 'url' => $url,\n 'via' => $account_via,\n 'related' => $account_related . ':' . $account_related_description,\n 'text' => $title,\n );\n $path = 'http://twitter.com/share';\n return _social_socialitejs_widget_markup('twitter', 'share', $path, $data);\n}", "title": "" }, { "docid": "d16793d612cf157045ca41a519f9a47b", "score": "0.5648764", "text": "function socialize_link_to($type, $value, $cssClass, $shareUrl = null)\r\n{\r\n $link = socialize_url_for($type, $shareUrl);\r\n return link_to($value, $link, array('class'=>$cssClass.' social'));\r\n}", "title": "" }, { "docid": "51a7ea21c14a468b1032034c772c726c", "score": "0.56465244", "text": "public function get_icon()\r\n {\r\n return 'eicon-person';\r\n }", "title": "" }, { "docid": "9d5df5c980d66fc2afee1af48f34f568", "score": "0.56464857", "text": "public function get_icon()\n {\n return 'fa fa-link';\n }", "title": "" }, { "docid": "9d5df5c980d66fc2afee1af48f34f568", "score": "0.56464857", "text": "public function get_icon()\n {\n return 'fa fa-link';\n }", "title": "" } ]
ef9af59e784546b613d9325b836deba1
to call the show function the url is index.php?page=task&action=show
[ { "docid": "a4432ab9cb796cc30e376e2c7ac3fd1a", "score": "0.0", "text": "public static function show()\n {\t\t\n\t\tsession_start();\n\t\t$userID = $_SESSION[\"userID\"];\n\t\t$record = useraccounts::findOne($userID);\n self::getTemplate('show_account', $record);\n }", "title": "" } ]
[ { "docid": "e33d5823c21a1a13b2cb807b110c1468", "score": "0.6911961", "text": "public function show(Task $task)\n {\n\n }", "title": "" }, { "docid": "1c17a048467bdd4665dff5a0b022922b", "score": "0.68796736", "text": "function ShowAction()\n\t\t{\n\t\t\t//retrieve post details\n\t\t\t//display post details\n\t\t}", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "e1f416d95b4a0e5cca688cbe486669ef", "score": "0.686467", "text": "public function show(Task $task)\n {\n //\n }", "title": "" }, { "docid": "47e747f99077c377d962c44054ba1f49", "score": "0.6810622", "text": "public function action_show() {\n $this->render('show');\n }", "title": "" }, { "docid": "393784c5fb73fc0812a43d119bb41756", "score": "0.6807145", "text": "public function showAction()\n {\n\n $page = (isset($_GET['page'])) ? $_GET[\"page\"] : 1;\n\n View::renderTemplate(\"News/index.html\", [\n\n \"news\" => ModelNews::getNews($page, 5, ModelNews::class),\n \"pages\" => ModelNews::getPages($page, 5, ModelNews::class),\n \"current_page\" => $page,\n\n ]);\n\n }", "title": "" }, { "docid": "70d31e261d98663a517cd3ac3b71b6fc", "score": "0.6785587", "text": "public function view_show(){\n\t}", "title": "" }, { "docid": "988a5c148bea360d62d8dacd5041df65", "score": "0.67388827", "text": "public function testShow()\n\n {\n\t$this->visit('/tasks') //on ouvre la page liste des tasks\n\t->click('View Task') //on clique sur le premier lien pour voir une task\n\t->seePageIs('/tasks/1'); //on verifie qu'on ouvre bien la task numéro 1\n\t\n }", "title": "" }, { "docid": "d16beb3d7083aa853ba4fe016deef330", "score": "0.66880363", "text": "public function showAction()\n {\n parent::showAction();\n $this->view->process = $this->view->proces; // Patch for bad inflector\n }", "title": "" }, { "docid": "2d2d7b580bfb7ae171a5fc87b5b18007", "score": "0.667502", "text": "public function showAction(){\n\n\n\n }", "title": "" }, { "docid": "8012632dabc73d979f9b311bb423b20b", "score": "0.6658248", "text": "public function show($id){\n echo \"show\"; exit;\n \n }", "title": "" }, { "docid": "cf28ef64fbad24c8422da3292b7e5e38", "score": "0.6594817", "text": "public function showAction() {\n\t\treturn 'show action called';\n\t}", "title": "" }, { "docid": "af7c95694b1adfb70719829e53fa90ae", "score": "0.6590456", "text": "public function show($id)\n {\n //\n echo 'show';\n }", "title": "" }, { "docid": "4ca9657d54fe03dd690a0177dac280e2", "score": "0.65900433", "text": "public function displayTask()\n\t{\n\t\t// Get filters\n\t\t$this->view->filters = array(\n\t\t\t'search' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.search',\n\t\t\t\t'search',\n\t\t\t\t''\n\t\t\t),\n\t\t\t'uidNumber' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.uidNumber',\n\t\t\t\t'uidNumber',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t// Get sorting variables\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'tLastUpdated'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'DESC'\n\t\t\t),\n\t\t\t// Get paging variables\n\t\t\t'limit' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limit',\n\t\t\t\t'limit',\n\t\t\t\tConfig::get('list_limit'),\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'start' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limitstart',\n\t\t\t\t'limitstart',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'report-notes' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.report-notes',\n\t\t\t\t'report-notes',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'report-from' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.report-from',\n\t\t\t\t'report-from',\n\t\t\t\tgmdate('m/d/Y', strtotime('-1 month'))\n\t\t\t),\n\t\t\t'report-to' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.report-to',\n\t\t\t\t'report-to',\n\t\t\t\tgmdate('m/d/Y')\n\t\t\t)\n\t\t);\n\n\t\t// Get record count\n\t\t$this->view->filters['count'] = true;\n\t\t$this->view->filters['userInfo'] = true;\n\t\t$this->view->total = Cart::getAllTransactions($this->view->filters);\n\n\t\t// Get records\n\t\t$this->view->filters['count'] = false;\n\t\t$this->view->rows = Cart::getAllTransactions($this->view->filters);\n\n\t\tif (!$this->view->rows)\n\t\t{\n\t\t\t$this->view->rows = array();\n\t\t}\n\n\t\t// update with total and items ordered\n\t\tforeach ($this->view->rows as $r)\n\t\t{\n\t\t\t$tInfo = Cart::getTransactionInfo($r->tId);\n\t\t\t$r->tiTotal = $tInfo->tiTotal;\n\t\t\t$tiItemsQty = count(unserialize($tInfo->tiItems));\n\t\t\t$r->tiItemsQty = $tiItemsQty;\n\t\t}\n\n\t\t// Output the HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "76422425111914023d9550469693d3a7", "score": "0.6571057", "text": "public function show($id) {\n echo 'show';\n }", "title": "" }, { "docid": "27a62b0cc70e2875cb5eeb7d28aaaa57", "score": "0.6540122", "text": "public function show() {\n //pregunto, si existe algun controlador que cargar.. de no existir niguno\n //por defecto cargo el index como principal\n if(USE_LOGIN && !isset($_SESSION['Usession'])){\n $controller = 'Clogin';\n $viewname = 'Vlogin';\n $model = \"Mdbhandler\";\n }else{\n if(isset ($_GET['load'])){\n $controller = 'C'.$_GET['load'];\n $viewname = 'V'.$_GET['load'];\n $model = 'M'.$_GET['load'];\n }else{\n $controller = 'Ctrackinglist';\n $viewname = 'Vtrackinglist';\n $model = \"Mtrackinglist\";\n }\n }\n switch ($controller){\n case '':\n $this->loadController($model,$controller, $viewname);\n break;\n default:\n $this->loadController($model,$controller, $viewname);\n break;\n }\n }", "title": "" }, { "docid": "10ca1bc12691387ce421f9e5c5474c33", "score": "0.6538823", "text": "public function show($id)\n {\n echo\"show\";\n }", "title": "" }, { "docid": "4d4b09b0a3c7d4f223586aead8483536", "score": "0.65273345", "text": "public function dynamicShowOneAction()\n {\n }", "title": "" }, { "docid": "3f8fa6e93cdaea9e4bd9abe7942182a5", "score": "0.6511922", "text": "public function displayTask()\n\t{\n\t\t// Get the page we are trying to access\n\t\t$page = Request::getWord('page', '');\n\t\t$component = Request::getWord('component', 'com_help');\n\t\t$extension = Request::getWord('extension', '');\n\n\t\tif ($component == $this->_option && !Request::getString('tmpl', '') && !$page)\n\t\t{\n\t\t\t$this->view\n\t\t\t\t->set('components', self::getComponents())\n\t\t\t\t->setLayout('overview')\n\t\t\t\t->display();\n\t\t\treturn;\n\t\t}\n\n\t\t$page = $page ?: 'index';\n\n\t\t// Force help template\n\t\tRequest::setVar('tmpl', 'help');\n\n\t\t$finalHelpPage = Finder::page($component, $extension, $page);\n\n\t\t// Var to hold content\n\t\t$this->view->content = '';\n\n\t\t// If we have an existing pge\n\t\tif ($finalHelpPage != '')\n\t\t{\n\t\t\tob_start();\n\t\t\trequire_once $finalHelpPage;\n\t\t\t$this->view->content = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t}\n\t\telse if (isset($component) && $component != '' && $page == 'index')\n\t\t{\n\t\t\t// Get list of component pages\n\t\t\t$pages[] = Finder::pages($component);\n\n\t\t\t// Display page\n\t\t\t$this->view->content = $this->displayHelpPageIndexForPages($pages, 'h1');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Raise error to avoid security bug\n\t\t\tApp::abort(404, Lang::txt('COM_HELP_PAGE_NOT_FOUND'));\n\t\t}\n\n\t\t// Set vars for views\n\t\t$this->view->modified = filemtime($finalHelpPage);\n\t\t$this->view->component = $component;\n\t\t$this->view->extension = $extension;\n\t\t$this->view->page = $page;\n\n\t\t// Display\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "6a4fd91700a00c41547ca8b2a193091f", "score": "0.65097356", "text": "public function actionShow()\n\t{\n\t\t$this->render('show',array('model'=>$this->loadArticles($_GET['id'])));\n\t}", "title": "" }, { "docid": "dffabbd39fa01d27e5385af66489771e", "score": "0.6475675", "text": "public function show()\n\t{\n\n\n\n\t}", "title": "" }, { "docid": "c66d8a02c25d54198c0818f54fe87485", "score": "0.6475648", "text": "public function show($id)\n {\n echo 'show';\n }", "title": "" }, { "docid": "c66d8a02c25d54198c0818f54fe87485", "score": "0.6475648", "text": "public function show($id)\n {\n echo 'show';\n }", "title": "" }, { "docid": "656fe493779bf91e119cf4af807d6ffc", "score": "0.64486307", "text": "public function show( )\n {\n //\n }", "title": "" }, { "docid": "f3cd975a1782b3c9de5e2a72a9e6c4e2", "score": "0.6423154", "text": "function index()\n {\n $this->actionNotFound('task');\n }", "title": "" }, { "docid": "c0ce4b7908d56b589be4c3806e7aaaa3", "score": "0.64150184", "text": "public function showAction()\n {\n $this->view->cache(true);\n }", "title": "" }, { "docid": "44cb4088de61595783dc95d02de1729d", "score": "0.6406621", "text": "function show($id)\n {\n }", "title": "" }, { "docid": "a0c9a6760434730748505f0cf797a2e9", "score": "0.64062655", "text": "public function show($id){\n echo \"show: $id\";\n }", "title": "" }, { "docid": "dbe0a89a145e28efc305dc69acd9b8fe", "score": "0.6390148", "text": "public function show_get()\n\t{\n\t\t# code...\n\t}", "title": "" }, { "docid": "eec41c9bc838d93e43fe676d18c7eb6b", "score": "0.6370546", "text": "public function show()\n\t{\n\t\t$this->load->view('site', $this->show_data);\n\t}", "title": "" }, { "docid": "9fd82c9e3e1d86a593dc5a4e26c7f04f", "score": "0.6342709", "text": "public function displayTask()\n\t{\n\t\t// Get filters\n\t\t$this->view->filters = array(\n\t\t\t'zone' => urldecode(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.zone',\n\t\t\t\t'zone',\n\t\t\t\t''\n\t\t\t)),\n\t\t\t'master' => urldecode(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.master',\n\t\t\t\t'master',\n\t\t\t\t''\n\t\t\t)),\n\t\t\t// Sorting\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'zone'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'ASC'\n\t\t\t),\n\t\t\t// Get paging variables\n\t\t\t'limit' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limit',\n\t\t\t\t'limit',\n\t\t\t\tConfig::get('list_limit'),\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'start' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limitstart',\n\t\t\t\t'limitstart',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t)\n\t\t);\n\n\t\t// In case limit has been changed, adjust limitstart accordingly\n\t\t$this->view->filters['start'] = ($this->view->filters['limit'] != 0 ? (floor($this->view->filters['start'] / $this->view->filters['limit']) * $this->view->filters['limit']) : 0);\n\n\t\t// Get the middleware\n\t\t$model = new Middleware();\n\n\t\t$this->view->total = $model->zones('count', $this->view->filters);\n\n\t\t$this->view->rows = $model->zones('list', $this->view->filters);\n\n\t\t// Set any errors\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Display results\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "b2438c2020fbad3d2935d8c111a16360", "score": "0.63322866", "text": "function show(){\n $pm = $this->page_mapper;\n $id = Registry::get('Request')->get_param('id');\n $array = array(\n 'id' => Registry::get('Request')->get_param('id'),\n 'page' => $pm->find( $id )\n ); \n $this->render('page', $array);\n }", "title": "" }, { "docid": "70b150cc4ed4a94b55c8a9de79b6aa4d", "score": "0.6329168", "text": "public function index()\n {\n $this->show(2);\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6316372", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "8a50bdb74ad58a3017390db3bedee3c6", "score": "0.63142556", "text": "public function run(){\n\t\t\n\n\t\t$params = array();\n\n\t\t$url = '/';\n\t\tif(isset($_GET['url'])){\n\t\t\t$url.=$_GET['url'];\n\t\t}\n\n\t\tif (!empty($url) && $url != '/') {\n\t\t\t$url = explode('/', $url);\n\n\t\t\t//remove o primeiro registo q seria o nome do site\n\t\t\tarray_shift($url);\n\n\t\t\t//chama o pagina/metodo e valida, se nao retorna para home\n\t\t\tif(file_exists('controller/'.$url[0].'Controller.php')){\n\t\t\t\t$currentController = $url[0].'Controller';\n\t\t\t}else{\n\t\t\t\t$currentController = 'homeController';\n\t\t\t}\n\t\t\t\n\t\t\tarray_shift($url);\n\n\t\t\t//verifica se existe o action, caso nao seta o padrao, caso sim ele remove o indece tbm\n\t\t\tif(isset($url[0]) && !empty($url[0])){\n\t\t\t\t$currentAction = $url[0];\n\t\t\t\tarray_shift($url);\n\t\t\t}else{\n\t\t\t\t//chama o metodo\n\t\t\t\t$currentAction = 'index';\n\t\t\t}\n\n\t\t\t//se existe parametro acrecenta, caso nao ele fica null\n\t\t\tif(count($url) > 0){\n\t\t\t\t$params = $url;\n\t\t\t}\n\n\t\t}else{\n\t\t\t//seta o home padrao\n\t\t\t$currentController = 'homeController';\n\t\t\t$currentAction = 'index';\n\t\t}\n\t\t\n\t\t//instancia o controller armazenado a instancia do obj dentro da variavel c\n\t\t$c = new $currentController();\n\t\t//agora instanciaremos a action\n\t\t//a action nada mais e q um metodo dentro da classe\n\n\n\t\t//essa funçao, o primeiro parametro pega a classe e executa o metodo=action, o segundo manda os params c tiver\n\t\tcall_user_func_array(array($c, $currentAction),$params);\n\t}", "title": "" }, { "docid": "e692f1b5aa5de4a8dd18c6e1b3c144d3", "score": "0.6311184", "text": "public function show($id)\n {\n echo \"Metodo show\";\n }", "title": "" }, { "docid": "961bb018b159f9fc23b1b194b360b0e7", "score": "0.63019466", "text": "public function index() {\n\t\tself::show();\n\t}", "title": "" }, { "docid": "6ba1ce60c07c6ded824dde3aab162236", "score": "0.62876165", "text": "public function show ( ) { $this->tab->show( ); }", "title": "" }, { "docid": "e57fb23b0f2b2f17ab0ab4d9b2a327ee", "score": "0.6286145", "text": "public function displayTask()\n\t{\n\t\t// Get filters\n\t\t$filters = array(\n\t\t\t'search' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.search',\n\t\t\t\t'search',\n\t\t\t\t''\n\t\t\t),\n\t\t\t'wish' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.wish',\n\t\t\t\t'wish',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t// Get sorting variables\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'id'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'DESC'\n\t\t\t),\n\t\t\t// Get paging variables\n\t\t\t'limit' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limit',\n\t\t\t\t'limit',\n\t\t\t\tConfig::get('list_limit'),\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'start' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limitstart',\n\t\t\t\t'limitstart',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'item_type' => 'wish',\n\t\t\t'parent' => 0\n\t\t);\n\n\t\t$wish = Wish::oneOrNew($filters['wish']);\n\n\t\t$wishlist = Wishlist::oneOrNew($wish->get('wishlist'));\n\n\t\t// Load child comments of the parents in the first set.\n\t\t// This will result in a pagination limit break, but it provides\n\t\t// a clearer story of a wish\n\t\t$model = Comment::all();\n\n\t\tif ($filters['wish'])\n\t\t{\n\t\t\t$model->whereEquals('item_id', $filters['wish']);\n\t\t}\n\n\t\t$comments1 = $model\n\t\t\t->whereEquals('item_type', $filters['item_type'])\n\t\t\t->whereEquals('parent', $filters['parent'])\n\t\t\t->order($filters['sort'], $filters['sort_Dir'])\n\t\t\t->paginated('limitstart', 'limit')\n\t\t\t->rows();\n\n\t\t$comments = array();\n\t\tif (count($comments1) > 0)\n\t\t{\n\t\t\t$pre = '<span class=\"treenode\">&#8970;</span>&nbsp;';\n\t\t\t$spacer = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';\n\n\t\t\tforeach ($comments1 as $comment1)\n\t\t\t{\n\t\t\t\t$comment1->set('prfx', '');\n\t\t\t\t$comment1->set('wish', $filters['wish']);\n\t\t\t\t$comments[] = $comment1;\n\n\t\t\t\tforeach ($comment1->replies() as $comment2)\n\t\t\t\t{\n\t\t\t\t\t$comment2->set('prfx', $spacer . $pre);\n\t\t\t\t\t$comment2->set('wish', $filters['wish']);\n\t\t\t\t\t$comments[] = $comment2;\n\n\t\t\t\t\tforeach ($comment2->replies() as $comment3)\n\t\t\t\t\t{\n\t\t\t\t\t\t$comment3->set('prfx', $spacer . $spacer . $pre);\n\t\t\t\t\t\t$comment3->set('wish', $filters['wish']);\n\t\t\t\t\t\t$comments[] = $comment3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$model = Comment::all();\n\n\t\tif ($filters['wish'])\n\t\t{\n\t\t\t$model->whereEquals('item_id', $filters['wish']);\n\t\t}\n\n\t\t$total = $model\n\t\t\t->whereEquals('item_type', $filters['item_type'])\n\t\t\t->total();\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('filters', $filters)\n\t\t\t->set('rows', $comments)\n\t\t\t->set('total', $total)\n\t\t\t->set('wish', $wish)\n\t\t\t->set('wishlist', $wishlist)\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "af1b92819411d0896747e3ae4be2ddf5", "score": "0.62793565", "text": "function listPage_quickAction(){\n /**\n action: link / action when executed\n title: text for show\n popup (true/false): if true => config by link view popup\n */\n $this->data_view['dataTable']['quickAction'] = array(\n array('action'=>$this->_table.'/set_status/is_active/0','title'=>'Ẩn','popup'=>false),\n array('action'=>$this->_table.'/set_status/is_active/1','title'=>'Hiện','popup'=>false),\n array('action'=>$this->_table.'/delete_popup/1','title'=>'Xóa','popup'=>true)\n );\n }", "title": "" }, { "docid": "7c25d9175a0b8f2be9a3f3b0c4a64c29", "score": "0.62790823", "text": "public function showAction()\r\n\t{\r\n\t\t$this->loadLayout()->renderLayout();\r\n\t}", "title": "" }, { "docid": "577ca03db6b7f98b3efd539a7dd6c5e3", "score": "0.6274941", "text": "public function show($id)\n {\n return 'This is task with ID: '.$id.'<br /> <a href=\"/\">Go back</a>';\n }", "title": "" }, { "docid": "67f08c643ba18e3fd206a1196f3a41de", "score": "0.6269892", "text": "static function display($option,$task){\n\t\tglobal $jinput, $mainframe;\n\t\t$language = Jfactory::getLanguage();\n\t\t$document = JFactory::getDocument();\n\t\t$document->addScript(JURI::root().\"media/com_osproperty/assets/js/lib.js\",\"text/javascript\",true);\n\t\tswitch ($task){\n\t\t\tcase \"locator_getstate\":\n\t\t\t\tOspropertyLocator::getstateforcountry($option);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\techo HelperOspropertyCommon::buildToolbar('locator');\n\t\t\t\tOspropertyLocator::locatorSearch($option);\n\t\t\t\tHelperOspropertyCommon::loadFooter($option);\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "fb98030a30dc71da2f834198c0eb2820", "score": "0.62583596", "text": "public function show() {\r\n // without an id we just redirect to the error page as we need the post id to find it in the database\r\n if (!isset($_GET['id']))\r\n return call('pages', 'error');\r\n\r\n // we use the given id to get the right post\r\n $event = Event::find($_GET['id']);\r\n require_once('views/events/show.php');\r\n }", "title": "" }, { "docid": "c3fa47641a67ef92172953142f25460c", "score": "0.62569255", "text": "public function index(){\n\n // show task\n $database = App::resolve('database');\n $tasks = $database->fetchAll('tasks');\n require 'app/views/tasks.view.php';\n\n }", "title": "" }, { "docid": "632f112a386fa66db7e2e11d656439e8", "score": "0.6249572", "text": "function ShowContent()\n \t{\n\t\tglobal $session;\n\t\t\n\t\t$page \t\t= GetPost('page'); \n\t\t$task \t\t= GetPost('task');\n\t\t$id\t\t= GetPost('id');\n\t\t$message\t= GetPost('message');\n\t\t$status\t\t= GetPost('status');\n\t\t$value\t\t= GetPost('value');\n\t\t\n\t\t$this->page = $page;\n\t\t\n\n\t\tif(!$id && $task == 'edit')\n\t\t $task = 'view';\n\n\t\tif(empty($page))\n\t\t{\n//\t\t\trequire('modules/content/admin_front_page.php');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(!empty($message))\n\t\t{\n\t\t\trequire('includes/information.php');\n\t\t\tShowInformation($message, $status, $value);\n\t\t}\n\n//\t\tif(!$this->permission->GetPerm($page, $task) && $task != 'edit')\n//\t\t\tRedirect($cfg_apath .'index2.php?page='. $page);\n\n\t\tif($task == 'edit' || $task == 'add')\n\t\t\trequire('content/'.$page.'_form.php');\n\t\telse\n\t\t{\n\t\t\trequire('content/'.$page.'.php');\n\t\t\tlist($items, $labels, $commands) = GetListEditorParams();\n\t\t\t$this->ShowList($items, $labels, $commands);\n\t\t}\t\n \t}", "title": "" }, { "docid": "1921e726177ae725b5c34f8b2810c7b9", "score": "0.6244003", "text": "public function displayTask()\n\t{\n\t\t$filters = array(\n\t\t\t'search' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.search',\n\t\t\t\t'search',\n\t\t\t\t''\n\t\t\t),\n\t\t\t'sort' => Request::getstate(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'name'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getstate(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'ASC'\n\t\t\t)\n\t\t);\n\n\t\t// instantiate mailing list object\n\t\t$lists = Mailinglist::all()\n\t\t\t->whereEquals('deleted', 0);\n\n\t\tif ($filters['search'])\n\t\t{\n\t\t\t$filters['search'] = strtolower((string)$filters['search']);\n\t\t\t$lists->whereLike('name', $filters['search']);\n\t\t}\n\n\t\t$rows = $lists\n\t\t\t->ordered($filters['sort'], $filters['sort_Dir'])\n\t\t\t->paginated('limitstart', 'limit')\n\t\t\t->rows();\n\n\t\t// diplay list of mailing lists\n\t\t$this->view\n\t\t\t->setLayout('display')\n\t\t\t->set('lists', $rows)\n\t\t\t->set('filters', $filters)\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.62068045", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.62068045", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "b2d61261fa41c95b6a25d5bee4bb5902", "score": "0.6206788", "text": "public function displayTask()\n\t{\n\t\t// Get paging variables\n\t\t$filters = array(\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'id'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'DESC'\n\t\t\t)\n\t\t);\n\n\t\t// Fetch results\n\t\t$rows = Message::all()\n\t\t\t->order($filters['sort'], $filters['sort_Dir'])\n\t\t\t->paginated('limitstart', 'limit')\n\t\t\t->rows();\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('rows', $rows)\n\t\t\t->set('filters', $filters)\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "0504b5f049f0905079cf42d27940d476", "score": "0.6198771", "text": "public function displayTask()\n\t{\n\t\t// Get SKU ID\n\t\t$sId = Request::getInt('sId');\n\t\t$this->view->sId = $sId;\n\n\t\t// Get SKU\n\t\t$sku = Sku::getInstance($sId);\n\t\t$this->view->sku = $sku;\n\n\t\t// Get filters\n\t\t$this->view->filters = array(\n\t\t\t// Get sorting variables\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'srId'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'ASC'\n\t\t\t),\n\t\t\t// Get paging variables\n\t\t\t'limit' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limit',\n\t\t\t\t'limit',\n\t\t\t\tConfig::get('list_limit'),\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'start' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limitstart',\n\t\t\t\t'limitstart',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t)\n\t\t);\n\t\t//print_r($this->view->filters); die;\n\n\t\t// Get record count\n\t\t$this->view->filters['return'] = 'count';\n\t\t$this->view->total = SerialsHelper::getSkuSerials($this->view->filters, $sId);\n\n\t\t// Get records\n\t\t$this->view->filters['return'] = 'list';\n\t\t$this->view->rows = SerialsHelper::getSkuSerials($this->view->filters, $sId);\n\n\t\t// Output the HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "17ba01dc83ac8a6c56a5d3f10af68821", "score": "0.6198085", "text": "function _show() {\n\t}", "title": "" }, { "docid": "17ba01dc83ac8a6c56a5d3f10af68821", "score": "0.6198085", "text": "function _show() {\n\t}", "title": "" }, { "docid": "f31b7bf34f35f4019acf66381b5dfa24", "score": "0.6194982", "text": "public function display_contents_page() {\n switch (filter_input(INPUT_GET, 'task', FILTER_SANITIZE_STRING)) {\n case NULL:\n include_once('views/contents.php');\n\n $headers = array(\n (object) array(\n 'text' => __('Title', $this->plugin_slug),\n 'sortable' => TRUE\n ),\n (object) array(\n 'text' => __('Content type', $this->plugin_slug),\n 'sortable' => TRUE,\n 'facet' => TRUE\n ),\n (object) array(\n 'text' => __('Author', $this->plugin_slug),\n 'sortable' => TRUE,\n 'facet' => TRUE\n ),\n (object) array(\n 'text' => __('Tags', $this->plugin_slug),\n 'sortable' => FALSE,\n 'facet' => TRUE\n ),\n (object) array(\n 'text' => __('Last modified', $this->plugin_slug),\n 'sortable' => TRUE\n ),\n (object) array(\n 'text' => __('ID', $this->plugin_slug),\n 'sortable' => TRUE\n )\n );\n if (get_option('h5p_track_user', TRUE)) {\n $headers[] = (object) array(\n 'class' => 'h5p-results-link'\n );\n }\n $headers[] = (object) array(\n 'class' => 'h5p-edit-link'\n );\n\n $plugin_admin = H5P_Plugin_Admin::get_instance();\n $plugin_admin->print_data_view_settings(\n 'h5p-contents',\n admin_url('admin-ajax.php?action=h5p_contents'),\n $headers,\n array(true),\n __(\"No H5P content available. You must upload or create new content.\", $this->plugin_slug),\n (object) array(\n 'by' => 4,\n 'dir' => 0\n )\n );\n return;\n\n case 'show':\n // Access restriction\n if ($this->current_user_can_view($this->content) == FALSE) {\n H5P_Plugin_Admin::set_error(__('You are not allowed to view this content.', $this->plugin_slug));\n H5P_Plugin_Admin::print_messages();\n return;\n }\n\n // Admin preview of H5P content.\n if (is_string($this->content)) {\n H5P_Plugin_Admin::set_error($this->content);\n H5P_Plugin_Admin::print_messages();\n }\n else {\n $plugin = H5P_Plugin::get_instance();\n $embed_code = $plugin->add_assets($this->content);\n include_once('views/show-content.php');\n H5P_Plugin::get_instance()->add_settings();\n\n // Log view\n new H5P_Event('content', NULL,\n $this->content['id'],\n $this->content['title'],\n $this->content['library']['name'],\n $this->content['library']['majorVersion'] . '.' . $this->content['library']['minorVersion']);\n }\n return;\n\n case 'results':\n // View content results\n if (is_string($this->content)) {\n H5P_Plugin_Admin::set_error($this->content);\n H5P_Plugin_Admin::print_messages();\n }\n else {\n // Print HTML\n include_once('views/content-results.php');\n $plugin_admin = H5P_Plugin_Admin::get_instance();\n $plugin_admin->print_data_view_settings(\n 'h5p-content-results',\n admin_url('admin-ajax.php?action=h5p_content_results&id=' . $this->content['id']),\n array(\n (object) array(\n 'text' => __('User', $this->plugin_slug),\n 'sortable' => TRUE\n ),\n (object) array(\n 'text' => __('Score', $this->plugin_slug),\n 'sortable' => TRUE\n ),\n (object) array(\n 'text' => __('Maximum Score', $this->plugin_slug),\n 'sortable' => TRUE\n ),\n (object) array(\n 'text' => __('Opened', $this->plugin_slug),\n 'sortable' => TRUE\n ),\n (object) array(\n 'text' => __('Finished', $this->plugin_slug),\n 'sortable' => TRUE\n ),\n __('Time spent', $this->plugin_slug)\n ),\n array(true),\n __(\"There are no logged results for this content.\", $this->plugin_slug),\n (object) array(\n 'by' => 4,\n 'dir' => 0\n )\n );\n\n // Log content result view\n new H5P_Event('results', 'content',\n $this->content['id'],\n $this->content['title'],\n $this->content['library']['name'],\n $this->content['library']['majorVersion'] . '.' . $this->content['library']['minorVersion']);\n }\n return;\n }\n\n print '<div class=\"wrap\"><h2>' . esc_html__('Unknown task.', $this->plugin_slug) . '</h2></div>';\n }", "title": "" }, { "docid": "9cea79eb4b9bd7ab5fbd1cfa1fe79830", "score": "0.6192886", "text": "public function run()\r\n {\r\n $url = '/';\r\n if (isset($_GET['url'])) {\r\n\r\n\r\n $url .= $_GET['url'];\r\n }\r\n\r\n $params = array();\r\n\r\n if (!empty($url) and $url != '/') {\r\n\r\n $url = explode('/',$url);\r\n array_shift($url);\r\n\r\n\r\n $currentController=$url[0].'Controller';\r\n array_shift($url);\r\n // print_r($url);\r\n\r\n if(isset($url[0]) && !empty($url[0])){\r\n $currentAction=$url[0];\r\n array_shift($url);\r\n\r\n }else{\r\n $currentAction='index';\r\n }\r\n\r\n if(count($url>0)){\r\n\r\n $params = $url;\r\n\r\n }\r\n\r\n } else {\r\n\r\n $currentController = 'homeController';\r\n $currentAction = 'index';\r\n\r\n\r\n }\r\n\r\n\r\n $c = new $currentController();\r\n call_user_func_array(array($c,$currentAction), $params);\r\n\r\n //executar uma funcao dentro de uma classe porem nao sabemos o nome dessa funcao\r\n\r\n // echo \"CONTROLLER: \".$currentController.\"</br>\";\r\n //echo \"ACTION: \".$currentAction.\"</br>\";\r\n //echo \"PARAMETROS: \".print_r($params, true).\"</br>\";\r\n }", "title": "" }, { "docid": "df1971f93d5a484076b55ac15824a94a", "score": "0.61891705", "text": "public function show($id)\n\t{\n\t\t//\n\t\treturn \"show\";\n\t}", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.6175428", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.6175428", "text": "public function show()\n {\n }", "title": "" }, { "docid": "3bd44a4de690d6da66058bcb664c1347", "score": "0.6172738", "text": "function index()\n {\n\n //uri - action segment\n $action = $this->uri->segment(3);\n\n //re-route to correct method\n switch ($action) {\n case 'upload-task-file':\n $this->__uploadTaskFile();\n break;\n\n default:\n $this->__default();\n }\n\n //log debug data\n $this->__ajaxdebugging();\n }", "title": "" }, { "docid": "b3bdb1db4279d12c4abb9fa533aae039", "score": "0.6164917", "text": "public function show()\n {\n }", "title": "" }, { "docid": "750c7e567a6a2032bac54daf926bec34", "score": "0.6159266", "text": "function show_route(){\n\t\t\n\t $id = $this->uri->segment(3);\n\t $date = $this->uri->segment(4);\n\t \n\t $data['on_date'] = date_to_mdy($date);\n $data['route'] = $this->route->get($id);\n $data['pickups'] = $this->pickup->route_on_date($id, $date);\n\n $this->subnav_active = \"reports\";\n $this->simple_page(\"show_route\", $data);\n\t}", "title": "" }, { "docid": "970d10a4b68da267035b238ae231f6f6", "score": "0.6138472", "text": "public function getShow($post)\n\t{\n // redirect to the frontend\n\t}", "title": "" }, { "docid": "1ac5e1cd82712eb01ad14c04910fd6bb", "score": "0.61273205", "text": "public function show($id)\n {\n //\n\n die('testshow');\n }", "title": "" }, { "docid": "478ee9b5773329f45fd5a1df30216513", "score": "0.61226124", "text": "function index(){\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "8daf3faf50e2568428dd99d253e2a05b", "score": "0.61211383", "text": "function get() {\n if( isset( $_GET['action'] ) && $_GET['action'] == 'addNews' ){\n $pageInfo['pageTitle'] = 'Add News';\n include( TEMPLATE_PATH . \"/admin/addNews.php\" );\n }\n else if( isset( $_GET['action'] ) && $_GET['action'] == 'edit' ){\n self::editNewsSnippet();\n }\n else if( isset( $_GET['action'] ) && $_GET['action'] == 'delete' ){\n self::deleteNewsSnippet();\n }\n else{\n self::listNewsSnippets();\n }\n\n }", "title": "" }, { "docid": "62ad859ba3a68624677db905837f11dc", "score": "0.611934", "text": "public function show($id)\n {\n return \"show\";\n }", "title": "" }, { "docid": "1828d055cd857fa052f436003dccc870", "score": "0.6115558", "text": "public function show()\n {\n\n\n\n }", "title": "" }, { "docid": "d99f987e67a0b77911e67874a37e2575", "score": "0.61133134", "text": "public function show() : void\n { \n $this->render('index.php');\n }", "title": "" }, { "docid": "5ae967a2de81f749387772a2696c6def", "score": "0.610444", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "a9b7617783503e39d3576a2a0429fc77", "score": "0.60992664", "text": "function detailAction()\r\n\t{\r\n\t\t$this->view->facebook = $this->mDiachi->getRecordByName('facebook');\r\n\t\t$this->view->twitter = $this->mDiachi->getRecordByName('twitter');\r\n\t\t//===================================================================\r\n\t\t/*--------Lấy ra forum và hình ảnh--------*/\r\n\t\t$this->view->listImageRight = $this->mHinhanh->getListImageRight();\r\n\t\t$this->view->listThread = $this->listThreadTitle;\r\n\t\t\r\n\t\t$this->view->headScript()->appendFile($this->view->baseUrl().'/application/templates/front/js/switch_news.js',\"text/javascript\");\r\n\t\t\r\n\t\t$this->view->listHotNews = $this->mDefault->getListHotNews();\r\n\t\t$this->view->listNewsMostView = $this->mDefault->getListMostView();\r\n\t\t$this->view->listHotNewsJs = $this->mDefault->getListHotNewsJs();\r\n\t\t$this->view->current_category=array('category_name'=>'Video');\r\n\t\t\r\n\t\t$video_id = $this->_request->getParam('videoid');\r\n\t\t$this->view->video = $this->mVideo->getVideoByVideoId($video_id);\r\n\t\t\r\n\t\t$this->view->listNewsMostVideo = $this->mVideo->getListMostVideo();\r\n\t\t$this->view->listvideo = $this->mVideo->getListNewsVideo();\r\n\t\t$listComment = $this->mVideo->getListCommentByVideoId($video_id);\r\n\t\t$listForumUser = $this->mVideo->getListForumUser();\r\n\t\t\r\n\t\t$listImage = array();\r\n\t\t$listAvatar = $this->mVideo->getListAvatar();\r\n\t\t\r\n\t\t$form = $this->setForm($video_id);\r\n\t\t$listquangcao = $this->mDefault->getListAds();\r\n\t\t$listParents = $this->mTintuc->getListParent();\r\n\t\t$listChild = $this->mTintuc->getListChild();\r\n\t\t\t\t\t//Lấy ra ảnh quảng cáo ngẫu nhiên\r\n\t\t$listquangcao1 = $this->mDefault->getListAds1();\r\n\t\t$listquangcao2 = $this->mDefault->getListAds2();\r\n\t\t$listquangcao3 = $this->mDefault->getListAds3();\r\n\t\t$listquangcao4 = $this->mDefault->getListAds4();\r\n\t\t$this->view->listquangcao1 = $listquangcao1;\r\n\t\t$this->view->listquangcao2 = $listquangcao2;\r\n\t\t$this->view->listquangcao3 = $listquangcao3;\r\n\t\t$this->view->listquangcao4 = $listquangcao4;\r\n\r\n\t\t$this->view->listImage = $listImage;\r\n\t\t$this->view->listParent = $listParents;\r\n\t\t$this->view->listChild = $listChild;\r\n\t\t$this->view->listquangcao = $listquangcao;\r\n\t\t$this->view->form = $form;\r\n\t\t$this->view->listComment = $listComment;\r\n\t\t\r\n\t\t$this->view->listdiachi = $this->mDiachi->getListDiachi();\r\n\t\t$this->view->listlienhe = $this->mDiachi->getListLienhe();\r\n\t\t/*$paginator = Zend_Paginator::factory($this->mVideo->getListCommentByVideoId($video_id));\r\n\t $paginator->setItemCountPerPage(5); \r\n\t $currentPage = $this->_request->getParam('page',1);\r\n\t $paginator->setCurrentPageNumber($currentPage);\r\n\t\t\r\n\t\t$this->view->listComment = $paginator;*/\r\n\t}", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60965574", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60965574", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60965574", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60965574", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60965574", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60965574", "text": "public function show()\n {\n\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "65c7e51c557119c4523c305976c470bc", "score": "0.80575514", "text": "public function create()\n {\n return view('Admin.acl.resource.form');\n }", "title": "" }, { "docid": "bb87b5e7b03ebf8127b27e4ff14ee77c", "score": "0.7914315", "text": "public function create()\n {\n return view('Backend/Resources/addResource');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "2378dd3b14ed3946fdc33fe245647ae5", "score": "0.75997573", "text": "public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName().'.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "ee18d6d904526a51f41375d0bd093040", "score": "0.75147605", "text": "public function create()\n {\n $model = $this->resource;\n $resource = new Resource;\n $providers = User::whereType('provider')->orderby('name')->get();\n $categories = Category::where('parent_id', 0)->get();\n\n return view('backend.resources.create', compact('model', 'resource', 'providers', 'categories'));\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "14707811f9cdd58dcd07e882041856bc", "score": "0.74805194", "text": "public function create()\n\t{\n\t\treturn view('module.forms.create');\n\t}", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "ecbbca86f1ca5794847773f086d5685e", "score": "0.7357543", "text": "public function create()\n {\n return view('backend.client.formcreate');\n }", "title": "" }, { "docid": "e24406181475135438d05ab2d48d4b36", "score": "0.73556155", "text": "public function create()\n\t{\n\t\treturn view('form');\n\t}", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "517ede7d413126a1373684f8f17be2b9", "score": "0.7247568", "text": "public function create()\n {\n return view('clothing.form');\n }", "title": "" }, { "docid": "5016b1af29a2cdfd8f026421109d1142", "score": "0.7241239", "text": "public function action_new()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id !== null)\n\t\t{\n\t\t\t$this->redirect(Route::url('supplier', array('action' => 'edit', 'id' => $id)));\n\t\t} // if\n\n\t\t$model = ORM::factory('Supplier');\n\n\t\t$this->content = View::factory('supplier/form', array(\n\t\t\t'title' => __('Create new supplier'),\n\t\t\t'supplier' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('supplier', array('action' => 'save'))\n\t\t));\n\t}", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "1e688bba9a7b271c2e7c26eb773383da", "score": "0.72305965", "text": "public function create()\n {\n //\n\n return view(\"student.form\");\n }", "title": "" }, { "docid": "1e47d9942ad3c42b28df121849c0197e", "score": "0.7225282", "text": "public function newAction()\n {\n $this->view->form = new PersonasForm(\n null,\n [\n 'edit' => true,\n ]\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "fabe91e71192c05e656f9056b41ad668", "score": "0.72117", "text": "public function showCreateForm()\n {\n return view('admin.accounts.create');\n }", "title": "" }, { "docid": "e816b62a64c3324cff6ccbc00e52514b", "score": "0.7202654", "text": "public function frontCreate()\n {\n $resource = new Resource;\n $countries = Countries::all();\n $cities = City::orderby('name')->get();\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\n\n return view('frontend.resources.create', compact(\n 'resource', 'countries', 'cities', 'categories'\n ));\n }", "title": "" }, { "docid": "a0f86f0603cbb921b500dd4fcb6185e6", "score": "0.71805054", "text": "public function create()\n {\n $data['action'] = 'absensi.store';\n return view('absensi.form', $data);\n }", "title": "" }, { "docid": "942a0a16c384247567b37ebeddf71971", "score": "0.7151351", "text": "public function create()\n {\n return view('Backend.student.new');\n }", "title": "" }, { "docid": "dc9ff50878e23f55a66dade7c29e9693", "score": "0.71423906", "text": "public function create()\n {\n return view('admin.trucks.forms.create');\n }", "title": "" }, { "docid": "b7f809ca4143f6da6ac8746ef0099f3a", "score": "0.71369606", "text": "public function create()\n {\n return view('backend.students.student-form-add');\n }", "title": "" }, { "docid": "0324ad3d56f56ecb8342812c78064a91", "score": "0.71342736", "text": "public function newAction()\n {\n $this->initializeScaffolding();\n\n $this->beforeNew();\n $this->view->form = $this->scaffolding->getForm();\n $this->afterNew();\n }", "title": "" }, { "docid": "871ecf60820ab50a5032377d975fc622", "score": "0.71342325", "text": "public function create()\n {\n return view('admin.ProviderCreateForm');\n }", "title": "" }, { "docid": "97209db276d73dfc71ffc10ef4a4037f", "score": "0.71315765", "text": "public function create()\n {\n return view('book.form');\n }", "title": "" }, { "docid": "1e082bee3084311021ae31460c5c0e39", "score": "0.7127698", "text": "public function create()\n {\n return view('forms.books.create');\n }", "title": "" }, { "docid": "fa54f02550ef87c9f8f5a27d06c382de", "score": "0.71258074", "text": "public function create() {\n return view('resources.edit');\n }", "title": "" }, { "docid": "33732dfef72a6d8b9b06cc792789e6df", "score": "0.71213603", "text": "public function create()\n\t{\n\t\treturn view('admin.product.form');\n\t}", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "d70c1ea684023a020e3557813873c2ca", "score": "0.70956016", "text": "public function create()\n {\n $sPageTitle = $this->sName;\n \n $aRepositories = Dataflow::getRepositories();\n \n return view($this->sPath.'/form', compact('sPageTitle', 'aRepositories'));\n }", "title": "" }, { "docid": "a5962b732b317d8491e1cd29bddb79a5", "score": "0.7095086", "text": "public function create()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resource = $this->resource;\n $resourceFields = json_encode($resource::fields());\n $relationalFields = json_encode(Otter::getRelationalFields($resource));\n\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['create']) ? $resource::validations()['client']['create'] : null;\n $validationFields = json_encode($validationRules);\n\n return view('otter::pages.create', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\n }", "title": "" }, { "docid": "4b38db6737bb3fb8f108037fd62385fc", "score": "0.70905846", "text": "public function create()\n {\n return view('enterprise.new');\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.705323", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "0ed27c8268deedd7d778400898a3117f", "score": "0.7051436", "text": "public function create()\n\t{\n return View::make('clerks.create');\n\t}", "title": "" }, { "docid": "991f766d6ac0e5a6f0b81f6a7483c64a", "score": "0.7049206", "text": "public function create()\n {\n //\n $page_title = 'Supplier';\n $page_description = 'Supplier Add Form';\n $form_title = 'Supplier - Add';\n $form_description = 'Enter details to add new supplier , field with * are required.';\n $supplier = new Supplier();\n return view('pages.masterfiles.profiles.supplier.add', compact('page_title', 'page_description','form_title', 'form_description', 'supplier'));\n }", "title": "" }, { "docid": "9954664a9c6b9b3ab69721566e0199bc", "score": "0.7044138", "text": "public function create()\n {\n $source = $this->source();\n $category = $this->category();\n $subcategory = $this->subcategory();\n $subject = $this->subject();\n $record = $this->record();\n $media = $this->media();\n $language = $this->language();\n $location = $this->location();\n return view('website.form', compact('source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\n }", "title": "" }, { "docid": "47df4583b4b1b0f104234ead33b0b361", "score": "0.7041365", "text": "public function create() {\n return view(\"ir.create\");\n }", "title": "" }, { "docid": "23ef4c6aae4638b7258db6105822d281", "score": "0.70397395", "text": "public function create()\n {\n $data['action'] = 'jadwalbelajar.store';\n return view ('jadwalbelajar.form', $data);\n }", "title": "" }, { "docid": "7bbb0d78cadef3c44a577d92d50a3e67", "score": "0.70380855", "text": "public function create()\n {\n $resources = Resource::all();\n return view('product.create', compact('resources'));\n }", "title": "" }, { "docid": "45f9c7429c98bc848636cf3e3af4a0b7", "score": "0.70367175", "text": "public function create()\n\t{\n\t\treturn view('admin.show.create');\n\t}", "title": "" }, { "docid": "4d21f7c9cf42b4d85338aca053e91032", "score": "0.70324284", "text": "public function create()\r\n {\r\n $title = trans('book.new');\r\n $this->generateParam();\r\n return view('layouts.create', compact('title'));\r\n }", "title": "" }, { "docid": "3be30800c76364ece9bf10bfffd9d576", "score": "0.7022247", "text": "public function create()\n {\n return view('penerbit.form');\n }", "title": "" }, { "docid": "5210b9361957c963c05861d35648076b", "score": "0.70178825", "text": "public function create()\n {\n $formInputs = $this->form();\n $formInputs['method'] = 'create';\n\n\n return view('students.create', compact('formInputs'));\n }", "title": "" }, { "docid": "804a6ca9dad7489200cc1f28102b0473", "score": "0.7002272", "text": "public function create()\n {\n return view('admin.restaurents.create');\n }", "title": "" }, { "docid": "e3189bc5490f564078b663c86cd3b554", "score": "0.69995284", "text": "public function create()\n {\n return view('admin.clubes.form')\n ->with(['action' => route('clubes.store')]);\n }", "title": "" }, { "docid": "27a713091aa62f5f81eb6b7a09310814", "score": "0.6997733", "text": "public function create()\n {\n return view('project.form');\n }", "title": "" }, { "docid": "76ecd9f94330c8bff719dad38ac5e742", "score": "0.69919205", "text": "public function create()\n {\n return view('forms.newPoetry');\n }", "title": "" }, { "docid": "75773cfa50c8a890d093cd7b4128f44b", "score": "0.6984025", "text": "public function create()\n {\n // INI REDIRECT KE HALAMAN FORM INPUT\n return view('admin.create');\n }", "title": "" }, { "docid": "c3119b97c0e321666818c6fe3e6116b4", "score": "0.697933", "text": "public function create()\n {\n return view($this->viewRoute.'.form');\n }", "title": "" }, { "docid": "7a36d29ededb118e48dc1f2b35700e81", "score": "0.697282", "text": "public function create()\n {\n //\n return view(\"billproducts.createForm\");\n }", "title": "" }, { "docid": "986fd11f3e8bfa985b902a8006b7d306", "score": "0.6968721", "text": "public function create()\n\t{\n\t\t$forms \t= $this->form_add();\n\t\t$custom_add = $disable_add = $disable_edit = $disable_delete = false;\n\n\t\tif(isset($this->disable_add))\n\t\t\t$disable_add = $this->disable_add;\n\n\t\tif(isset($this->disable_edit))\n\t\t\t$disable_edit = $this->disable_edit;\n\n\t\tif(isset($this->disable_delete))\n\t\t\t$disable_delete = $this->disable_delete;\n\n\t\tif(isset($this->custom_add))\n\t\t\t$custom_add = $this->custom_add;\n\n\t\treturn View::make('crud.create' , \n\t\t\tarray(\t\n\t\t\t\t'forms' \t\t\t=> $forms,\n\t\t\t\t'title'\t\t\t\t=> $this->title,\n\t\t\t\t'slug'\t\t\t\t=> $this->slug,\n\t\t\t\t'form_span'\t\t\t=> $this->form_span,\n\t\t\t\t'controller'\t\t=> $this->controller,\n\t\t\t\t'disable_edit'\t\t=> $disable_edit,\n\t\t\t\t'disable_delete' \t=> $disable_delete,\n\t\t\t\t'disable_add'\t\t=> $disable_add,\n\t\t\t\t'custom_add'\t\t=> $custom_add\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "8ced93e50c35698f25fcb388d463e032", "score": "0.6958418", "text": "public function create()\n {\n return view(\"pages.daftar.form\");\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "5225b1fd92184a478b2b9762321d1c23", "score": "0.69497955", "text": "public function create()\n {\n return view('hiperbolica.create');\n }", "title": "" }, { "docid": "593fbba523a02dd32ffe7ecf4fd50435", "score": "0.6946303", "text": "public function create()\n {\n return view('admin.site.form');\n }", "title": "" }, { "docid": "5700bb5603b363af554c788e226eff17", "score": "0.6945535", "text": "public function newAction()\n {\n $entity = new Reconocimiento();\n $form = $this->createForm(new ReconocimientoType(), $entity);\n\n return $this->render('SystemAdministracionBundle:Reconocimiento:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "12fd2eae40d48367c7e6d8331f5ead34", "score": "0.69429785", "text": "public function create()\n\t{\n\t\t//\n return View::make('objects.addnew');\n\t}", "title": "" }, { "docid": "c7310471f43f53eaf4b8eff6831b36d3", "score": "0.6939984", "text": "public function create()\n {\n return view('linhas.create');\n }", "title": "" }, { "docid": "ad623548153e56c22245e48fee70a80f", "score": "0.69390464", "text": "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = __('Add').' '. __($this->label);\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "title": "" }, { "docid": "6339cf25fff656067a9eaf3d5b7efb2a", "score": "0.6938875", "text": "public function create()\n {\n return view('admin.banner.banner-form')->with('title','add');\n }", "title": "" }, { "docid": "517e8eef100389973418652d54a823b1", "score": "0.69366604", "text": "public function create()\n {\n //no create view as ther create form is on the index page\n }", "title": "" }, { "docid": "9dc7ce932c1b23a833528346de52d671", "score": "0.69311243", "text": "public function create()\n {\n return view('admin.electrician.add');\n }", "title": "" }, { "docid": "a44e07047efd0e153e9c966db5bdabd0", "score": "0.69306445", "text": "public function create()\n {\n return view('dashboard.student.studentForm');\n }", "title": "" }, { "docid": "0b0f0931a087bfbc6677280f914ebfda", "score": "0.69298023", "text": "public function create()\n {\n return view('hocsinh.add');\n }", "title": "" }, { "docid": "8c2948fcee8393ed6a20bf84afb9cc88", "score": "0.6928795", "text": "public function create()\n {\n return view('manage.add');\n }", "title": "" }, { "docid": "1ba5eb9946214bea84f1480b6feabe1f", "score": "0.69276893", "text": "public function create()\n {\n return view('bspyl-form');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "5ed8a37a585288e035b28ed478757c41", "score": "0.6921601", "text": "public function create()\n {\n return view('elonlars.create');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "9a0129f9c2c01a078afcdd438cc75b1f", "score": "0.69172627", "text": "public function create()\n {\n return view('vestiti.form');\n }", "title": "" }, { "docid": "92274cb7faf3de5d13f627815b8f4ba2", "score": "0.69144803", "text": "public function create()\n {\n\n //\n\n return view('addinformation');\n\n }", "title": "" }, { "docid": "8a7c33d5844900cbaaaebde7aa21e4dd", "score": "0.6911652", "text": "public function formCreateAction() {\n $this->view->form = new PartnersForm();\n }", "title": "" }, { "docid": "b43d8bd2e5fa832f2b86d77c64e5ad10", "score": "0.69116175", "text": "public function create()\n {\n $supplier = new Supplier;\n return view('supplierForm')->with('supplier',$supplier);\n }", "title": "" }, { "docid": "d6d7c0a46ec7af65d934ca4831a12435", "score": "0.6911027", "text": "public function create()\n {\n $this->authorize(__FUNCTION__);\n\n $specie = new Specie;\n\n return view('species.form')->with(['specie' => $specie]);\n }", "title": "" }, { "docid": "d0a17dffa7cd331b95da26311bfaf458", "score": "0.69106084", "text": "public function create()\n {\n return view('backend.actions.create');\n }", "title": "" }, { "docid": "bf90fc181239c9ee309df9b686f918de", "score": "0.69096845", "text": "public function create()\n {\n return view('kontraktor::create');\n }", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908564", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "2b077d4213a9e74657f7368e00d5d96e", "score": "0.69072443", "text": "public function create()\n\t{\n\t\t$person = new Person;\n \n return view('admin.people.form', ['person' => $person]); \n\t}", "title": "" }, { "docid": "8cfed7c03b1c2f9d9fc6996ae61ff1e3", "score": "0.6906446", "text": "public function create()\n {\n return view('admin.users.forms.create');\n }", "title": "" }, { "docid": "12c04608837ced3906ffa6fd0839aefc", "score": "0.6904492", "text": "public function create()\n {\n // return view('formname.create');\n }", "title": "" }, { "docid": "6fe9753acadb65e60f24f2784b8c57e8", "score": "0.6903352", "text": "public function create()\n {\n return view('showCreate');\n }", "title": "" }, { "docid": "be0ad6355f1cd2d306c6632b0178efe9", "score": "0.69000477", "text": "public function create()\n {\n return view('comuni.add');\n }", "title": "" }, { "docid": "1b96ed3b5237de2d9b8b93a0082346de", "score": "0.6898089", "text": "public function create()\n\t{\n $theme = $this->theme;\n $theme->set('title','New Employee');\n\n return $theme->layout('form')->scope('employees.create')->render();\n\t}", "title": "" }, { "docid": "c05139fcffc8ed34edf664b1dcababe1", "score": "0.6897515", "text": "public function actionCreate()\n {\n $this->layout = 'principal2';\n $model = new Registros();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "8f937ad7c5f9325dd1c12c02346f01a1", "score": "0.6897389", "text": "public function create()\n {\n return view('Job.form');\n }", "title": "" }, { "docid": "c6e630a8785e77f2934d7509a0426ed1", "score": "0.68941396", "text": "public function newAction()\n {\n $entity = new Formations();\n $form = $this->createCreateForm($entity);\n\n\n return $this->render('FormBundle:Formations:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f8dbbd8eb79b47b7dd8cbe07d9f8aa6c", "score": "0.68926984", "text": "public function create()\n {\n \n return view('falta.create'\n );\n }", "title": "" }, { "docid": "9d3fa77955670de89373a055d00ff3f2", "score": "0.68926096", "text": "public function create()\n {\n return view('terapis.create');\n }", "title": "" }, { "docid": "3ff70187ad516bfc1251de194f42b7f8", "score": "0.6892582", "text": "public function create()\n {\n //\n $title = 'Add Partner';\n return view('partnercompany.create_edit')->with(compact('title'));\n }", "title": "" }, { "docid": "ee157e1835fe293cefd0eceeafc16825", "score": "0.68916535", "text": "public function create()\n {\n return view('question.new');\n }", "title": "" }, { "docid": "eaeda1b26ca65d0dd32dbeb43e442328", "score": "0.6891185", "text": "public function create()\n\t{\n\t\treturn View::make('Client.newClient')->with(array('title' => 'Add Client'));\n\t}", "title": "" } ]
77b556382f5e1210f17ad13921fc5171
Offers a 200 HTTP code to prove the service is still working.
[ { "docid": "624aab028293e9b7908479d2c0ab9c81", "score": "0.0", "text": "public function health(): Response\n {\n $response = new Response();\n $response->setStatusCode(Response::HTTP_OK);\n $response->headers->set('Content-Type', 'text/html');\n\n return $response;\n }", "title": "" } ]
[ { "docid": "1b3428d6da5ab88a330dcc9122edd427", "score": "0.71367055", "text": "public function getResponseCode()\n {\n return 200;\n }", "title": "" }, { "docid": "08bb49c0f72beae214bd695a882e2657", "score": "0.6793052", "text": "public function seeResponseCodeIsSuccessful()\n {\n $this->connectionModule->seeResponseCodeIsSuccessful();\n }", "title": "" }, { "docid": "bf2894dfdb5149a1c95534ef035c2c7e", "score": "0.66462016", "text": "public function isSuccessful(){\r\n return $this->code>=200&& $this->code <300;\r\n }", "title": "" }, { "docid": "74a950d22265501df29fb3a8584c72ef", "score": "0.66405374", "text": "public function success() {\n return $this->statusCode >= 200 && $this->statusCode < 300;\n }", "title": "" }, { "docid": "4f37acde370e1ed970441dedcf2c382d", "score": "0.64576066", "text": "public function statusAction()\n {\n $response = new Response('', 200, ['Content-Type' => 'text/plain']);\n\n try {\n $this->client->ping();\n\n $response->setContent('ping succeeded');\n } catch (\\Exception $e) {\n $response\n ->setStatusCode(503)\n ->setContent($e->getMessage());\n }\n\n return $response;\n }", "title": "" }, { "docid": "b07656ec5e7808febc37407b390c5cdd", "score": "0.6378008", "text": "public function getWebhookResponseCode() {\n return 200;\n }", "title": "" }, { "docid": "5d936657d30a999baf99a96af469aae0", "score": "0.6364175", "text": "public function getStatusCode(): int\n {\n return 204;\n }", "title": "" }, { "docid": "6596fac9b6ff0f5c8c900a17695f133f", "score": "0.6358131", "text": "public function assertResponseOk()\n {\n $this->assertResponseStatusCode(200);\n }", "title": "" }, { "docid": "ead15613c85d6bfb6aec740b310db088", "score": "0.6320076", "text": "public function isOk() : bool\n {\n return $this->statusCode >= 200 && $this->statusCode < 300;\n }", "title": "" }, { "docid": "3975f17990dc20f72f20231a6edd2b47", "score": "0.63145113", "text": "function httpOk($message = null, $die = true) {\n header(\"HTTP/1.1 200 OK\");\n if($message) {\n print '<h1>' . clean($message) . '</h1>';\n } // if\n \n if($die) {\n die();\n } // if\n }", "title": "" }, { "docid": "a3cb2e4a3cd0bf7877aaf1c1c93f663a", "score": "0.62933856", "text": "public function test200()\n {\n $schedule = $this->createFactorySchedule();\n\n $user = $this->randomAdmin();\n\n $response = $this->requestToApi(\n $user, 'GET', '/schedules/'. $schedule->id\n );\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "9badf04735c5e8f7da95316ee6eaa1ee", "score": "0.6284141", "text": "function status($code) {\n\t\t$reason=@constant('self::HTTP_'.$code);\n\t\tif (PHP_SAPI!='cli')\n\t\t\theader('HTTP/1.1 '.$code.' '.$reason);\n\t\treturn $reason;\n\t}", "title": "" }, { "docid": "86b152392662640c054c968269aa687e", "score": "0.62806404", "text": "public function isOk()\n {\n if ($this->getHttpStatus() == 200) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "6cf1d0c799d8b2dac9359509845d74e0", "score": "0.6272464", "text": "public function isOk() : bool\n {\n return $this->m_responseCode === 200;\n }", "title": "" }, { "docid": "05875e5ff50999a5573b579fcc04d901", "score": "0.62626785", "text": "public function youCanOmitStatusCode()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n $meta = [\n 'foo' => 'bar'\n ];\n\n // Act...\n $response = $this->responder->success( $fruit, $meta );\n\n // Assert...\n $this->assertEquals( $response->getStatusCode(), 200 );\n $this->assertContains( $meta, $response->getData( true ) );\n }", "title": "" }, { "docid": "caabf8781132e8aa826e17136a8dea18", "score": "0.6242507", "text": "public function isSuccessfulResponse() {\r\n // return true;\r\n return ($this->getStatus() == \"APPROVED\" && $this->getMessage() != \"DUPLICATE\"); \r\n }", "title": "" }, { "docid": "608d910de9745e4d4b4e9c1630b81f07", "score": "0.6240705", "text": "public function isSuccessful()\n {\n return $this->response->getStatusCode() >= 200 && $this->response->getStatusCode() < 300;\n }", "title": "" }, { "docid": "076ee1248822ac8481cfa9b3193218f6", "score": "0.6219976", "text": "public function assertRequestOk()\n {\n $this->assertStatusCode( 200 );\n }", "title": "" }, { "docid": "5466fa255acec118e9862eb3cbb829e9", "score": "0.6208859", "text": "function status($new = null)\n {\n static $code = 200;\n if ( ! empty($new) )\n ($code = $new) && hdrs('x-horus-status', 'a horus response', true, $new);\n return $code;\n }", "title": "" }, { "docid": "dcf7bfae492c585de02d1d5db62b9cab", "score": "0.6204948", "text": "public function getResponseCode()\n {\n }", "title": "" }, { "docid": "fe10905ad4571eaadabbbc0334f8727d", "score": "0.62042683", "text": "public function isSuccessful(): bool\n {\n return \\in_array($this->getStatusCode(), [200, 201, 202, 204, 205]);\n }", "title": "" }, { "docid": "d6467d78429b0c1290f11cc6d6e53868", "score": "0.6175895", "text": "public function check()\n {\n if ($this->getResponse()->status !== 200) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a2575fb3120b23c9c6d42cad79a1fb33", "score": "0.61666954", "text": "public function testSuccessResponseHasHTTPStatus200Header()\n\t{\n\t\t$headers = $this->successResponse->getHeaders();\n\t\t$this->checkHeaders($headers);\n\t}", "title": "" }, { "docid": "f2ee84e68b1a4f722508f2fc4fa073c2", "score": "0.61619717", "text": "public static function ok($result = null, $http_status_code = 200) {\n\t\treturn self::_send_response($result, $http_status_code);\n\t\t//return self::_send_response(array('result' => $result));\n\t}", "title": "" }, { "docid": "a86bd41de14c6b8374364308d47cc9df", "score": "0.6150406", "text": "public function status_code()\n {\n }", "title": "" }, { "docid": "d92ccf0a02584b1bdda73505f39a3af5", "score": "0.613411", "text": "public function youCanPassInStatusCode()\n {\n // Arrange...\n $fruit = $this->createTestModel();\n\n // Act...\n $response = $this->responder->success( $fruit, 201 );\n\n // Assert...\n $this->assertEquals( $response->getStatusCode(), 201 );\n }", "title": "" }, { "docid": "bffd9d1a6e471df42786fb44abf26ce7", "score": "0.6130993", "text": "function http_response_code($newcode = NULL)\n\t\t{\n\t\t\tstatic $code = 200;\n\t\t\tif($newcode !== NULL)\n\t\t\t{\n\t\t\t\theader('X-PHP-Response-Code: '.$newcode, true, $newcode);\n\t\t\t\tif(!headers_sent())\n\t\t\t\t\t$code = $newcode;\n\t\t\t}\n\t\t\treturn $code;\n\t }", "title": "" }, { "docid": "9eaad57cb142763644be2bb52c2b4255", "score": "0.6107381", "text": "public static function getStatus() {\n\t\treturn http_response_code();\n\t}", "title": "" }, { "docid": "5dc51d1ce0d42df5a74d507bda60d35c", "score": "0.60833913", "text": "function status($code) {\n\t\t$reason=@constant('self::HTTP_'.$code);\n\t\tif (PHP_SAPI!='cli')\n\t\t\theader($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n\t\treturn $reason;\n\t}", "title": "" }, { "docid": "209a700ac960b06415a91c0515f50f04", "score": "0.60666406", "text": "public function isSuccessful() {}", "title": "" }, { "docid": "dd375515d2df085c8208c844e0bcdeb2", "score": "0.6061707", "text": "public function isSuccessful(): bool\n {\n $statusCode = $this->getStatusCode();\n\n return ($statusCode >= 200 && $statusCode < 300) || $statusCode == 304;\n }", "title": "" }, { "docid": "c192b21afde48bda76bf40fc240941d0", "score": "0.60447377", "text": "public function testStatus()\n {\n $this->status(204);\n\n $this->assertEquals($this->code, 204);\n }", "title": "" }, { "docid": "a87422a9501720e28d6cf7a421d9eb0b", "score": "0.6041852", "text": "public function testBlogPageResponseCode()\n {\n $response = $this->call('GET', '/');\n $this->assertEquals(200, $response->status());\n }", "title": "" }, { "docid": "7f96e5a3e67efecda7bda541a4ce0985", "score": "0.60363215", "text": "public function test200Self()\n {\n $user = $this->randomEntrant();\n\n $response = $this->requestToApi(\n $user, 'GET', '/users/'. $user->id .'/alerts'\n );\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "0ee0b191afc329e76a16b8990e423186", "score": "0.60182416", "text": "public function seeResponseCodeIsServerError()\n {\n $this->connectionModule->seeResponseCodeIsServerError();\n }", "title": "" }, { "docid": "2834769c3f58b8ebfc4d276fa3fac3cd", "score": "0.60144466", "text": "public function isSuccessful()\n {\n return ($this->statusCode >= 200) && ($this->statusCode < 300);\n }", "title": "" }, { "docid": "bb6e4f164c1f9fbbfcd79a8bc683917e", "score": "0.6010579", "text": "function http_response_code(int $code = null): int\n{ // int|bool\n return Http::responseCode($code); // Fix to return actual status when void\n}", "title": "" }, { "docid": "3a9a07ab4b37ea97e3f53b5d0f580f49", "score": "0.60098004", "text": "public function ping(): void\n {\n if ($this->oRest->getRequestMethod() !== HttpRequest::METHOD_GET) {\n $this->oRest->response('', StatusCode::NOT_ACCEPTABLE);\n } else {\n $this->oRest->response($this->set(['return' => 'Pong']));\n }\n }", "title": "" }, { "docid": "dd32bc9bd3645953ecd76fed4b84b72d", "score": "0.6009228", "text": "public function status() :int\n {\n return 401;\n }", "title": "" }, { "docid": "9be3c9f454255747b6dd113f49c49b30", "score": "0.5986241", "text": "public function status(int $code);", "title": "" }, { "docid": "084e8628608d84987808544df071c8d7", "score": "0.5980214", "text": "public function isSuccess(): bool\n {\n return $this->code >= CODE_OK && $this->code < CODE_BAD_REQUEST;\n }", "title": "" }, { "docid": "3dd3d0fc3d424bc4eda64563ffb365b1", "score": "0.5979938", "text": "function http_response_code ($response_code = null) {}", "title": "" }, { "docid": "171427c1fc7e3753c8988e39a5361f30", "score": "0.5977182", "text": "public function test_WhenBasicRequest_Expect_Response200()\n {\n $response = $this->get('/');\n\n $this->assertEquals(200, $this->response->status());\n }", "title": "" }, { "docid": "299d92724c3d492aaa5be24af5c6585e", "score": "0.5974212", "text": "public function isSuccess()\n\t{\n\t\treturn ($this->statusCode < 300) || $this->isCached();\n\t}", "title": "" }, { "docid": "807b557715fc3963abf1f31bf38a5c1b", "score": "0.59723", "text": "function status($code) {\n $reason=@constant('self::HTTP_'.$code);\n if (PHP_SAPI!='cli')\n header($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n return $reason;\n }", "title": "" }, { "docid": "aef981c28500fc3905dcf26d7a46215b", "score": "0.59650284", "text": "public function getStatusCode(): int;", "title": "" }, { "docid": "aef981c28500fc3905dcf26d7a46215b", "score": "0.59650284", "text": "public function getStatusCode(): int;", "title": "" }, { "docid": "aef981c28500fc3905dcf26d7a46215b", "score": "0.59650284", "text": "public function getStatusCode(): int;", "title": "" }, { "docid": "e6935d3b5dc3c51c2b1458518cd0b9f9", "score": "0.59621507", "text": "public function success(){\n\t\t$this->response->status = self::STATUS_SUCCESS;\n\t}", "title": "" }, { "docid": "0260385a57af6a23853c7564c3bfb160", "score": "0.59613395", "text": "public function isSuccessful()\n {\n return false;\n }", "title": "" }, { "docid": "0260385a57af6a23853c7564c3bfb160", "score": "0.59613395", "text": "public function isSuccessful()\n {\n return false;\n }", "title": "" }, { "docid": "0260385a57af6a23853c7564c3bfb160", "score": "0.59613395", "text": "public function isSuccessful()\n {\n return false;\n }", "title": "" }, { "docid": "442bf91d56820ca2b3c4cca904ab7cd2", "score": "0.59534943", "text": "function respond_with_error( $error, $http_code = \"400 Bad Request\")\n {\n header(\"HTTP/1.1 \".$http_code);\n exit( $error );\n }", "title": "" }, { "docid": "52700731ec27606e09ddb0351159bd4f", "score": "0.5953136", "text": "function check_auth_response_code($status) {\n\n if ($status != 'S000') {\n $message = get_ticket_error_message($status);\n return result_error($status,$message);\n }\n return result_success();\n}", "title": "" }, { "docid": "e5754af93380b20a9c44223f2dcdacab", "score": "0.59488636", "text": "public function test_https_status()\n {\n }", "title": "" }, { "docid": "a79280cdfce8ec1073a6a758db016155", "score": "0.5941251", "text": "function http_response_code($newcode = null)\n {\n static $code = 200;\n if ($newcode !== null) {\n header('X-PHP-Response-Code: '.$newcode, true, $newcode);\n if (!headers_sent()) {\n $code = $newcode;\n }\n }\n return $code;\n }", "title": "" }, { "docid": "e4e4dcf9416630e08682819a01bd7f5c", "score": "0.59348804", "text": "public function isOk() : bool\n {\n return $this->m_responseCode === 201;\n }", "title": "" }, { "docid": "581f38bb19aaa2167ecd9e4f6ec4cbfa", "score": "0.59291816", "text": "public function wussy() {\r\n $this->returnJson(200, 'You wussy!!');\r\n }", "title": "" }, { "docid": "d823f02063ce1b8298b1816588e585f9", "score": "0.5926728", "text": "protected function statusCodeSuccess(): int\n {\n return $this->statusCodeSuccess ?? 200;\n }", "title": "" }, { "docid": "94c804aca29523b5e3e3a16d1cd362a5", "score": "0.5924889", "text": "public function testStatusDefaultsTo200OnCreation()\n {\n $response = new Response();\n $this->assertEquals(200, $response->getStatus());\n }", "title": "" }, { "docid": "eb4997c722b1bd65f290ea95b63eaf9b", "score": "0.5910697", "text": "public function update_status()\n\t{\n\t\t$model = $this->module->model->target;\n\t\t$count = $model->where('status < 200')->count;\n\n\t\tif (!$count)\n\t\t{\n\t\t\tthrow new AssertionFailed(__FUNCTION__, [ \"status < 200\" ]);\n\t\t}\n\n\t\t$model('UPDATE {self} SET `status` = ? WHERE `status` = 1', [ Site::STATUS_OK ]);\n\t\t$model('UPDATE {self} SET `status` = ? WHERE `status` = 0', [ Site::STATUS_UNAUTHORIZED ]);\n\t}", "title": "" }, { "docid": "d27f22c0af718f99c9e83bcdf2ce26f5", "score": "0.58915025", "text": "public function isSuccessful()\n {\n return $this->getCode() === '1000' ? true : false;\n }", "title": "" }, { "docid": "09c06a11a05bd89922b0f6dd678327a4", "score": "0.58779496", "text": "abstract function getResponseCode();", "title": "" }, { "docid": "b52fb30107da731fdbf60ca2c59f502c", "score": "0.58622956", "text": "public function getStatusCode() {}", "title": "" }, { "docid": "6b147fe03f68600dad55aec594a655d3", "score": "0.58565736", "text": "public function getStatusCode()\n {\n return 301;\n }", "title": "" }, { "docid": "f4581949af459e8993869c521ced71c2", "score": "0.5836348", "text": "function response_send_error($code = 404, $msg = '')\n{\n if ($msg) {\n response_header('X-VSAC-error-msg', $msg);\n }\n http_response_code($code);\n die();\n}", "title": "" }, { "docid": "e3f3c5749139ea75cc1a87eff79f7970", "score": "0.5827882", "text": "public function isSuccessful()\n {\n return true;\n }", "title": "" }, { "docid": "e3f3c5749139ea75cc1a87eff79f7970", "score": "0.5827882", "text": "public function isSuccessful()\n {\n return true;\n }", "title": "" }, { "docid": "e3f3c5749139ea75cc1a87eff79f7970", "score": "0.5827882", "text": "public function isSuccessful()\n {\n return true;\n }", "title": "" }, { "docid": "2c897873aa0e4f777c7283e77344b07b", "score": "0.5826131", "text": "public function status($code, $message = '');", "title": "" }, { "docid": "475c7dc73fc792e73c4fead9af9ee387", "score": "0.58171", "text": "function send_message($http_code, $response_data) {\n http_response_code($http_code);\n \n if ($response_data != null) {\n // tell the user\n echo json_encode($response_data);\n }\n\n exit();\n}", "title": "" }, { "docid": "3a4346776ebb84680dd029f02aa692c8", "score": "0.5806464", "text": "public function successful();", "title": "" }, { "docid": "6c4661f5b09f4093b00678708a3e263c", "score": "0.5801275", "text": "function send_http_status($code)\n {\n static $_status = array(\n // Informational 1xx\n 100 => 'Continue', 101 => 'Switching Protocols', \n\n // Success 2xx\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', \n\n // Redirection 3xx\n 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', // 1.1\n\t\t303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', // 306 is deprecated but reserved\n\t\t307 => 'Temporary Redirect', \n\n // Client Error 4xx\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', \n\n // Server Error 5xx\n 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', 509 => 'Bandwidth Limit Exceeded' \n );\n \n if (array_key_exists($code, $_status)) {\n header('HTTP/1.1 ' . $code . ' ' . $_status[$code]);\n }\n }", "title": "" }, { "docid": "8bffbd19246518bd25ff9146aa910953", "score": "0.5797382", "text": "public static function httpStatus($_code) {\n\t\tif (!defined('self::HTTP_'.$_code)) {\n\t\t\t// Invalid status code\n\t\t\tself::$global['CONTEXT']=$_code;\n\t\t\ttrigger_error(self::TEXT_HTTP);\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Get description\n\t\t$_response=constant('self::HTTP_'.$_code);\n\t\t// Send raw HTTP header\n\t\tif (PHP_SAPI!='cli' && !self::$global['QUIET'] && !headers_sent())\n\t\t\theader('HTTP/1.1 '.$_code.' '.$_response);\n\t\treturn $_response;\n\t}", "title": "" }, { "docid": "4b805fbf3524b9cbfe467957e788cdb7", "score": "0.57794404", "text": "public function setStatus(int $code): Response;", "title": "" }, { "docid": "18aec17f211b1423f10b45da0df650fc", "score": "0.5777539", "text": "public static function success()\n {\n static::returnCode(static::CODE_SUCCESS);\n }", "title": "" }, { "docid": "217234dbe99be0866e65471566396e72", "score": "0.5771997", "text": "public function getStatusCode()\n {\n }", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.577173", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.577173", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.577173", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.577173", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.577173", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.577173", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.577173", "text": "public function getStatusCode();", "title": "" }, { "docid": "18eeaa11689ab767b5078083d6fe1ae0", "score": "0.577173", "text": "public function getStatusCode();", "title": "" }, { "docid": "7532b1f158437ed2cd259f457a75f00e", "score": "0.57687736", "text": "protected static function statusCode($code=null) {\r\n\t\tstatic $current_status;\r\n\t\t\r\n\t\tif ($code) {\r\n $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';\r\n\t\t\t$current_status = $code;\r\n\t\t\theader($protocol. ' ' . static::$messages[$code]);\r\n\t\t}\r\n\t\treturn $current_status?:200;\r\n\t}", "title": "" }, { "docid": "956e6be1d67ba5c1e72d440271687f0d", "score": "0.5765811", "text": "public function testStatusCode()\n {\n $response = $this->json('GET', 'api/books/top-review');\n $response->assertStatus(Response::HTTP_OK);\n }", "title": "" }, { "docid": "d0c41d1d7b15119c04908ae0e57d4c98", "score": "0.5756094", "text": "public static function success(): self\n {\n return new self(200, 299);\n }", "title": "" }, { "docid": "2ad90913293c66541c94edd7267db496", "score": "0.5752567", "text": "function failed($reason) {\n // Status for ELB, will cause ELB to remove instance.\n header(\"HTTP/1.0 503 Service unavailable: failed $reason check\");\n // Status for the humans.\n print \"Server is DOWN<br>\\n\";\n echo \"Failed: $reason\";\n exit;\n}", "title": "" }, { "docid": "95d86383973d6e05204bda59a3afcf49", "score": "0.5746691", "text": "public function writeStatus() {\n global $HTTP_STATUS;\n \n header(\"HTTP/1.0 \".$this->status.\" \".$HTTP_STATUS[$this->status]);\n }", "title": "" }, { "docid": "8e56dcf123ff28cd49bb809f8e954926", "score": "0.5742768", "text": "private function setResponseStatus()\n {\n $this->response->setStatus(500);\n }", "title": "" }, { "docid": "b2135b09759b124228803ad02f39f1b5", "score": "0.57193685", "text": "public function status($code)\n {\n $this['response']->setStatus($code);\n }", "title": "" }, { "docid": "e0da12338df8cea3f52f35aa6c21bbe4", "score": "0.57160527", "text": "public function testStatusCode()\n {\n $response = $this->json('GET', '/api/daily-menus/2017-09-14');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "244a7a9295b077d85ace5607c6bfe6cd", "score": "0.5710574", "text": "function finish ($status, $payload = '')\n{\n\tif ($status == 0)\n\t{\n\t\theader ('Location: https://'.BASE_DOMAIN.'/?auth='.$payload);\n\t\tdie ('Redirecting...');\n\t}\n\t\telse\n\t\tdie ('<h1>Failed to authorize: '.$payload.'</h1>');\n}", "title": "" }, { "docid": "09e324dc97e3f1e369a84a162117764f", "score": "0.5708852", "text": "public function isSuccessful() {\n return true;\n }", "title": "" }, { "docid": "df4d8406dffd13e6c0718682812b200b", "score": "0.5708518", "text": "public function getStatusCode() : int;", "title": "" }, { "docid": "7c7f111a9b503a21810a3e183bc66a94", "score": "0.5700946", "text": "public function isOK()\n {\n if($this -> status == \"OK\")\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "9f4bc75bd697b1772cd2600f643ae0f5", "score": "0.569663", "text": "function urlOK($url)\n{\n $headers = @get_headers($url);\n if(strpos($headers[0],'200')===false){return false;}else{return true;}\n}", "title": "" }, { "docid": "25b27a5aeb36ed2b7f2861495c7c7e88", "score": "0.56962466", "text": "public function ping()\r\n {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, \"http://\".WEMO_IP.\":\".WEMO_PORT);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_VERBOSE, false);\r\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\r\n $result = curl_exec($ch);\r\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n if($httpcode >= 200 && $httpcode <500){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "5a7402bab53f142a1351bbf849840a7c", "score": "0.5685385", "text": "protected function is_status_ok( $code ) {\n\t\t\treturn ( 200 <= $code && 300 > $code );\n\t\t}", "title": "" }, { "docid": "8f3fe851860dd14b765d4bf8e60ac71e", "score": "0.5684844", "text": "public function getStatusCode()\n {\n return http_response_code();\n }", "title": "" } ]
73881d013e3ee6a2156f9056da0a56af
/function to get all clients
[ { "docid": "8ebb188d7f274497a2c33aea630720ae", "score": "0.0", "text": "public function getClientsAll(){\n \n $client_analysts=DB::table('analyst_client')->get();\n \n $client_analyst_array=array();\n foreach($client_analysts as $key=>$value){\n $analyst_names=DB::table('users')->where('id',$value->analyst_id)->select('name','id')->get();\n $client_names=DB::table('users')->where('id',$value->client_id)->select('name','id')->get();\n foreach($client_names as $key =>$value1){\n $client_name=$value1->name;\n \n }\n foreach($analyst_names as $key =>$value1){\n $analyst_name=$value1->name;\n }\n \n \n array_push($client_analyst_array ,array('client_id'=>$value->client_id,'analyst_id'=>$value->analyst_id,'client_name'=>$client_name,'analyst_name'=>$analyst_name)\n );\n }\n\n if($client_analysts){\n $arrResponse['status'] = \"200\";\n $arrResponse['clients_analysts'] = $client_analyst_array;\n }else{\n $arrResponse['status'] = \"104\";\n $arrResponse['message'] = \"DB ERROR\";\n }\n \n return $arrResponse;\n }", "title": "" } ]
[ { "docid": "45612e4162c77218c2aa341a79cbfefb", "score": "0.82563645", "text": "public function getAllClients()\n {\n return $this->model->getAllClients();\n }", "title": "" }, { "docid": "17246954c27f5ef36d59e44ba9491b9d", "score": "0.8179964", "text": "public function getClients() {\n $query = $this->connection->query(\"SELECT * FROM clients\");\n\n $clients = [];\n if($query->num_rows > 0) {\n while($row = $query->fetch_assoc()) {\n $clients[] = $row;\n }\n }\n $this->connection->close();\n return $clients;\n }", "title": "" }, { "docid": "50546dab78d9828a9dbc211c002e04e7", "score": "0.8074342", "text": "public function getClients(){\n\t\ttry {\n\t\t\t$pdo = $this->Connect();\n\t\t\t$sql = \"SELECT * FROM clients\";\n\t\t\t$stmt = $pdo->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\t$data = $stmt->fetchAll();\n\t\t\treturn $data;\n\t\t} catch (\\Throwable $th) {\n\t\t\t//throw $th;\n\t\t}\n\t}", "title": "" }, { "docid": "b8616c10b957a89b89e441d1599b7716", "score": "0.79525673", "text": "private function getClientList()\n {\n return Client::get()\n ->filter(['active' => true])\n ->sort('LastFetch')\n ;\n }", "title": "" }, { "docid": "9d018f0dead332cdfade6c4661cc20b7", "score": "0.77592546", "text": "public function getAllClients() {\n $query = 'SELECT * FROM ' . $this->table;\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $result = Utility::stmtToArray($stmt);\n return $result;\n }", "title": "" }, { "docid": "51170dd9e120757d7ec3c562e8e4b11d", "score": "0.77520627", "text": "static function getAll()\n {\n $returned_clients = $GLOBALS['DB']->query(\"SELECT * FROM clients ORDER BY name;\");\n $all_clients = array();\n foreach($returned_clients as $client) {\n $id = $client['id'];\n $client_name = $client['name'];\n $phone = $client['phone'];\n $stylist_id = $client['stylist_id'];\n $new_client = new Client($id, $client_name, $phone, $stylist_id);\n array_push($all_clients, $new_client);\n }\n return $all_clients;\n }", "title": "" }, { "docid": "3922fc906024d737b53e299c6ef8e05a", "score": "0.77188295", "text": "public function getClients() {\n return $this->clients;\n }", "title": "" }, { "docid": "6aea6f2d8c4743678159ae58ac900460", "score": "0.770195", "text": "function clients_get()\n {\n\t\t// Get the names of all clients from the database and stick it into an array.\n\t $clients = $this->Collect_model->get_clients();\n\t\t\n\t\t// Send the response back\n if($clients) {\n $this->response($clients, 200); // 200 being the HTTP response code\n } else {\n $this->response(array('error' => 'Couldn\\'t find any data!'), 404);\n }\n }", "title": "" }, { "docid": "803a91d6518cbb6a64348fd1d8f1a9de", "score": "0.7646455", "text": "public function getClients() {\n\n return $this->clients;\n\n }", "title": "" }, { "docid": "ba3c7c7af082603d4242fe36c39b0695", "score": "0.7621444", "text": "public function getAllClients()\n {\n $clients = User::where('is_client', 1)->get();\n\n if (is_null($clients)) {\n return $this->sendError('Clients list is empty or invalid.');\n }\n\n return $this->sendResponse(UserResource::collection($clients), 'Clients list retrieved successfully.');\n }", "title": "" }, { "docid": "7f853d6e8ebed2ac8de28342a61b16f2", "score": "0.7611185", "text": "function findClients() {\n\n $connexion = BddConnexion::getInstance();\n $bdd = new ClientManager($connexion->handle());\n $clients = $bdd->getList();\n\n if (is_null($clients))\n $msgClient = \"Aucun client n'a été trouvé\";\n return $clients;\n}", "title": "" }, { "docid": "fa4af4aa0705a1ceab133eed7dfadc97", "score": "0.76048994", "text": "public function all_clients() {\n return new Service_Yandex_Direct_ClientsCollection($this->api()->GetClientsList());\n }", "title": "" }, { "docid": "0868af2602cf255f5f454b88f0ce30bf", "score": "0.75873643", "text": "public function getAllClients() {\n \t//$clients = Client::get()->toJson(JSON_PRETTY_PRINT);\n \n\t $clients = QueryBuilder::for(Client::class)\n\t ->allowedFilters([\n\t AllowedFilter::exact('nombre')->ignore(null),\n\t AllowedFilter::exact('apellido')->ignore(null),\n\t AllowedFilter::exact('email')->ignore(null),\n\t ])\n\t ->paginate(10)->toJson(JSON_PRETTY_PRINT);\n\t return response($clients, 200);\n }", "title": "" }, { "docid": "a195aa10a40e7fec34aa0a633ed91c90", "score": "0.75506675", "text": "protected function clients() {\n if ( $this->method == 'GET' ) {\n $list = array();\n $result = Client::query_all();\n\n foreach ( $result as $user ) {\n $list[ $user->getClientId() ] = $user->decode();\n }\n\n return $list;\n } else {\n return \"Only accepts GET requests\";\n }\n }", "title": "" }, { "docid": "95e1954ee1603f9503b3c77169293f80", "score": "0.75120425", "text": "public function listAll(){\n try{\n $sql = 'select * from client';\n $stm = $this->pdo->prepare($sql);\n $stm->execute();\n $result = $stm->fetchAll();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "title": "" }, { "docid": "836dde0be0dcec66d958b0dbc16fe96c", "score": "0.7421526", "text": "public function get_clients( $_id = '' ) {\n\t\t$_path = 'clients/' . $_id;\n\t\treturn $this->call_wcm_data( $_path );\n\t}", "title": "" }, { "docid": "481ebf071fe54e9637ae4818358c6825", "score": "0.7383012", "text": "function get_all_clientes()\n {\n return $this->db->get('clientes')->result_array();\n }", "title": "" }, { "docid": "5249365ba2184d5b49e83969269e7afd", "score": "0.73788226", "text": "static function getActiveClients($all_fields = false)\n {\n global $user;\n $mdb2 = getConnection();\n\n $group_id = $user->getGroup();\n $org_id = $user->org_id;\n if ($all_fields)\n $sql = \"select * from tt_clients where group_id = $group_id and org_id = $org_id and status = 1 order by upper(name)\";\n else\n $sql = \"select id, name from tt_clients where group_id = $group_id and org_id = $org_id and status = 1 order by upper(name)\";\n\n $res = $mdb2->query($sql);\n $result = array();\n if (!is_a($res, 'PEAR_Error')) {\n while ($val = $res->fetchRow()) {\n $result[] = $val;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "76b1097aa8051d50e10f7e44b7219f87", "score": "0.7349067", "text": "private function getClients(){\n $result['operation'] = \"showClient\";\n $result['value'] = $this->db->getClient();\n $ret = json_encode($result);\n return $ret;\n }", "title": "" }, { "docid": "9a70352144864e253c14fe805de8d12a", "score": "0.7272493", "text": "function populateClients() {\r\n $clientDAO = new ClientDAO();\r\n $clients = $clientDAO->populateClients();\r\n return $clients;\r\n }", "title": "" }, { "docid": "e7a0e05fd82de38a03abe2611bcfa2d6", "score": "0.72635573", "text": "public function getClientsAction()\n {\n $scope = $this->getRequest()->getQuery('scope');\n $scopeId = $this->getRequest()->getQuery('scopeId');\n $apiKey = $this->getRequest()->getQuery('apiKey');\n\n Mage::getConfig()->saveConfig(Campaignmonitor_Createsend_Helper_Data::XML_PATH_API_ID, $apiKey, $scope, $scopeId);\n\n /** @var $apiHelper Campaignmonitor_Createsend_Helper_Api */\n $apiHelper = Mage::helper(\"createsend/api\");\n\n $clients = $apiHelper->getClients($scope, $scopeId);\n if ($clients !== null) {\n if (count($clients) == 2) {\n // Automatically get the lists if only one client\n $clients[1]['lists'] = $apiHelper->getLists($clients[1]['value'], $scope, $scopeId);\n }\n }\n\n $jsonData = json_encode(\n array (\n 'status' => 'success',\n 'items' => $clients\n )\n );\n\n $this->getResponse()->setHeader('Content-type', 'application/json');\n $this->getResponse()->setBody($jsonData);\n }", "title": "" }, { "docid": "d18eddd96552d4dd73ba6ad97303862c", "score": "0.72432745", "text": "public function getClients() {\n\t\t$result = $this->diet_model->getClients(); \n\t\t$this->output->set_content_type('application/json')->set_output(json_encode($result));\n\t}", "title": "" }, { "docid": "b2f454a10dd6dbba3d80de53f77dc257", "score": "0.7225676", "text": "public function getAllLatestClients()\n {\n return $this->model->getAllLatestClients();\n }", "title": "" }, { "docid": "4827645c1f23f4e636a3968ae71dfed3", "score": "0.71766454", "text": "public function getHosts() {\n $result = $this->db->query(\"SELECT * FROM `clients`\", \"id\");\n return $result;\n }", "title": "" }, { "docid": "d7b7b6fb001e66d7d798b5f246802e37", "score": "0.7163776", "text": "function get_all_clientes(){\n\t$clientes = null;\n\t$sql = \"select * from ayahuaska.clientes order by id asc\";\n\t$res = mysql_query($sql);\n\t$tot = mysql_num_rows($res);\n\tif($tot > 0){\n\t\twhile($dat = mysql_fetch_array($res)){\n\t\t\t$clientes[] = array('id' => $dat['id'], 'rut' =>$dat['rut'], 'nombre' => $dat['nombre'], 'direccion' => $dat['direccion'],\n\t\t\t\t\t\t\t\t'ciudad' => $dat['ciudad'], 'telefono' => $dat['telefono'],\n\t\t\t\t\t\t\t\t'correo' => $dat['correo'], 'cupo' => $dat['cupo']);\n\t\t}\n\t}\n\treturn $clientes;\n}", "title": "" }, { "docid": "f8edf440c3832d9a7fc9019c57a351f6", "score": "0.7131988", "text": "public function getClients()\n\t{\n\t\t$clientModel = new ClientModel();\n\t\treturn response()->json($clientModel->all());\n\t}", "title": "" }, { "docid": "85f13a19cde38a801f798be417e0247a", "score": "0.711988", "text": "public function index()\n {\n return Client::all();\n }", "title": "" }, { "docid": "85f13a19cde38a801f798be417e0247a", "score": "0.711988", "text": "public function index()\n {\n return Client::all();\n }", "title": "" }, { "docid": "7e5bfbed620e49c65917c7c9992b2e63", "score": "0.7104724", "text": "public function getList()\n {\n\n $sql = \"SELECT * FROM CLIENTE\";\n\n if (!$resultado = pg_query($this->conexion, $sql)) die();\n\n $clientes = array();\n\n while ($row = pg_fetch_array($resultado)) {\n $cliente = new Cliente();\n $cliente->setCod_cliente($row[0]);\n $cliente->setNom_cliente($row[1]);\n $cliente->setTelefono_cliente($row[2]);\n $cliente->setCedula_cliente($row[3]);\n $cliente->setContraseña_cliente($row[4]);\n $cliente->setCorreo_cliente($row[5]);\n $cliente->setCod_peticion($row[6]);\n $cliente->setCod_usuario($row[7]);\n array_push($clientes, $cliente);\n }\n return $clientes;\n }", "title": "" }, { "docid": "b28fd1c21307583896b6c074866ecd2c", "score": "0.7104004", "text": "public function query(){\n\t// emmagasine la liste de clients.\n\t\t$listeClientServer = $this->webService->getListeClients();\n\n\t\tforeach ($listeClientServer as $clientServer) {\n\t\t\t$client = $this->adaptor->convertClientServer($clientServer);\n\t\t\t$reservationsServer = $this->webService->getReservationByClient($client->getId());\n\n\t\t\tforeach ($reservationsServer as $reservationServer) {\n\t\t\t\t$client->addReservation($this->adaptor->convertReservationServer($reservationServer));\n\t\t\t}\n\t\t\t$this->clients[$client->getId()] = $client;\n\t\t}\n\t\t// retourner une liste de clients\n\t\treturn $this->clients;\n\t\n\t}", "title": "" }, { "docid": "4d01d8ab3849e5142ba12ca5ffb65bca", "score": "0.7098261", "text": "function show_client_list_all()\n\t{\n\t$query = \"SELECT ID,FName,MName,LName FROM clients ORDER BY LName,FName,MName\";\n\t$result = try_query($query);\n\tshow_client_list_result($result);\n\t}", "title": "" }, { "docid": "858195f66a38f3bdc9ae102fb2090096", "score": "0.7050729", "text": "function listarClientes(){\r\n\t\t$dados = array();\r\n\t\t$dados[\"clientes\"] = pegarTodosClientes();\r\n\t\texibir(\"cliente/listar\", $dados);\r\n\r\n\t}", "title": "" }, { "docid": "7b134a01e6cd0b0f84bd3e3dd16af440", "score": "0.7045753", "text": "public function getClusterClients(): array\n\t{\n\t\treturn $this->clusterClients;\n\t}", "title": "" }, { "docid": "ed42dfaf0899ad1937006fd98d9994be", "score": "0.7021928", "text": "protected function obtenerTodosLosClientes()\n {\n // Llama a la API para obtener un listado de todos los clientes\n\n $respuesta = $this->realizarPeticion('GET', 'https://ziptest.com.es/clientes');\n $datos = json_decode($respuesta);\n $clientes = $datos->data;\n return $clientes;\n }", "title": "" }, { "docid": "5fd1516a6ac01e186480494039d665b7", "score": "0.70132", "text": "public static function listUsers(){\n // Instantiate Teamspeak Instance\n $tsAdmin = self::InstantiateTS();\n\n // List Users on server\n $clients = $tsAdmin->clientList();\n\n return $clients;\n }", "title": "" }, { "docid": "6c95b815424f8351065b744086cc9c89", "score": "0.7010726", "text": "public function getClientes() {\n $stmt = $this->db->prepare(\"SELECT * from clientes\");\n $stmt->execute();\n $resul = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $resul;\n\n }", "title": "" }, { "docid": "19683c7fd793e6b5957c26db267a3d13", "score": "0.7006557", "text": "public function getClients() {\r\n /* Retrieve information from the request */\r\n $experiment_id = intval($this->app->input('post', 'experiment_id')); // The ID of the experiment\r\n $days = intval($this->app->input('post', 'days')); // The amount of days to retrieve\r\n $limit = intval($this->app->input('post', 'limit')); // The amount of different clients to retrieve\r\n \r\n /* Validate the input */\r\n // The days parameter defaults to our days constant\r\n $days = !empty($days) ? $days : DEFAULT_QUERY_DAYS;\r\n \r\n // Make sure the experiment ID is not empty\r\n if( empty($experiment_id) ) {\r\n error('Invalid experiment ID.');\r\n }\r\n \r\n // Days can't be a negative number\r\n if( $days <= 0) {\r\n error('The amount of days has to be larger than 0!');\r\n }\r\n \r\n // Clients limit can't be a negative number\r\n if( $limit <= 0) {\r\n error('The clients limit has to be larger than 0!');\r\n }\r\n \r\n // Create a new Experiment object\r\n $experiment = new Experiment($experiment_id);\r\n \r\n // Make sure the current user is the owner of the experiment\r\n if( $experiment->owner_id !== $this->app->user->id\r\n && !$this->app->user->isSuperUser() ) {\r\n error('You do not have permissions to view this experiment!');\r\n }\r\n\r\n // Get the unique clients for that experiment\r\n $clients = $experiment->getClients(true, $days, $limit);\r\n\r\n // If we've reached here, everything is OK. Return the clients amount\r\n $this->app->output->setArguments(array(\r\n FLAG_SUCCESS => true,\r\n ':total_clients' => $clients,\r\n ));\r\n }", "title": "" }, { "docid": "7a53ba5ad67195dbac4c86fa57952b77", "score": "0.69947386", "text": "function fGetClients()\r\n\t{\r\n\t\t$query = $this->db->query(\"SELECT clients.CName,clients.CId from clients\");\r\n\t\t$strData = \"\";\r\n\t\tforeach ($query->result() as $row)\r\n\t\t{\r\n\t\t \t$strData .= $row->CId;\r\n\t\t\t$strData .= '/';\r\n\t\t \t$strData .= $row->CName;\r\n\t\t\t$strData .= '*';\r\n\t\t}\r\n\t\techo ($strData);\r\n\t}", "title": "" }, { "docid": "2add4ba8b5b463e21e2845a3fd53031b", "score": "0.69812447", "text": "public function all()\n {\n return $this->client->all();\n }", "title": "" }, { "docid": "7d177725d3c978aeefd91ded5bac4a6c", "score": "0.6871337", "text": "public function listAction()\n {\n $user = $this->getUser();\n $clients = $this->entityManager->getRepository(Client::class)->findBy(array('user' => $user));\n\n return $this->getResponse($clients, Response::HTTP_OK, ['client_list']);\n }", "title": "" }, { "docid": "5076c3a67e2c10a33f1cdfac2bf47c9a", "score": "0.6857565", "text": "public function clients()\n\t{\n\t\t$this->init_rbac();\n\t\t$this->session->set_flashdata('client_menu', 'active');\n\t\t//redirect user to home page if not admin\n\t\t$request = new Request('GET', $this->base_url . '/clients?' . http_build_query($this->request_body), $this->headers);\n\t\ttry {\n\t\t\t$response = $this->httpAdapter->sendRequest($request);\n\t\t\t$clients = json_decode($response->getBody()->getContents(), true);\n\n\t\t\t$this->setData([\n\t\t\t\t'clients' => $clients['data']['clients']\n\t\t\t]);\n\n\n\t\t\t//log_message('error', 'stats error. '. implode('-',$franchises['data']['users']));\n\t\t} catch (RequestException $ex) {\n\t\t\tlog_message('error', 'Error fetching clients. ' . $ex->getMessage() . '. Trace : ' . $ex->getTraceAsString());\n\t\t}\n\t\t$this->setBody('admin/clients')->loadView();\n\t}", "title": "" }, { "docid": "ada6c43d8bfc29232337f7f401ef4ca8", "score": "0.6846982", "text": "public function getClients(sfParameterHolder $paramHolder = null) {\n return $this->getclientDao()->getClients($paramHolder);\n\n }", "title": "" }, { "docid": "22eb82a3d885dfdff6e1a3747a5c2c19", "score": "0.68383044", "text": "public function getClients()\n {\n //initialzie the rest controller\n $contr = new RestController();\n $odata = [\n 'url'=>$this->backendUrl,\n 'urlId'=>(isset($id))?$id:null,\n 'select' => ['CINumber','Created'], // what fields do we want\n //parameters passed for the main resource\n 'parameters'=>[\n 'count'=>'true',\n ],\n 'expand' => ['User'=>[\n 'select'=>['UserName']\n ],\n ]\n ];\n $link = $contr->oDataGetLink($odata);\n $clients = $contr->getRequest($link);\n if ($clients instanceof RedirectResponse) {\n return json_encode(['status'=>'error']);\n }\n $responseArray=[];\n $responseArray['recordsTotal']= $clients->{'@odata.count'};\n $rows = array();\n foreach ($clients->value as $row) {\n $rows[] = array_values((array)$row);\n }\n\n $responseArray['data'] = $rows;\n\n return json_encode($responseArray);\n }", "title": "" }, { "docid": "3b0cdc83e96944e75609e71bc24f5ae4", "score": "0.6825421", "text": "public function getClients() {\n \n $clients = DB::table('users')\n ->where('id', $_POST['id'])\n ->get();\n \n if ($clients) {\n \n $arrResponse['status'] = \"200\";\n $arrResponse['clients'] = $clients;\n } else {\n $arrResponse['status'] = \"104\";\n $arrResponse['message'] = \"DB ERROR\";\n }\n return $arrResponse;\n }", "title": "" }, { "docid": "5b803bd49721588e038af17e35b1ca6b", "score": "0.68151855", "text": "static function getAllClients($group_id, $all_fields = false) {\n $mdb2 = getConnection();\n\n if ($all_fields)\n $sql = \"select * from tt_clients where group_id = $group_id order by status, upper(name)\";\n else\n $sql = \"select id, name from tt_clients where group_id = $group_id order by status, upper(name)\";\n\n $res = $mdb2->query($sql);\n $result = array();\n if (!is_a($res, 'PEAR_Error')) {\n while ($val = $res->fetchRow()) {\n $result[] = $val;\n }\n return $result;\n }\n return false;\n }", "title": "" }, { "docid": "290fa0983b66961f26c2d006e22a3f1d", "score": "0.6791191", "text": "public function getClients() {\n $query = \"SELECT Person.email, Person.fName, Person.lName, Client.address, Client.telephone\n FROM Person\n JOIN Client\n ON Person.email = Client.email\";\n $statement = self::$db->prepare($query);\n $statement->execute();\n $row = $statement->fetchAll();\n return $row;\n }", "title": "" }, { "docid": "bc1404c133a163ae76a9e87f1c85c0ac", "score": "0.67639536", "text": "function getAllClients($dbh)\n{\n $query = $dbh->prepare( 'SELECT * FROM clients' );\n $query->execute();\n return $allclients = $query->fetchAll();\n}", "title": "" }, { "docid": "5480feb932777a807000ef8a6b32e661", "score": "0.6757063", "text": "public function listar()\n {\n $conexao = new conexao();\n $bd = $conexao->conectar();\n\n $sql = \"SELECT * FROM clientes\";\n\n $resultado = $bd->query($sql);\n $bd->close();\n return $resultado;\n }", "title": "" }, { "docid": "84969a552dd42cb9fecdd6ffc4776fc0", "score": "0.67358065", "text": "public function listCliente()\n {\n $query = \"SELECT * FROM clientes ORDER BY cliente ASC\";\n $stm = Conection::DBconection()->prepare($query);\n if ($stm->execute()) {\n return printf(json_encode($stm->fetchAll(PDO::FETCH_ASSOC)));\n } else {\n return printf(json_encode(array('action' => \"error\")));\n }\n }", "title": "" }, { "docid": "81e3b16febc23935a7c3248838efa023", "score": "0.6711639", "text": "protected function getSubClientNames()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "e62c7a5994b042a3352a2d3f7f63bf69", "score": "0.67083466", "text": "function client_get()\n {\n\t\t// Put the value from the name field into a variable.\n\t\t$name = $this->get('name');\n\t\t\t\n\t\t// Checks if there is a value in the name field\n\t\tif(!$name) {\n\t\t\t$this->response(array('error' => 'A client name was not specified in the URL (e.g. /collect/client/name/<name>'), 400);\n\t\t}\t\t\t\n\t\t\t\n\t\t// Get all users from the database and stick it into an array.\n\t $client = $this->Collect_model->get_client($name);\n\t\t\n\t\t// Send the response back\n if($client) {\n $this->response($client, 200); // 200 being the HTTP response code\n } else {\n $this->response(array('error' => 'Couldn\\'t find any data!'), 404);\n }\n }", "title": "" }, { "docid": "0c4ffc81f845b8404b77c83e0dcf3f0d", "score": "0.6655004", "text": "public function list()\n {\n $clientes = Cliente::all();\n return response()->json($clientes);\n }", "title": "" }, { "docid": "d9cac5450078c6306b3cb162359e183a", "score": "0.6647718", "text": "public function index()\n {\n \n $clientes = Tercero::get();\n return $clientes;\n\n }", "title": "" }, { "docid": "093843c374061a600617e4fe8926d64b", "score": "0.6627791", "text": "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new ClienteData());\n\t}", "title": "" }, { "docid": "68f932dd1f71d3486c03ae1154c3ebca", "score": "0.6625129", "text": "static function getInactiveClients($all_fields = false)\n {\n global $user;\n $mdb2 = getConnection();\n\n $group_id = $user->getGroup();\n $org_id = $user->org_id;\n if ($all_fields)\n $sql = \"select * from tt_clients where group_id = $group_id and org_id = $org_id and status = 0 order by upper(name)\";\n else\n $sql = \"select id, name from tt_clients where group_id = $group_id and org_id = $org_id and status = 0 order by upper(name)\";\n\n $res = $mdb2->query($sql);\n $result = array();\n if (!is_a($res, 'PEAR_Error')) {\n while ($val = $res->fetchRow()) {\n $result[] = $val;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "bb6b5684db6b23055789696a9fb9c4e8", "score": "0.6609021", "text": "public function index()\n {\n //Regresa todos los clientes\n /*$clients = Client::all();\n return $clients;*/\n }", "title": "" }, { "docid": "546853d55851a1d8f24d9c9510b8a0c0", "score": "0.65735126", "text": "public function clients(string ...$rooms): array;", "title": "" }, { "docid": "4f98cd73bf5bc5c817f842624e50aa50", "score": "0.6572089", "text": "public static function getClients($search = false, $limitstart = 0, $limitnum = 25) {\r\n $params['limitstart'] = $limitstart;\r\n $params['limitnum'] = $limitnum;\r\n if ($search) {\r\n $params['search'] = $search;\r\n }\r\n $params['action'] = 'getclients';\r\n return self::sendRequest($params);\r\n }", "title": "" }, { "docid": "9593b7731187c4f9beb19f5e85603cdb", "score": "0.6546039", "text": "public function get_all() {\n return $this->get_results( 'SELECT * FROM `server`', PDO::FETCH_CLASS, 'Server' );\n }", "title": "" }, { "docid": "ce80d19b5dc71128f25f486bb653e2b5", "score": "0.65277296", "text": "function listarClientes()\r\n\t{\r\n\t\t$conn = conectar(); \r\n\t\t$stmt = $conn->prepare(\"select id, nome from cliente order by id\");\r\n\t\t$stmt->execute();\r\n\t\t$retorno = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\t\treturn $retorno;\r\n\r\n }", "title": "" }, { "docid": "4affb558ec0e405a6c8c27d9cf0b7af3", "score": "0.6514608", "text": "public function get_all()\n\t{\n\t\treturn $this->db->get('cliente')->result_array();\n\t\t\n\t}", "title": "" }, { "docid": "03acd5ebe5ea9b8ef297ab03f5d17506", "score": "0.651132", "text": "public static function getClients($num_client)\n {\n return Client::find($num_client)->billets()->get();\n }", "title": "" }, { "docid": "08732aa987e1c0eeec102061638ada4d", "score": "0.64919734", "text": "public function getConnections();", "title": "" }, { "docid": "9da23e700c19b6f3ce0454eddb1d8ec5", "score": "0.64604527", "text": "public function bestClients ()\n {\n $client = new clientController;\n return lib::$return = ['status' => true, 'clients' => $client->reportBestClients()];\n }", "title": "" }, { "docid": "f5f5d077d952f4deed5afb70ca76900e", "score": "0.6455131", "text": "public function getAllClientTags()\n {\n\treturn $this->setRequestData(self::RESOURCE_CLIENT_TAGS);\n }", "title": "" }, { "docid": "57a37411af77e39307a7cb00f11dadb4", "score": "0.6452309", "text": "function findClientsJSON() {\n\n $connexion = BddConnexion::getInstance();\n $bdd = new ClientManager($connexion->handle());\n $clients = $bdd->getList();\n\n foreach ($clients as $client) {\n $clientJSON = $client->jsonSerialize();\n $clientsJSON[] = $clientJSON;\n }\n\n if (is_null($clientsJSON))\n $msgClient = \"Aucun client n'a été trouvé\";\n return $clientsJSON;\n}", "title": "" }, { "docid": "37e13a8d5448881d50363bf3f7ccf408", "score": "0.6450397", "text": "public function getDevicesCli()\n {\n $sql = 'SELECT dispositivo, fecha FROM historial_sesion_cli WHERE id_cliente_user = ?';\n $params = array($_SESSION['id_cliente_user']);\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "d6d76601606e7c66faac864456fae9fe", "score": "0.6449505", "text": "private function getConnectedClients($role = \"\")\n {\n // $hods = Helpers::getUsersByRoleName('HOD of CRM');\n $hods = Helpers::getUsersRoleName('HOD of CRM');\n // Log::channel('customerDnd')->info('hods:::::::::'.$hods);\n $andy = User::find(216);\n $yogesh = User::find(6);\n $clients = [];\n /** @var Helpers $hod */\n\n foreach ($hods as $hod) {\n if($role == 'customer_call_agent')\n {\n $clients[$hod->id]['agent_id'] = $hod->id;\n $clients[$hod->id]['agent_name'] = $hod->name;\n $clients[$hod->id]['agent_name_id'] = 'customer_call_agent_'.$hod->id;\n }\n else\n $clients[] = str_replace('-', '_', str_slug($hod->name));\n }\n\n if (Setting::get('incoming_calls_andy') == 1) {\n if($role == 'customer_call_agent')\n {\n $clients[$andy->id]['agent_id'] = $andy->id;\n $clients[$andy->id]['agent_name'] = $andy->name;\n $clients[$andy->id]['agent_name_id'] = 'customer_call_agent_'.$andy->id;\n }\n else\n $clients[] = str_replace('-', '_', str_slug($andy->name));\n }\n\n if (Setting::get('incoming_calls_yogesh') == 1) {\n if($role == 'customer_call_agent')\n {\n $clients[$yogesh->id]['agent_id'] = $yogesh->id;\n $clients[$yogesh->id]['agent_name'] = $yogesh->name;\n $clients[$yogesh->id]['agent_name_id'] = 'customer_call_agent_'.$yogesh->id;\n // $clients[$yogesh->id]['agent_name_id'] = 'customer_call_agent_383';\n }\n else\n $clients[] = str_replace('-', '_', str_slug($yogesh->name));\n }\n\n return $clients;\n }", "title": "" }, { "docid": "8ab9abaac53e7ac34568615d5a671484", "score": "0.64434046", "text": "public function index()\n {\n return new ClientCollection(Client::paginate(10));\n }", "title": "" }, { "docid": "bd88860c866741a74a0324a90ece1c4e", "score": "0.6442348", "text": "public static function listaCliente(){\n\t\t\t$Negocio = new UsuarioNegocio();\n\t\t\t$res = $Negocio->listarCliente();\n\t\t\treturn $res;\n\t\t}", "title": "" }, { "docid": "daa36cac5d67efdc9029de43038bd937", "score": "0.64335036", "text": "public function index()\n {\n $client = Client::all();\n return view('listAllClients', ['clients' => $client]);\n }", "title": "" }, { "docid": "74e3e3cb1af8d5c074f630974fc1e5db", "score": "0.6403833", "text": "public function SelectAll()\n {\n $query = 'select ID_CLIENT, NOM, PRENOM, EMAIL, PASSWD, ADRESSE, TELEPHONE\n from clients';\n \n $result = $this->conn->prepare($query);\n \n //$result->bindValue(':ID_CATEGORIE', $_id_categorie, PDO::PARAM_INT);\n \n $result->execute(); //or die ($this->Error($result));\n \n return $result->fetchAll();\n }", "title": "" }, { "docid": "c19176eaaa42063c9f00fb2ddc27c560", "score": "0.6403691", "text": "public function clientsAction() {\n\t\t// nacteni seznamu klientu\n\t\t$tableClients = new Application_Model_DbTable_Client();\n\t\t$clients = $tableClients->fetchAll(array(\"!deleted\", \"!archived\"), array(\"company_name\"));\n\n\t\t$this->view->clients = $clients;\n\t}", "title": "" }, { "docid": "bd080506e03ba7d3232e220699e516bb", "score": "0.63925505", "text": "public function getIdClients()\r\n {\r\n return $this->_idClients;\r\n }", "title": "" }, { "docid": "9453c8d5c82c3a2c581236956a461339", "score": "0.6389812", "text": "public function list($id){\n try{\n $sql = 'select * from client where id_client = ? limit 1';\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n $result = $stm->fetch();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "title": "" }, { "docid": "5febe61d91f6ba09857e18323c7ba830", "score": "0.6384567", "text": "public function clientes($id) {\n return Sede::find($id)->clientes;\n }", "title": "" }, { "docid": "7dec97b57583fec02686f2000f03bccb", "score": "0.6380873", "text": "function afficherClient(){\n\t\t$sql=\"SELECT * FROM `client` ORDER BY cin ASC\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "e2e053ad28f0a0b40c8b9fc94289fe33", "score": "0.63786364", "text": "public function actionClients()\n {\n if (Yii::$app->user->isGuest) \n {\n return $this->redirect(Yii::$app->urlManager->createUrl('/admin/login'));\n }\n $this->view->title = 'Клиенты';\n $this->view->params['breadcrumbs'][] = $this->view->title;\n \n $query = Clients::find()->where(['>','id',1])->orderby(['created'=>SORT_ASC]);\n $countQuery = clone $query;\n $pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize' => 20]);\n $pages->pageSizeParam = false;\n $clients = $query->offset($pages->offset)->limit($pages->limit)->all();\n\n return $this->render('clients', [\n 'clients' => $clients,\n 'pages' => $pages,\n ]);\n }", "title": "" }, { "docid": "2eb9cd263b82b200ff11852fd710207d", "score": "0.63621634", "text": "public function getAllRows() {\r\n $stmt = $this->db->conn->prepare('SELECT * FROM `cls_сlients`');\r\n $stmt->execute();\r\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "70178b1bc96071c891ce9ab94efba2bb", "score": "0.63487935", "text": "public function sellsy_clients()\n {\n $pagenum = 1;\n $nbpages = $pagenum + 1;\n do {\n $clientsRequest = $this->sellsy\n ->Client()\n ->getList(['pagination' => ['nbperpage' => 5000, 'pagenum' => $pagenum]])\n ->getResponse();\n $nbpages = $clientsRequest['infos']['nbpages'];\n\n $clients = $clientsRequest['result'];\n foreach ($clients as $clientId => $client) {\n $this->addOrUpdateDB(\n 'sellsy_clients',\n $clientId,\n [\n 'capital' => isset($client['capital']) ? $client['capital'] : '',\n 'logo' => isset($client['logo']) ? $client['logo'] : '',\n 'joindate' => isset($client['joindate']) ? $client['joindate'] : '',\n 'auxCode' => isset($client['auxCode']) ? $client['auxCode'] : '',\n 'accountingCode' =>\n isset($client['accountingCode']) ? $client['accountingCode'] : '',\n 'stickyNote' =>\n isset($client['stickyNote']) ? $client['stickyNote'] : '',\n 'ident' => isset($client['ident']) ? $client['ident'] : '',\n 'rateCategory' =>\n isset($client['rateCategory']) ? $client['rateCategory'] : '',\n 'massmailingUnsubscribed' =>\n isset($client['massmailingUnsubscribed'])\n ? $client['massmailingUnsubscribed']\n : '',\n 'massmailingUnsubscribedSMS' =>\n isset($client['massmailingUnsubscribedSMS'])\n ? $client['massmailingUnsubscribedSMS']\n : '',\n 'phoningUnsubscribed' =>\n isset($client['phoningUnsubscribed'])\n ? $client['phoningUnsubscribed']\n : '',\n 'massmailingUnsubscribedMail' =>\n isset($client['massmailingUnsubscribedMail'])\n ? $client['massmailingUnsubscribedMail']\n : '',\n 'massmailingUnsubscribedCustom' =>\n isset($client['massmailingUnsubscribedCustom'])\n ? $client['massmailingUnsubscribedCustom']\n : '',\n 'lastactivity' =>\n isset($client['lastactivity']) ? $client['lastactivity'] : '',\n 'ownerid' => isset($client['ownerid']) ? $client['ownerid'] : null,\n 'type' => isset($client['type']) ? $client['type'] : '',\n 'maincontactid' =>\n isset($client['maincontactid']) ? $client['maincontactid'] : null,\n 'relationType' =>\n isset($client['relationType']) ? $client['relationType'] : '',\n 'actif' => isset($client['actif']) ? $client['actif'] : '',\n 'pic' => isset($client['pic']) ? $client['pic'] : '',\n 'dateTransformProspect' =>\n isset($client['dateTransformProspect'])\n ? $client['dateTransformProspect']\n : '',\n 'mainContactName' =>\n isset($client['mainContactName'])\n ? $client['mainContactName']\n : '',\n 'name' => isset($client['name']) ? $client['name'] : '',\n 'tel' => isset($client['tel']) ? $client['tel'] : '',\n 'fax' => isset($client['fax']) ? $client['fax'] : '',\n 'email' => isset($client['email']) ? $client['email'] : '',\n 'mobile' => isset($client['mobile']) ? $client['mobile'] : '',\n 'apenaf' => isset($client['apenaf']) ? $client['apenaf'] : '',\n 'rcs' => isset($client['rcs']) ? $client['rcs'] : '',\n 'siret' => isset($client['siret']) ? $client['siret'] : '',\n 'siren' => isset($client['siren']) ? $client['siren'] : '',\n 'vat' => isset($client['vat']) ? $client['vat'] : '',\n 'mainaddressid' =>\n isset($client['mainaddressid']) ? $client['mainaddressid'] : '',\n 'maindelivaddressid' =>\n isset($client['maindelivaddressid'])\n ? $client['maindelivaddressid']\n : '',\n 'web' => isset($client['web']) ? $client['web'] : '',\n 'corpType' => isset($client['corpType']) ? $client['corpType'] : '',\n 'addr_name' =>\n isset($client['addr_name']) ? $client['addr_name'] : '',\n 'addr_part1' =>\n isset($client['addr_part1']) ? $client['addr_part1'] : '',\n 'addr_part2' =>\n isset($client['addr_part2']) ? $client['addr_part2'] : '',\n 'addr_zip' => isset($client['addr_zip']) ? $client['addr_zip'] : '',\n 'addr_town' =>\n isset($client['addr_town']) ? $client['addr_town'] : '',\n 'addr_state' =>\n isset($client['addr_state']) ? $client['addr_state'] : '',\n 'addr_lat' => isset($client['addr_lat']) ? $client['addr_lat'] : '',\n 'addr_lng' => isset($client['addr_lng']) ? $client['addr_lng'] : '',\n 'addr_countrycode' =>\n isset($client['addr_countrycode'])\n ? $client['addr_countrycode']\n : '',\n 'delivaddr_name' =>\n isset($client['delivaddr_name']) ? $client['delivaddr_name'] : '',\n 'delivaddr_part1' =>\n isset($client['delivaddr_part1'])\n ? $client['delivaddr_part1']\n : '',\n 'delivaddr_part2' =>\n isset($client['delivaddr_part2'])\n ? $client['delivaddr_part2']\n : '',\n 'delivaddr_zip' =>\n isset($client['delivaddr_zip']) ? $client['delivaddr_zip'] : '',\n 'delivaddr_town' =>\n isset($client['delivaddr_town']) ? $client['delivaddr_town'] : '',\n 'delivaddr_state' =>\n isset($client['delivaddr_state'])\n ? $client['delivaddr_state']\n : '',\n 'delivaddr_lat' =>\n isset($client['delivaddr_lat']) ? $client['delivaddr_lat'] : '',\n 'delivaddr_lng' =>\n isset($client['delivaddr_lng']) ? $client['delivaddr_lng'] : '',\n 'delivaddr_countrycode' =>\n isset($client['delivaddr_countrycode'])\n ? $client['delivaddr_countrycode']\n : '',\n 'formated_joindate' =>\n isset($client['formated_joindate'])\n ? $client['formated_joindate']\n : '',\n 'formated_transformprospectdate' =>\n isset($client['formated_transformprospectdate'])\n ? $client['formated_transformprospectdate']\n : '',\n 'corpid' => isset($client['corpid']) ? $client['corpid'] : null,\n 'lastactivity_formatted' =>\n isset($client['lastactivity_formatted'])\n ? $client['lastactivity_formatted']\n : '',\n 'addr_countryname' =>\n isset($client['addr_countryname'])\n ? $client['addr_countryname']\n : '',\n 'mainAddress' =>\n isset($client['mainAddress']) ? $client['mainAddress'] : '',\n 'addr_geocode' =>\n isset($client['addr_geocode']) ? $client['addr_geocode'] : '',\n 'delivaddr_countryname' =>\n isset($client['delivaddr_countryname'])\n ? $client['delivaddr_countryname']\n : '',\n 'delivAddress' =>\n isset($client['delivAddress']) ? $client['delivAddress'] : '',\n 'delivaddr_geocode' =>\n isset($client['delivaddr_geocode'])\n ? $client['delivaddr_geocode']\n : '',\n 'fullName' => isset($client['fullName']) ? $client['fullName'] : '',\n 'contactId' =>\n isset($client['contactId']) ? $client['contactId'] : '',\n 'contactDetails' =>\n isset($client['contactDetails']) ? $client['contactDetails'] : '',\n 'formatted_tel' =>\n isset($client['formatted_tel']) ? $client['formatted_tel'] : '',\n 'formatted_mobile' =>\n isset($client['formatted_mobile'])\n ? $client['formatted_mobile']\n : '',\n 'formatted_fax' =>\n isset($client['formatted_fax']) ? $client['formatted_fax'] : '',\n 'owner' => isset($client['owner']) ? $client['owner'] : '',\n 'webUrl' => isset($client['webUrl']) ? $client['webUrl'] : ''\n ],\n 'sellsy_id'\n );\n if (isset($client['contacts'])) {\n foreach ($client['contacts'] as $contact) {\n if (isset($contact['peopleid'])) {\n $this->addOrUpdateDB(\n 'sellsy_contacts',\n $contact['peopleid'],\n [\n 'pic' => isset($contact['pic']) ? $contact['pic'] : '',\n 'name' => isset($contact['name']) ? $contact['name'] : '',\n 'forename' =>\n isset($contact['forename']) ? $contact['forename'] : '',\n 'tel' => isset($contact['tel']) ? $contact['tel'] : '',\n 'email' => isset($contact['email']) ? $contact['email'] : '',\n 'mobile' =>\n isset($contact['mobile']) ? $contact['mobile'] : '',\n 'civil' => isset($contact['civil']) ? $contact['civil'] : '',\n 'position' =>\n isset($contact['position']) ? $contact['position'] : '',\n 'birthdate' =>\n (\n isset($contact['birthdate']) &&\n $contact['birthdate'] !== 'NC.'\n )\n ? $contact['birthdate']\n : '',\n 'thirdid' =>\n isset($contact['thirdid']) ? $contact['thirdid'] : null,\n 'fullName' =>\n isset($contact['fullName']) ? $contact['fullName'] : '',\n 'corpid' =>\n isset($contact['corpid']) ? $contact['corpid'] : null,\n 'formatted_tel' =>\n isset($contact['formatted_tel'])\n ? $contact['formatted_tel']\n : '',\n 'formatted_mobile' =>\n isset($contact['formatted_mobile'])\n ? $contact['formatted_mobile']\n : '',\n 'formatted_fax' =>\n (\n isset($contact['formatted_fax']) &&\n $contact['formatted_fax'] !== 'N/C'\n )\n ? $contact['formatted_fax']\n : '',\n 'formatted_birthdate' =>\n isset($contact['formatted_birthdate'])\n ? $contact['formatted_birthdate']\n : ''\n ],\n 'sellsy_id'\n );\n }\n }\n }\n }\n // var_dump($clientsRequest);\n } while ($pagenum++ < $nbpages);\n\n echo json_encode(['success' => true]);\n }", "title": "" }, { "docid": "e7a7fbbbfbd149aed029a048103aebdd", "score": "0.63445705", "text": "public function index()\n {\n return response()->json(Client::all()->toArray(),200);\n }", "title": "" }, { "docid": "d0102d75cbe7caf85e7c1b6cd67d213c", "score": "0.6336381", "text": "public function all(int $page = 1, int $maxPerPage = 20): array\n {\n if ($maxPerPage > 50) {\n $maxPerPage = 50;\n }\n\n $options = [\n 'page' => $page,\n 'max_per_page' => $maxPerPage,\n ];\n\n return Billingo::get('clients', $options);\n }", "title": "" }, { "docid": "a46892f6021384a205ffb6ae5c92efb6", "score": "0.6330155", "text": "public function index()\n {\n $clients = Client::all();\n return response()->json($clients);\n }", "title": "" }, { "docid": "70ff5816bfc3e7651c3678db03bc772c", "score": "0.63285375", "text": "public static function getClientes() {\n \n $conexion=GenericoBD::abrir();\n \n $query = \"SELECT * FROM cliente\";\n \n $rs = mysqli_query($conexion, $query) or die(mysqli_error($conexion));\n\n $clientes = [];\n $fila = mysqli_fetch_array($rs);\n \n while ($fila != null){\n $t = new Cliente($fila[\"id_cliente\"], $fila[\"nombre\"], $fila[\"direccion\"], $fila[\"correo\"]);\n array_push($clientes, $t);\n $fila = mysqli_fetch_array($rs);\n }\n \n GenericoBD::cerrar($conexion);\n \n $_SESSION[\"clientes\"] = $clientes;\n }", "title": "" }, { "docid": "f2d7ec5106646247ec32b5ebb2ccdcb0", "score": "0.63253915", "text": "public function clientGroupsList()\n {\n $url = '/admin/client_groups.json';\n\n return $this->client->makeRequest($url, Request::METHOD_GET);\n }", "title": "" }, { "docid": "cccf4943d7e459c6393bebafed49f5b9", "score": "0.6324579", "text": "public function getAll()\n {\n return $this->apiRequest('application/servers');\n }", "title": "" }, { "docid": "5a4680dc010607e777309b9ea115d31c", "score": "0.631801", "text": "function getAllChannelIds($client) {\n\n\t$ids = array();\n foreach ($client->channels->all() as $channel) \n {\n $ids[] = $channel->getId();\n }\n return $ids;\n}", "title": "" }, { "docid": "4324fbe487ae1b7596a73339cb5410f3", "score": "0.6307464", "text": "public function index()\n {\n $clients = $this->client->all();\n return response()->json(['data'=>$clients],201);\n }", "title": "" }, { "docid": "e420dc9560e1934d90d9e910b5f03fd1", "score": "0.6281888", "text": "public function fetchClients ($_admin, $_limit = 5)\r\n\t{\r\n\t\tif (! is_null($this->db)) {\r\n\t\t\t/*\r\n\t\t\t * A complex SQL query to find ONLY clients to which the current user has access\r\n\t\t\t */\r\n\t\t\t$query = $this->db->select()\r\n\t\t\t\t->from(array(\r\n\t\t\t\t'c' => 'dui_clients'), array(\r\n\t\t\t\t'id',\r\n\t\t\t\t'sys_name'))\r\n\t\t\t\t->join(array(\r\n\t\t\t\t'u' => 'dui_users'),\r\n\t\t\t'c.admin = u.id OR c.users REGEXP CONCAT(\\'(^|[0-9]*,)\\', u.id, \\'(,|$)\\')',\r\n\t\t\tarray())\r\n\t\t\t\t->order('c.id ASC')\r\n\t\t\t\t->limit($_limit);\r\n\t\t\tif (is_int($_admin)) {\r\n\t\t\t\t// treat it as the integer user ID\r\n\t\t\t\t$query->where('u.id = ?', $_admin, 'INTEGER');\r\n\t\t\t} else {\r\n\t\t\t\t// treat is as the username\r\n\t\t\t\t$query->where('u.username = ?', $_admin);\r\n\t\t\t}\r\n\t\t\treturn $query->query()->fetchAll(Zend_Db::FETCH_ASSOC);\r\n\t\t}\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.62813073", "text": "public static function getAll();", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.62813073", "text": "public static function getAll();", "title": "" }, { "docid": "173b1e562cfaca093e3af2b5f56861e4", "score": "0.6268585", "text": "public function clients($type = ''){\n $model = new ClientModel();\n $data = $model->where('type', $type)->findAll();\n return $data;\n }", "title": "" }, { "docid": "e8d33df741c2dea1df7de2aa4ae00b82", "score": "0.6252588", "text": "public function listar($id_cliente){\n try {\n \n $clienteDao = $this->Factory->createDao(\"com_clientes_end_entrega\");\n $clienteDao->connect();\n $listClientes =$clienteDao->listar($id_cliente);\n $clienteDao->disconnect();\n return $listClientes;\n\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "title": "" }, { "docid": "44300fb406d90bf25ac4380313bf81d6", "score": "0.624634", "text": "public function showAllClientSessions($client) {\n\t\t$stmt = $this->db->prepare (\"SELECT * FROM ENGLOBA T1 JOIN SESION T2 WHERE T1.ID_ENGLOBA = T2.ID_ENGLOBA AND T1.DNI_USUARIO = ? ORDER BY T1.ID_TABLA, T2.FECHA DESC, T2.HORA_INI DESC\" );\n\t\t$stmt->execute(array($client));\n\t\t$sessions_db = $stmt->fetchAll ( PDO::FETCH_ASSOC );\n\t\t\n\t\t$sessions = array ();\n\t\t\n\t\tforeach ( $sessions_db as $session ) {\n\t\t\tarray_push ( $sessions, new Session ($session [\"ID_SESION\"], $session [\"FECHA\"], $session [\"HORA_INI\"], $session [\"HORA_FIN\"], $session [\"DURACION\"], $session [\"OBSERVACIONES\"], $session [\"ID_ENGLOBA\"], $session [\"DNI_USUARIO\"], $session[\"ID_TABLA\"]) );\n\t\t}\n\t\treturn $sessions;\n\t}", "title": "" }, { "docid": "7bc2c0f60f471f0e4e7cbf0d4182005e", "score": "0.6242963", "text": "public function getClients(string $access_token, array $params = array()) {\n return $this->request->post('ads.getClients', $access_token, $params);\n }", "title": "" }, { "docid": "39e28eb27e4eade1c5591d4e85de1c73", "score": "0.6232427", "text": "public function listarc()\n\t{\n\t\t$sql=\"SELECT * FROM persona WHERE tipo_persona='Cliente'\";\n\t\treturn ejecutarConsulta($sql); \n\t}", "title": "" }, { "docid": "f9b82608602f4e890b8be7d41fbf80d6", "score": "0.62246704", "text": "public function client_list()\n {\n\n $client_list = Client::where('status','=', 1)->get();\n \n return view('front.pages.client_list',[\"client_list\" => $client_list]);\n }", "title": "" }, { "docid": "4e7954975c04683062919eee8511a789", "score": "0.6223345", "text": "public function getClientes(){ //SELECT id_usuario, nombre_usuario, apellido_usuario, telefono, nickname, correo, contrasena, nombre_genero, nombre_tipo FROM usuarios INNER JOIN generos_usuario USING(id_genero) INNER JOIN tipo_usuario USING(id_tipo) ORDER BY apellido_usuario\n\t\t$sql = \"SELECT * FROM usuario WHERE id_tipouser = 2\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "title": "" }, { "docid": "e32df8f02456fc307a72f31997e85d2b", "score": "0.6207655", "text": "static public function getSearchClients()\n {\n if (!self::$_searchClients instanceof Core_Model_SearchManager) {\n self::$_searchClients = self::newSearchClients();\n }\n\n return self::$_searchClients;\n }", "title": "" }, { "docid": "e9c22f746a72261376dd3e1918fbb846", "score": "0.6206151", "text": "public static function getAll() { }", "title": "" }, { "docid": "5111a209e8aae9b65e5a5d40b12cb7d7", "score": "0.62048966", "text": "public function getConnections()\n {\n $this->curl->get($this->host . 'vhosts/' . urlencode($this->virtualHost) . '/connections');\n $data = $this->curl->getBody();\n $data = json_decode($data, true);\n $output = [];\n foreach ($data as $value) {\n $output[$value['name']] = $value;\n }\n return $output;\n }", "title": "" } ]
d36b11f32a222543b5b884e6d0625711
Get the value of updatedat
[ { "docid": "a120cb9a388a629ef1460c57c9c5a2ca", "score": "0.0", "text": "public function getUpdated()\n {\n return Carbon::parse($this->updated_at, 'Europe/Paris')->locale('fr_FR')->diffForHumans();\n }", "title": "" } ]
[ { "docid": "f8c261c43f3b74dec8f233449f09c3b7", "score": "0.8232281", "text": "public function getUpdateAt()\n {\n return $this->update_at;\n }", "title": "" }, { "docid": "f8c261c43f3b74dec8f233449f09c3b7", "score": "0.8232281", "text": "public function getUpdateAt()\n {\n return $this->update_at;\n }", "title": "" }, { "docid": "e57fd375e0ddda9cb27da1cd60ee3fd5", "score": "0.8083773", "text": "public function getUpdated_at()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "e57fd375e0ddda9cb27da1cd60ee3fd5", "score": "0.8083773", "text": "public function getUpdated_at()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "e57fd375e0ddda9cb27da1cd60ee3fd5", "score": "0.8083773", "text": "public function getUpdated_at()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "e57fd375e0ddda9cb27da1cd60ee3fd5", "score": "0.8083773", "text": "public function getUpdated_at()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "50dd859162afd90418143b1597c3bf10", "score": "0.7898908", "text": "public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}", "title": "" }, { "docid": "50dd859162afd90418143b1597c3bf10", "score": "0.7898908", "text": "public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}", "title": "" }, { "docid": "50dd859162afd90418143b1597c3bf10", "score": "0.7898908", "text": "public function updated_at()\n\t{\n return $this->date($this->updated_at);\n\t}", "title": "" }, { "docid": "f8727bf0f891ca7c19fb9aadfafae489", "score": "0.78951627", "text": "protected static function updated_at(): mixed\n\t{\n\t\treturn self::$query->updated_at;\n\t}", "title": "" }, { "docid": "f8727bf0f891ca7c19fb9aadfafae489", "score": "0.78951627", "text": "protected static function updated_at(): mixed\n\t{\n\t\treturn self::$query->updated_at;\n\t}", "title": "" }, { "docid": "dff8abcde65cad169506152b59ad2cc8", "score": "0.7874443", "text": "public function getUpdatedAt(){\n return $this->_getData(self::UPDATED_AT);\n }", "title": "" }, { "docid": "f9ff4919bf45146e1dc4e1107c6e68c7", "score": "0.7852112", "text": "public function getUpdatedTime()\n {\n return $this->getAttribute('updatedTime');\n }", "title": "" }, { "docid": "ed87e0883f098978720cd4396e4d1540", "score": "0.7790689", "text": "public function getUpdatedTime() {\r\n return $this->updated_time;\r\n }", "title": "" }, { "docid": "032fe53f61ec378ea8bf46159e163a57", "score": "0.77786624", "text": "public function get_updated_at() {\n\t\t\treturn $this->updated_at;\n\t\t}", "title": "" }, { "docid": "664e97f041009754a9c3a5c0e3715dc3", "score": "0.7745248", "text": "public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }", "title": "" }, { "docid": "481ad6ac0127c406c39bde3bdc7db16e", "score": "0.7735923", "text": "public function getTimestampUpdated()\n {\n return $this->_getData(self::TIMESTAMP_UPDATED);\n }", "title": "" }, { "docid": "fa8f6b192fbc048447f4ede3ff783f27", "score": "0.7727733", "text": "public function updated_at()\n {\n return $this->date($this->updated_at);\n }", "title": "" }, { "docid": "c423a1383576cc039b8bcc7a6ca9fe7e", "score": "0.77147377", "text": "public function updatedAt(){\n return $this->_formatDate($this->updated_at);\n }", "title": "" }, { "docid": "45e29d97e5b5b6da29130cbca563a5eb", "score": "0.7694113", "text": "public function getUpdatedAt()\n {\n return $this->data['fields']['updated_at'];\n }", "title": "" }, { "docid": "0113505d7ca576c3b6f94c6a3391c0c9", "score": "0.76485276", "text": "public function getUpdatetime()\n {\n return $this->updateTime;\n }", "title": "" }, { "docid": "acb375c3e0c4c150eee414406d5e95b6", "score": "0.7626634", "text": "public function getUpdatedAt() {\n return $this->attributes['updated_at'];\n }", "title": "" }, { "docid": "a2157ab8436ddd30acb39f88b633c61f", "score": "0.7622224", "text": "public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }", "title": "" }, { "docid": "e2112a5f798e33062e295f3c87f0f465", "score": "0.7607809", "text": "public function getUpdatedAt()\n {\n return $this->_updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "0a476a41fbe277fe44f1a54113cb057d", "score": "0.7580195", "text": "public function getUpdatedAt()\n {\n return $this->updated_at;\n }", "title": "" }, { "docid": "04b54921c259a378b9fff99a5c2bad1b", "score": "0.7572657", "text": "public function getUpdatedAt()\n\t{\n\t\treturn $this->updatedAt;\n\t}", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "0b7a3257364453e4642861d14640b039", "score": "0.7564113", "text": "public function getUpdatedAt()\n {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "9771405543a1447b73c6340e05170964", "score": "0.7563131", "text": "public function getDateUpdate()\n {\n return $this->date_update;\n }", "title": "" }, { "docid": "9771405543a1447b73c6340e05170964", "score": "0.7563131", "text": "public function getDateUpdate()\n {\n return $this->date_update;\n }", "title": "" }, { "docid": "e14b8c21ac9328fe446cc25cb360d4f4", "score": "0.75608957", "text": "public function getDateUpdated()\n {\n return $this->date_updated;\n }", "title": "" }, { "docid": "e14b8c21ac9328fe446cc25cb360d4f4", "score": "0.75608957", "text": "public function getDateUpdated()\n {\n return $this->date_updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "d87bd54a902f1764a2ebbd54374e8f52", "score": "0.7553797", "text": "public function getUpdated()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "cd18a2fcbbbfd16463d44b6f9e13c318", "score": "0.7548709", "text": "public function getDateUpdate()\n {\n return $this->dateUpdate;\n }", "title": "" }, { "docid": "aee94c2adf31c76bc5c8e3ac18f4e5ef", "score": "0.75472826", "text": "public function getUpdatedAt() {\n return $this->updatedAt;\n }", "title": "" }, { "docid": "15174abba2be7fd54e6ba55394bee9de", "score": "0.7534319", "text": "public function updated_at()\n {\n return ExpressiveDate::make($this->updated_at)->getRelativeDate();\n }", "title": "" }, { "docid": "94fb166cb4081faf1aaa5dfbda814851", "score": "0.75188994", "text": "public function getUpdated() \n\t{\n\t\treturn $this->updated;\n\t}", "title": "" }, { "docid": "54e2508154e0b4147627aec09e0df7c6", "score": "0.7500965", "text": "public function getUpdated(): \\DateTime\n {\n return $this->updated;\n }", "title": "" }, { "docid": "065b22c74a0c9b8f2b2ca4c9e014cccc", "score": "0.74777824", "text": "public function getUtcUpdated()\n {\n return $this->utc_updated;\n }", "title": "" }, { "docid": "f408ce98b9cf0102c23638f26e5750b4", "score": "0.74744797", "text": "public function getDateUpdated() {\n return $this->dateUpdated;\n }", "title": "" }, { "docid": "a11fc62d5e769957845dfe7239399afe", "score": "0.74732465", "text": "public function getUpdatedDate()\n {\n return $this->updated;\n }", "title": "" }, { "docid": "bd200c9c23715e5545e2aa82e875f0a7", "score": "0.7466097", "text": "public function getUpdateTs()\n {\n return $this->update_ts;\n }", "title": "" }, { "docid": "936ed96b1524f6802f37e7f3d91590b3", "score": "0.7459533", "text": "public function getUpdateTime()\r\n {\r\n return $this->update_time;\r\n }", "title": "" }, { "docid": "e453d1ca22e274d855711e2deffcd03f", "score": "0.7443989", "text": "public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.7439111", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "3b5f69ebef43ba69384180af34d900a5", "score": "0.7432443", "text": "public function _getUpdatedOn() {\n\t\treturn $this->_updatedOn;\n\t}", "title": "" } ]
d41ac44759a9a1fa1ed93544d2f26f97
Get the value of payer_selected
[ { "docid": "c6f042710dcda0e796f539d7c0137fa8", "score": "0.8761905", "text": "public function getPayer_selected()\n {\n return $this->payer_selected;\n }", "title": "" } ]
[ { "docid": "edd3711b2eb7c60128f8f7f4cfff9dc6", "score": "0.6767744", "text": "function getValue() {\n return $this->selected;\n }", "title": "" }, { "docid": "40469d99d3878eef8e482af31a0df6bb", "score": "0.6476162", "text": "public function get_value() {\n return $this->get_selected_options();\n }", "title": "" }, { "docid": "67a1765a138381242e945d0d9921cfe7", "score": "0.64689875", "text": "public function selected() {\n return $this->value[0];\n }", "title": "" }, { "docid": "0d444769b0c1da66a8091ce84e5ede39", "score": "0.6228723", "text": "protected function getSelectedValue() {}", "title": "" }, { "docid": "b7dc08816dbd47d3ed51c92c3b1b254b", "score": "0.6169491", "text": "public function setPayer_selected($payer_selected)\n {\n $this->payer_selected = $payer_selected;\n\n return $this;\n }", "title": "" }, { "docid": "a0a1b556306fa3e1f6253250764fe220", "score": "0.60724324", "text": "function getSelected()\n {\n return $this->m_selected;\n }", "title": "" }, { "docid": "c8b0d338c6f89f789d63372aa1f45ec0", "score": "0.6070481", "text": "function getSelected() { return $this->_selected; }", "title": "" }, { "docid": "d501fbce1e10182b3a5cb051b6d4ba65", "score": "0.60243195", "text": "protected function getReceiverValue()\n\t{\n\t\t$payment = $this->request->getPayment();\n\n\t\treturn $this->request->get('receiver.'.$payment->id);\n\t}", "title": "" }, { "docid": "a6c8f47d54e82ed63e764a77b9d29f83", "score": "0.6007494", "text": "public function getSelected()\n {\n return $this->selected;\n }", "title": "" }, { "docid": "a6c8f47d54e82ed63e764a77b9d29f83", "score": "0.6007494", "text": "public function getSelected()\n {\n return $this->selected;\n }", "title": "" }, { "docid": "a6c8f47d54e82ed63e764a77b9d29f83", "score": "0.6007494", "text": "public function getSelected()\n {\n return $this->selected;\n }", "title": "" }, { "docid": "d1053038cf86fb645be2ca652b98a34f", "score": "0.5962052", "text": "public function getPayer()\n {\n return $this->getParameter('payer', []) ?? [];\n }", "title": "" }, { "docid": "271ccac5ca956eea7efa187b5ab34f3b", "score": "0.5859183", "text": "protected function getSelectedValue() {\n\t\t$assignment = $this->arguments['family'] ? $this->arguments['family']->getAssignmentForUser($this->arguments['user']) : NULL;\n\t\treturn $assignment ? $assignment->getRole()->getUid() : 0;\n\t}", "title": "" }, { "docid": "395dd706efefe563198ff16f9e55d71b", "score": "0.5854333", "text": "protected function get_value() {\n\t\treturn $this->user_options->get( Active_Consumers::OPTION );\n\t}", "title": "" }, { "docid": "99fa2eb18356273eab1522e144d0de49", "score": "0.58274657", "text": "public function getPayerName()\n {\n return $this->payer_name;\n }", "title": "" }, { "docid": "e7882a03227ac5fd3d2b2af64128e69d", "score": "0.5789573", "text": "public function getPayment() \n {\n return $this->_fields['Payment']['FieldValue'];\n }", "title": "" }, { "docid": "624f6ff3045b19c3be1f39ac2fdcd52d", "score": "0.57689536", "text": "public function getPayer_name()\n {\n return $this->payer_name;\n }", "title": "" }, { "docid": "24e40368a6cf2b13ccf472ea2ef30353", "score": "0.5721962", "text": "public function paymentSelect(){\n $payment = $this->paymentArray();\n $option='';\n foreach($payment as $key=>$val){\n $option.= \"<option value='$key'>$val</option>\";\n }\n return $option;\n }", "title": "" }, { "docid": "429d970e868067e43878d2b116d20487", "score": "0.5720589", "text": "public function value()\n {\n return $this['checked'];\n }", "title": "" }, { "docid": "23b02da7b096aa1aee6733eadb5ed6c5", "score": "0.57190275", "text": "private function get_selected_state() {\n if ( ! isset( $this->selected_state ) ) {\n $this->selected_state = isset($_REQUEST['slp_widget']['state']) ? $_REQUEST['slp_widget']['state'] : '';\n }\n return $this->selected_state;\n }", "title": "" }, { "docid": "e8f140250d601a65fb0345b7fe5dd7d4", "score": "0.56207484", "text": "public function getPayerId() {\n\t\treturn $this->_getField(self::$PAYER_ID);\n\t}", "title": "" }, { "docid": "7c197f4fb3ef110fecc75d2673096208", "score": "0.5612429", "text": "public function getPayerId(): ?string\n {\n return $this->{self::PAYER_ID};\n }", "title": "" }, { "docid": "bba6f7dd71df7c28de9f15f37ef8a182", "score": "0.55981064", "text": "public function getSelected() {}", "title": "" }, { "docid": "bba6f7dd71df7c28de9f15f37ef8a182", "score": "0.5597279", "text": "public function getSelected() {}", "title": "" }, { "docid": "fbfeb5b07b36d02d6970ec398149c2aa", "score": "0.5569406", "text": "public function getSelectedPayment()\r\n {\r\n if (!empty($this->View()->sUserData['additional']['payment'])) {\r\n $payment = $this->View()->sUserData['additional']['payment'];\r\n } elseif (!empty($this->session['sPaymentID'])) {\r\n $payment = $this->admin->sGetPaymentMeanById($this->session['sPaymentID'], $this->View()->sUserData);\r\n }\r\n\r\n $paymentClass = $this->admin->sInitiatePaymentClass($payment);\r\n if ($payment && $paymentClass instanceof \\ShopwarePlugin\\PaymentMethods\\Components\\BasePaymentMethod) {\r\n $data = $paymentClass->getCurrentPaymentDataAsArray(Shopware()->Session()->sUserId);\r\n if (!empty($data)) {\r\n $payment['data'] = $data;\r\n }\r\n }\r\n\r\n if (!empty($payment)) {\r\n return $payment;\r\n }\r\n $payments = $this->getPayments();\r\n if (empty($payments)) {\r\n unset($this->session['sPaymentID']);\r\n return false;\r\n }\r\n $payment = reset($payments);\r\n $this->session['sPaymentID'] = (int) $payment['id'];\r\n return $payment;\r\n }", "title": "" }, { "docid": "c0a71f86bc60e5eba880ce2ac615a96f", "score": "0.5560475", "text": "public function getBuyer()\n {\n return $this->getParameter('buyer');\n }", "title": "" }, { "docid": "a35e349f51938867bdd6b4601d8eaa9e", "score": "0.55459106", "text": "public function get_value() {\n\t\treturn $this->widget_type->get_instance_for_user( array(\n\t\t\t'user_id' => $this->user_id,\n\t\t\t'key' => $this->key,\n\t\t) );\n\t}", "title": "" }, { "docid": "421bec730354ee863c08ea5073dfd590", "score": "0.5518347", "text": "function get_selected($value,$comparison_value='')\n{\n\treturn ($value == $comparison_value) ? 'selected': ''; \n}", "title": "" }, { "docid": "58e78052e63e3a6976a2350ff1c0a0e1", "score": "0.55182326", "text": "function readSelectedItemID() { return $this->_selecteditemid; }", "title": "" }, { "docid": "1270eaf69b950cdc7b0e57c03c60e4ae", "score": "0.54982615", "text": "public function getValue()\n {\n return $this->valueOption->getValue();\n }", "title": "" }, { "docid": "64092e856a5b1b596e31553c33692bb1", "score": "0.5457418", "text": "public function paymentSelectWeb(){\n $payment = $this->paymentArrayWeb();\n $option='';\n foreach($payment as $key=>$val){\n $option.= \"<option value='$key'>$val</option>\";\n }\n return $option;\n }", "title": "" }, { "docid": "89ae521861f948a10db427d3400c4a14", "score": "0.5425285", "text": "function selection()\n\t{\n\t\t$retorno = FALSE;\n\n\t\tif ($this->_currencyValidation())\n\t\t\t$retorno = array('id' => $this->code, 'module' => $this->title);\n\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "a4f8ea3f96e80e8844c776e102218a85", "score": "0.54022527", "text": "public function getSellerSKU()\n {\n return $this->_fields['SellerSKU']['FieldValue'];\n }", "title": "" }, { "docid": "4904b01fbe5a23cb5f2426ff50a20f04", "score": "0.5398904", "text": "public function getSelectedOptions()\n {\n\t$selected = Mage::getSingleton('checkout/session')->getData('selected_delivery_options');\n\tif(!is_array($selected)) {\n\t $selected = array();\n\t}\n\treturn $selected;\n }", "title": "" }, { "docid": "01c6196d941b9a49a75d500e2eb4ddd2", "score": "0.5367948", "text": "function wpsc_shipping_quote_selected_state() {\n global $wpsc_cart;\n\n if(($wpsc_cart->selected_shipping_method == $wpsc_cart->shipping_method) && ($wpsc_cart->selected_shipping_option == $wpsc_cart->shipping_quote['name']) ) {\n\t $wpsc_cart->selected_shipping_amount = $wpsc_cart->base_shipping;\n return \"checked='checked'\";\n } else {\n return \"\";\n }\n}", "title": "" }, { "docid": "e41f547906fd20e96c4bcedf9b631e5c", "score": "0.5364536", "text": "protected function getPayButtonTarget() {\n if (preg_match(\"/target\\\":\\\"(.*?)\\\"/\", $this->button_code, $matches)) {\n $target = $matches[1] ;\n }\n else {\n $target = \"null\" ;\n }\n return $target ;\n }", "title": "" }, { "docid": "7ae703c671f09a98ef6d8116bb18746f", "score": "0.5356247", "text": "public function getCKPaymentValue(){ \n $query = \"SELECT * FROM tbl_payment WHERE id ='2'\"; // id = 2 for Check Payment\n $result = $this->db->select($query);\n return $result;\n }", "title": "" }, { "docid": "1e368c9fb0cf8ec4d10e5a6315607c13", "score": "0.5356194", "text": "function getValue()\n {\n return $this->getAttribute(\"value\");\n }", "title": "" }, { "docid": "f3192b539592623c314ea0fb65cf6ece", "score": "0.53554964", "text": "function getPaymentStatus(){\n\t\t$value = '--';\n\t\t$values = getPaymentStatuses();\n\t\tif(!isEmptyString($this->getStatus()) && $this->getStatus() != 0){\n\t\t\t$value = $values[$this->getStatus()];\n\t\t}\n\t\treturn $value;;\n\t}", "title": "" }, { "docid": "b6fc5fb0a622a49527f76aabdd60f879", "score": "0.5339454", "text": "public function getSelectedItem()\n {\n $tab = intval($_REQUEST[\"tab\"]);\n $swagPostItems = $this->getSwagPostItems();\n return $swagPostItems[$tab];\n }", "title": "" }, { "docid": "c4c0aa681d9c291f38953ad4f7f3bb31", "score": "0.5337803", "text": "public function getPaidValue()\n {\n return defined('static::PAID_VALUE') ? static::PAID_VALUE : 'paid';\n }", "title": "" }, { "docid": "f684a27f96f535dc71fe48678e0010a0", "score": "0.5331009", "text": "public function selection() {\n global $lC_Language;\n\n $selection = array('id' => $this->_code,\n 'module' => '<div class=\"payment-selection\">' . $this->_method_title . '<span>' . $this->_card_images . '</span></div><div class=\"payment-selection-title\">' . $lC_Language->get('payment_cresecure_blurb') . '</div>'); \n \n return $selection;\n }", "title": "" }, { "docid": "f411a31be049297f943634775ab8479d", "score": "0.5327395", "text": "public function get_user_fundraiser()\n {\n return $this->get_option( 'userFundraiser' );\n }", "title": "" }, { "docid": "3b4dc062354bb77fda0ebfaf1f1a3253", "score": "0.5285506", "text": "public function getPayer()\n {\n $payer = $this->data['address_name'] . '/' . $this->data['payer_email'];\n $charset = strtoupper(str_replace(\"_\", \"-\", $this->data['charset']));\n if ($charset !== 'UTF-8') {\n $payer = iconv($charset, 'UTF-8//IGNORE', $payer);\n }\n\n return $payer;\n }", "title": "" }, { "docid": "9eac0975d29fd884ed4d98653dbbfeb6", "score": "0.5280313", "text": "public function getPayment() {\n return $this->payment;\n }", "title": "" }, { "docid": "75219e8c9bfdae2e80c673e25b0289a4", "score": "0.52766347", "text": "public function getBuyerSelectedInvoiceCategory()\n {\n return $this->_fields['BuyerSelectedInvoiceCategory']['FieldValue'];\n }", "title": "" }, { "docid": "2b287a9192cf9580bd78b80446d096ce", "score": "0.5274365", "text": "public function getSelected(){\n\t\tif(count($this->selected) == 0){\n\t\t\treturn false;\n\t\t}elseif(count($this->selected) == 1){\n\t\t\treturn $this->selected[0];\n\t\t}else{\n\t\t\t$options = array();\n\t\t\tforeach($this->selected as $key){\n\t\t\t\t$options[] = $this->options[$key];\n\t\t\t}\n\t\t\treturn $options;\n\t\t}\n\t}", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.52730435", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "c8747bebc9ff7455d4f2579fd935bfa7", "score": "0.52730435", "text": "public function getPayment()\n {\n return $this->payment;\n }", "title": "" }, { "docid": "c3f64a50891646be8c188e2a6fae044b", "score": "0.5270255", "text": "public function getPayee()\n {\n return $this->payee;\n }", "title": "" }, { "docid": "bedabe97ba812d4abf4ffc1912f863ae", "score": "0.5252303", "text": "public function getSelectedShipping($field=FALSE)\n\t{\n\t\t$shipping = $this->session->userdata('shipping_selected');\t\n\t\t\n\t\tif($field && isset($shipping[$field])) return $shipping[$field];\n\t\telse return $shipping;\n\t}", "title": "" }, { "docid": "d4287b96750e141b5d1fbcd3ebd11c85", "score": "0.52461714", "text": "public function getPaymentId()\n {\n return $this->_getValue('oepaypal_paymentid');\n }", "title": "" }, { "docid": "daa931b35c33b0d098dc12c17bb7ef4e", "score": "0.52443796", "text": "public function getSelectValue() {\n if( is_array( $this->value ) ) {\n for( $i = 0; $i < count( $this->value ); $i++ ) {\n $arr[] = $this->options[$this->value[$i]];\n\n }\n return serialize( $arr );\n }\n }", "title": "" }, { "docid": "b092b3309a8c127f3d448adc3eecbdbd", "score": "0.5241276", "text": "public function getPayerEmail()\n {\n return $this->payer_email;\n }", "title": "" }, { "docid": "9e8a3d6a876eb4d72117275647a2ad1c", "score": "0.5236145", "text": "public function getStatusPayment()\r\n {\r\n return $this->statusPayment;\r\n }", "title": "" }, { "docid": "12ae7a4c22972f91e3cdd0cccab03a93", "score": "0.52327853", "text": "public function getPayer_email()\n {\n return $this->payer_email;\n }", "title": "" }, { "docid": "1033e8def68b3f1e2451ab7f34f89289", "score": "0.5213856", "text": "protected function readjsOnChangeSelected()\n { return $this->_jsonchangeselected; }", "title": "" }, { "docid": "99c8734995a89d60fcf70ff5c46244eb", "score": "0.5203218", "text": "public function getPayment()\n {\n return $this->getData('payment');\n }", "title": "" }, { "docid": "478d2094ce91ef575e28eb8f86d04af3", "score": "0.5197469", "text": "public function getCheckedValue()\n {\n return $this->checkedValue;\n }", "title": "" }, { "docid": "07967e9b35588270b3b2ecc3d1a7d65b", "score": "0.5192799", "text": "function creditCardSelected($cc){\n\t\tif (isset($this->Form->params['data']['Payment']['card']['name'])) {\n\t\t\tif($this->Form->params['data']['Payment']['card']['name'] == $cc) {\n\t\t\t\treturn 'checked=\\'checked\\'';\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "8e56d117d680ac907a6e5853bc12903e", "score": "0.5162962", "text": "public static function get_selected_app()\n\t{\n\t\t$serialized_selected_app = self::get_setting('nr_selected_app');\n\t\tif ($serialized_selected_app != NULL && $serialized_selected_app != '')\n\t\t{\n\t\t\treturn unserialize($serialized_selected_app);\n\t\t}\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "8916b66a7b30b984818550127cf27b45", "score": "0.51601505", "text": "public function getPaymentResult()\n\t{\n\t\treturn $this->validator ? $this->validator->getPaymentResult() : null;\n\t}", "title": "" }, { "docid": "d086027c97aa5bd9799786ff9467c003", "score": "0.512388", "text": "private function getSelectedValue(Crawler $crawler)\n {\n $field = $this->field($crawler);\n\n return $field->elementName() == 'select'\n ? $this->getSelectedValueFromSelect($field)\n : [$this->getCheckedValueFromRadioGroup($field)];\n }", "title": "" }, { "docid": "121262e0e1378eba255380a1a18af9d3", "score": "0.51213735", "text": "public function getPickup()\n {\n return $this->pickup;\n }", "title": "" }, { "docid": "121262e0e1378eba255380a1a18af9d3", "score": "0.51213735", "text": "public function getPickup()\n {\n return $this->pickup;\n }", "title": "" }, { "docid": "4b7511e25a98eaf3c6391a1f8cf66b4c", "score": "0.5114167", "text": "function mc_option_selected( $field, $value, $type = 'checkbox' ) {\n\tswitch ( $type ) {\n\t\tcase 'radio':\n\t\tcase 'checkbox':\n\t\t\t$result = ' checked=\"checked\"';\n\t\t\tbreak;\n\t\tcase 'option':\n\t\t\t$result = ' selected=\"selected\"';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result = '';\n\t\t\tbreak;\n\t}\n\tif ( $field == $value ) {\n\t\t$output = $result;\n\t} else {\n\t\t$output = '';\n\t}\n\n\treturn $output;\n}", "title": "" }, { "docid": "e7a0da300c2f02e79f07b4313e6b0dc1", "score": "0.51140314", "text": "function GetSessionDropDownValue(&$fld) {\n\t\t$parm = substr($fld->FldVar, 2);\n\t\t$this->GetSessionValue($fld->DropDownValue, 'sv_dealers_reports_' . $parm);\n\t}", "title": "" }, { "docid": "7447eb547e2dfee322cf589e0a7e13e3", "score": "0.5112511", "text": "public function getSelectedField()\n {\n $selected = 'error';\n if (!isset($_POST['moduleId']) || !isset($_POST['fieldName'])) {\n echo $selected;\n die();\n }\n\n $moduleId = $_POST['moduleId'];\n $fieldName = $_POST['fieldName'];\n preg_match('/\\[row-(\\d+)\\]/', $fieldName, $match);\n if (!empty($match[1])) {\n $key = 'form_fields_' . $match[1] . '_conditonal_field';\n $selected = get_post_meta($moduleId, $key, true);\n }\n\n echo $selected;\n die();\n }", "title": "" }, { "docid": "4e6af651f191d2244d0016fce63a3bf3", "score": "0.51094663", "text": "function get_select_value($type, $selected_key) {\n list($table, $key, $descriptor) = get_select_def($type);\n return db_getOne(\"SELECT $descriptor FROM $table WHERE $key='$selected_key'\");\n}", "title": "" }, { "docid": "f3d94f8c9df75706e49e8cf7a0975316", "score": "0.51094574", "text": "public function get() {\n\t\treturn $this->user_options->get( self::OPTION );\n\t}", "title": "" }, { "docid": "855795adb9b7c04c115e9d0a8deb0c24", "score": "0.51055807", "text": "function seleccionado()\n\t{\n\t\treturn $this->tiene_estado();\n\t}", "title": "" }, { "docid": "180ba52aef29292eed34522042379b14", "score": "0.5103817", "text": "public function getPaymentName()\n {\n return $this->paymentName;\n }", "title": "" }, { "docid": "9d5695286ef715609405056cfa9dc695", "score": "0.5094269", "text": "function selected($field, $value = null) {\n if ( is_string($field) ) {\n if ( $this->setting($field) == $value ) {\n echo 'selected=\"selected\"';\n }\n } else if ( (bool) $field ) {\n echo 'selected=\"selected\"';\n }\n }", "title": "" }, { "docid": "9d5695286ef715609405056cfa9dc695", "score": "0.5094269", "text": "function selected($field, $value = null) {\n if ( is_string($field) ) {\n if ( $this->setting($field) == $value ) {\n echo 'selected=\"selected\"';\n }\n } else if ( (bool) $field ) {\n echo 'selected=\"selected\"';\n }\n }", "title": "" }, { "docid": "955c63153aceecae586c1f0fe324577a", "score": "0.5082882", "text": "function selected($field, $answer) {\n if(h($field) === $answer) {\n return \" selected=\\\"selected\\\"\";\n }\n }", "title": "" }, { "docid": "aa644fcc9e64c9091e9fcfccc98e36b3", "score": "0.5072354", "text": "public function getSellerApproval() {\n return $this->scopeConfig->getValue ( static::XML_SELLER_APPROVAL, ScopeInterface::SCOPE_STORE );\n }", "title": "" }, { "docid": "e6f6d53ea9623f081631cc105bff3e73", "score": "0.5070889", "text": "protected function getValue() {\n\t\treturn $this->getField()->getValue();\n\t}", "title": "" }, { "docid": "aa9f80bd1fd8b51ca03d262582111ae6", "score": "0.5059008", "text": "public function getSubmittedValue() {\n return isset($_REQUEST[$this->name]) ? $_REQUEST[$this->name] : FALSE;\n }", "title": "" }, { "docid": "4e12162cce27859cb1ca805fa544ad7b", "score": "0.5058036", "text": "public function getSelectedState()\r\n {\r\n if (!empty($this->View()->sUserData['additional']['stateShipping'])) {\r\n $this->session['sState'] = (int) $this->View()->sUserData['additional']['stateShipping']['id'];\r\n return $this->View()->sUserData['additional']['stateShipping'];\r\n }\r\n return array(\"id\" => $this->session['sState']);\r\n }", "title": "" }, { "docid": "01ffa4d93ecb255f4947190e155ed205", "score": "0.505466", "text": "public function getSubmittedValue();", "title": "" }, { "docid": "2e143fdffc0705d272c17559999453c9", "score": "0.5054275", "text": "public function getVariantSelection();", "title": "" }, { "docid": "45b5b85a89b56c78cbc3f2773a72b245", "score": "0.5052831", "text": "public function getValue ()\n {\n return parent::getValue();\n }", "title": "" }, { "docid": "80a84b899d22e0d28c2c4bea534848ac", "score": "0.5047186", "text": "function getPostOrArraySelected($columns, $key, $valueToCheck) {\n $value = $_POST[$key];\n if (!isset($value)) {\n $value = $columns[$key];\n }\n return $value == $valueToCheck ? \"selected\" : \"\";\n }", "title": "" }, { "docid": "bf7cee8e09c16e64f6847c346b75b77d", "score": "0.50365764", "text": "public function getNom_payeur_cb()\n {\n return $this->nom_payeur_cb;\n }", "title": "" }, { "docid": "ad79e68d758efd88ace60d3bf3e63223", "score": "0.5035586", "text": "public function hasToBeSelected($saved_value = null, $old_value = null)\n {\n if($old_value && ($old_value == $this->id)){\n return \"selected\";\n } elseif ( !$old_value && ($saved_value == $this->id)) {\n return \"selected\";\n }else{\n return NULL;\n }\n }", "title": "" }, { "docid": "2ef7b41116d03a87ed5fffe026615147", "score": "0.50346065", "text": "public function getPayee_preferred()\n {\n return $this->payee_preferred;\n }", "title": "" }, { "docid": "5ca0fe5277cba8dec8146e4a5fc36e43", "score": "0.5032274", "text": "public function getPaymentState(): string\n {\n return $this->paymentState;\n }", "title": "" }, { "docid": "b82cc27ac5d21cf085b1a233657bdfcc", "score": "0.50296795", "text": "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "b82cc27ac5d21cf085b1a233657bdfcc", "score": "0.50296795", "text": "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "2d0ebde01b12438f60e2ee64cfc10589", "score": "0.50283915", "text": "public function get_saved_value() {\n\t\treturn $this->saved_value;\n\t}", "title": "" }, { "docid": "bf041eeab7ddd6ddd1fbd90584f5c43b", "score": "0.5027416", "text": "public function getValue()\n {\n return !empty($this->getTagProperty('checked'));\n }", "title": "" }, { "docid": "a5e21c91144c6239b7eafc17343d34d0", "score": "0.50251466", "text": "function getValue() {\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "57e9cc74874ee5f9e810c1838c33c2b6", "score": "0.50232583", "text": "public function get_value() {\n\t\treturn papi_is_empty( $this->value ) ? $this->default : $this->value;\n\t}", "title": "" }, { "docid": "c88e5b5fc4ab6b59ed13b9139adfe590", "score": "0.50223625", "text": "public function getSelectedServicePointId()\n {\n return $this->SelectedServicePointID;\n }", "title": "" }, { "docid": "2f4f40c5362505ffeabf33423ef025a7", "score": "0.5020831", "text": "public function get_value()\n {\n }", "title": "" }, { "docid": "2f4f40c5362505ffeabf33423ef025a7", "score": "0.5020831", "text": "public function get_value()\n {\n }", "title": "" }, { "docid": "2bc71c22e1a25586ab7b8e17aafcd758", "score": "0.5013947", "text": "public function get_submit_value()\n\t{\n\t\treturn $this->submit_value;\n\t}", "title": "" }, { "docid": "1d54fcb83ecc6c8c192cc62bbb98bbda", "score": "0.50119054", "text": "public function getEntryValue_selectedOption($field, $item, array $config) {\r\n\t\t$selectedOption = '';\r\n\t\t$options = array();\r\n\t\tif ($this->pi_base->piVars['valid']) {\r\n\t\t\tif ($config['maxitems'] >1)\r\n\t\t\t\t$options = array_keys($this->pi_base->piVars[$field]);\r\n\t\t\telse\r\n\t\t\t\t$options = array($this->pi_base->piVars[$field]);\r\n\t\t}\r\n\t\telse {\t// $this->pi_base->piVars['cancel'] or any submit\r\n\t\t\tif ($config['MM']) {\r\n\t\t\t\t$loadDBGroup = t3lib_div::makeInstance('FE_loadDBGroup');\r\n\t\t\t\t$loadDBGroup->start('', $config['foreign_table'], $config['MM'], $this->row['uid'], $this->table, $config);\r\n\t\t\t\tforeach($loadDBGroup->itemArray as $item) {\r\n\t\t\t\t\t$options[] = $item['id'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telseif ($config['maxitems'] >1) {\r\n\t\t\t\t$options = t3lib_div::trimExplode(',', $this->row[$field]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$options = array($this->row[$field]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (in_array($item, $options))\r\n\t\t\t$selectedOption = 'selected=\"selected\"';\r\n\t\treturn $selectedOption;\r\n\t}", "title": "" }, { "docid": "03624d144edb0eb496ba0d8940ca02c3", "score": "0.5011436", "text": "public function getSubmitValue() {\n return $this->getAttr('value');\n }", "title": "" }, { "docid": "eca50010949301c3e6c92478af404afb", "score": "0.50112396", "text": "private function getPaymentId()\n {\n return Session::get('mall.payment.id');\n }", "title": "" } ]
cbda7f50fd2205643c6e0ce3a16e5644
Returns a new EventocontrareciboQuery object.
[ { "docid": "2549f7f7838adf45e918e5ff2e02ec05", "score": "0.6213115", "text": "public static function create($modelAlias = null, $criteria = null)\n {\n if ($criteria instanceof EventocontrareciboQuery) {\n return $criteria;\n }\n $query = new EventocontrareciboQuery(null, null, $modelAlias);\n\n if ($criteria instanceof Criteria) {\n $query->mergeWith($criteria);\n }\n\n return $query;\n }", "title": "" } ]
[ { "docid": "d396fa5e6e2f18f62afdd986f0d8dff8", "score": "0.5837009", "text": "public function obterReservasEventosCanceladosInfra() {\n \n $data = date(\"Y-m-d\");\n \n $sql = \"\n SELECT \n *,\n p.nome AS pessoaNome,\n re.nome AS nome\n FROM \n reservas_eventos re\n INNER JOIN\n salas s\n ON\n re.idSala = s.idSala\n INNER JOIN\n pessoas p\n ON\n re.idCoordenador = p.idPessoa\n WHERE\n re.status = 1\n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }", "title": "" }, { "docid": "d5bd85ef61ff30a8bf25a2b7db099330", "score": "0.5725368", "text": "public function obterMinhasReservasEventosCanceladas() {\n \n $idPessoa = $this->session->userdata('idPessoa'); \n \n $sql = \"\n SELECT \n *\n FROM \n reservas_eventos re\n INNER JOIN\n salas s\n ON\n re.idSala = s.idSala \n WHERE\n idCoordenador = $idPessoa and\n re.status = 1\n \";\n $query = $this->query->setQuery($sql);\n\n return $query;\n }", "title": "" }, { "docid": "3918cdf92a3d7d8797bff28c7d679dcf", "score": "0.5715074", "text": "public function getContratosoro() {\n $consulta = oro::join('detalle_oro', 'detalle_oro.codigo', '=', 'oro.codigo' )\n ->select ('oro.*', 'detalle_oro.*')\n ->get();\n \n return $consulta;\n }", "title": "" }, { "docid": "5005a646362f5056e19b3f0cf98a9053", "score": "0.562591", "text": "public function prune($eventocontrarecibo = null)\n {\n if ($eventocontrarecibo) {\n $this->addUsingAlias(EventocontrareciboPeer::IDEVENTOCONTRARECIBO, $eventocontrarecibo->getIdeventocontrarecibo(), Criteria::NOT_EQUAL);\n }\n\n return $this;\n }", "title": "" }, { "docid": "d67ae7115d1c33ac088215ffc109187e", "score": "0.5554028", "text": "public function filterByEventocontrareciboEvento($eventocontrareciboEvento = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($eventocontrareciboEvento)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $eventocontrareciboEvento)) {\n $eventocontrareciboEvento = str_replace('*', '%', $eventocontrareciboEvento);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(EventocontrareciboPeer::EVENTOCONTRARECIBO_EVENTO, $eventocontrareciboEvento, $comparison);\n }", "title": "" }, { "docid": "ecf46e0058f5cbef1985a3f7e953c5ef", "score": "0.5462702", "text": "public function newQuery()\n {\n return new static($this->connection, $this->grammar, $this->processor, $this->baseEntity);\n }", "title": "" }, { "docid": "f08076555efdc8fc16ea79eb989d6e9a", "score": "0.54491156", "text": "public function newQueryBuilder()\n {\n return new EventStoreQuery($this->adapter,$this);\n }", "title": "" }, { "docid": "a829f8e557231f4493da91884426cfb2", "score": "0.54213023", "text": "public function queryAttente() {\n $query = $this->_query();\n\n $query['conditions'] += [\n 'Fiche.user_id' => $this->Session->read('Auth.User.id'),\n 'EtatFiche.etat_id' => EtatFiche::ENCOURS_VALIDATION\n ];\n\n return $query; \n }", "title": "" }, { "docid": "395b7e82542ee0c01f60d1a9b7c23028", "score": "0.5359932", "text": "public function createQuery() {\n return new Query();\n }", "title": "" }, { "docid": "d95f2697203bf2239bf60d678f3b8760", "score": "0.53051555", "text": "public function getEventos()\n {\n $evento = new \\Evento\\Modelo\\Evento();\n $evento = $evento->listarTodosDiscipulo($this->id);\n\n return $evento\t;\n\n }", "title": "" }, { "docid": "8649a3cf2ba02c59fe2b92704ece9a81", "score": "0.53037125", "text": "public function EventoComisaria()\n\t{\n\n$query =\"\nselect * from crosstab(\n 'SELECT ce.nombre_entidad::text, e.id_tipo_evento, count(*)::integer as conteo FROM sipol.tbl_evento e, catalogos_publicos.tbl_sede ts, catalogos_publicos.cat_entidad ce\nwhere ts.id_sede = e.id_sede\nand ce.id_cat_entidad = ts.id_cat_entidad\nand estado = ''t''\nand e.fecha_ingreso between (now())::date-90 and now()\ngroup by ce.nombre_entidad, e.id_tipo_evento \norder by 1',\n 'select id_tipo_evento from sipol_catalogos.cat_tipo_evento where id_tipo_evento in(1,2,3)'\n) as (\n entidad text,\n \". \"\\\"Denuncia\\\"\" . \"integer,\n \". \"\\\"Incidencia\\\"\" . \"integer,\n \". \"\\\"Extravio\\\"\" . \"integer\n);\n\n\";\n\n$resultado = yii::app()->db->createCommand($query)->queryAll();\nreturn $resultado;\n\n\t}", "title": "" }, { "docid": "f64e57c3406c4932a1cffc20c9eaccfb", "score": "0.52548987", "text": "public static function buscarEventoContabilPeloDesdobramento($iTipoDocumento, $iCodigoElemento) {\n\n $oDocumentoContabil = SingletonRegraDocumentoContabil::getDocumento($iTipoDocumento);\n $oDocumentoContabil->setValorVariavel(\"[desdobramento]\", $iCodigoElemento);\n $iCodigoDocumentoExecutar = $oDocumentoContabil->getCodigoDocumento();\n return new EventoContabil($iCodigoDocumentoExecutar, db_getsession(\"DB_anousu\"));\n }", "title": "" }, { "docid": "5d96b4f8e050a7011515328508d34026", "score": "0.5244859", "text": "static public function Create(): Query{\n\t\treturn new self();\n\t}", "title": "" }, { "docid": "2fef1e66af7f89d3604433fd8d52164e", "score": "0.5221482", "text": "public function getCaixaAberto() {\n return self::find()\n ->andWhere(['not', ['dataabertura' => null]])\n ->andWhere( ['datafechamento' => null])\n ->one();\n }", "title": "" }, { "docid": "aad25034f5422ba86422e14be6bc00e9", "score": "0.5210289", "text": "public function filterByIdeventocontrarecibo($ideventocontrarecibo = null, $comparison = null)\n {\n if (is_array($ideventocontrarecibo)) {\n $useMinMax = false;\n if (isset($ideventocontrarecibo['min'])) {\n $this->addUsingAlias(EventocontrareciboPeer::IDEVENTOCONTRARECIBO, $ideventocontrarecibo['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($ideventocontrarecibo['max'])) {\n $this->addUsingAlias(EventocontrareciboPeer::IDEVENTOCONTRARECIBO, $ideventocontrarecibo['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EventocontrareciboPeer::IDEVENTOCONTRARECIBO, $ideventocontrarecibo, $comparison);\n }", "title": "" }, { "docid": "8b68080853300fd7d06d1b9002a49aa9", "score": "0.5201188", "text": "public static function getBoletosCobranca()\n {\n return TodosBoletos::selectRaw('CdRcd,Cedente,CNPJCPF_Cedente,CNPJCPF_Sacado,Sacado,Endereco,\n NrPesEdr as numero, Bairro, NrPesCep as cep, Cidade, UF, ValorPrincipal as Valor, NrFfm as nosso_numero,\n NrBco, Carteira,AgCodCed as agencia_conta, DtRctVen as vencimento, NFSE, \n EspecieDoc as especie, Aceite, DataEHoraDoProcessamento as processamento,\n DtRcdEmi as emissao, LinhaDigitavel as codigo_barras,ClienteId,Email,Email2,\n convert(varchar, DtRctVenPro ,103) as data_vencimento_prorrogado,NmBco,TipoDeDocumento')\n ->whereRaw(\n 'cast(DtRctVen as DATE) = cast(DATEADD(dd,\n - 3,GETDATE()) as Date)\n AND NrFfm IS NOT NULL\n '\n )->get();\n }", "title": "" }, { "docid": "f4b1f79171523ab76baca8ee139bdd39", "score": "0.5192182", "text": "public function obterReservasEventosPassadosInfra() {\n \n $data = date(\"Y-m-d\");\n \n $sql = \"\n SELECT \n *,\n p.nome AS pessoaNome,\n re.nome AS nome\n FROM \n reservas_eventos re\n INNER JOIN\n salas s\n ON\n re.idSala = s.idSala\n INNER JOIN\n pessoas p\n ON\n re.idCoordenador = p.idPessoa\n WHERE\n re.status = 0 and\n re.data <= '$data'\n \";\n $query = $this->query->setQuery($sql);\n\n return $query;\n }", "title": "" }, { "docid": "0f9c55dff7cd72cabef6255e57aa6b2d", "score": "0.5187485", "text": "public function obterReservasEventosAtivosInfra() {\n \n $data = date(\"Y-m-d\");\n \n $sql = \"\n SELECT \n *,\n p.nome AS pessoaNome,\n re.nome AS nome\n FROM \n reservas_eventos re\n INNER JOIN\n salas s\n ON\n re.idSala = s.idSala\n INNER JOIN\n pessoas p\n ON\n re.idCoordenador = p.idPessoa \n WHERE\n re.status = 0 and\n re.data >= '$data'\n \";\n $query = $this->query->setQuery($sql);\n\n return $query;\n }", "title": "" }, { "docid": "e0b4af0e778516057537ab88aee009ec", "score": "0.5184492", "text": "public function getQuery()\n {\n $table = Doctrine::getTable($this->model);\n $method = 'getCalendarableQuery';\n $query = method_exists($table, $method) ? $table->$method() : $table->createQuery();\n $rootAlias = $query->getRootAlias();\n\n foreach($this->constraints as $field => $value)\n {\n $query->addWhere($rootAlias . '.' . $field . ' = ?', $value);\n }\n return $query;\n }", "title": "" }, { "docid": "fcd03bcdf37e60809a9ebaf843b4b3f0", "score": "0.5180517", "text": "public function newQuery()\n {\n return new Query($this);\n }", "title": "" }, { "docid": "a0ba88b69a0e0a24078c3b1d1da24984", "score": "0.5177263", "text": "public function newQuery()\n\t{\n\t\t$query = parent::newQuery();\n\n\t\t$query->where('modulo_id', '=', 52)->where('grupo', '=', 0);\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "fbf31fefc0f5347f5bf0c24f3a3f6fd8", "score": "0.51730794", "text": "public function filterByEventocontrareciboFecha($eventocontrareciboFecha = null, $comparison = null)\n {\n if (is_array($eventocontrareciboFecha)) {\n $useMinMax = false;\n if (isset($eventocontrareciboFecha['min'])) {\n $this->addUsingAlias(EventocontrareciboPeer::EVENTOCONTRARECIBO_FECHA, $eventocontrareciboFecha['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($eventocontrareciboFecha['max'])) {\n $this->addUsingAlias(EventocontrareciboPeer::EVENTOCONTRARECIBO_FECHA, $eventocontrareciboFecha['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(EventocontrareciboPeer::EVENTOCONTRARECIBO_FECHA, $eventocontrareciboFecha, $comparison);\n }", "title": "" }, { "docid": "ddc7cf4793b499b5fca0525bd48e1356", "score": "0.5154849", "text": "public function obterMinhasReservasEventos() {\n \n $idPessoa = $this->session->userdata('idPessoa'); \n \n $data = date(\"Y-m-d\");\n \n $sql = \"\n SELECT \n *\n FROM \n reservas_eventos re\n INNER JOIN\n salas s\n ON\n re.idSala = s.idSala \n WHERE\n idCoordenador = $idPessoa and\n re.status = 0 and\n re.data >= '$data'\n \";\n $query = $this->query->setQuery($sql);\n\n return $query;\n }", "title": "" }, { "docid": "c015eeee0704afe8773553f319a5ffd9", "score": "0.51165", "text": "public function __construct($evento)\n {\n $this->evento = $evento;\n }", "title": "" }, { "docid": "ebcf7c10e7dd885b7056c6dfbdaeeeaa", "score": "0.50999784", "text": "public function obterReservaEventosPassadas() {\n \n $idPessoa = $this->session->userdata('idPessoa'); \n \n $data = date(\"Y-m-d\");\n \n $sql = \"\n SELECT \n *\n FROM \n reservas_eventos re\n INNER JOIN\n salas s\n ON\n re.idSala = s.idSala \n WHERE\n idCoordenador = $idPessoa and\n re.data <= '$data'\n \";\n $query = $this->query->setQuery($sql);\n\n return $query;\n }", "title": "" }, { "docid": "d3e6ca7c3871716e9918508b3b01a2c9", "score": "0.50986767", "text": "public function newQueryBuilder()\n {\n return new VoucherQuery($this->adapter,$this);\n }", "title": "" }, { "docid": "c8ddf35131580305c442359ff5d21efc", "score": "0.5081558", "text": "function construyeCadenaBusqueda() {\n\t\t$res =\"\";\n\t\tif ($this->id!=\"\") {\n\t\t\tif ($res!=\"\") $res.=\" AND \";\n\t\t\t$res.=\"id=\". $this->id;\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "bd4c31e6153bc17f86af4daf902c43d9", "score": "0.50777024", "text": "protected function _buildQuery() {\n\t\treturn new Query($this->connection(), $this);\n\t}", "title": "" }, { "docid": "81748f2a8e02615682ed1eaa28891278", "score": "0.50705945", "text": "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(AlpzaMiembroAsociadosPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ID_ALPZA_MIEMBRO_ASOCIADOS)) $criteria->add(AlpzaMiembroAsociadosPeer::ID_ALPZA_MIEMBRO_ASOCIADOS, $this->id_alpza_miembro_asociados);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ALPZA_MIEMBRO_ID_ALPZA_MIEMBRO)) $criteria->add(AlpzaMiembroAsociadosPeer::ALPZA_MIEMBRO_ID_ALPZA_MIEMBRO, $this->alpza_miembro_id_alpza_miembro);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::NOMBRE_FORMAL)) $criteria->add(AlpzaMiembroAsociadosPeer::NOMBRE_FORMAL, $this->nombre_formal);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::SIGLA)) $criteria->add(AlpzaMiembroAsociadosPeer::SIGLA, $this->sigla);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::TIPO_INSTITUCION)) $criteria->add(AlpzaMiembroAsociadosPeer::TIPO_INSTITUCION, $this->tipo_institucion);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::NUMERO_IDENTIFICACION)) $criteria->add(AlpzaMiembroAsociadosPeer::NUMERO_IDENTIFICACION, $this->numero_identificacion);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ANO_FUNDACION)) $criteria->add(AlpzaMiembroAsociadosPeer::ANO_FUNDACION, $this->ano_fundacion);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ANO_INGRESO_ALPZA)) $criteria->add(AlpzaMiembroAsociadosPeer::ANO_INGRESO_ALPZA, $this->ano_ingreso_alpza);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DIRECTOR_NOMBRE)) $criteria->add(AlpzaMiembroAsociadosPeer::DIRECTOR_NOMBRE, $this->director_nombre);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DIRECTOR_EMAIL)) $criteria->add(AlpzaMiembroAsociadosPeer::DIRECTOR_EMAIL, $this->director_email);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DELEGADO_NOMBRE)) $criteria->add(AlpzaMiembroAsociadosPeer::DELEGADO_NOMBRE, $this->delegado_nombre);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DELEGADO_APELLIDO)) $criteria->add(AlpzaMiembroAsociadosPeer::DELEGADO_APELLIDO, $this->delegado_apellido);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DELEGADO_CARGO)) $criteria->add(AlpzaMiembroAsociadosPeer::DELEGADO_CARGO, $this->delegado_cargo);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DELEGADO_PROFESION)) $criteria->add(AlpzaMiembroAsociadosPeer::DELEGADO_PROFESION, $this->delegado_profesion);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DELEGADO_EMAIL)) $criteria->add(AlpzaMiembroAsociadosPeer::DELEGADO_EMAIL, $this->delegado_email);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::LOGO)) $criteria->add(AlpzaMiembroAsociadosPeer::LOGO, $this->logo);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DIRECCION)) $criteria->add(AlpzaMiembroAsociadosPeer::DIRECCION, $this->direccion);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::CODIGO_POSTAL)) $criteria->add(AlpzaMiembroAsociadosPeer::CODIGO_POSTAL, $this->codigo_postal);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PAIS)) $criteria->add(AlpzaMiembroAsociadosPeer::PAIS, $this->pais);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::TELEFONO_COD_CIUDAD)) $criteria->add(AlpzaMiembroAsociadosPeer::TELEFONO_COD_CIUDAD, $this->telefono_cod_ciudad);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::TELEFONO_COD_PAIS)) $criteria->add(AlpzaMiembroAsociadosPeer::TELEFONO_COD_PAIS, $this->telefono_cod_pais);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::TELEFONO)) $criteria->add(AlpzaMiembroAsociadosPeer::TELEFONO, $this->telefono);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::CELULAR)) $criteria->add(AlpzaMiembroAsociadosPeer::CELULAR, $this->celular);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::EMAIL)) $criteria->add(AlpzaMiembroAsociadosPeer::EMAIL, $this->email);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::FAX)) $criteria->add(AlpzaMiembroAsociadosPeer::FAX, $this->fax);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::SITIO_WEB)) $criteria->add(AlpzaMiembroAsociadosPeer::SITIO_WEB, $this->sitio_web);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DESCRIPCION)) $criteria->add(AlpzaMiembroAsociadosPeer::DESCRIPCION, $this->descripcion);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MISION)) $criteria->add(AlpzaMiembroAsociadosPeer::MISION, $this->mision);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::VISION)) $criteria->add(AlpzaMiembroAsociadosPeer::VISION, $this->vision);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::OBJETIVOS)) $criteria->add(AlpzaMiembroAsociadosPeer::OBJETIVOS, $this->objetivos);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ACREDITACION_AZA)) $criteria->add(AlpzaMiembroAsociadosPeer::ACREDITACION_AZA, $this->acreditacion_aza);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ACREDITACION_ISO14001)) $criteria->add(AlpzaMiembroAsociadosPeer::ACREDITACION_ISO14001, $this->acreditacion_iso14001);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ACREDITACION_ISO9001)) $criteria->add(AlpzaMiembroAsociadosPeer::ACREDITACION_ISO9001, $this->acreditacion_iso9001);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ACREDITACION_OTRA)) $criteria->add(AlpzaMiembroAsociadosPeer::ACREDITACION_OTRA, $this->acreditacion_otra);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_WAZA)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_WAZA, $this->asociacion_waza);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_AZA)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_AZA, $this->asociacion_aza);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_EAZA)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_EAZA, $this->asociacion_eaza);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_IZE)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_IZE, $this->asociacion_ize);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_AMACZOA)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_AMACZOA, $this->asociacion_amaczoa);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_ISIS)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_ISIS, $this->asociacion_isis);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_OTRA)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_OTRA, $this->asociacion_otra);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_ANILLO)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_ANILLO, $this->marca_anillo);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_BANDA)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_BANDA, $this->marca_banda);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_CALIENTE)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_CALIENTE, $this->marca_caliente);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_FRIA)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_FRIA, $this->marca_fria);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_MICROCHIP)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_MICROCHIP, $this->marca_microchip);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_NATURA)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_NATURA, $this->marca_natura);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_PIQUETE)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_PIQUETE, $this->marca_piquete);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_RAYA)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_RAYA, $this->marca_raya);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_TATUAJE)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_TATUAJE, $this->marca_tatuaje);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::MARCA_OTRA)) $criteria->add(AlpzaMiembroAsociadosPeer::MARCA_OTRA, $this->marca_otra);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::VISITAS_ANUALES)) $criteria->add(AlpzaMiembroAsociadosPeer::VISITAS_ANUALES, $this->visitas_anuales);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PROPIETARIO)) $criteria->add(AlpzaMiembroAsociadosPeer::PROPIETARIO, $this->propietario);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ADMINISTRADOR)) $criteria->add(AlpzaMiembroAsociadosPeer::ADMINISTRADOR, $this->administrador);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::LUCRO)) $criteria->add(AlpzaMiembroAsociadosPeer::LUCRO, $this->lucro);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::OFRECE_ASESORIA)) $criteria->add(AlpzaMiembroAsociadosPeer::OFRECE_ASESORIA, $this->ofrece_asesoria);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PERSONAL_PERMANENTE)) $criteria->add(AlpzaMiembroAsociadosPeer::PERSONAL_PERMANENTE, $this->personal_permanente);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PERSONAL_TEMPORAL)) $criteria->add(AlpzaMiembroAsociadosPeer::PERSONAL_TEMPORAL, $this->personal_temporal);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::HORARIO_ATENCION)) $criteria->add(AlpzaMiembroAsociadosPeer::HORARIO_ATENCION, $this->horario_atencion);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::OBJETIVO)) $criteria->add(AlpzaMiembroAsociadosPeer::OBJETIVO, $this->objetivo);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::SENALIZACION_PORCENTAJE)) $criteria->add(AlpzaMiembroAsociadosPeer::SENALIZACION_PORCENTAJE, $this->senalizacion_porcentaje);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ZOOLOGICO_CONTACTO)) $criteria->add(AlpzaMiembroAsociadosPeer::ZOOLOGICO_CONTACTO, $this->zoologico_contacto);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::BOLETIN)) $criteria->add(AlpzaMiembroAsociadosPeer::BOLETIN, $this->boletin);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PROGRAMA_ENRIQUECIMIENTO)) $criteria->add(AlpzaMiembroAsociadosPeer::PROGRAMA_ENRIQUECIMIENTO, $this->programa_enriquecimiento);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PROGRAMA_ENTRENAMIENTO)) $criteria->add(AlpzaMiembroAsociadosPeer::PROGRAMA_ENTRENAMIENTO, $this->programa_entrenamiento);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PROGRAMA_MANEJO_AMBIENTAL)) $criteria->add(AlpzaMiembroAsociadosPeer::PROGRAMA_MANEJO_AMBIENTAL, $this->programa_manejo_ambiental);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PROGRAMA_MEDICINA_PREVENTIVA)) $criteria->add(AlpzaMiembroAsociadosPeer::PROGRAMA_MEDICINA_PREVENTIVA, $this->programa_medicina_preventiva);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::CONSULTA_EXTERNA_VETERINARIA)) $criteria->add(AlpzaMiembroAsociadosPeer::CONSULTA_EXTERNA_VETERINARIA, $this->consulta_externa_veterinaria);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::SHOW)) $criteria->add(AlpzaMiembroAsociadosPeer::SHOW, $this->show);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::DOCUMENTO_ESTRATEGICO)) $criteria->add(AlpzaMiembroAsociadosPeer::DOCUMENTO_ESTRATEGICO, $this->documento_estrategico);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PROYECTO_CONSERVACION_EXSITU)) $criteria->add(AlpzaMiembroAsociadosPeer::PROYECTO_CONSERVACION_EXSITU, $this->proyecto_conservacion_exsitu);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::PROYECTO_CONSERVACION_INSITU)) $criteria->add(AlpzaMiembroAsociadosPeer::PROYECTO_CONSERVACION_INSITU, $this->proyecto_conservacion_insitu);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_LISTA_ASOCIACIONES)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_LISTA_ASOCIACIONES, $this->asociacion_lista_asociaciones);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_LISTA_INSTITUCIONES)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_LISTA_INSTITUCIONES, $this->asociacion_lista_instituciones);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_APOYO_DESDE_ALPZA)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_APOYO_DESDE_ALPZA, $this->asociacion_apoyo_desde_alpza);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_APOYO_HACIA_ALPZA)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_APOYO_HACIA_ALPZA, $this->asociacion_apoyo_hacia_alpza);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_ESTATUTOS)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_ESTATUTOS, $this->asociacion_estatutos);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_ORGANIGRAMA)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_ORGANIGRAMA, $this->asociacion_organigrama);\n\t\tif ($this->isColumnModified(AlpzaMiembroAsociadosPeer::ASOCIACION_PANORAMA_PAIS)) $criteria->add(AlpzaMiembroAsociadosPeer::ASOCIACION_PANORAMA_PAIS, $this->asociacion_panorama_pais);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "4f8a7d0585a3e6b242dd194e1426a65f", "score": "0.5034716", "text": "public function __construct()\n {\n parent::__construct();\n $this->query = new Query();\n }", "title": "" }, { "docid": "18df484f13bd0f2126996b6601a1c221", "score": "0.50258374", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('idTransaccion',$this->idTransaccion);\n\t\t$criteria->compare('Monto',$this->Monto);\n\t\t$criteria->compare('Fecha',$this->Fecha,true);\n\t\t$criteria->compare('Aprobado',$this->Aprobado);\n\t\t$criteria->compare('Descripcion',$this->Descripcion,true);\n\t\t$criteria->compare('Ingreso',$this->Ingreso);\n\t\t$criteria->compare('TDC_NumeroTDC',$this->TDC_NumeroTDC);\n\t\t$criteria->compare('Transferencia_idTransferencia',$this->Transferencia_idTransferencia);\n\t\t$criteria->compare('Efectivo_idEfectivo',$this->Efectivo_idEfectivo);\n\t\t$criteria->compare('Cheque_numeroCheque',$this->Cheque_numeroCheque);\n\t\t$criteria->compare('Fondo_idFondo',$this->Fondo_idFondo);\n\t\t$criteria->compare('PagosProgramados_idPagosProgramados',$this->PagosProgramados_idPagosProgramados);\n\t\t$criteria->compare('Edificio_RIF',$this->Edificio_RIF);\n\t\t$criteria->compare('Propietario_Cedula',$this->Propietario_Cedula);\n\t\t$criteria->compare('Trabajo_idTrabajo',$this->Trabajo_idTrabajo);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "44ca367142731b2eedc1e84d373fdf01", "score": "0.50189555", "text": "public static function query(): static\r\n {\r\n return new static(self::$table);\r\n }", "title": "" }, { "docid": "e735c980af878a8b2929e814f8acc78c", "score": "0.5010497", "text": "public function pesquisarCanceladas($objeto) {\n\n $linhas = \" and 1=1 and \";\n if( $objeto->dataInicial != \"\" and $objeto->dataFinal != \"\" ){\n $linhas .= \"r.data BETWEEN '\" .$this->query->dateEua($objeto->dataInicial).\"'\";\n $linhas .= \" and '\" .$this->query->dateEua($objeto->dataFinal).\"'\";\n $linhas .= \" and \";\n }\n \n if( $objeto->hora != \"\" ){\n $linhas .= \"r.hora = '\".$objeto->hora.\"'\";\n $linhas .= \" and \";\n }\n \n if( $objeto->pesquisa != \"\" ){\n $linhas .= \"r.idTurma like '%\".$objeto->pesquisa.\"%'\";\n $linhas .= \" or \";\n $linhas .= \"r.idSala like '%\".$objeto->pesquisa.\"%'\";\n $linhas .= \" or \";\n $linhas .= \"r.obs like '%\".$objeto->pesquisa.\"%'\";\n $linhas .= \" and \";\n }\n \n $linhas .= \" r.status = 1 \";\n \n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora,\n d.nome AS DisciplinaNome,\n c.nome AS cursoNome,\n r.obs\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n INNER JOIN\n disciplinas d\n ON\n d.idDisciplina = t.idDisciplina\n INNER JOIN\n cursos c\n ON\n c.idCurso = d.idCurso\n WHERE\n r.idPessoa = '$objeto->idPessoa'\n $linhas\n \";\n\n \n\n $query = $this->query->setQuery($sql);\n return $query;\n }", "title": "" }, { "docid": "6d9d56537a896fee78a8bb2ab336b53f", "score": "0.49942917", "text": "public function getOrdenCompraActiveRecord() { \n return new MysqlOrdenCompraActiveRecord();\n }", "title": "" }, { "docid": "3f4d5b18250313b207411c7f0d64dc23", "score": "0.49880794", "text": "function buscaRegistro($query = \"\")\r\n\t{\r\n\t\tif ($query != \"\") {\r\n\t\t\t$this->setSQL_R($query);\r\n\t\t} // END IF\r\n\t\t$retorno = $this->getData($this->pSQL_R);\r\n\t\treturn $retorno;\r\n\t}", "title": "" }, { "docid": "1d5f2a63d7842fddca34b1f278a611c0", "score": "0.4982581", "text": "public function newQuery()\n {\n $builder = parent::newQuery();\n\n if (isset($this->connectionType) and $this->connectionType) {\n $builder->where('p2p_type', $this->connectionType);\n }\n\n return $builder;\n }", "title": "" }, { "docid": "fe31bd22b69374e2fe81acb0ad54bf83", "score": "0.49788898", "text": "public function filterByEventocontrareciboNota($eventocontrareciboNota = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($eventocontrareciboNota)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $eventocontrareciboNota)) {\n $eventocontrareciboNota = str_replace('*', '%', $eventocontrareciboNota);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(EventocontrareciboPeer::EVENTOCONTRARECIBO_NOTA, $eventocontrareciboNota, $comparison);\n }", "title": "" }, { "docid": "ed0ac23ec8f4bb8639162f6b8de5d5aa", "score": "0.49785694", "text": "function listarObservacionesConciliacion(){\n\t\t$this->procedimiento='obingresos.ft_observaciones_conciliacion_sel';\n\t\t$this->transaccion='OBING_OBC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_observaciones_conciliacion','int4');\n\t\t$this->captura('tipo_observacion','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_observacion','date');\n\t\t$this->captura('banco','varchar');\n\t\t$this->captura('observacion','text');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "a8d0932a43795e8dc17ae48a6ea64cd1", "score": "0.49761274", "text": "public function __construct()\n {\n\n $this->filtros = new Buscador_Filtro();\n\n\n\n\n }", "title": "" }, { "docid": "d06dff8c6b55b3dae475747d818a2e00", "score": "0.49684894", "text": "public function createQuery() {\n\t\t$query = parent::createQuery();\n\t\t// $startDate = new \\DateTime('last friday');\n\t\t// $query->matching($query->greaterThan('created', $startDate));\n\t\t$query->setOrderings(array(\n\t\t\t'created' => \\TYPO3\\Flow\\Persistence\\QueryInterface::ORDER_DESCENDING\n\t\t));\n\n\t\t$customers = $this->customerRepository->findAll()->toArray();\n\n\t\t$surveys = array();\n\t\tforeach ($query->execute() as $survey) {\n\t\t\tif (in_array($survey->getCustomer(), $customers)) {\n\t\t\t\t$surveys[] = $survey;\n\t\t\t}\n\t\t}\n\n\t\t$query = new \\Famelo\\ADU\\Domain\\ArrayQuery();\n\t\t$query->setArray($surveys);\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "902c5fe3011093a2665f39a43a93e975", "score": "0.49615508", "text": "public function get_excursionesCuernavaca()\n {\n \n $sql='select A.id, A.nombre_del_destino, C.nombre from destino A\n inner join categorias_traslados B on B.id =A.id_categorias_traslados\n inner join zona C on C.id = A.id_zona\n WHERE B.id=2 AND A.activo =1 AND C.id =2';\n $query= $this->db->query($sql);\n \n if ($query->num_rows() > 0)\n {\n return $query; \n }\n \n }", "title": "" }, { "docid": "ad34b350aaa651d52c161f1f3886f44a", "score": "0.4951478", "text": "public function montaRecuperaEventosFormatado()\n {\n $sql = sprintf(\"\n SELECT evento.cod_evento\n , evento.codigo\n , TRIM(evento.descricao) as descricao\n , sequencia_calculo.sequencia\n , evento.fixado\n , ( CASE when evento.tipo = 'F' then 'Fixo'\n when evento.tipo = 'V' then 'Variável'\n when evento.tipo = 'B' then 'Base'\n END ) as tipo\n , ( CASE when evento.natureza = 'P' THEN 'Provento'\n when evento.natureza = 'D' THEN 'Desconto'\n when evento.natureza = 'B' THEN 'Base'\n when evento.natureza = 'I' THEN 'Informativo'\n END ) as natureza\n FROM folhapagamento.evento\n , folhapagamento.evento_evento\n , folhapagamento.sequencia_calculo_evento\n , folhapagamento.sequencia_calculo\n , ( SELECT cod_evento\n , MAX(timestamp) AS timestamp\n FROM folhapagamento.evento_evento\n GROUP BY cod_evento\n ) AS max_evento_evento\n WHERE evento.cod_evento = evento_evento.cod_evento\n AND evento_evento.cod_evento = max_evento_evento.cod_evento\n AND evento_evento.timestamp = max_evento_evento.timestamp\n AND evento_evento.cod_evento = sequencia_calculo_evento.cod_evento\n AND sequencia_calculo_evento.cod_sequencia = sequencia_calculo.cod_sequencia\n \");\n\n $query = $this->_em->getConnection()->prepare($sql);\n $query->execute();\n $result = $query->fetchAll(\\PDO::FETCH_OBJ);\n\n return $result;\n }", "title": "" }, { "docid": "403da454401e1041b7a12200f69ff445", "score": "0.4950093", "text": "public function filterByEventocontrareciboGenerador($eventocontrareciboGenerador = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($eventocontrareciboGenerador)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $eventocontrareciboGenerador)) {\n $eventocontrareciboGenerador = str_replace('*', '%', $eventocontrareciboGenerador);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(EventocontrareciboPeer::EVENTOCONTRARECIBO_GENERADOR, $eventocontrareciboGenerador, $comparison);\n }", "title": "" }, { "docid": "102dc0a57c990a0f328955ebb31cc13d", "score": "0.49493024", "text": "function prepararConsulta() {\n\t\t$campos = \"select distinct id_albaran from albaranes_informaticos where id_albaran is not null and activo=1 \";\n\n\t\tif($this->nombre_albaran != \"\") {\n\t\t\t$condiciones .= \" and nombre_albaran like '%\".$this->nombre_albaran.\"%'\";\n\t\t}\n\t\tif($this->id_usuario != \"\") {\n\t\t\t$condiciones .= \" and id_usuario=\".$this->id_usuario;\n\t\t}\n\t\tif($this->tipo_albaran != \"\") {\n\t\t\t$condiciones .= \" and tipo_albaran='\".$this->tipo_albaran.\"'\";\n\t\t}\n\t\tif($this->origen_destino != \"\"){\n\t\t\t$condiciones .= \" and origen_destino=\".$this->origen;\n\t\t}\t\n\t\tif($this->motivo != \"\"){\n\t\t\t$condiciones .= \" and motivo='\".$this->motivo.\"'\";\n\t\t}\n\t\tif($this->fecha_creado != \"\") {\n\t\t\t$condiciones .= \" and albaranes_informaticos.fecha_creado='\".$this->fecha_creado.\"'\";\n\t\t}\n\t\tif($this->num_serie != \"\"){\n\t\t\t$condiciones .= \" and albaranes_informaticos.id_albaran in \n\t\t\t\t\t\t\t\t(select id_albaran from albaranes_informaticos_movimientos where id_material in \n\t\t\t\t\t\t\t\t\t(select id_material from material_informatico where num_serie='\".$this->num_serie.\"'))\";\n\t\t}\n\n\t\t$ordenado = \" order by albaranes_informaticos.fecha_creado DESC, albaranes_informaticos.id_albaran DESC\";\n\t\t\n\t\t$this->consultaSql = $campos.$condiciones.$ordenado;\n\t}", "title": "" }, { "docid": "68afff44fdc524d4af603476e2bad4e1", "score": "0.49485227", "text": "public function newQuery()\n {\n return $this->newBuilder();\n }", "title": "" }, { "docid": "8e4a804e108585ec940ced05e64efe48", "score": "0.4945042", "text": "public function createQuery($context = 'list')\n {\n $query = parent::createQuery($context);\n $query->getQueryBuilder()\n ->where('o.idEstadoTransferencia IN (?1,?2,?3)')\n ->setParameter(1, '2')//Aprobada(de patrimonio)\n ->setParameter(2, '3')//Aceptada\n ->setParameter(3, '4');//Rechazada\n return $query;\n }", "title": "" }, { "docid": "f8b8290aca4fb37444fc12d0f3053097", "score": "0.49437845", "text": "public static function getBoletosCobrancaAntigos()\n {\n\n return TodosBoletos::selectRaw('CdRcd,Cedente,CNPJCPF_Cedente,CNPJCPF_Sacado,Sacado,Endereco,\n NrPesEdr as numero, Bairro, NrPesCep as cep, Cidade, UF, ValorPrincipal as Valor, NrFfm as nosso_numero,\n NrBco, Carteira,AgCodCed as agencia_conta, DtRctVen as vencimento, NFSE, \n EspecieDoc as especie, Aceite, DataEHoraDoProcessamento as processamento,\n DtRcdEmi as emissao, LinhaDigitavel as codigo_barras,ClienteId,Email,Email2,\n convert(varchar, DtRctVenPro ,103) as data_vencimento_prorrogado,NmBco,TipoDeDocumento')\n ->whereRaw('\n YEAR(cast(DtRctVen as DATE)) = YEAR(GETDATE()) \n\t\t\t\t\tAND cast(DtRctVen as DATE) <= cast(DATEADD(dd,- 7, GETDATE()) as Date)\n\t\t\t\t\tAND DtRctVen > DATEADD(month, - 6, GETDATE())\n\t\t\t\t\tAND NrFfm IS NOT NULL\n ')->get();\n }", "title": "" }, { "docid": "1bd60d6a354fc11dc1a1802d49a78f5c", "score": "0.49347174", "text": "public function __construct() {\n parent::__construct('retos', 'reto_id');\n }", "title": "" }, { "docid": "cce277d4db7b87be8567f17d746f4e3d", "score": "0.4932754", "text": "public function usePagocontrareciboQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinPagocontrarecibo($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'Pagocontrarecibo', 'PagocontrareciboQuery');\n }", "title": "" }, { "docid": "97e08351b36b142c34aed205e92d62b5", "score": "0.4925329", "text": "public function __construct($cliente, $colaborador, $condicaoPgto){\n $this-> cliente = $cliente;\n $this-> colaborador = $colaborador;\n $this-> condicaoPgto = $condicaoPgto;\n \n }", "title": "" }, { "docid": "9c1a65d9bcf6c0a7645bd65ac22a9a1e", "score": "0.4910771", "text": "public function consultarEAcuerdo( $filtroAcuerdo ){\n\t\t\t\n\t\t$detalleActaAcuerdos = array( );\n\t\t$sql = \"SELECT idestudiantegeneral,\n\t\t\t\tcodigoestudiante,\n\t\t\t\tNombre,\n\t\t\t\tnombrecarrera,\n\t\t\t\tcodigocarrera,\n\t\t\t\tFechaMaximaCumplimiento,\n\t\t\t\tFechaGradoId,\n\t\t\t\tAcuerdoActaId,\n\t\t\t\tDetalleAcuerdoActaId,\n\t\t\t\tcodigomodalidadacademica,\n\t\t\t\tNumeroActaAcuerdo,\n\t\t\t\tcodigosituacioncarreraestudiante, NumeroAcuerdo\n\t\t\t\tFROM ( SELECT DISTINCT\n\t\t\t\t\tEG.idestudiantegeneral, E.codigoestudiante, CONCAT( EG.apellidosestudiantegeneral,' ', EG.nombresestudiantegeneral ) AS Nombre,\n\t\t\t\t\tC.nombrecarrera, C.codigocarrera, FG.FechaMaximaCumplimiento, FG.FechaGradoId, AC.AcuerdoActaId, DAC.DetalleAcuerdoActaId, C.codigomodalidadacademica, AC.NumeroActaAcuerdo, E.codigosituacioncarreraestudiante, AC.NumeroAcuerdo\n\t\t\t\tFROM\n\t\t\t\t\testudiantegeneral EG\n\t\t\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\t\t\tINNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n\t\t\t\tINNER JOIN facultad F ON ( F.codigofacultad = C.codigofacultad )\n\t\t\t\tINNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n\t\t\t\tINNER JOIN AcuerdoActa AC ON ( AC.FechaGradoId = FG.FechaGradoId )\n\t\t\t\tINNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = AC.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n\t\t\t\tINNER JOIN planestudioestudiante PE ON ( PE.codigoestudiante = E.codigoestudiante )\n\t\t\t\tWHERE 1= 1 \"; \n\t\t\t\t$sql .=\t$filtroAcuerdo;\n\t\t\t\t$sql .= \" AND E.codigoestudiante NOT IN (\tSELECT\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.codigoestudiante\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tregistrograduado R\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.codigoestudiante = E.codigoestudiante\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\tAND E.codigoestudiante IN ( SELECT DC.EstudianteId\n\t\t\t\t\t\t\t\t\t\t\t\tFROM DetalleAcuerdoActa DC\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\tAND DAC.CodigoEstado = 100\n\t\t\t\tAND DAC.EstadoAcuerdo = 100\n\t\t\t\tAND PE.codigoestadoplanestudioestudiante LIKE '1%'\n\t\t\t\tAND DAC.EnviarCorreoSecretaria = 100\n\t\t\t\tAND DAC.EnviarCorreoVicerrectoria = 100\";\n\t\t\n\t\t$sql .= \" ORDER BY AC.AcuerdoActaId, EG.apellidosestudiantegeneral ASC) b\n\t\t\t\tORDER BY NumeroAcuerdo, Nombre\";\n\t\t\t\t\n\t\t$this->persistencia->crearSentenciaSQL( $sql );\n\t\t//echo $this->persistencia->getSQLListo( );\n\t\t$this->persistencia->ejecutarConsulta( );\n\t\twhile( $this->persistencia->getNext( ) ){\n\t\t\t$detalleActaAcuerdo = new DetalleActaAcuerdo( $this->persistencia );\n\t\t\t$detalleActaAcuerdo->setIdDetalleActaAcuerdo( $this->persistencia->getParametro( \"DetalleAcuerdoActaId\" ) );\n\t\t\t\n\t\t\t$actaAcuerdo = new ActaAcuerdo( null );\n\t\t\t$actaAcuerdo->setIdActaAcuerdo( $this->persistencia->getParametro( \"AcuerdoActaId\" ) );\n\t\t\t$actaAcuerdo->setNumeroActaConsejoDirectivo( $this->persistencia->getParametro( \"NumeroActaAcuerdo\" ) );\n\t\t\t\n\t\t\t$estudiante = new Estudiante( null );\n\t\t\t$estudiante->setIdEstudiante( $this->persistencia->getParametro( \"idestudiantegeneral\" ) );\n\t\t\t$estudiante->setCodigoEstudiante( $this->persistencia->getParametro( \"codigoestudiante\" ) );\n\t\t\t$estudiante->setNombreEstudiante( $this->persistencia->getParametro( \"Nombre\" ) );\n\t\t\t\n\t\t\t$situacionCarreraEstudiante = new SituacionCarreraEstudiante( null );\n\t\t\t$situacionCarreraEstudiante->setCodigoSituacion( $this->persistencia->getParametro( \"codigosituacioncarreraestudiante\") ); \n\t\t\t\n\t\t\t\n\t\t\t$fechaGrado = new FechaGrado( null );\n\t\t\t$fechaGrado->setIdFechaGrado( $this->persistencia->getParametro( \"FechaGradoId\" ) );\n\t\t\t$fechaGrado->setFechaMaxima( $this->persistencia->getParametro( \"FechaMaximaCumplimiento\" ) );\n\t\t\t\n\t\t\t$carrera = new Carrera( null );\n\t\t\t$carrera->setCodigoCarrera( $this->persistencia->getParametro( \"codigocarrera\" ) );\n\t\t\t$carrera->setNombreCarrera( $this->persistencia->getParametro( \"nombrecarrera\" ) );\n\t\t\t\n\t\t\t$modalidadAcademica = new ModalidadAcademica( null );\n\t\t\t$modalidadAcademica->setCodigoModalidadAcademica( $this->persistencia->getParametro( \"codigomodalidadacademica\" ) );\n\t\t\t\n\t\t\t$carrera->setModalidadAcademica( $modalidadAcademica );\n\t\t\t\n\t\t\t$fechaGrado->setCarrera( $carrera );\n\t\t\t\n\t\t\t$estudiante->setFechaGrado( $fechaGrado );\n\t\t\t$estudiante->setSituacionCarreraEstudiante( $situacionCarreraEstudiante );\n\t\t\t\n\t\t\t$detalleActaAcuerdo->setActaAcuerdo( $actaAcuerdo );\n\t\t\t$detalleActaAcuerdo->setEstudiante( $estudiante );\n\t\t\t\n\t\t\t$detalleActaAcuerdos[ count( $detalleActaAcuerdos ) ] = $detalleActaAcuerdo;\n\t\t}\n\t\t$this->persistencia->freeResult( );\n\t\t\n\t\treturn \t$detalleActaAcuerdos;\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "1ada987734c91e36ae7bfd2c975fde04", "score": "0.49099475", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t\n\t\tif (isset($_GET['Ctacte']['clienteId']))\n\t\t\t$this->clienteId = $_GET['Ctacte']['clienteId'];\n\t\tif (isset($_GET['Ctacte']['productoId']))\n\t\t\t$this->productoId = $_GET['Ctacte']['productoId'];\n\t\tif (isset($_GET['Ctacte']['fechaInicio']))\n\t\t\t$this->fechaInicio = Utilities::MysqlDateFormat($_GET['Ctacte']['fechaInicio']);\n\t\tif (isset($_GET['Ctacte']['fechaFin']))\n\t\t\t$this->fechaFin = Utilities::MysqlDateFormat($_GET['Ctacte']['fechaFin']);\n\t\t\n \t$criteria = new CDbCriteria;\n \n $criteria->addBetweenCondition('fecha',$this->fechaInicio,$this->fechaFin);\n\t\t$criteria->with = array('productoCtaCte');\n\t\t$criteria->compare('productoCtaCte.pkModeloRelacionado',$this->clienteId);\n\t\t$criteria->compare('productoCtaCte.productoId',$this->productoId);\n\t\t$criteria->compare('productoCtaCte.nombreModelo',$this->nombreModelo);\n\t\t$criteria->together = true;\n\n\t\t/*\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('tipoMov',$this->tipoMov);\n\t\t$criteria->compare('productoCtaCteId',$this->productoCtaCteId,true);\n\t\t$criteria->compare('conceptoId',$this->conceptoId);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('monto',$this->monto,true);\n\t\t$criteria->compare('saldoAcumulado',$this->saldoAcumulado,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\t\t$criteria->compare('origen',$this->origen,true);\n\t\t$criteria->compare('identificadorOrigen',$this->identificadorOrigen,true);\n\t\t$criteria->compare('estado',$this->estado);\n\t\t$criteria->compare('userStamp',$this->userStamp,true);\n\t\t$criteria->compare('timeStamp',$this->timeStamp,true);\n\t\t$criteria->compare('sucursalId',$this->sucursalId);\n\t\t*/\n return new CActiveDataProvider(get_class($this), array('criteria' => $criteria, 'pagination' => false, ));\t\t\n\t}", "title": "" }, { "docid": "76f14b2aa24321be02993e6130e739aa", "score": "0.49075752", "text": "public function getEventos() {\r\n $sqlQuery = \"SELECT e.*, l.Nome \" .\r\n \"FROM eventos e \" .\r\n \"LEFT JOIN localizacoes l ON e.IDlocalizacao = l.IDlocalizacao\";\r\n \r\n $statement = $this->connect->prepare($sqlQuery);\r\n $status = $statement->execute();\r\n \r\n if (!$status) {\r\n die(\"nao foi possivel realizar acao\");\r\n } \r\n \r\n return $statement;\r\n }", "title": "" }, { "docid": "5e8ba81e98319c76ad2fbe048e4265f7", "score": "0.49059814", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id_evento_detalle',$this->id_evento_detalle);\n\t\t$criteria->compare('id_evento',$this->id_evento);\n\t\t$criteria->compare('id_hecho_denuncia',$this->id_hecho_denuncia);\n\t\t$criteria->compare('atributos',$this->atributos,true);\n\t\t$criteria->compare('novedad_relacionada',$this->novedad_relacionada,true);\n\t\t$criteria->compare('fecha_evento',$this->fecha_evento,true);\n\t\t$criteria->compare('hora_evento',$this->hora_evento,true);\n\t\t$criteria->compare('motivo',$this->motivo,true);\n\t\t$criteria->compare('id_motivo_consignados',$this->id_motivo_consignados);\n\t\t$criteria->compare('id_lugar_remision',$this->id_lugar_remision);\n\t\t$criteria->compare('atributos_lugar_remision',$this->atributos_lugar_remision,true);\n\t\t$criteria->compare('id_tipo_incidencia',$this->id_tipo_incidencia);\n\t\t$criteria->compare('id_motivo_incidencia',$this->id_motivo_incidencia);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "ecce5aade83f4c1238a5cab96cb5a88d", "score": "0.48969048", "text": "public function actionCrearContratoConsulta(){\n\t\t$model=new DocumentoProveedor();\n\t\t$model=$model->findByPk(base64_decode($_GET[id_docpro]));\n\t\t$model->setScenario('oferta_contrato');\n\t\t$model_detalle=new DocumentoProveedor('search_detalle');\n\t\t$model_traza= new DocumentoProveedorTrazabilidad('search');\n\t\t$model_estado= new DocumentoProveedorTrazabilidad('observacion');\n\n\t\t$this->render('oferta_contrato_consulta',array('model'=>$model, 'model_detalle'=>$model_detalle,'model_traza'=>$model_traza, 'model_estado'=>$model_estado ));\n\t}", "title": "" }, { "docid": "fc89060037ecc88798428251da5bfd16", "score": "0.48950064", "text": "public function convencoes()\n {\n return $this->hasMany(Convencoes::class, 'fl_entidade')->where('fl_status', 1)->orderBy('dt_validade', 'desc');\n }", "title": "" }, { "docid": "eb838d94c9b8f3f089967ac16740c50d", "score": "0.48825467", "text": "public function myFindNewEvent($timer = 60, $id_root = null, $start = null, $end = null) {\n // $current = date('Y-m-d H:i:s', strtotime('now'));\n\n $date_now = date(\"Y-m-d H:i:s\", time());\n $date_last = date(\"Y-m-d H:i:s\", time() - $timer);\n // echo \"date last=$date_last<br>\\n\";\n // echo \"date now=$date_now\";\n $calendarEvent = new CalendarEvent(new \\Datetime('now'), new \\Datetime('now'), $id_root);\n // $current = date('Y-m-d H:i:s', strtotime('now'));\n // $datetime_from = date(\"Y-m-d H:i\",strtotime(\"-45 minutes\",strtotime($thestime)));\n $parameters = array();\n $values = array('a,b');\n $qu = $this->createQueryBuilder('a')\n ->select($values)\n // ->distinct('a.id')\n ->leftJoin('a.calendarid', 'b')\n ->where('a.addedDate BETWEEN :startDate and :endDate')\n ->orwhere('a.updatedDate BETWEEN :startDate and :endDate')\n ->setParameter('startDate', $date_last)\n ->setParameter('endDate', $date_now);\n\n if (isset($start) && isset($end)) {\n $qu->andwhere('(a.startDatetime BETWEEN :start and :end OR a.endDatetime BETWEEN :start and :end) OR (a.startDatetime <= (:start) AND a.endDatetime >= (:end))')\n \n // ->ordwhere('a.startDatetime <= (:start) AND a.endDatetime >= (:end)')\n ->setParameter('start', $start)\n ->setParameter('end', $end);\n }\n\n\n if (isset($id_root)) {\n $qu->andwhere('b.id = :idRoot')\n ->setParameter('idRoot', $id_root);\n }\n\n $companyEvents = $qu->getQuery()->getScalarResult();\n\n //var_dump($companyEvents);\n foreach ($companyEvents as $v) {\n $eventEntity = new EventEntity($v['a_title'], $v['a_startDatetime'], $v['a_endDatetime'], $v['a_allDay']\n );\n $eventEntity->setId($v['a_id']);\n $eventEntity->setFgColor($v['a_fgColor']);\n $eventEntity->setBgColor($v['a_bgColor']);\n $eventEntity->setCssClass($v['a_cssClass']);\n $nbfic = (isset($v['num']) ? $v['num'] : \"0\");\n $eventEntity->setNbfiles($nbfic);\n $eventEntity->setDescription($v['a_description']); //set the foreground color of the event's label\n\n $calendarEvent->addEvent($eventEntity);\n ;\n }\n//var_dump($calendarEvent);\n return $calendarEvent->getEvents();\n }", "title": "" }, { "docid": "eff51f6ec7c745d2ba5a56c00f188a1b", "score": "0.4881655", "text": "public function comuna(){\n return $this->hasOne('App\\Comunas', 'id_comuna','cd_comuna_fk_establecimiento');\n }", "title": "" }, { "docid": "ad5047d7d1bd29024bb39a198b9af0e2", "score": "0.4875555", "text": "protected function createQuery()\n {\n return \\PropelQuery::from($this->modelClass);\n }", "title": "" }, { "docid": "8610c30219c4c9c8c4482f9df670217b", "score": "0.48721343", "text": "public static function query()\n {\n return (new static([], true))->newQuery();\n }", "title": "" }, { "docid": "a39ffafccd14ee221ff52a791e54fce4", "score": "0.48682037", "text": "public function get_excursionesRoo()\n {\n \n $sql='select A.id, A.nombre_del_destino, C.nombre from destino A\n inner join categorias_traslados B on B.id =A.id_categorias_traslados\n inner join zona C on C.id = A.id_zona\n WHERE B.id=2 AND A.activo =1 AND C.id =1';\n $query= $this->db->query($sql);\n \n if ($query->num_rows() > 0)\n {\n return $query; \n }\n\n }", "title": "" }, { "docid": "e706417df9f7611f7dfc7f0db81d33d2", "score": "0.48563653", "text": "public function newQueryBuilder()\n {\n return new AccountQuery($this->adapter,$this);\n }", "title": "" }, { "docid": "0804eafa5e56078695b47125ddcc51f0", "score": "0.4850857", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EventocontrareciboPeer::IDEVENTOCONTRARECIBO, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "f7b513bbd7bab500e1dc4e08352ca23e", "score": "0.48440215", "text": "public function BuscarAtendimento($Conta)\r\n {\r\n //caso o campo esteja vazio retorna tudo\r\n if($Conta == \"\"){\r\n\r\n $sql = \"SELECT * FROM clientes JOIN enderecos ON clientes.idEndereco = enderecos.idEndereco \r\n JOIN atendimento ON atendimento.NumeroContaCliente = clientes.NumeroConta;\";\r\n\r\n $p_sql = Conexao::abrirConexao()->prepare($sql);\r\n $p_sql->bindValue(\":Conta\", $Conta);\r\n\r\n $p_sql->execute();\r\n\r\n //faz o retorno como um array de objetos\r\n //para trabalhar com foreach\r\n return $p_sql->fetchall(PDO::FETCH_OBJ);\r\n }\r\n\r\n $sql = \"SELECT * FROM clientes JOIN enderecos ON clientes.idEndereco = enderecos.idEndereco \r\n JOIN atendimento\r\n ON atendimento.NumeroContaCliente = clientes.NumeroConta\r\n WHERE clientes.NumeroConta = :Conta or clientes.CPF_CNPJ = :Conta;\";\r\n\r\n $p_sql = Conexao::abrirConexao()->prepare($sql);\r\n $p_sql->bindValue(\":Conta\", $Conta);\r\n\r\n\r\n $p_sql->execute();\r\n\r\n //faz o retorno como um array de objetos\r\n //para trabalhar com foreach\r\n return $p_sql->fetchall(PDO::FETCH_OBJ);\r\n\r\n }", "title": "" }, { "docid": "8ef9cc9a0e6040a1627e2578918576df", "score": "0.4842889", "text": "public function obtenerConsultasPorEvento2($fechaIniGral4, $fechaFinGral4, $tipo_evento, $estado,$id_cat_entidad)\n\t\t{\n\t\t\t//armo las condiciones\n\t\t\t\n\t\t\t$condiciones = array();\n\t\t\t$condicion = '';\n\t\t\t\tif (empty($fechaIniGral4) || empty($fechaFinGral4)) {\n\t\t\t\techo\"<br>\";\n\t\t\t echo\"<div class=\\\"alert alert-error\\\">\n\t\t\t <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\">&times;</button>\n\t\t\t <h4>Advertencia!</h4>El rango de fechas proporcinado esta vacio, debe de ingresar fechas...\n\t\t\t </div>\";\n\t\t\t // $condicion5='';\n\t\t\t \n\t\t\t} else\n\t\t\t{\n\n\n\t\t\t\tif (empty($tipo_evento)) \n\t\t\t\t{\n\t\t\t\t\t$condicion .= ' ';\n\t\t\t\t}\n\t\t\t\telse if ($tipo_evento =='t')\n\t\t\t\t{\n\t\t\t\t\t$condicion .=\"\";\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t\t$condicion .= \" and e.id_tipo_evento = '\".$tipo_evento.\"'\";\n\t\t\t\t}\n\n\t\t\t\n\t\t\tif (empty($estado)) \n\t\t\t\t{\n\t\t\t\t\t$condicion .= ' ';\n\t\t\t\t}\n\t\t\t\t\tif ($estado=='f')\n\t\t\t\t{\n\t\t\t\t\t$condicion .=\" AND e.estado='\".$estado.\"'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if ($estado ==2)\n\t\t\t\t{\n\t\t\t\t\t$condicion .=\"\";\n\t\t\t\t} elseif ($estado==0) {\n\t\t\t\t\t# code...\n\t\t\t\t\t$condicion .=\" AND e.estado='f'\";\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t\t\t$condicion .=\" AND e.estado='\".$estado.\"'\";\n\t\t\t\t}\n\t\t\t\n\t\t\t$fechaIniGral4 = \"'\". $fechaIniGral4 . \"'\";\n\t\t\t$fechaFinGral4 = \"'\". $fechaFinGral4 . \"'\";\n\t\t\t$condicion.=' and e.fecha_ingreso BETWEEN '.$fechaIniGral4.' and '.$fechaFinGral4;\n\t\t\t\t\n\t\t\t \t$SQL1=\"SELECT \n\t\t\t\t\t\t\ten.id_cat_entidad, en.nombre_entidad entidad, count(e.*), s.nombre sede \n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tsipol.tbl_evento e, \n\t\t\t\t\t\t catalogos_publicos.tbl_sede s, \n\t\t\t\t\t\t catalogos_publicos.cat_entidad en, \n\t\t\t\t\t\t catalogos_publicos.cat_tipo_sede ts\n\n\t\t\t\t\t\twhere \n\t\t\t\t\t\t en.id_cat_entidad = s.id_cat_entidad\n\t\t\t\t\t\t and ts.id_tipo_sede = s.id_tipo_sede\n\t\t\t\t\t\t AND e.ID_USUARIO IN (SELECT ID_USUARIO FROM SIPOL_USUARIO.TBL_ROL_USUARIO WHERE ID_ROL =7)\n\t\t\t\t\t\t AND en.id_cat_entidad not in(1)\n\t\t\t\t\t\t and e.id_sede = s.id_sede\".$condicion.\"\n\t\t\t\t\t\tand en.id_cat_entidad= \".$id_cat_entidad.\"\n\t\t\t\t\t\tgroup by en.nombre_entidad, ts.descripcion, s.nombre,en.id_cat_entidad\n\t\t\t\t\t\torder by en.id_cat_entidad\";\n\n\n\t\t\t //echo $SQL1;\n\t\t\t //Yii::log('ii', CLogger::LEVEL_ERROR, $SQL1);\n\n\t\t\t $Response1 = Yii::app()->db->createCommand($SQL1)->queryAll();\t\n\n\t\t\n\t\t\t\n\t\t\t//ahora recorro los registros y genero la respuesta\n\t\t\t\t$data= \"\";\n\t\t\t\t$nombre_s= \"\";\n\t\t\t\t$cantidad= \"\";\n\t\t\t\t\n\t\t\t\t\tforeach ($Response1 as $registro) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t$entidad= $registro['entidad'];\n\t\t\t\t\t\t$nombre_s.=\"'\". $registro['sede'].\"',\";\t\n\t\t\t\t\t\t$cantidad.= $registro['count'].\",\";\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t$nombre_s=substr($nombre_s, 0, -1);\n\t\t\t\t\t$cantidad=substr($cantidad, 0, -1);\n\t\t\t\t\t\t$data.=\" \n\t\t\t\t\t\tname: '\".$entidad.\"',\n categories: [\".$nombre_s.\"],\n data: [\".$cantidad.\"],\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t//Yii::log('', CLogger::LEVEL_ERROR, CVarDumper::dumpAsString($retorno));\n\t\t\t}// FIN ELSE\n\t\t\treturn $data;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3dbdebf813460496fd53eccf1421cfbc", "score": "0.48367307", "text": "public function findAsignarCuenta(){\r\n $query = \"SELECT ac.`id_asignacion`, ac.`porcentaje_comision`, ac.`id_caratula`, ac.`id_persona`,\r\n p.`nombrecompleto`, CONCAT(a.`ubicacion`,' - ',c.`descripcion`,' - ',a.`dimesion_area`,' m2') AS catalogo,\r\n c.codigo\r\n FROM `lgk_asignacioncuenta` ac\r\n INNER JOIN `mae_persona` p ON p.`id_persona` = ac.`id_persona`\r\n INNER JOIN `lgk_caratula` c ON c.`id_caratula` = ac.`id_caratula` \r\n INNER JOIN `lgk_catalogo` a ON a.`id_producto` = c.`id_producto`\r\n WHERE `id_asignacion` = :id;\";\r\n \r\n $parms = array(\r\n ':id'=>$this->_idAsignarCuenta\r\n );\r\n \r\n $data = $this->queryOne($query,$parms);\r\n return $data;\r\n \r\n }", "title": "" }, { "docid": "f4fac9488223aab5237e70832b1755f1", "score": "0.48300177", "text": "public function obtenerEvento(){\r\n return $this->evento;\r\n }", "title": "" }, { "docid": "a6b3bc868d19aaccca043f857a3aa76c", "score": "0.48253936", "text": "public function buildCriteria()\n\t{\n\t\t$criteria = new Criteria(IgrejaPeer::DATABASE_NAME);\n\n\t\tif ($this->isColumnModified(IgrejaPeer::ID)) $criteria->add(IgrejaPeer::ID, $this->id);\n\t\tif ($this->isColumnModified(IgrejaPeer::CRIADOR_ID)) $criteria->add(IgrejaPeer::CRIADOR_ID, $this->criador_id);\n\t\tif ($this->isColumnModified(IgrejaPeer::RESPONSAVEL_ID)) $criteria->add(IgrejaPeer::RESPONSAVEL_ID, $this->responsavel_id);\n\t\tif ($this->isColumnModified(IgrejaPeer::ENDERECO_ID)) $criteria->add(IgrejaPeer::ENDERECO_ID, $this->endereco_id);\n\t\tif ($this->isColumnModified(IgrejaPeer::IGREJA_ID)) $criteria->add(IgrejaPeer::IGREJA_ID, $this->igreja_id);\n\t\tif ($this->isColumnModified(IgrejaPeer::TIPO)) $criteria->add(IgrejaPeer::TIPO, $this->tipo);\n\t\tif ($this->isColumnModified(IgrejaPeer::NOME_FANTASIA)) $criteria->add(IgrejaPeer::NOME_FANTASIA, $this->nome_fantasia);\n\t\tif ($this->isColumnModified(IgrejaPeer::RAZAO_SOCIAL)) $criteria->add(IgrejaPeer::RAZAO_SOCIAL, $this->razao_social);\n\t\tif ($this->isColumnModified(IgrejaPeer::CNPJ)) $criteria->add(IgrejaPeer::CNPJ, $this->cnpj);\n\t\tif ($this->isColumnModified(IgrejaPeer::ATIVA)) $criteria->add(IgrejaPeer::ATIVA, $this->ativa);\n\t\tif ($this->isColumnModified(IgrejaPeer::SITE)) $criteria->add(IgrejaPeer::SITE, $this->site);\n\t\tif ($this->isColumnModified(IgrejaPeer::SOBRE_NOS)) $criteria->add(IgrejaPeer::SOBRE_NOS, $this->sobre_nos);\n\t\tif ($this->isColumnModified(IgrejaPeer::VISAO)) $criteria->add(IgrejaPeer::VISAO, $this->visao);\n\t\tif ($this->isColumnModified(IgrejaPeer::MISSAO)) $criteria->add(IgrejaPeer::MISSAO, $this->missao);\n\t\tif ($this->isColumnModified(IgrejaPeer::VALORES)) $criteria->add(IgrejaPeer::VALORES, $this->valores);\n\t\tif ($this->isColumnModified(IgrejaPeer::DATA_CADASTRO)) $criteria->add(IgrejaPeer::DATA_CADASTRO, $this->data_cadastro);\n\t\tif ($this->isColumnModified(IgrejaPeer::EMAIL)) $criteria->add(IgrejaPeer::EMAIL, $this->email);\n\t\tif ($this->isColumnModified(IgrejaPeer::TELEFONE)) $criteria->add(IgrejaPeer::TELEFONE, $this->telefone);\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "1108a35042459900ad375a91c4d2e276", "score": "0.48232567", "text": "public function procedura($query){\n $treno=Treno::where(\"ID\",$query)->first(); \n return Carrozza::where(\"Codice_carrozza\",$treno->Cabina_montata)->get(); \n \n /*Carrozza::select(\"Carrozza.Nome\")->join(\"Treno\",\"Codice_carrozza\",\"=\",\"Cabina_montata\")->where(\"Treno.ID=$query)->get()*/\n }", "title": "" }, { "docid": "b88dd578d292586b5341a51612640a59", "score": "0.48226818", "text": "public function evento()\n {\n return $this->belongsTo('App\\Model\\Evento', 'eventos_id');\n }", "title": "" }, { "docid": "9617f4b2002520f36fe0bcb7048cb3a4", "score": "0.4816598", "text": "public static function createQuery()\n\t{\n\t\t$query = parent::createQuery();\n\t\t$query->isAdmin();\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "1883e468c41a13a8f45e33c2dc0b056a", "score": "0.4814073", "text": "function BuscarIncidencia($palabra){\n $sentencia= \"SELECT * FROM incidencias where Palabras = '$palabra';\";\n $resultado = BasedeDatos::ejecutar($sentencia);\n\n \n \n \n $elemento = $resultado->fetch_assoc();\n $incidencia = new Incidencia($elemento['id'],$elemento['titulo'],$elemento['descripcion'],$elemento['lugar'],$elemento['fecha'],$elemento['idUsuario'],$elemento['estado'],$elemento['likes'],$elemento['dislikes'],$elemento['Foto'],$elemento['Palabras']);\n \n \n\n return $incidencia;\n\n}", "title": "" }, { "docid": "d54b5fbaf8d83d9ae770aba7f8602af4", "score": "0.48137248", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('IDCURSO_PROG',$this->IDCURSO_PROG,true);\n\t\t$criteria->compare('IDCURSO',$this->IDCURSO,true);\n\t\t$criteria->compare('IDCICLO',$this->IDCICLO,true);\n\t\t$criteria->compare('IDPROFESOR',$this->IDPROFESOR,true);\n\t\t$criteria->compare('VACANTES',$this->VACANTES,true);\n\t\t$criteria->compare('MATRICULADOS',$this->MATRICULADOS,true);\n\t\t$criteria->compare('HORARIO',$this->HORARIO,true);\n\t\t$criteria->compare('FECHAREGISTRO',$this->FECHAREGISTRO,true);\n\t\t$criteria->compare('ESTADO',$this->ESTADO,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "4ee524217cf8f2118dcc52cbf299fdd0", "score": "0.48112708", "text": "public function obterReservaCanceladas($objetor) {\n \n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.status = '1'\n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }", "title": "" }, { "docid": "c2eaece9c65d71248e8b7740f67fccf5", "score": "0.4811163", "text": "function insertarObservacionesConciliacion(){\n\t\t$this->procedimiento='obingresos.ft_observaciones_conciliacion_ime';\n\t\t$this->transaccion='OBING_OBC_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('tipo_observacion','tipo_observacion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_observacion','fecha_observacion','date');\n\t\t$this->setParametro('banco','banco','varchar');\n\t\t$this->setParametro('observacion','observacion','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "a433b9ff2d74ca35026e53377603afea", "score": "0.47927052", "text": "function listarBoleto(){\n $this->procedimiento='obingresos.ft_boleto_sel';\n $this->transaccion='OBING_BOL_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n //Definicion de la lista del resultado del query\n $this->captura('id_boleto','int4');\n $this->captura('fecha_emision','date');\n $this->captura('codigo_noiata','varchar');\n $this->captura('cupones','int4');\n $this->captura('ruta','varchar');\n $this->captura('estado','varchar');\n $this->captura('id_agencia','int4');\n $this->captura('moneda','varchar');\n $this->captura('total','numeric');\n $this->captura('pasajero','varchar');\n $this->captura('id_moneda_boleto','int4');\n $this->captura('estado_reg','varchar');\n $this->captura('gds','varchar');\n $this->captura('comision','numeric');\n $this->captura('codigo_agencia','varchar');\n $this->captura('neto','numeric');\n $this->captura('tipopax','varchar');\n $this->captura('origen','varchar');\n $this->captura('destino','varchar');\n $this->captura('retbsp','varchar');\n $this->captura('monto_pagado_moneda_boleto','numeric');\n $this->captura('tipdoc','varchar');\n $this->captura('liquido','numeric');\n $this->captura('nro_boleto','varchar');\n $this->captura('id_usuario_ai','int4');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_reg','timestamp');\n $this->captura('usuario_ai','varchar');\n $this->captura('id_usuario_mod','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('nombre_agencia','varchar');\n\n $this->captura('id_forma_pago','integer');\n $this->captura('forma_pago','varchar');\n $this->captura('monto_forma_pago','numeric');\n $this->captura('codigo_forma_pago','varchar');\n $this->captura('numero_tarjeta','varchar');\n $this->captura('codigo_tarjeta','varchar');\n $this->captura('ctacte','varchar');\n $this->captura('moneda_fp1','varchar');\n\n $this->captura('id_forma_pago2','integer');\n $this->captura('forma_pago2','varchar');\n $this->captura('monto_forma_pago2','numeric');\n $this->captura('codigo_forma_pago2','varchar');\n $this->captura('numero_tarjeta2','varchar');\n $this->captura('codigo_tarjeta2','varchar');\n $this->captura('ctacte2','varchar');\n $this->captura('moneda_fp2','varchar');\n\n\n $this->captura('tc','numeric');\n $this->captura('moneda_sucursal','varchar');\n $this->captura('ruta_completa','varchar');\n $this->captura('voided','varchar');\n $this->captura('monto_total_fp','numeric');\n $this->captura('mensaje_error','text');\n $this->captura('id_boleto_vuelo','integer');\n $this->captura('vuelo_retorno','varchar');\n $this->captura('localizador','varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //var_dump($this->consulta); exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "a762f1ea347c41e38fc2be4cc47f34c6", "score": "0.4786387", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t\n\t\t$criteria->condition=\"t.REQ_estado != 'Necesitado' \";\n\t\t$criteria->compare('IDREQUERIMIENTO',$this->IDREQUERIMIENTO);\n\t\t$criteria->compare('REQ_estado',$this->REQ_estado,true);\n\t\t$criteria->compare('REQ_fecha',$this->REQ_fecha,true);\n\t\t$criteria->compare('REQ_presupuesto',$this->REQ_presupuesto);\n\t\t$criteria->compare('IDUSUARIO',$this->IDUSUARIO);\n\t\t$criteria->compare('CODMETA',$this->CODMETA);\n\t\t$criteria->compare('IDCUANEC',$this->IDCUANEC);\n\n\n\t\t//$criteria->compare('TIPO',$this->TIPO,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort'=>array(\n\t\t\t 'defaultOrder'=>'IDREQUERIMIENTO DESC',\n\t\t\t ),\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>15\n\t\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "618d47a023060a0f0440b3b842221344", "score": "0.47861347", "text": "public function query() {\n\t\treturn Query::create();\n\t}", "title": "" }, { "docid": "fb95639294d9a8fbb6802a42757a9ee1", "score": "0.4782133", "text": "public static function query()\n {\n return new QuarkORMQueryBuilder(__CLASS__);\n }", "title": "" }, { "docid": "c98ac89cc72e99cb8910d9885eb9a204", "score": "0.478204", "text": "function clsRecordconcuentasSearch()\n {\n\n global $FileName;\n $this->Visible = true;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record concuentasSearch/Error\";\n $this->ReadAllowed = false;\n $this->InsertAllowed = false;\n $this->UpdateAllowed = false;\n $this->DeleteAllowed = false;\n if($this->Visible)\n {\n $this->ComponentName = \"concuentasSearch\";\n $CCSForm = split(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->EditMode = ($FormMethod == \"Edit\");\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->s_Cue_CodCuenta = new clsControl(ccsTextBox, \"s_Cue_CodCuenta\", \"s_Cue_CodCuenta\", ccsText, \"\", CCGetRequestParam(\"s_Cue_CodCuenta\", $Method));\n $this->s_cue_Descripcion = new clsControl(ccsTextBox, \"s_cue_Descripcion\", \"s_cue_Descripcion\", ccsText, \"\", CCGetRequestParam(\"s_cue_Descripcion\", $Method));\n $this->s_Cue_Padre = new clsControl(ccsListBox, \"s_Cue_Padre\", \"s_Cue_Padre\", ccsInteger, \"\", CCGetRequestParam(\"s_Cue_Padre\", $Method));\n $this->s_Cue_Padre->DSType = dsSQL;\n list($this->s_Cue_Padre->BoundColumn, $this->s_Cue_Padre->TextColumn, $this->s_Cue_Padre->DBFormat) = array(\"cue_padre\", \"txt_cuenta\", \"\");\n $this->s_Cue_Padre->ds = new clsDBdatos();\n $this->s_Cue_Padre->ds->SQL = \"select distinct a.cue_padre, concat(b.cue_codcuenta, ' - - - - - ' , left(b.cue_descripcion,15)) as txt_cuenta \" .\n \"from concuentas a join concuentas b on b.cue_id = a.cue_padre \" .\n \"\";\n $this->s_Cue_Padre->ds->Order = \"2\";\n $this->s_Cue_Padre->HTML = true;\n $this->s_cue_TipMovim = new clsControl(ccsListBox, \"s_cue_TipMovim\", \"s_cue_TipMovim\", ccsInteger, \"\", CCGetRequestParam(\"s_cue_TipMovim\", $Method));\n $this->s_cue_TipMovim->DSType = dsListOfValues;\n $this->s_cue_TipMovim->Values = array(array(\"0\", \"DE TITULO\"), array(\"1\", \"DE MOVIMIENTO\"));\n $this->s_cue_TipMovim->HTML = true;\n $this->s_cue_ReqAuxiliar = new clsControl(ccsListBox, \"s_cue_ReqAuxiliar\", \"s_cue_ReqAuxiliar\", ccsInteger, \"\", CCGetRequestParam(\"s_cue_ReqAuxiliar\", $Method));\n $this->s_cue_ReqAuxiliar->DSType = dsListOfValues;\n $this->s_cue_ReqAuxiliar->Values = array(array(\"0\", \"NO\"), array(\"1\", \"SI\"));\n $this->s_cue_ReqAuxiliar->HTML = true;\n $this->s_cue_TipAuxiliar = new clsControl(ccsListBox, \"s_cue_TipAuxiliar\", \"s_cue_TipAuxiliar\", ccsInteger, \"\", CCGetRequestParam(\"s_cue_TipAuxiliar\", $Method));\n $this->s_cue_TipAuxiliar->DSType = dsTable;\n list($this->s_cue_TipAuxiliar->BoundColumn, $this->s_cue_TipAuxiliar->TextColumn, $this->s_cue_TipAuxiliar->DBFormat) = array(\"par_Secuencia\", \"par_Descripcion\", \"\");\n $this->s_cue_TipAuxiliar->ds = new clsDBdatos();\n $this->s_cue_TipAuxiliar->ds->SQL = \"SELECT * \" .\n\"FROM genparametros\";\n $this->s_cue_TipAuxiliar->ds->Parameters[\"expr13\"] = 'CAUTI';\n $this->s_cue_TipAuxiliar->ds->wp = new clsSQLParameters();\n $this->s_cue_TipAuxiliar->ds->wp->AddParameter(\"1\", \"expr13\", ccsText, \"\", \"\", $this->s_cue_TipAuxiliar->ds->Parameters[\"expr13\"], \"\", false);\n $this->s_cue_TipAuxiliar->ds->wp->Criterion[1] = $this->s_cue_TipAuxiliar->ds->wp->Operation(opEqual, \"par_Clave\", $this->s_cue_TipAuxiliar->ds->wp->GetDBValue(\"1\"), $this->s_cue_TipAuxiliar->ds->ToSQL($this->s_cue_TipAuxiliar->ds->wp->GetDBValue(\"1\"), ccsText),false);\n $this->s_cue_TipAuxiliar->ds->Where = $this->s_cue_TipAuxiliar->ds->wp->Criterion[1];\n $this->s_cue_Estado = new clsControl(ccsListBox, \"s_cue_Estado\", \"s_cue_Estado\", ccsInteger, \"\", CCGetRequestParam(\"s_cue_Estado\", $Method));\n $this->s_cue_Estado->DSType = dsListOfValues;\n $this->s_cue_Estado->Values = array(array(\"0\", \"INACTIVO\"), array(\"1\", \"ACTIVO\"));\n $this->s_cue_Estado->HTML = true;\n $this->Button_DoSearch = new clsButton(\"Button_DoSearch\");\n }\n }", "title": "" }, { "docid": "ea1baaff4e14142863cadeaf7732444a", "score": "0.4773839", "text": "public function query()\n {\n\t\t\t\t\n $levantamentos = Levantamento::query()\n ->select([\n 'levantamentos.id',\n 'obras.nome as obra',\n\t\t\t\t'levantamentos.apropriacao',\n\t\t\t\t'levantamentos.insumo', \n\t\t\t\t'levantamentos.torre',\n\t\t\t\t'levantamentos.andar',\n\t\t\t\t'levantamentos.pavimento',\n\t\t\t\t'levantamentos.trecho',\n\t\t\t\t'levantamentos.comodo',\n\t\t\t\t'levantamentos.parede',\n\t\t\t\t'levantamentos.trecho_parede',\n\t\t\t\t'levantamentos.personalizavel',\n\t\t\t\t'levantamentos.quantidade',\n\t\t\t\t'levantamentos.perda',\n\t\t\t\t'levantamentos.created_at'\t\t\t\t\t\n ])\n ->join('obras','obras.id','levantamentos.obra_id');\n\t\t//->join('insumos','insumos.codigo','levantamentos.insumo');\t\t\n\t\t\n if($this->obra){\n $levantamentos>where('levantamentos.obra_id', $this->obra);\n }\n\n return $this->applyScopes($levantamentos);\n }", "title": "" }, { "docid": "965660a3a68d3cd592c45b890fc721d3", "score": "0.47721496", "text": "public function consultaCalendario() {\n $consultalistaJornadas = $this->db->select(\"SELECT * FROM calendario \");\n return $consultalistaJornadas;\n }", "title": "" }, { "docid": "7db3e17ba66a5920196ad16fe5f1a843", "score": "0.47716883", "text": "public function busqueda()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('subtotal',$this->subtotal);\n\t\t$criteria->compare('descuento',$this->descuento);\n\t\t$criteria->compare('envio',$this->envio);\n\t\t$criteria->compare('iva',$this->iva);\n\t\t$criteria->compare('descuentoRegalo',$this->descuentoRegalo);\n\t\t$criteria->compare('total',$this->total);\n\t\t$criteria->compare('estado',$this->estado);\n\t\t$criteria->compare('fecha',$this->fecha);\n\t\t$criteria->compare('bolsa_id',$this->bolsa_id);\n\t\t$criteria->compare('user_id',$this->user_id);\n\t\t//$criteria->compare('pago_id',$this->pago_id);\n\t\t//$criteria->compare('detalle_id',$this->detalle_id);\n\t\t$criteria->compare('direccionEnvio_id',$this->direccionEnvio_id);\n\t\t$criteria->compare('tracking',$this->tracking);\n\t\t$criteria->compare('seguro',$this->seguro);\n\t\t$criteria->compare('zoho_id',$this->zoho_id);\n\t\t\n\t\t$criteria->addCondition('estado != 6');\n $criteria->order = 'fecha DESC';\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "7a91c37a0d389c1548c9a4417b418f72", "score": "0.47708264", "text": "public function relatorioCustomizadoAction()\n {\n $this->view->disable();\n $response = new Response();\n $util = new Util();\n $gerar = new Relatorio();\n $dados = filter_input_array(INPUT_GET);\n $params = array();\n parse_str($dados[\"dados\"], $params);\n\n $where = \"Circuitos.excluido = 0\";\n\n if (!empty($params[\"id_cliente\"]))\n {\n $where .= \" AND Circuitos.id_cliente = {$params[\"id_cliente\"]}\";\n }\n if (!empty($params[\"id_cliente_unidade\"]))\n {\n $where .= \" AND Circuitos.id_cliente_unidade = {$params[\"id_cliente_unidade\"]}\";\n }\n if (!empty($params[\"fieldDesignacao\"]))\n {\n $where .= \" AND Circuitos.designacao = {$params[\"fieldDesignacao\"]}\";\n }\n if (!empty($params[\"fieldDesignacaoAnterior\"]))\n {\n $where .= \" AND Circuitos.designacao_anterior = '{$params[\"fieldDesignacaoAnterior\"]}'\";\n }\n if (!empty($params[\"id_cidadedigital\"]))\n {\n $where .= \" AND Circuitos.id_cidadedigital = {$params[\"id_cidadedigital\"]}\";\n }\n if (!empty($params[\"id_conectividade\"]))\n {\n $where .= \" AND Circuitos.id_conectividade = {$params[\"id_conectividade\"]}\";\n }\n if (!empty($params[\"id_contrato\"]))\n {\n $where .= \" AND Circuitos.id_contrato = {$params[\"id_contrato\"]}\";\n }\n if (!empty($params[\"id_tipolink\"]))\n {\n $where .= \" AND Circuitos.id_tipolink = {$params[\"id_tipolink\"]}\";\n }\n if (!empty($params[\"id_funcao\"]))\n {\n $where .= \" AND Circuitos.id_funcao = {$params[\"id_funcao\"]}\";\n }\n if (!empty($params[\"id_tipoacesso\"]))\n {\n $where .= \" AND Circuitos.id_tipoacesso = {$params[\"id_tipoacesso\"]}\";\n }\n if (!empty($params[\"id_fabricante\"]))\n {\n $where .= \" AND Circuitos.id_fabricante = {$params[\"id_fabricante\"]}\";\n }\n if (!empty($params[\"id_modelo\"]))\n {\n $where .= \" AND Circuitos.id_modelo = {$params[\"id_modelo\"]}\";\n }\n if (!empty($params[\"id_equipamento\"]))\n {\n $where .= \" AND Circuitos.id_equipamento = {$params[\"id_equipamento\"]}\";\n }\n if (!empty($params[\"fieldIpRedelocal\"]))\n {\n $where .= \" AND Circuitos.ip_redelocal = '{$params[\"fieldIpRedelocal\"]}'\";\n }\n if (!empty($params[\"fieldIpGerencia\"]))\n {\n $where .= \" AND Circuitos.ip_gerencia = '{$params[\"fieldIpGerencia\"]}'\";\n }\n if (!empty($params[\"banda\"]))\n {\n $where .= \" AND Circuitos.id_banda = {$params[\"banda\"]}\";\n }\n if (!empty($params[\"fieldTag\"]))\n {\n $where .= \" AND Circuitos.tag = '{$params[\"fieldTag\"]}'\";\n }\n if (!empty($params[\"fieldSsid\"]))\n {\n $where .= \" AND Circuitos.ssid = '{$params[\"fieldSsid\"]}'\";\n }\n if (!empty($params[\"fieldChamado\"]))\n {\n $where .= \" AND Circuitos.chamado = '{$params[\"fieldChamado\"]}'\";\n }\n if (!empty($params[\"id_status\"]))\n {\n $where .= \" AND Circuitos.id_status = {$params[\"id_status\"]}\";\n }\n if (!empty($params[\"id_tipoesfera\"]))\n {\n $where .= \" AND PessoaJuridica1.id_tipoesfera = {$params[\"id_tipoesfera\"]}\";\n }\n if (!empty($params[\"id_setor\"]))\n {\n $where .= \" AND PessoaJuridica1.id_setor = {$params[\"id_setor\"]}\";\n }\n if (!empty($params[\"fieldDataAtivacao\"]))\n {\n $datas = explode(\" - \", $params[\"fieldDataAtivacao\"]);\n $data1 = $util->converterDataUSA($datas[0]);\n $data2 = $util->converterDataUSA($datas[1]);\n $where .= \" AND Circuitos.data_ativacao BETWEEN '{$data1} 00:00:00' AND {$data2} 23:59:59'\";\n }\n if (!empty($params[\"fieldDataAtualizacao\"]))\n {\n $datas = explode(\" - \", $params[\"fieldDataAtualizacao\"]);\n $data1 = $util->converterDataUSA($datas[0]);\n $data2 = $util->converterDataUSA($datas[1]);\n $where .= \" AND Circuitos.data_atualizacao BETWEEN '{$data1} 00:00:00' AND {$data2} 23:59:59'\";\n }\n\n $orderby = $dados[\"ordenar_campo\"] . \" \" . $dados[\"ordenar_sentido\"];\n\n $dados_relatorio = Circuitos::pesquisarRelatorioCircuitos($dados[\"eixo_x\"], $where, $orderby);\n\n $orientacao = null;\n\n if (count($dados[\"eixo_x\"]) > 5)\n {\n $orientacao = \"L\";\n }\n else\n {\n $orientacao = \"P\";\n }\n\n $url = $gerar->gerarPDFRelatório($dados[\"eixo_x\"], $dados_relatorio, $orientacao);\n ## Enviando os dados via JSON ##\n $response->setContent(json_encode(array(\n 'url' => $url\n )));\n return $response;\n }", "title": "" }, { "docid": "d2969a256971e143f1f5b27524f15369", "score": "0.47696838", "text": "public function getOrdenesCompras($data)\n {\n $doc = new DocumentoDTO();\n\n\n $proveedor = $data['proveedor'];\n $f_inicio = $data['f_inicio'];\n $f_fin = $data['f_fin'];\n $numero = $data['numero'];\n $vigencia = $data['vigencia'];\n\n $doc = \\DB::select(\"SELECT RazonSocial as EMPRESA,CONVERT(VARCHAR(19),Fecha,103) FechaF,Fecha,idDocto,TipoDocto,Correlativo,Numero,\n COUNT(Producto) as Productos\n FROM v_ordenCompra_details\n where Fecha BETWEEN '$f_inicio' AND '$f_fin'\n AND RazonSocial like '%$proveedor%'\n AND Numero like '%$numero%'\n AND Vigencia like '%$vigencia%'\n group by RazonSocial,Fecha,idDocto,TipoDocto,Correlativo,Numero\n ORDER BY Fecha DESC \");\n\n\n\n return $doc;\n\n\n }", "title": "" }, { "docid": "9d72798fb96773eabceba162437fb5c1", "score": "0.47624224", "text": "function agregaRegistro($query = \"\")\r\n\t{\r\n\t\tif ($query != \"\") {\r\n\t\t\t$this->setSQL_C($query);\r\n\t\t} // END IF\r\n\t\t$retorno = $this->execute($this->pSQL_C);\r\n\t\treturn $retorno;\r\n\t}", "title": "" }, { "docid": "f1551c35b70c9734fea48a784d25e5bf", "score": "0.47623596", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID_INFORME',$this->ID_INFORME);\n\t\t$criteria->compare('ID_TECNICO',$this->ID_TECNICO);\n\t\t$criteria->compare('ID_CLIENTE',$this->ID_CLIENTE);\n\t\t$criteria->compare('ID_SUCURSAL',$this->ID_SUCURSAL);\n $criteria->compare('ID_UBICACION',$this->ID_UBICACION);\n\t\t$criteria->compare('FECHA_INGRESO',$this->FECHA_INGRESO,true);\n\t\t$criteria->compare('HORA_INGRESO',$this->HORA_INGRESO,true);\n\t\t$criteria->compare('HORA_SALIDA',$this->HORA_SALIDA,true);\n\t\t$criteria->compare('OBSERVACIONES',$this->OBSERVACIONES,true);\n\t\t$criteria->compare('IMAGEN',$this->IMAGEN,true);\n\t\t$criteria->compare('TIMESTAMP',$this->TIMESTAMP,true);\n\n\t\tif (Yii::app()->user->T1()){\n\n\t\t\t$table = Usuarios::model()->find('NOMBRE_USUARIO=\"'.Yii::app()->user->name.'\"');\n\t\t\t\tif ($table->ID_TECNICO == null || $table->ID_TECNICO == ''){\t\t\t\t\t\n\t\t\t\t\t$tecnico = 0;\n\t\t\t\t} else{\n\t\t\t\t\t$tecnico = $table->ID_TECNICO;\n\t\t\t\t}\n\t\t\t$criteria->compare ('ID_TECNICO', $tecnico, true, \"AND\");\n\n\t\t}\n\n\t\t//$criteria->with = array('iDTECNICO');\n\t\t//$criteria->compare('APELLIDOS_TECNICO',$this->iDTECNICO->APELLIDOS_TECNICO);\n\t\t//$criteria->compare('NOMBRE_CLIENTE',$this->iDCLIENTE->NOMBRE_CLIENTE);\n\t\t//$criteria->compare('NOMBRE_SUCURSAL',$this->sucursales->NOMBRE_SUCURSAL);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'keyAttribute'=>'ID_INFORME',\n\t\t\t'criteria'=>$criteria,\t\t\t\n\t\t\t'sort'=>array(\n \t\t\t'defaultOrder'=>'ID_INFORME DESC',\n \t\t\t//'defaultOrder'=>array('TIPO_VISITA'=>CSort::SORT_ASC),\n \t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "7685fd0fa9436964df24ba58f501fff9", "score": "0.47597936", "text": "public function GetBitacora()\n\t{\n\t\t\n\t\t$TareasDb = new Application_Model_DbTable_Calendar_Tareas();\n\t\t$EventsDb = new Application_Model_DbTable_Calendar_Eventos();\n\t\t$UsusarioDb = new Application_Model_DbTable_Calendar_UsuariosTareas();\n\t\t$EventsLogDb = new Application_Model_DbTable_Calendar_EventosLog();\n\t\t$hour_ago = date( \"Y-m-d H:i:s\",strtotime('-14 hour'));\n\t\t$hour_after = date( \"Y-m-d H:i:s\",strtotime('+24 hour'));\n\t\t$selectb = $TareasDb->select()\n\t\t\t\t\t\t\t->setIntegrityCheck(false)\n\t\t\t\t\t\t\t->from(array('a'=>$TareasDb->__get('_name')),array('idTarea'=>'id','limite','title','OU_ID'))\n\t\t\t\t\t\t\t->joinLeft(array('c'=>$UsusarioDb->__get('_name')),'a.id=c.idTarea',array('username'))\n\t\t\t\t\t\t\t->joinLeft(array('b'=>$EventsDb->__get('_name')),'a.id=b.idTarea',array('id','start'=>new Zend_Db_Expr('DATE_FORMAT(start,\\'%d/%m/%Y %H:%i\\')'),'end'=>new Zend_Db_Expr('DATE_FORMAT(end,\\'%d/%m/%Y %H:%i\\')'),'origen','allDay','refer','description','status','cliente','centro','turno'))\n\t\t\t\t\t\t\t->joinLeft(array('d'=>$EventsLogDb->__get('_name')),'b.id=d.idEvento',array('Fecha Log'=>new Zend_Db_Expr('DATE_FORMAT(fecha,\\'%d/%m/%Y %H:%i\\')'),'User Log'=>'username','Message Log'=>'msj'))\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//->where('c.username = ?',$this->view->user->username)\n\t\t\t\t\t\t\t->where('a.programada IS NOT NULL')\n\t\t\t\t\t\t\t->where('b.status NOT IN(\\'Cancelado\\',\\'Finalizado\\')')\n\t\t\t\t\t\t\t->where(new Zend_Db_Expr(\"b.start BETWEEN '$hour_ago' AND '$hour_after' \"))\n\t\t\t\t\t\t\t->group('a.id')\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t->order(array('b.start','d.fecha DESC'))\n\t\t;\n\t\t//die($selectb->__toString());\n\t\t$listb = $TareasDb->fetchAll($selectb)->toArray();\n\t\t\n\t\t\n\t\t$TareasProgramadas = array();\n\t\t$TareasProgramadas['count'] = count($listb);\n\t\t$TareasProgramadas['list'] = self::setTiming($listb);\n\t\t$TareasProgramadas['Estado'] = 'Prueba de ejecución...';\n// \t\t$TareasProgramadas['list'] = $this->view->partialLoop('partials/tareasList.phtml',self::setTiming($listb));\n\t\t\n\t\t$Tareas = array('programadas'=>$TareasProgramadas);\n\t\techo json_encode($Tareas);\n\t\t\n// \t\treturn $this->view->partialLoop('partials/tareasList.phtml',self::setTiming($Tareas));\n\t}", "title": "" }, { "docid": "f6ab3ce3a59829e7f0ed9df360b412ac", "score": "0.47583848", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n if($this->pesquisar == ''){\n \t\t$criteria->compare('cod_aluno',$this->cod_aluno,true);\n\n\t\t$criteria->compare('ra_aluno',$this->ra_aluno,true);\n\n\t\t$criteria->compare('nome_aluno',$this->nome_aluno,true);\n\n\t\t$criteria->compare('sexo_aluno',$this->sexo_aluno,true);\n\n\t\t$criteria->compare('local_nasc_aluno',$this->local_nasc_aluno,true);\n\n\t\t$criteria->compare('data_nasc',$this->data_nasc,true);\n\n\t\t$criteria->compare('nome_mae',$this->nome_mae,true);\n\n\t\t$criteria->compare('nome_pai',$this->nome_pai,true);\n\n\t\t$criteria->compare('email_resp',$this->email_resp,true);\n\n\t\t$criteria->compare('email_aluno',$this->email_aluno,true);\n\n\t\t$criteria->compare('caminho',$this->caminho,true);\n\n\t\t$criteria->compare('Etnia_cod_etnia',$this->Etnia_cod_etnia);\n\n\t\t$criteria->compare('password',$this->password,true);\n\n\t\t$criteria->compare('cep',$this->cep,true);\n\n\t\t$criteria->compare('end_aluno',$this->end_aluno,true);\n\n\t\t$criteria->compare('num_end',$this->num_end);\n\n\t\t$criteria->compare('bairro_aluno',$this->bairro_aluno,true);\n\n\t\t$criteria->compare('comp_aluno',$this->comp_aluno,true);\n\n\t\t$criteria->compare('cidade_aluno',$this->cidade_aluno,true);\n\n }else{\n \n \t\t$criteria->compare('cod_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('ra_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('nome_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('sexo_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('local_nasc_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('data_nasc',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('nome_mae',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('nome_pai',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('email_resp',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('email_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('caminho',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('Etnia_cod_etnia',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('password',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('cep',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('end_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('num_end',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('bairro_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('comp_aluno',$this->pesquisar,true,'OR');\n\n\t\t$criteria->compare('cidade_aluno',$this->pesquisar,true,'OR');\n\n }\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n 'pagination'=>array(\n 'pageSize'=>Yii::app()->params['PageSize'],\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "377d35555a93fad7c9ff939ebbf5500d", "score": "0.47549814", "text": "public function newQuery()\n {\n\n }", "title": "" }, { "docid": "c166a0f40ff5ee9e1e4e2cb62711172f", "score": "0.4753605", "text": "public function query()\n {\n return new FirebirdQueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "d9c15eaf1d64dba4fc6f5abb1d9e5063", "score": "0.4739745", "text": "public static function obtener_cotos($fecha_inicio = null, $fecha_fin = null)\n {\n $query = Coto::select(DB::raw(\"cotos.*, users.correo AS 'correo_servicio', users.contra as contra_user_servicio, users_2.contra as contra_guardia,\n users_2.nombre_completo AS 'guardia_responsable', users_2.correo AS 'correo_guardia'\"))\n ->leftJoin('users', 'cotos.users_id', '=', 'users.id')//Tabla que trae los datos del usuario del servicio\n ->leftJoin('users as users_2', 'cotos.guardia_users_id', '=', 'users_2.id')//tabla que trae los datos del usuario del guardia\n ->where('cotos.status', 1);\n if ( !empty($fecha_inicio) ) {\n \t$query->where('cotos.created_at','>=',$fecha_inicio.' 00:00:00');\n }\n\n if ( !empty($fecha_fin) ) {\n \t$query->where('cotos.created_at','<=',$fecha_fin.' 23:59:59');\n }\n\n /*if (($fecha_inicio || $fecha_fin) {\n dd('entro');\n //$query->where('users.status', 1);\n }*/\n $cotos = $query->get();\n\n return $cotos;\n }", "title": "" }, { "docid": "3c1bc30a418537848bf7c8deb6b96081", "score": "0.47342682", "text": "function queryValoresRecaudo($idAcreedor_, $qDateStart_){//, $qDateEnd_ = null\n global $db; \n $dataQuery = array(); \n \n /*if($qDateStart_ != $qDateEnd_){ \n $db->where('fecha_valores_cobrar_dia', array($qDateStart_, $qDateEnd_), 'BETWEEN'); \n }else{\n $db->where('fecha_valores_cobrar_dia', $qDateStart_); \n }*/ \n \n $db->where('id_acreedor', $idAcreedor_);\n $db->where('fecha_valores_cobrar_dia', $qDateStart_);\n $queryTbl = $db->get (\"valores_cobrar_dia\", 1,\"dinero_recaudar_hoy, dinero_capital_hoy, dinero_interes_hoy, fecha_valores_cobrar_dia\");\n \n $rowQueryTbl = count($queryTbl);\n if ($rowQueryTbl > 0){ \n foreach ($queryTbl as $qKey) { \n \n $dataQuery = $qKey;\n } \n }\n return $dataQuery;\n}", "title": "" }, { "docid": "9db3bcd4306aca8efc84aadb1c1cf04e", "score": "0.47269416", "text": "public function createQuery() : QueryBuilder\n {\n $this->currentQuery = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->tableName);\n\n $this->andWhereDeleted(false);\n\n return $this->currentQuery;\n }", "title": "" }, { "docid": "bddb1ba35c703f2ed2c0a0d8b3ad25f8", "score": "0.47268045", "text": "protected function newQuery()\n {\n return $this->getInstance()->newQuery();\n }", "title": "" }, { "docid": "0c51d9406e3a865e7c076f8ca3c6097a", "score": "0.4726575", "text": "public function __construct()\n {\n parent::__construct();\n \n $this->setDatabase('estagio'); // defines the database\n $this->setActiveRecord('Concedente'); // defines the active record\n $this->addFilterField('nome', 'ilike', 'nome'); // filter field, operator, form field\n $this->setDefaultOrder('id', 'desc'); // define the default order\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_search_convenio');\n $this->form->setFormTitle('Lista de Empresas');\n \n $nome = new TEntry('nome');\n $this->form->addFields( [new TLabel('Nome:')], [$nome] );\n \n // add form actions\n $this->form->addAction('Buscar', new TAction([$this, 'onSearch']), 'fa:search blue');\n \n $this->form->addActionLink('Limpar', new TAction([$this, 'clear']), 'fa:eraser red');\n \n // keep the form filled with the search data\n $this->form->setData( TSession::getValue('ConvenioList_filter_data') );\n \n // creates the DataGrid\n $this->datagrid = new BootstrapDatagridWrapper(new TDataGrid);\n $this->datagrid->width = \"100%\";\n $this->datagrid->datatable= 'true';\n \n // creates the datagrid columns\n // $col_id = new TDataGridColumn('id', 'Id', 'right', '5%');\n $col_name = new TDataGridColumn('nome', 'Name', 'left', '30%');\n $col_situacao = new TDataGridColumn('situacao', 'Status', 'left', '25%');\n $col_representante= new TDataGridColumn('representante', 'Representante', 'left', '15%');\n $col_email = new TDataGridColumn('email', 'E-mail', 'left', '15%');\n $cidade = new TDataGridColumn('cidade->nome', 'Cidade', 'center', '15%');\n \n \n // $this->datagrid->addColumn($col_id);\n $this->datagrid->addColumn($col_name);\n $this->datagrid->addColumn($col_situacao);\n $this->datagrid->addColumn($col_representante);\n $this->datagrid->addColumn($col_email);\n $this->datagrid->addColumn($cidade);\n\n $col_situacao->setTransformer(array($this, 'Ajustar'));\n \n \n \n // create the datagrid model\n $this->datagrid->createModel();\n \n // creates the page navigation\n $this->pageNavigation = new TPageNavigation;\n $this->pageNavigation->setAction(new TAction(array($this, 'onReload')));\n \n // creates the page structure using a table\n $vbox = new TVBox;\n $vbox->style = 'width: 100%';\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n $vbox->add(TPanelGroup::pack('', $this->datagrid, $this->pageNavigation));\n \n // add the table inside the page\n parent::add($vbox);\n }", "title": "" }, { "docid": "42cd65f5996067e853fd82e2e0789587", "score": "0.47219163", "text": "public function selecionarAction() { \r\n\r\n\t // Captura a sessão\r\n $sessao = new Zend_Session_Namespace('portoweb');\r\n\r\n // Recupera os parametros da requisição\r\n $params = $this->_request->getParams();\r\n \r\n // Instancia os modelos de dados\r\n $consColuna\t= new ConsultaColunaTabelaModel();\r\n $tpFiltro = new ConsultaTipoFiltroModel();\r\n \r\n // Define os filtros para a cosulta\r\n $where = $consColuna->addWhere(array(\"C.CD_CONSULTA = ?\" => $params['cd_consulta']))\r\n ->getWhere();\r\n \r\n $select = $consColuna->select()\r\n\t\t\t\t\t\t\t->setIntegrityCheck(false)\r\n ->from(array(\"TC\" => \"COLUNA\"), array(\"TC.TP_COLUNA\",\r\n \"TC.TAMANHO\",\r\n \"TC.NO_COLUNA\",\r\n \"CC.CD_COND_COL\",\r\n \"CC.CD_CONSULTA\",\r\n \"SG_TABELA\" => \"LTRIM(RTRIM(CC.SG_TABELA))\",\r\n \"CC.CD_COLUNA\",\r\n \"CC.DS_COMPLEMENTO\",\r\n \"CC.ABRE_PAR\",\r\n \"CC.FECHA_PAR\",\r\n \"CC.TP_LIGACAO\",\r\n \"LIG_INT_PAR\" => new Zend_Db_Expr(\"LTRIM(RTRIM(CC.LIG_INT_PAR))\"),\r\n \"LIG_EXT_PAR\" => new Zend_Db_Expr(\"LTRIM(RTRIM(CC.LIG_EXT_PAR))\"),\r\n \"CC.ORD_COND\",\r\n \"C.TITULO\",\r\n \"CF.NO_TP_FILTRO\",\r\n \"CF.DS_TP_FILTRO\"))\r\n ->join(array(\"CC\" => \"CONSULTA_CONDICAO_COLUNA\"), \"TC.CD_COLUNA = CC.CD_COLUNA\", array())\r\n ->join(array(\"CT\" => \"CONSULTA_TABELA\"), \"TC.CD_TABELA = CT.CD_TABELA AND LTRIM(RTRIM(CC.SG_TABELA)) = LTRIM(RTRIM(CT.SG_TABELA))\", array())\r\n ->join(array(\"C\" => \"CONSULTA\"), \"CT.CD_CONSULTA = C.CD_CONSULTA\", array())\r\n ->join(array(\"CF\" => \"CONSULTA_TIPO_FILTRO\"), \"CC.TP_LIGACAO = CF.CD_TP_FILTRO\", array())\r\n ->where($where)\r\n ->order(\"CC.ORD_COND ASC\");\r\n \r\n // Recupera a transação\r\n $res = $consColuna->fetchAll($select);\r\n\r\n\t\tif (count($res) > 0) {\r\n\t\t\t// Reenvia os valores para o formulário\r\n\t\t\t$this->view->cd_consulta = $params['cd_consulta'];\r\n\t\t\t$this->view->cd_usuario = $sessao->perfil->CD_USUARIO;\r\n\t\t\t$this->view->titulo = $res[0]['TITULO'];\r\n\r\n\t\t\t$this->view->dados = $res;\r\n\r\n\t\t}else{\r\n\r\n\t\t\t// Retorna as transações, menus e sistemas\r\n\t\t\t$select = $consColuna->select()\r\n\t\t\t\t\t\t\t\t->setIntegrityCheck(false)\r\n\t\t\t\t\t\t\t\t->from(array(\"C\" => \"CONSULTA\"), array(\"C.TITULO\"))\r\n\t\t\t\t\t\t\t\t->where($where);\r\n\r\n\t\t\t// Recupera a transação\r\n\t\t\t$res = $consColuna->fetchAll($select);\r\n\r\n\t\t\t$this->view->cd_consulta = $params['cd_consulta'];\r\n\t\t\t$this->view->dados = array();\r\n\t\t\t$this->view->cd_usuario = $sessao->perfil->CD_USUARIO;\r\n\t\t\t$this->view->titulo = $res[0]['TITULO'];\r\n\r\n\t\t}\r\n \r\n // Busca os filtros para ligação entre as colunas\r\n $selFiltros = $tpFiltro->queryBuscaFiltrosConsulta();\r\n \r\n // Executa a consulta\r\n $resConFiltro = $tpFiltro->fetchAll($selFiltros);\r\n \r\n // Joga para a os dados da consulta\r\n $this->view->filtros = $resConFiltro;\r\n }", "title": "" }, { "docid": "27bf173e349e39abaca642e44205c45a", "score": "0.4716828", "text": "function recuperarConsolidado(){\n\t\t$this->procedimiento='cd.ft_cuenta_doc_sel';\n\t\t$this->transaccion='CD_REPCON_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t$this->setCount(false);\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\t\t//Definicion de la lista del resultado del query\n\n\t\t$this->captura('codigo_categoria','VARCHAR');\n\t\t$this->captura('partida','VARCHAR');\n\t\t$this->captura('importe','NUMERIC');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//var_dump($this->consulta); exit;\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "01a08299b046751b3f79bebc4d3ef639", "score": "0.4716633", "text": "public function consultarTodas()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->select = \"t.idTarea, CONCAT(DATE_FORMAT( t.fechaTarea , '%d-%m-%y' ),' - CLIENTE: ',CONCAT(clientes.apellido,' ',clientes.nombre,' ',clientes.razonSocial ),' VISITA: ',IF(t.visitaRutina=1,'SI','NO') ,' DESCRIPCION: ',t.descripcionTarea,' REF: ',t.idTarea) as descripcionTarea\";\n $criteria->join=\"LEFT JOIN clientes on clientes.idCliente = t.idClienteTarea\";\n $criteria->order='t.idTarea desc';\n\t\treturn self::model()->findAll($criteria);\n\t}", "title": "" }, { "docid": "df602210b04263903e6876a35f04e63c", "score": "0.4714672", "text": "public function search()\n\t{\n\t\t$criteria = new \\CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\n\t\t$criteria->compare('status_id', $this->status_id);\n\t\t$criteria->compare('followup_quanityt', $this->followup_quantity);\n\t\t$criteria->compare('followup_quantity', $this->followup_quantity);\n\t\t$criteria->compare('followup_period_id', $this->followup_period_id);\n\t\t$criteria->compare('role_id', $this->role_id);\n\t\t$criteria->compare('role_comments', $this->role_comments);\n\n\t\treturn new \\CActiveDataProvider(get_class($this), array(\n\t\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" } ]
5a2e39b605ef3024b173f89ee9576d5c
[fetch get all the reservations from the given user from the database based on the $when variable]
[ { "docid": "60527487e4efd54fde0ecdccdc71f8fd", "score": "0.66060203", "text": "public function fetch($code = null,$when) {\n if($when === 'expired'){\n $fetch = $this->_db->query(\"SELECT * FROM reservations WHERE ov = ? AND date < ? order by date\", array($code, date(\"Y-m-d\")));\n } else if($when === 'upcoming') {\n $fetch = $this->_db->query(\"SELECT * FROM reservations WHERE ov = ? AND date >= ? order by date\", array($code, date(\"Y-m-d\")));\n }\n if(!$fetch){\n throw new Exception(\"There was a problem making this reservation\");\n } else {\n return $fetch->results();\n }\n\n }", "title": "" } ]
[ { "docid": "1e429ec3d873fee6b775b2f673ba986e", "score": "0.62347203", "text": "public function reservations() {\n $this->template->content = View::instance(\"v_reservations_reservations\");\n $this->template->title = \"Reservations\";\n\n # Build the query to get all the users\n // $q = \"SELECT * FROM reservations\";\n\n\t $q = \"SELECT *\n FROM reservations\n WHERE user_id = \".$this->user->user_id.\" order by reservation_id desc\";\n\n # Execute the query to get all the users.\n # Store the result array in the variable $users\n $reservations = DB::instance(DB_NAME)->select_rows($q);\n\n # Build the query to figure out what reservations does this user already have?\n # I.e. who are they following\n $q = \"SELECT *\n FROM reservations\n WHERE user_id = \".$this->user->user_id;\n\n\n\n # Pass data (reservations) to the view\n $this->template->content->reservations = $reservations;\n\n\n # Render the view\n echo $this->template;\n }", "title": "" }, { "docid": "a94f97fbe36a3f206c7577532007fc68", "score": "0.6222676", "text": "public function getRespondToReservation(Request $request)\n {\n\t\t$user = null;\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t\t\n\t\t\tif($this->helpers->isAdmin($user))\n\t\t\t{\n\t\t\t\t$hasPermission = $this->helpers->hasPermission($user->id,['view_users','edit_users']);\n\t\t\t\t#dd($hasPermission);\n\t\t\t\t$req = $request->all();\n\t\t\t\t\n\t\t\t\tif($hasPermission)\n\t\t\t\t{\n\t\t\t\t$validator = Validator::make($req,[\n\t\t 'xf' => 'required|numeric',\n\t\t\t\t\t\t\t'axf' => 'required',\n\t\t\t\t\t\t\t'gxf' => 'required|numeric'\n\t\t ]);\n\t\t\t\t\t\t\n\t\t\t\tif($validator->fails())\n {\n session()->flash(\"validation-status-error\",\"ok\");\n\t\t\t return redirect()->intended('/');\n }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$dt = [\n\t\t\t 'id' => $req['xf'],\n\t\t\t 'apartment_id' => $req['axf'],\n\t\t\t 'user_id' => $req['gxf']\n\t\t\t ];\n\t\t\t \n\t\t\t if($this->helpers->hasReservation($dt))\n\t\t\t {\n\t\t\t\t $dt['type'] = $req['type'];\n\t\t\t\t $dt['auth'] = $user->id;\n\t\t\t\t\n\t\t\t $this->helpers->respondToReservation($dt);\n\t\t\t session()->flash(\"respond-to-reservation-status\",\"ok\");\n return redirect()->intended('/');\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \t session()->flash(\"duplicate-reservation-status-error\",\"ok\");\n\t\t\t return redirect()->intended('/');\n\t\t\t }\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"permissions-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('/');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAuth::logout();\n\t\t\t\t$u = url('/');\n\t\t\t\treturn redirect()->intended($u);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn redirect()->intended('/');\n\t\t}\n }", "title": "" }, { "docid": "f1f8a733fae8559bba5cf431ddce041c", "score": "0.61696804", "text": "public function get_new_reserv_with_user_id($user_id){\n $reservations = Reservation::where('user_id',$user_id)\n ->limit(5)\n ->get();\n return reservationResource::collection($reservations);\n }", "title": "" }, { "docid": "be08d6f07d108d0767a31d5de9a5a7d6", "score": "0.6147693", "text": "public function get_reserv_with_user_id($user_id){\n $reservations = Reservation::where('user_id',$user_id)\n ->get();\n return reservationResource::collection($reservations);\n }", "title": "" }, { "docid": "93c1a53e3e4f18523630d03c741ec55c", "score": "0.60279727", "text": "public function selectReservations() {\n $tab=[];\n $pdo=$this->connect_db('boutique');\n $reqlogin = $pdo->prepare(\"SELECT r.id, r.id_utilisateur, r.titrereservation, r.typeevenement, r.datedebut, r.heuredebut FROM reservation AS r INNER JOIN utilisateurs AS u ON r.id_utilisateur = u.id\");\n $reqlogin->execute($tab);\n $result=$reqlogin->fetchAll();\n return $result;\n }", "title": "" }, { "docid": "661c6df3520381cc34400caaac9fe7ec", "score": "0.5877947", "text": "public function get_accepted_reserv_with_user_id($user_id){\n $reservations = Reservation::where('status',1)\n ->where('user_id',$user_id)\n ->get();\n return reservationResource::collection($reservations);\n }", "title": "" }, { "docid": "ab6e3b61bdce389c508fcdf53cfe70ec", "score": "0.58596313", "text": "public function get_confirmable_reserv_with_user_id($user_id){\n $reservations = Reservation::where('status',2)\n ->where('user_id',$user_id)\n ->get();\n return reservationResource::collection($reservations);\n }", "title": "" }, { "docid": "ecf95b7c58f77c5b9fe0306e04c4b1d1", "score": "0.5789454", "text": "public function postEventsAction(Request $request)\n {\n $connectedUser = $this->getUser(); \n $clientId = $connectedUser->getId();\n\n // if($connectedUser->getRoles()[0] == 'ROLE_USER')\n //{\n // $userId = $clientId;\n //}else\n //{\n $userId = $request->request->get('userid');\n //}\n $dateStart = $request->request->get('dateStart');\n $dateEnd = $request->request->get('dateEnd');\n $title = $request->request->get('title');\n \n\n if(!$this->isEventValid($dateStart,$dateEnd,$userId))\n {\n $view = $this->view(\"Invalid reservation\", 400);\n return $this->handleView($view);\n }else if($this->isFree($dateStart,$dateEnd,$userId))\n {\n $reservation = new Reservations();\n echo(\"after\");\n $dateTimeStart = new \\DateTime($dateStart);\n $dateTimeEnd = new \\DateTime($dateEnd);\n $reservation->setDateStart($dateTimeStart);\n $reservation->setDateEnd($dateTimeEnd);\n $reservation->setTitle($title);\n $reservation->setIdUser($userId);\n $reservation->setIdClient($clientId);\n $reservation->setDuree(30);\n \n $em = $this->getDoctrine()->getManager();\n\n $em->persist($reservation);\n $em->flush();\n\n $data = \"ok\";\n $view = $this->view($data, 200)\n ->setTemplate('default/getUsers.html.twig')\n ->setTemplateVar('users');\n\n return $this->handleView($view);\n }else\n {\n $view = $this->view(\"Date is not free\", 400);\n return $this->handleView($view);\n }\n \n }", "title": "" }, { "docid": "6b707afe6317183d5df51f06a34eae76", "score": "0.57858723", "text": "public function getBillsWithUserReservation () {\n if (strpos(Route::getFacadeRoot()->current()->uri(), 'admin') !== false) {\n $bills = self::select('*')->orderBy('bill_bill_date', 'DESC')->get();\n } else {\n\n $bills = self::where('bill_user_id', '=', Auth::id())->get();\n }\n $bills->each(function ($b) {\n global $subtotals;\n global $totals;\n $r = new Reservation();\n $b->reservation = $r->where('id', '=', $b->reservation_id)\n ->select('id', 'reservation_started_at', 'reservation_ended_at', 'reservation_nights', 'user_id')\n ->with(array(\n 'guests' => function ($q) {\n $q->select('guests.id', 'reservation_id', 'guest_number', 'guest_night', 'guest_ended_at', 'guest_started_at', 'role_id');\n },\n ))\n ->first();\n $b->user = \\User::find($b->reservation->user_id);\n $b->reservation->guests->each(function ($g) use($b) {\n $g->calcGuestSumTotals();\n $s = new DateTime($g->guest_started_at);\n $g->guest_started_at_show = $s->format('d. m Y');\n $e = new DateTime($g->guest_ended_at);\n $g->guest_ended_at_show = $e->format('d. m Y');\n $b->reservation->reservation_sum += $g->guestSum;\n });\n $bds = new \\DateTime($b->bill_bill_date);\n $s = new DateTime($b->reservation->reservation_started_at);\n $b->reservation->reservation_started_at_show = $s->format('d. m Y');\n $e = new DateTime($b->reservation->reservation_ended_at);\n $b->reservation->reservation_ended_at_show = $e->format('d. m Y');\n $b->bill_bill_date_show = $bds->format(trans('formats.short-date-ts'));\n if (isset($b->bill_paid)) {\n $bds = new \\DateTime($b->bill_paid);\n $b->bill_paid_show = $bds->format(trans('formats.short-date-ts'));\n }\n\n if (isset($b->bill_resent_date)) {\n $bds = new \\DateTime($b->bill_resent_date);\n $b->bill_resent_date_show = $bds->format(trans('formats.short-date-ts'));\n }\n\n $ubc = DB::select(DB::raw('select `country_name_' . trans('formats.langjs') . '` from countries where country_code = ' . $b->user->user_country_code));\n $b->user->country = $ubc[0]->{'country_name_' . trans('formats.langjs')};\n $subtotals += (float)$b->bill_sub_total;\n $totals += (float)$b->bill_total;\n $b->subtotals = $subtotals;\n $b->totals = $totals;\n });\n return $bills;\n }", "title": "" }, { "docid": "ba59d6020d077e85110f8d86ceec21e3", "score": "0.5751105", "text": "function getMyAppointments ($user_id){\n global $db;\n $sql='SELECT firstname, lastname, date, time, location FROM `users`, `appointments` WHERE users.user_id = appointments.user_id AND users.user_id = ? ORDER BY date DESC';\n $statement = $db->prepare($sql);\n $statement->bindValue(1, $user_id); \n $statement->execute();\n $result = $statement->fetchAll();\n $statement->closeCursor();\n return $result; \n}", "title": "" }, { "docid": "5f24ad611e1f2850cfd1a2e644a05c6f", "score": "0.5714096", "text": "public function details($id_space, $invoice_id, $lang){\n $sql = \"SELECT DISTINCT recipient_id FROM bk_calendar_entry WHERE invoice_id=?\";\n $users = $this->runRequest($sql, array($invoice_id))->fetchAll();\n\n // all resources in the invoice\n $sqlr = \"SELECT DISTINCT resource_id FROM bk_calendar_entry WHERE invoice_id=?\";\n $resources = $this->runRequest($sqlr, array($invoice_id))->fetchAll();\n\n\n\n $modelResource = new ResourceInfo();\n $modelUser = new CoreUser();\n\n $data = array();\n $data[\"title\"] = BookingTranslator::MAD($lang);\n $data[\"header\"] = array(\n \"label\" => BookingTranslator::Resource($lang),\n \"user\" => CoreTranslator::User($lang),\n \"date\" => CoreTranslator::Date($lang),\n \"quantity\" => BookingTranslator::Quantities($lang)\n );\n $data[\"content\"] = array();\n foreach($resources as $resource){\n $resouceName = $modelResource->getName($resource[0]);\n\n foreach($users as $user){\n\n //echo \"user = \" . $user[0] . \", resource = \" . $resource[0] . \"<br/>\";\n\n $sql = \"SELECT * FROM bk_calendar_entry WHERE invoice_id=? AND recipient_id=? AND resource_id=? ORDER BY start_time ASC\";\n $resreq = $this->runRequest($sql, array($invoice_id, $user[0], $resource[0]));\n if ($resreq->rowCount() > 0){\n $reservations = $resreq->fetchAll();\n $time = 0;\n foreach($reservations as $res){\n $time += $res[\"end_time\"] - $res[\"start_time\"];\n }\n $data[\"content\"][] = array(\n \"label\" => $resouceName,\n \"user\" => $modelUser->getUserFUllName($user[0]),\n \"date\" => CoreTranslator::dateFromEn(date(\"Y-m-d\", $reservations[0][\"start_time\"]), $lang) . \" - \" .\n CoreTranslator::dateFromEn(date(\"Y-m-d\", $reservations[count($reservations)-1][\"start_time\"]), $lang),\n \"quantity\" => $time/3600\n );\n }\n\n\n }\n }\n return $data;\n }", "title": "" }, { "docid": "d7039f7da42552da53eb4d1af652bc62", "score": "0.57031095", "text": "public function pastReservation()\n {\n if (isset($_SESSION['id']) && isset($_SESSION['user'])) {\n $id = $_SESSION['id'];\n $pastReservations = new ReservationManager();\n $pastReservations->selectAllReservation($id);\n }\n }", "title": "" }, { "docid": "03264f0c7de41df9b6adf8269121eb44", "score": "0.5668911", "text": "public function index()\n {\n $my_id= Auth::user()->getId();\n //return $my_id;\n $myreservations = \\DB::table('reservation')\n ->join('seat', 'seat.id', '=', 'reservation.seat_id')\n ->join('projection', 'projection.id', '=', 'reservation.projection_id')\n ->join('film', 'film.id', '=', 'projection.film_id')\n ->join('hall', 'hall.id', '=', 'projection.hall_id')\n ->join('kino', 'kino.id', '=', 'hall.kino_id')\n ->where('reservation.users_id', '=', $my_id )\n ->select('projection.start AS start', 'film.name AS film', 'kino.name AS kino', 'hall.number AS hall' , 'seat.number AS seat' ,\n 'reservation.price AS price', 'reservation.id AS reservation' , 'projection.id AS projection' , 'reservation.users_id AS user_id')\n ->orderBy('projection.start', 'asc','projection.id')\n ->get();\n //return $myreservations;\n return view('reserve', compact('myreservations'));\n \n \n\n }", "title": "" }, { "docid": "d8bda52d540321d7a84c04c45558b65e", "score": "0.5647813", "text": "public function getReserv()\r\n {\r\n $query = \"SELECT * FROM list_reservation\";\r\n $stmt = $this->connexion()->prepare($query);\r\n $stmt->execute();\r\n\r\n while ($result = $stmt->fetchAll()) {\r\n return $result;\r\n }\r\n }", "title": "" }, { "docid": "8bd3e17c44eabd59d99b13d3c79b59a5", "score": "0.5586163", "text": "function get_reservation_byId($id) {\n global $DB;\n\n return $DB->get_record('roomscheduler_reservations', array('id' => $id));\n}", "title": "" }, { "docid": "960d3e05d4833a45dea6e20544417790", "score": "0.5580597", "text": "function get_all(){\n $where = \"reservation_status <> 'Pending'\";\n $reservations = where( 'reservations', $where );\n\n echo json_encode( $reservations );\n exit;\n}", "title": "" }, { "docid": "82cad6875cb0c15cbb32eed7dc67ed93", "score": "0.55629563", "text": "public function reservationsArray(){\n\t\t$reponse = new Reponse();\n\t\t$date=new Zend_Date();\n\t\t$dateres=$date->get('dd-MM-YYYY');\n\t\t$datestart=new Zend_Date( $dateres.' 00:00:00', 'dd-MM-YYYY HH:mm:ss');\n\t\t$dateend=new Zend_Date( $dateres.' 23:59:59', 'dd-MM-YYYY HH:mm:ss');\n\t\t$start=$datestart->getTimestamp();\n\t\t$end=$dateend->getTimestamp();\n\n\t\t$mylocation = $this->selectedLocation;\n\t\tif( $mylocation instanceof Object_Location ){\n\t\t\t$this->view->reservations= $mylocation->getResource()->getReservationsByDate($start,$end);\n\t\t}\n\t}", "title": "" }, { "docid": "cb4ad2ac94c02839d10e386fe2d5a1d2", "score": "0.554328", "text": "function get_avaliable_rooms($fromTime, $toTime){\n global $DB, $USER, $CFG;\n\n //reservation starts: Start = S, End = E\n //Location: Above Given Start Time : A, Between given start/end: M, After End Time: E\n\n //Cases:\n //SA EA, --(start above, end above) non useful\n //SA EM, --(start above, end mid)\n //SA EE, -- (Start above, end after)\n //SM EA -- (start mid, end above) -- no useful\n //SM EM -- start mid, end mid\n //SM EE -- start mid, end after\n //SE EA -- non useful\n //SE EM -- non useful\n //SE EE -- non useful\n\n\n $sql = \"SELECT DISTINCT * FROM {roomscheduler_rooms} room \".\n\"WHERE room.active = 1 AND room.id not in ( \". //check which rooms are not avaliable\n\"SELECT DISTINCT rom.id FROM {roomscheduler_reservations} res, {roomscheduler_rooms} rom \".\n\"WHERE rom.id = res.location AND res.active=1 AND ( \".\n\"(res.startdate <= $fromTime AND res.enddate <= $toTime and res.enddate > $fromTime ) OR \". //--(start above, end mid)\n\"(res.startdate <= $fromTime AND res.enddate > $toTime ) OR \". //-- (Start above, end after)\n\"(res.startdate >= $fromTime AND res.startdate < $toTime and res.enddate > $fromTime AND res.enddate <= $toTime ) OR \". //-- start mid, end mid\n\"(res.startdate >= $fromTime AND res.startdate < $toTime AND res.enddate > $toTime )) \".//-- start mid, end after\n\");\";\n\n$rooms = $DB->get_records_sql($sql, array(), $limitfrom=0, $limitnum=0);\n\n\nprint '<center><table id=\"open_rooms_table\">';\nprint '<tr><th>'.get_string('room','block_roomscheduler');\nprint '</th><th>'.get_string('resources','block_roomscheduler');\nprint '</th><th>'.get_string('bookroom','block_roomscheduler').'</th></tr>';\nif($rooms){\n$index = 1;\nforeach($rooms as $room){\n\nprint '<tr onclick=\"\"><td>';\n\nprint \"$index. \".$room->name;\n\nprint '</td><td>';\nprint $room->resources;\nprint '</td><td>';\n\nprint '<form><center>';\nif($room->reservable){\nprint '<input type=\"image\" src=\"img/success.gif\" value=\"Book Room\" onclick=\"book_room('.$room->id.');return false;\" />';\n} else {\n$email = $CFG->roomscheduler_manage_email;\n$subject = get_string('book_room_email_subject','block_roomscheduler');\n\n$information = get_string('email_room','block_roomscheduler').\" \".$room->name . \"%0A\";\n$information .= get_string('email_start','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $fromTime ). \"%0A\";\n$information .= get_string('email_end','block_roomscheduler').\" \".date( 'F n, Y @ G:i' , $toTime ). \"%0A\";\n$information .= get_string('email_reason','block_roomscheduler').\" _______________________________%0A%0A\";\n\n$body = get_string('book_room_email_body','block_roomscheduler') . $information;\n$body .= get_string('book_room_email_close','block_roomscheduler') . $USER->firstname .\" \".$USER->lastname ;\n\n\nprint '<a href=\"mailto:'.$email.'?subject='.$subject.'&body='.$body.'\" border=\"0\">\n <img src=\"img/email.png\"></a>';\n\n}\nprint '</form></center>';\nprint '</td></tr>';\n\n\n\n\n $index++;\n}\n}\nprint '</table></center>';\n\n}", "title": "" }, { "docid": "f5f8e2c8bfc363c182abf29d76bbe4c5", "score": "0.54912686", "text": "function get_user_booking_using_id($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id'\";\n $result = $db->query($sql)->fetch();\n return $result;\n}", "title": "" }, { "docid": "6e93458218ef08e66128de4fe94a32c5", "score": "0.5462384", "text": "function row_reservation_user($data){\n\t\t$this->db->select('trajet.voiture,trajet.villedepart,trajet.villearrive,trajet.datedepart,trajet.datearrive,trajet.prixplace, trajet.statut,trajet.place_disponible,reservations.place,reservations.date,reservations.id,reservations.status,reservations.trajet');\n\t\t$this->db->from('trajet');\n\t\t$this->db->join('reservations','reservations.trajet=trajet.id');\n\t\t$this->db->where('reservations.pseudo',$data['pseudo']);\n\t\t$query=$this->db->get();\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "ec1a97a9643db642ff1ea04893264223", "score": "0.5459738", "text": "public function get_all_leave_requests($user_id,$yr=2017){\r\n\t\t\r\n\t\t$user_ids = ($user_id != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($user_id).\"'\":'NULL';\r\n\t\t$one = 1;\r\n\t\t$table1 = 'leave_request_'.$yr;\r\n\t\t$ones = ($one != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($one).\"'\":'NULL';\r\n\t\t$sql1 = $this->hrm_mysql_connect->query(\"SELECT a.user_id, b.supervisor_id FROM leave_reg a JOIN leave_groups b ON a.leave_group=b.group_id WHERE b.supervisor_id=$user_ids || b.delegate=$user_ids\");\r\n\t\tif($sql1->num_rows!=0){\r\n\t\twhile($data = $sql1->fetch_assoc()){\r\n\t\t$staff[] = $data['user_id'];\r\n\t\t}\r\n\t\t$filterExisting = \"'\" . implode(\"', '\", $staff ) . \"'\";\r\n\t\t\r\n\t$sql2 = $this->hrm_mysql_connect->query(\"SELECT a.*, b.user_firstname, b.user_lastname FROM $table1 a LEFT JOIN hrm_users b ON a.user_id=b.user_id LEFT JOIN hrm_reg c ON a.user_id = c.user_id WHERE c.supervisor_id=$user_ids ORDER BY a.id DESC\");\r\n\t$sql3 = $this->hrm_mysql_connect->query(\"SELECT a.*, b.user_firstname, b.user_lastname FROM $table1 a LEFT JOIN hrm_users b ON a.user_id=b.user_id LEFT JOIN hrm_reg c ON a.user_id = c.user_id WHERE c.supervisor_id=$user_ids && a.approval_one = $ones\");\r\n\t $num = $sql3->num_rows;\r\n\t\t\t if($sql2->num_rows==0){\r\n\t\t\t$na = \"\"; \r\n\t\t }else{\r\n\t\t while(($row2 = $sql2->fetch_object())){\r\n\t\t\t$na[] = $row2;\r\n\t\t}\r\n\t\t }\r\n\t\treturn array($na, $num);\r\n\t\t}else {\r\n\t\t\t$sql2 = $this->hrm_mysql_connect->query(\"SELECT a.*, b.user_firstname, b.user_lastname FROM $table1 a LEFT JOIN hrm_users b ON a.user_id=b.user_id LEFT JOIN hrm_reg c ON a.user_id = c.user_id WHERE c.supervisor_id=$user_ids ORDER BY a.id DESC\");\r\n\t$sql3 = $this->hrm_mysql_connect->query(\"SELECT a.*, b.user_firstname, b.user_lastname FROM $table1 a LEFT JOIN hrm_users b ON a.user_id=b.user_id LEFT JOIN hrm_reg c ON a.user_id = c.user_id WHERE c.supervisor_id=$user_ids && a.approval_one = $ones\");\r\n\t $num = $sql3->num_rows;\r\n\t\t if($sql2->num_rows==0){\r\n\t\t\t$na = \"\"; \r\n\t\t }else{\r\n\t\t while(($row2 = $sql2->fetch_object())){\r\n\t\t\t$na[] = $row2;\r\n\t\t}\r\n\t\treturn array($na, $num);\r\n\t\t}\r\n\t\t}\r\n\t\t}", "title": "" }, { "docid": "7ccd34812b63fdeeffea829cbd97b1a3", "score": "0.5432992", "text": "function findBooking() : array\n{ \n $db = new Database;\n $db = $db->dbConnect();\n\n $sql = \"SELECT booking.id, booking_date_debut, booking_time_debut, booking_date_fin, booking_time_fin, number_of_seats, user_i, last_name, first_name, mail \n FROM booking \n INNER JOIN user ON user.id = booking.user_i \";\n $adminGetBooking = $db->query($sql);\n $adminGetBooking = $adminGetBooking->fetchAll();\n return $adminGetBooking;\n}", "title": "" }, { "docid": "9b65364bd13336324399eb80ab4ac08a", "score": "0.54306513", "text": "public function getBusSeats(Request $req)\n {\n $schedule = $req->schedule;\n $date = $req->bookingdate;\n\n $from_sort = Stop::where([\n ['route_id', $req->route],\n ['terminal_id', $req->from_stop]\n ])->get()->first()->sort_order;\n /*$to_sort = Stop::where([\n ['route_id', $req->route],\n ['terminal_id', $req->to_stop]\n ])->get()->first()->sort_order;*/\n\n //dd($from_sort);\n\n $seats = TicketSeat::where([\n ['to_sort', '>', $from_sort],\n ['from_sort', '<=', $from_sort],\n ])\n ->whereHas('ticket', function ($query) use ($schedule, $date) {\n return $query->where('schedule_id', $schedule)\n ->whereDate('booking_for', $date);\n })->get()->toArray();\n\n //dd($seats);\n\n $schedule = Schedule::find($req->schedule);\n $data['schedule'] = $schedule;\n $data['seats'] = $this->toSelect($seats, 'gender', 'seat');\n /* $data['btypes'] = $this->toSelect($schedule->seats()->whereHas('ticket', function($query) use ($schedule, $date){\n return $query->whereDate('booking_for', $date);\n })->addSelect(['seat', 'tickets.btype_id'])->get()->toArray(), 'btype_id', 'seat');*/\n $data['paid'] = $this->toSelect($schedule->seats()->whereHas('ticket', function ($query) use ($schedule, $date) {\n return $query->whereDate('booking_for', $date);\n })->addSelect(['seat', 'tickets.paid'])->get()->toArray(), 'paid', 'seat');\n\n return view('admin.ticket.getBusSeats', $data);\n //return response($schedules);\n }", "title": "" }, { "docid": "e025d55aff5a3f82749d7c581bef37ba", "score": "0.54281396", "text": "function get_user_booking_with_id($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id'\";\n $result = $db->query($sql);\n return $result;\n}", "title": "" }, { "docid": "74df37f8e1c4fc00f0a294dd54d8c380", "score": "0.54093075", "text": "public\n function indexReservationAction(Request $request)\n {\n $authenticationUtils = $this->get('security.authentication_utils');\n\n // get the login error if there is one\n $error = $authenticationUtils->getLastAuthenticationError();\n\n // last username entered by the user\n $lastUsername = $authenticationUtils->getLastUsername();\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $profilNotifs = $em->getRepository('AppBundle:ProfilNotification')->findby(array('active' => true));\n $typeNotifications = $em->getRepository('AppBundle:TypeNotification')->findby(array('entite' => 'Reservation'));\n foreach ($profilNotifs as $profilNotif) {\n foreach ($typeNotifications as $typeNotification) {\n if ($profilNotif->getTypeNotification() == $typeNotification) {\n $profilNotif->setActive(false);\n $em->merge($profilNotif);\n $em->flush();\n }\n }\n }\n // $reservations = $em->getRepository('AppBundle:Reservation')->findAlll();\n $reservations = $em->getRepository('AppBundle:Reservation')->findAlll();\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate($reservations, $request->query->getInt('page', 1), 5);\n\n\n return $this->render(':admin:reservation/index.html.twig', array('pagination' => $pagination,\n 'reservations' => $reservations,\n\n 'last_username' => $lastUsername,\n 'error' => $error,\n 'user' => $user\n ));\n }", "title": "" }, { "docid": "02203f6f9d86782a4c14fce5057e9584", "score": "0.53911144", "text": "static public function getAllReservations() {\n\t\ttry {\n\t\t\t$rep = Model::$pdo->query('SELECT * FROM reservation WHERE idFestival =' . $_SESSION[\"idFestival\"]);\n\t\t\t$rep->setFetchMode(PDO::FETCH_CLASS, 'ModelReservation');\n\t\t\t$tab_prod = $rep->fetchAll();\n\t\t\treturn $tab_prod;\n\t\t} catch (PDOException $e) {\n\t\t\techo('Error tout casse ( /!\\ method getAllReservations() /!\\ )');\n\t\t}\n\t}", "title": "" }, { "docid": "5991d7fab264afddac47821c6931f123", "score": "0.5390297", "text": "function getAllAppointments(){\n global $db;\n $sql='SELECT firstname, lastname, date, time, location FROM `users`, `appointments` WHERE users.user_id = appointments.user_id ORDER BY date ASC';\n $statement = $db->prepare($sql); \n $statement->execute();\n $result = $statement->fetchAll();\n $statement->closeCursor();\n return $result; \n}", "title": "" }, { "docid": "bc4c064ff66bf1264d12cbe8876dc920", "score": "0.5379694", "text": "public function open($reservation_id) {\n $this->template->content = View::instance(\"v_reservations_index\");\n $this->template->title = \"Reservations\";\n\n # Build the query to get all the users\n // $q = \"SELECT * FROM reservations \";\n\n\t\t$q = \"SELECT *\n FROM reservations\n WHERE reservation_id = \".$reservation_id;\n\n # Execute the query to get all the users.\n # Store the result array in the variable $users\n $reservations = DB::instance(DB_NAME)->select_rows($q);\n\n # Build the query to figure out what reservation does this user already have?\n # I.e. who are they following\n $q = \"SELECT *\n FROM reservations\n WHERE reservation_id = \".$reservation_id;\n\n\n # Pass data (reservation) to the view\n $this->template->content->reservations = $reservations;\n\n\n # Render the view\n echo $this->template;\n\n\n\n}", "title": "" }, { "docid": "de27c717cdbaa23b613987c28577c73e", "score": "0.5372582", "text": "public function Showreservations($statu){\n $reservations = \\App\\reservation::where([\n ['EMAIL','=',\\Auth::user()->email],\n ['statu','=',$statu],\n ])->orderBy('ID_RESERVATION', 'desc')->get();\n $i=1;\n return view('reservation-client',compact('reservations','i'));\n\n }", "title": "" }, { "docid": "c9c13f8299062d58f8c8ea281b9e3a46", "score": "0.53573614", "text": "public function reservationsList(Request $request)\n {\n $id = $request->get('id');\n $search = $request->get('search');\n\n $placeReservations = $this->repository->scopeQuery(function ($query) use ($id) {\n return $query->where(['place_id' => $id, 'is_pre_reservation' => false])->orderBy('date', 'ASC');\n })->with('client')->whereHas('client', function($q) use ($search){\n $q->where('name', 'LIKE', '%'.$search.'%');\n $q->orWhere('last_name', 'LIKE', '%'.$search.'%');\n })->paginate(10);\n\n if (request()->wantsJson()) {\n\n return response()->json($placeReservations);\n }\n }", "title": "" }, { "docid": "741520bac14d2cf7f294df66c7e98a6c", "score": "0.5347061", "text": "public function get_reservation_per_teacher($res_teach_code=NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t $res_room_code=NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t $tm_row=NULL,\n\t\t\t\t\t\t\t\t\t\t\t\t $res_todate)\n\t\t{\n \t\t\t$where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\". date(\"Y-m-d\").\"'\";\n\t\t if(!empty($res_todate))\n\t\t\t $where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\".date('Y-m-d',strtotime($res_todate)).\"'\";\n\t\t \n\t\t\t\n\t \n \t\t\t$reservs = $this->db->query(\"select Distinct res_teach_code, res_admin_note from \n\t\t\t\t\t\t\t\t\t\t reservations \n \t\t\t where res_teach_code = \".$res_teach_code.\"\n\t\t\t\t\t\t\t and res_room_code = \".$res_room_code.\"\n\t\t\t\t\t\t\t and DATE_FORMAT(res_time_start, '%H:%i') <= '\".$tm_row.\"'\n\t\t\t\t\t\t\t and DATE_FORMAT(res_time_end, '%H:%i') >= '\".$tm_row.\"' \".\n\t\t\t\t\t\t $where .\n \t\t\t\t\t\t\t \" order by res_code desc \")->result();\n \t\t\t //\t \n\t \n\t\t\treturn $reservs;\n\t\t}", "title": "" }, { "docid": "f02dd5817f79152eded115fa674a09bf", "score": "0.53275406", "text": "public function getTodayReserves($userId) {\r\n $q = self::getInstance()->createQuery(\"r\")\r\n ->where('r.user_id = ?', $userId)\r\n ->andWhere('DATE(r.date) = CURDATE()');\r\n return $q->execute();\r\n }", "title": "" }, { "docid": "fae7aad025323726eb8a8ecdd355822c", "score": "0.53057194", "text": "public function reservation()\n\t{\n\n\t}", "title": "" }, { "docid": "edb62bf5ba6742ff68741fcd93110f74", "score": "0.5298219", "text": "public function walk_in_reservation(Request $request, GuestDetail $guest_detail)\n {\n $guest_detail = new GuestDetail;\n $guest_detail->last_name = $request['last_name'];\n $guest_detail->first_name = $request['first_name'];\n $guest_detail->mi = $request['mi'];\n $guest_detail->email_address = $request['email_address'];\n $guest_detail->address = $request['address'];\n $guest_detail->contact_number = $request['contact_number'];\n $guest_detail->purpose = $request['purpose'];\n $guest_detail->gender = $request['gender'];\n $guest_detail->nationality = $request['nationality'];\n $guest_detail->check_in_date = date('Y-m-d', strtotime($request['check_in']));\n $guest_detail->check_out_date = date('Y-m-d', strtotime($request['check_out']));\n $guest_detail->save();\n\n $guest_id = DB::table('guest_details')->orderBy('id',\"DESC\")->take(1)->value('id');\n\n $date_start = date('Y-m-d', strtotime($request['check_in']));\n $date_end = date('Y-m-d', strtotime($request['check_out']));\n $interval = Carbon::parse($date_end)->diffInDays($date_start);\n\n $bookings = new Booking;\n $bookings->guest_id = $guest_id;\n $bookings->number_of_rooms = $request['number_of_rooms'];\n $bookings->grand_total = $interval;\n $bookings->payment_mode = 'Unpaid';\n $bookings->paid_status = 0;\n $bookings->viewed_status = 0;\n $bookings->save();\n\n for($i=0; $i < $request['number_of_rooms']; $i++)\n { \n $booking_id = DB::table('bookings')->orderBy('id',\"DESC\")->take(1)->value('id');\n\n $booking_details = new BookingDetail;\n \n $booking_details->booking_id = $booking_id;\n $booking_details->room_cat_id = $request['room_cat_id'];\n $booking_details->room_no = $request['room_no'];\n $booking_details->room_rate = $request['room_rate'];\n $booking_details->status = 'occupied';\n $booking_details->check_in = date('Y-m-d', strtotime($request['check_in']));\n $booking_details->check_out = date('Y-m-d', strtotime($request['check_out']));\n $booking_details->nights = $interval;\n $booking_details->total = ($request['room_rate']) * $interval;\n // $booking_details->total = ($request['room_rate'] * $request['number_of_rooms']) * $interval;\n $booking_details->save();\n\n $grand_total = BookingDetail::where('booking_id', $booking_id)->sum('total');\n $bookings = Booking::findOrFail($booking_id);\n $bookings->grand_total = $grand_total;\n $bookings->save();\n\n $accept_booking = new ConfirmedBooking;\n\n $accept_booking->booking_id = $booking_id;\n $accept_booking->room_cat_id = $request['room_cat_id'];\n $accept_booking->room_no = $request['room_no'];\n $accept_booking->room_rate = $request['room_rate'];\n $accept_booking->status = 'occupied';\n $accept_booking->check_in = date('Y-m-d', strtotime($request['check_in']));\n $accept_booking->check_out = date('Y-m-d', strtotime($request['check_out']));\n $accept_booking->nights = $interval;\n $accept_booking->total = ($request['room_rate']) * $interval;\n $accept_booking->save();\n\n }\n\n return ['bookings' => $bookings];\n }", "title": "" }, { "docid": "8045789d3e08def4799390698ce78043", "score": "0.5293992", "text": "public function fetchAll(){\n $sql = \"SELECT * FROM reservation \";\n $result = $this->connection()->query($sql);\n if ($result->rowCount()>0){\n while($rows = $result->fetch()){\n $data [] = $rows;\n }return $data;\n }\n }", "title": "" }, { "docid": "56ef0ec94c1be5fa04afdbc580658519", "score": "0.5292033", "text": "public function reservations() {\n return $this->hasMany('App\\Reservation')->getResults();\n }", "title": "" }, { "docid": "bdf9468e36e3987232049ff4b76fb766", "score": "0.52865887", "text": "function afficherreservation(){\n\t\t$sql=\"SElECT * From reservation\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "871d19e46d04090ea6bc1eca479c59e1", "score": "0.5284585", "text": "function php_show_reservation_list($date) {\r\n\r\n $returnStatus['status'] = 'undefined';\r\n\r\n $uid = php_get_uid();\r\n\r\n //check the date format is valid\r\n if (!php_check_convert_resv_date($date, $d, $m, $y)) {\r\n $returnResult['status'] = 'Date format incorrect';\r\n return $returnResult;\r\n }\r\n\r\n php_database_connect();\r\n\r\n //Lookup restaurant ID to get the query string from the table\r\n $safe_uid = GetSQLValueString($uid, 'int');\r\n $safe_timeslot = GetSQLValueString($y . '-' . $m . '-' . $d, 'date');\r\n\r\n $query = sprintf(\"SELECT id, cust_id, TIME(timeslot) AS time_timeslot, person, special_request, HEX(response) AS hex_response FROM resv WHERE rest_id = %s AND DATE(timeslot) = %s\", $safe_uid, $safe_timeslot);\r\n $rs = php_database_query($query);\r\n\r\n $responseXML = \"\";\r\n while ($resvInfo = mysql_fetch_array($rs)) {\r\n $safe_custId = GetSQLValueString($resvInfo['cust_id']);\r\n $query = sprintf(\"SELECT fullname FROM customer WHERE id = %s\", $safe_custId);\r\n $cust_rs = php_database_query($query);\r\n\r\n $custInfo = mysql_fetch_array($cust_rs);\r\n $xmlElement['time'] = $resvInfo['time_timeslot'];\r\n $xmlElement['person'] = $resvInfo['person'];\r\n $xmlElement['customer_name'] = $custInfo['fullname'];\r\n $xmlElement['msg'] = $resvInfo['special_request'];\r\n $xmlElement['resv_id'] = $resvInfo['id'];\r\n $xmlElement['response'] = \"undefined\";\r\n\r\n switch (intval($resvInfo['hex_response'])) {\r\n case 0: //pending\r\n $xmlElement['response'] = 'pending';\r\n break;\r\n case 1: //decline\r\n $xmlElement['response'] = 'decline';\r\n break;\r\n case 2: //accept\r\n $xmlElement['response'] = 'accept';\r\n break;\r\n default:\r\n $xmlElement['response'] = 'undefined';\r\n }\r\n \r\n ## <resv>\r\n ## <time>1:00pm</time>\r\n ## <person>4</person>\r\n ## <customer_name>Tom Chan</customer_name>\r\n ## <msg></msg>\r\n ## <resv_id>1234-001</resv_id>\r\n ## <response>accept</response>\r\n ## </resv>\r\n \r\n $responseXMLItem = sprintf(\"<resv><time>%s</time><person>%s</person><customer_name>%s</customer_name><msg>%s</msg><resv_id>%s</resv_id><response>%s</response></resv>\", $xmlElement['time'], $xmlElement['person'], $xmlElement['customer_name'], $xmlElement['msg'], $xmlElement['resv_id'], $xmlElement['response']);\r\n $responseXML = $responseXML . $responseXMLItem;\r\n }\r\n\r\n //Re-factoring the query string\r\n echo $responseXML = '<resv_list>' . $responseXML . '</resv_list>';\r\n\r\n $returnStatus['status'] = 'success';\r\n return $returnStatus;\r\n}", "title": "" }, { "docid": "c897dad186ebdf534f3628d61ab3ee9b", "score": "0.5265671", "text": "public function disable_reservation_user() {\n $query = 'UPDATE reservations ';\n $query .= 'SET state_id = 3 ';\n $query .= 'WHERE state_id IN (1,2) ';\n $query .= 'AND user_id=' . $this->id;\n\n $connection = get_connection();\n $query_result = $connection->query($query);\n\n $connection->close();\n\n return $query_result;\n }", "title": "" }, { "docid": "fd8fb3a27c5caf53f0806df86d602b87", "score": "0.5264993", "text": "public function getSchedules() {\n $result = DB::select(\"SELECT * FROM schedular,unnest(string_to_array(user_id, ',')) AS s_user_id WHERE s_user_id = ANY ( string_to_array('\".session('user-id').\"', ',') ) AND is_active = true order by created_date desc\" );\n if (count($result) > 0) {\n return $result;\n }\n return array();\n }", "title": "" }, { "docid": "4e129f91fdc887151c0fb048c7ac85e4", "score": "0.526101", "text": "function afficherreservation(){\n\t\t$sql=\"select hotel.nom hotel ,hotel.ville,reservation.* from (reservation inner join hotel on reservation.idhotel=hotel.id) order by idres \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "8f44255e70732078a2130a3d28d20c0a", "score": "0.5254553", "text": "public function reservationRecord()\n\t{\n\t\t$user_array = Session::all();\n\t\t//$userID =Session::get('id');\n\t\t//this code is start in header and footer page.\n $cities = Location::where(['Type' => 'City', 'visible' =>1])->lists('name','id');\n $arrResponse['cities'] = $cities;\n\n $city_id = Input::get('city'); \n $city_name = Location::where(['Type' => 'City', 'id' => $city_id])->pluck('name');\n if(empty($city_name))\n {\n $city_name = 'mumbai';\n }\n\n $arrResponse['allow_guest'] ='Yes'; \n $arrResponse['current_city'] = strtolower($city_name);\n $arrResponse['current_city_id'] = $city_id;\n //this code is start in header and footer page.\n $userID = Session::get('id');\n\t\tif($userID) {\n\t\t\t$arrReservation = ReservationModel::getReservationRecord($userID);\n\t\t}\n\t\telse {\n\t\t\t$arrReservation['status'] = Config::get('constants.API_ERROR');\n\t\t\t$arrReservation['msg'] = 'Not a valid request'; \n\t\t}\n\t\t/*print_r($arrReservation);\n\t\tforeach ($arrReservation['data']['pastReservation'] as $data) {\n\t\t\techo $data['guest_email'];\n\t\t}\n\t\texit;*/\n\t\t//return response()->json($arrResponse,200); \n\t\t//$aLaCarteID = DB::table('vendor_locations')->where('slug',$alaslug)->first()->id; //@kailash\n /*$aLaCarteID \t\t = '97';\n $arrALaCarte \t\t = $this->alacarte_model->getALaCarteDetails($aLaCarteID);\n\t\t$data['reserveData'] = $this->alacarte_model->getAlacarteLimit($aLaCarteID);\n $data['block_dates'] = $this->alacarte_model->getAlacarteBlockDates($aLaCarteID);\n $data['schedule'] = $this->alacarte_model->getAlacarteLocationSchedule($aLaCarteID);*/ \n \t/*print_r($arrReservation);\n \texit;*/\n return view('frontend.pages.myreservation',$arrResponse)\n \t\t\t->with('arrReservation',$arrReservation);\n \t\t\t/*->with('data',$data);*/\n\t}", "title": "" }, { "docid": "24487941c8f380b1987b3e5e524f74d3", "score": "0.5250719", "text": "public function indexAction()\n\t{\n\t\t$order_id = session_id();\n\t\t\n\t\t$this->view->headTitle('Reservation');\n\t\t$objReser = new Models_Reservation();\n\t\t\n\t\t$resId = $this->_getParam('rid', false);\n\t\tif (false === $resId) {\n\t\t $this->_redirect('');\n\t\t}\n\t\t\n /**\n * Get restaurant\n */\n $objRes = new Models_Restaurant();\n $res = $objRes->find($resId)->toArray();\n $res = current($res);\n if (false == $res || '0' == $res['reser_onoff']) {\n $this->_redirect('');\n }\n /**\n * Check active restaurant\n */\n $this->_checkReservationOfRestaurant($res);\n// echo '<pre>';print_r($res);die;\n /**\n * All time in a day\n */\n $defaultTimeZone = date_default_timezone_get();\n date_default_timezone_set('UTC');\n $allTimes = array();\n for ($i = 0; $i < 48; $i++) {\n $time = 1800 * $i;\n $allTimes[] = array(\n 'time' => $time,\n 'text' => date('g:i A', $time)\n );\n }\n date_default_timezone_set($defaultTimeZone);\n// echo date('g:i A', 0);die;\n// echo '<pre>';print_r($allTimes);die;\n \n /**\n * Get search condition\n */\n $search = $this->_getParam('search', array(\n 'date' => date('m/d/Y'),\n 'time' => (date('G') * 3600 + (ceil(date('i')/30)) * 1800),\n 'quantity' => 2\n ));\n $search['quantity'] = intval($search['quantity']);\n \n \n $pointerDate = explode('/', $search['date']);\n $pointerDate = mktime(0, 0, 0, $pointerDate[0], $pointerDate[1], $pointerDate[2]) + $search['time'];\n $search['unixTime'] = $pointerDate;\n \n $this->session->reserSearch = $search;\n// echo '<pre>';print_r($search);die;\n\n /**\n * Get next 7 day often\n */\n $searchDateArr = array();\n $count = 0;\n $pointerDate = $search['unixTime'];\n $dateArr = array('date_mon', 'date_tue', 'date_wed', 'date_thu', 'date_fri', 'date_sat', 'date_sun');\n\n while (true) {\n $field = 'date_' . strtolower(date('D', $pointerDate));\n if ('1' == $res[$field]) {\n $searchDateArr[] = array(\n 'time' => $pointerDate,\n 'field' => $field,\n 'date' => date('D, m/d/Y g:i A', $pointerDate)\n );\n $count++;\n }\n if( 8 <= $count) {\n break;\n }\n $pointerDate += 3600 * 24;\n }\n /**\n * Get available hour for each date\n */\n foreach ($searchDateArr as &$date) {\n $date['startTime'] = $date['time'] - 1800 * 3;\n $date['endTime'] = $date['time'] + 1800 * 3;\n $maxTotal = $res['reser_quantity'] - $search['quantity'];\n \n $date['exitResers'] = $objReser->searchExistRerservation($date['startTime'], $date['endTime'], $maxTotal);\n $date['available'] = array();\n \n for ($i = $date['startTime']; $i <= $date['endTime']; $i = $i + 1800) {\n $flag = true;\n foreach ($date['exitResers'] as $exist) {\n if ($i == $exist['time']) {\n $flag = false;\n break;\n }\n }\n \n $date['available'][$i] = $flag;\n }\n }\n unset($date);\n \n// echo '<pre>';print_r($searchDateArr);die;\n// $searchDateArr[1]['available']['1301472000'] = false;\n// $searchDateArr[1]['available']['1301477400'] = false;\n// $searchDateArr[1]['available']['1301482800'] = false;\n /**\n * Data for view\n */\n $this->view->res = $res;\n $this->view->arr_restaurant = $res;\n $this->view->resId = $resId;\n $this->view->allTimes = $allTimes;\n $this->view->search = $search;\n $this->view->searchDateArr = $searchDateArr;\n $this->view->currentTime = time();\n $this->view->address_restaurant = $res['street'].\" \".$res['city'].\" \".$res['state'];\n\t}", "title": "" }, { "docid": "37747fdb9604b57097d7ddc46b005966", "score": "0.5239427", "text": "function new_reservation($room, $fromTime, $toTime, $subject, $category, $description='', $allDay=0, $recurrence_id=0, $printresult=0) {\n global $USER, $DB;\n\n /*\n if ($colision = check_availability($room, $fromTime, $toTime)) {\n echo '<b>COLLISION!!! : </b>';\n print_r($colision);\n }\n * \n */\n \n//check if start time == end time\n//this should result in no reservation\n \n$starttime_notEqual_endtime = !($fromTime == $toTime);\n\n if ($starttime_notEqual_endtime && !check_availability($room, $fromTime, $toTime)) {\n $reservation = new stdClass();\n $reservation->subject = $subject;\n $reservation->startdate = $fromTime;\n $reservation->enddate = $toTime;\n $reservation->alldayevent = $allDay;\n $reservation->meetingorganizer = $USER->id;\n $reservation->categories = $category;\n $reservation->description = $description;\n $reservation->location = $room;\n $reservation->active = 1;\n $reservation->confirm = 0;\n $reservation->recurrence_id = $recurrence_id;\n\n \n\n $reservationID = $DB->insert_record('roomscheduler_reservations', $reservation);\n\n if($printresult){//used if want id of reservation returned with ajax\n print $reservationID;\n }\n\n return $reservationID;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "bb9bb077b4792970a86593feeb9669f0", "score": "0.5220362", "text": "function retrieve_trailing_weekly_guest_list_reservation_requests(){\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->retrieve_trailing_weekly_guest_list_reservation_requests($this->promoter->up_id);\n\t}", "title": "" }, { "docid": "49450a647b87e640f5f51e14dd8e07ef", "score": "0.5218166", "text": "public function listbooking($user=\"\") {\n \t$this->db->select('rumah.*, booking.*');\n\t\t$this->db->from('rumah');\n\t\t$this->db->where('rumah.user', $user);\n\t\t$this->db->join('users','users.id = rumah.user','right');\n\t\t$this->db->join('booking','booking.rumah = rumah.id','right');\n\t\t$this->db->order_by('rumah.id','desc');\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array(); \n }", "title": "" }, { "docid": "09bf08d530ef94b3504021c7189fc22e", "score": "0.5210253", "text": "public function index()\n {\n return Reservation::with('customer','paypal_payments')->Where('status','Check in')->orWhere('status','Reserved')->get();\n }", "title": "" }, { "docid": "b1819033aa329f4a1d33ff75dc003d47", "score": "0.5178583", "text": "public function if_show_time_found()\n {\n $reservation = \\App\\Models\\Reservation::factory()->create();\n\n $reponse = $this->withHeaders(['Authorization'=> 'Bearer '.$this->userLogin()])->json('GET', 'api/reservations/'.$reservation->id);\n $reponse\n ->assertStatus(201)\n ->assertJsonStructure(\n [\n 'data' => [\n 'id', \n 'receptionist'=> ['name', 'email', 'created_at'], \n 'show_time'=> [\n 'id', \n 'date', \n 'start_time', \n 'end_time', \n \"created_at\",\n 'movie' => [\n \"id\",\n \"movie_name\",\n \"movie_duration\",\n \"release_date\",\n \"created_at\"\n ],\n \"hall\" => [\n \"id\",\n \"hall_name\",\n \"price\",\n \"created_at\"\n ]\n ],\n \"num_of_seats\",\n \"total_cost\",\n \"created_at\"\n ]\n ] \n );\n }", "title": "" }, { "docid": "087de02bdb2f07975526b240a2309af5", "score": "0.5174862", "text": "public function getUser()\n { \n $search_zone = $_SESSION['search_zone']; \n $datef = new DateTime($this->input->post('fromDate', TRUE));\n $timef = new DateTime($this->input->post ( 'fromTime', TRUE )); \n $datet = new DateTime($this->input->post('toDate', TRUE));\n $timet = new DateTime($this->input->post ( 'toTime', TRUE ));\n $given_from = new DateTime($datef->format(DATE_FORMAT) .' ' .$timef->format(TIME_FORMAT) , new DateTimeZone($search_zone));\n $given_from->setTimezone(new DateTimeZone(UTC));\n $fromdate = $given_from->format(\"Y-m-d H:i:s\"); \n $given_to = new DateTime($datet->format(DATE_FORMAT) .' ' .$timet->format(TIME_FORMAT) , new DateTimeZone($search_zone));\n $given_to->setTimezone(new DateTimeZone(UTC));\n $todate = $given_to->format(\"Y-m-d H:i:s\"); \n \n $data = $this->session->userdata ( 'logged_in' );\n $userId = $data ['user_id'];\n $role = $data ['role']; \n $response = array();\n if (! $this->checkLogin ( $this->module )) { \n $response['login'][0] = array(\n \"status\" => false \n );\n echo json_encode($response);\n return true;\n }\n else { \n $minutes_to_add = MINUTES_TO_ADD; //add it from settings page //this is for locking the driveway\n $currentTime = new DateTime(date(\"Y-m-d H:i:s\") );\n $currentTime->add(new DateInterval('PT' . $minutes_to_add . 'M'));\n $currentTime->setTimezone(new DateTimeZone(UTC));\n $unlockTime = $currentTime->format(DATE_TIME); \n $booking['unlockTime'] = $unlockTime;\n $booking['fromDate'] = $fromdate;\n $booking['toDate'] = $todate; \n $booking['userID'] = $userId;\n $booking ['drivewayID'] = $this->input->post('drivewayID', TRUE); \n\t\t\t$booktempId = $this->drivewaymodel->bookProcess($booking); \n $option = $this->input->post('option', TRUE); \n if($option == 2)\n {\n $fromDate = $this->input->post ( 'fromDate', TRUE );\n $toDate = $this->input->post ( 'toDate', TRUE );\n $fromTime = $this->input->post ( 'fromTime', TRUE );\n $toTime = $this->input->post ( 'toTime', TRUE );\n $fdate = new \\DateTime($fromTime);\n $tdate = new \\DateTime($toTime);\n $timeFrom = $fdate->format(TIME_FORMAT);\n\t\t\t\t$timeTo = $tdate->format(TIME_FORMAT);\n $frm_date = new \\DateTime($fromDate);\n $to_date = new \\DateTime($toDate);\n $dateFrom = $frm_date->format(DATE_TIME);\n $dateTo = $to_date->format(DATE_TIME); \n $bookArray = $this->createDateRangeArray($dateFrom,$dateTo); \n foreach ($bookArray as $bookDate) \n { \n $start_date_and_time = $bookDate . ' ' . $timeFrom; \n $end_date_and_time = $bookDate . ' ' . $timeTo; \n $bookingFrom = new DateTime($start_date_and_time);\n $bookingFrom->setTimezone(new DateTimeZone(UTC)); \n $bookingTo = new DateTime($end_date_and_time);\n $bookingTo->setTimezone(new DateTimeZone(UTC)); \n $book_d['start_date'] = $bookingFrom->format(\"Y-m-d H:i:s\"); \n $book_d['end_date'] = $bookingTo->format(\"Y-m-d H:i:s\"); \n $this->drivewaymodel->recbookProcess($book_d);\n }\n }\n \n $sess_array = array ( \n 'temp_booking_id' => $booktempId,\n 'fromDate' => $fromdate\n \n );\n // set session values\n $this->session->set_userdata ( 'temp_search', $sess_array ); \n \n $response['login'][0] = array(\n \"status\" => true \n );\n $this->load->model ( 'usermanagement/Usermanagementmodel' ); \n $this->load->model ( 'DrivewayModel' );\n $vehicles = $this->DrivewayModel->checkCarExist($userId); \n $cards = $this->DrivewayModel->checkCardExist($userId); \n if(!$vehicles) {\n $response['vehicle'][0] = array(\n \"status\" => true,\n \"vehicle\" => false,\n \"userID\" => $userId,\n \"role\" => $role \n );\n \n } \n else \n { \n foreach($vehicles as $i => $vehicle)\n {\n $response['vehicle'][$i]= array(\n \"status\" => true,\n \"vehicle\" => true,\n 'vehicleType' => $vehicle->vehicleNumber.' '.$vehicle->year.' '.$vehicle->color,\n 'vehicleID' => $vehicle->vehicleID\n );\n $i++;\n }\n }\n \n if(!$cards) {\n $response['cards'][0] = array(\n \"status\" => true,\n \"cards\" => false,\n \"userID\" => $userId,\n \"role\" => $role \n );\n \n } else { \n foreach($cards as $i => $card){\n $response['cards'][$i]= array(\n \"status\" => true,\n \"cards\" => true,\n 'name_on_card' => $card->name_on_card.' - '.$card->expiration_month.'/'.$card->expiration_year,\n 'billID' => $card->billID\n \n );\n $i++;\n }\n }\n $this->apiResponse($response);\n return true;\n \n echo json_encode($response);\n return true;\n }\n }", "title": "" }, { "docid": "575e4a2cff789110f9915950aead71b7", "score": "0.5166795", "text": "function get_reservation_byTime($room, $atTime) {\n global $DB;\n$records = $DB->get_records_select('roomscheduler_reservations', 'location=\\'' . $room . '\\' AND active=\\'1\\' AND startdate<=\\'' . $atTime . '\\' AND enddate>\\'' . $atTime . '\\'',$params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0);\n\nif(is_array($records)){\n return end($records);\n}\n \n return NULL;\n}", "title": "" }, { "docid": "93d91675f482a364e6bc1b5fc8fa8f8e", "score": "0.5160819", "text": "public function hotel_fetch(Request $request)\n {\n if ($request->ajax()) {\n $logged_in_user = Auth::user();\n if ($logged_in_user->user_role_define == 1 and $logged_in_user->user_level == 1) {\n //here we select only hotels user from admins table in db\n //if magicspree side super user logged in\n $hotel_user = Hotel::select('id', 'title')->orderBy('id', 'DESC')->limit(500)->get();\n } elseif ($logged_in_user->user_role_define == 1 and $logged_in_user->user_level != 1) {\n //if magicspree side local user logged in\n $user_id = Admin::select('id')->where('id', '=', $logged_in_user->id)->orwhere('super_user_id', '=', $logged_in_user->id)->get()->toArray();\n $hotel_user = Hotel::select('id', 'title')->whereIn('rm_user_id', $user_id)->orderBy('id', 'DESC')->limit(500)->get();\n } elseif ($logged_in_user->user_role_define == 2 and $logged_in_user->user_level == 1) {\n //if hotel side super user logged in\n $user_id = Admin::select('id')->where('id', '=', $logged_in_user->id)->orwhere('super_user_id', '=', $logged_in_user->id)->get()->toArray();\n $hotel_user = Hotel::select('id', 'title')->whereIn('user_id', $user_id)->orderBy('id', 'DESC')->limit(500)->get();\n } elseif ($logged_in_user->user_role_define == 2 and $logged_in_user->user_level != 1) {\n //if hotel side local user is logged in\n $hotel_user = Hotel::select('id', 'title')->where('user_id', '=', $logged_in_user->id)->orderBy('id', 'DESC')->limit(500)->get();\n } elseif ($logged_in_user->user_role_define == 3) {\n //if hotel side revenue manager user is logged in\n $hotel_user = Hotel::select('id', 'title')->where('revenue_user', '=', $logged_in_user->id)->orderBy('id', 'DESC')->limit(500)->get();\n }\n\n return $hotel_user;\n }\n }", "title": "" }, { "docid": "c6d775f82537c9a86d17c0570a663367", "score": "0.5149116", "text": "public function getRecentAirData($req){\r\n $int_timestamp = $_SERVER['REQUEST_TIME'] - 10;\r\n $datetime_timestamp = date('Y-m-d H:i:s', $int_timestamp);\r\n $sql = 'SELECT *\r\n FROM airq_data JOIN registration \r\n WHERE user_id = ? AND timestamp = ?';\r\n $stmt = $this->getReadConnection()->prepare($sql);\r\n $stmt->setFetchMode(\\PDO::FETCH_ASSOC);\r\n // fetch records that saves 10 seconds before.\r\n $isSuccess = $stmt->execute(array($req->{'user-id'}, $datetime_timestamp));\r\n if ($isSuccess){\r\n return $stmt->fetch();\r\n }\r\n else {\r\n throw new \\Exception(\"submit form is invalid\", 203);\r\n }\r\n }", "title": "" }, { "docid": "71503edc67cdf3941eac636e30b7b3b4", "score": "0.514483", "text": "function makeRequest($resource, $username, $date, $block){\n\t$date = date(\"Y-m-d\", strtotime($date));\n $user = getUserId($username);\n\n sqlQuery(\"INSERT INTO schedule (schedule_resource_id, schedule_user_id, schedule_date, schedule_block) VALUES ('$resource','$user','$date','$block')\");\n $resource = getResourceDesc($resource);\n $block = blockToHuman($block);\n alog(\"Added request for $username for $resource on $date $block\");\n}", "title": "" }, { "docid": "ea95978c0f786d807e011dc5ef67e003", "score": "0.51445305", "text": "function get_user_serv_history ($db, $user){\n $query = \"SELECT Appointments.service_id, Appointments.appt_time, Appointments.cust_comments, Services.serv_description FROM Appointments\n INNER JOIN Services ON Services.service_id=Appointments.service_id\n WHERE (Appointments.cust_email='$user')\n ORDER BY Appointments.appt_time\";\n $statement = $db->prepare($query);\n $statement->execute();\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\n $statement->closeCursor();\n return $result;\n}", "title": "" }, { "docid": "f28b4cf615933b0ae58382b18bd09020", "score": "0.5142542", "text": "function getGuestList($eventid, $rsvp) {\n global $dbc;\n// $query = \"SELECT `profileid`, `displayname`, `fname`, `lname`, `guests` \"\n// . \"FROM `eventrsvp`, `profile_data` \"\n// . \"WHERE `eventrsvp`.`userid` = `profile_data`.`profileid` \"\n// . \"AND `eventid` = ? \"\n// . \"AND `response` = ?\";\n// $stmt = mysqli_prepare($dbc, $query);\n// mysqli_stmt_bind_param($stmt, 'is',$eventid, $rsvp);\n// mysqli_stmt_execute($stmt);\n// $result = $stmt->get_result();\n// return $result;\n $q = \"SELECT `profileid`, `displayname`, `fname`, `lname`, `guests` \"\n . \"FROM `eventrsvp`, `profile_data` \"\n . \"WHERE `eventrsvp`.`userid` = `profile_data`.`profileid` \"\n . \"AND `eventid` = '$eventid' \"\n . \"AND `response` = '$rsvp'\";\n $r = @mysqli_query($dbc, $q);\n return $r;\n}", "title": "" }, { "docid": "4a1b3cf71d945a732b70ab686592e247", "score": "0.5138818", "text": "function findAppointmentsDue(){\n\t$db = dbConnect();\n\n\t$sql = \"SELECT id FROM Appointment WHERE start_date > date_add(NOW(),INTERVAL 15 MINUTE) AND start_date <= date_add(NOW(),INTERVAL 30 MINUTE) AND status = 2 AND (type = 0 OR type = 1)\";\n\n\t$results = $db->query($sql);\n\n\treturn $results;\n}", "title": "" }, { "docid": "5af7f2f803fed1be0ff212493e4050e8", "score": "0.5138372", "text": "function get_user_tasks($user, $session_uid, $json=false,$limit=0, $where_attr='', $administrator=false) {\r\n global $conn, $task_attributes;\r\n $out = '{\"content\": []}';\r\n if (isset($conn)) {\r\n //make everything safe to use\r\n $user = make_safe($user);\r\n $session_uid = make_safe($session_uid);\r\n $limit = is_int($limit) ? $limit : 0;\r\n $where_attr = make_safe($where_attr);\r\n $adinistrator = $administrator===true ? true : false;\r\n\r\n //verify user's access before continuing\r\n if (verify_access($user, $session_uid)) {\r\n //get a list of all accessible tasks using get_accessible_tasks function\r\n $accessible_tasks = get_accessible_tasks($user, $administrator, $conn);\r\n\r\n //make where string\r\n $where_string = $where_attr==='' ? '' : \" AND $where_attr\";\r\n //return $where_attr;\r\n\r\n $task_db_results = array();\r\n //for all the available tasks, query them\r\n foreach($accessible_tasks as $task_id) {\r\n //prepare statement\r\n $q = \"SELECT * FROM tasks WHERE id=$task_id $where_string\";\r\n //query statement\r\n if ($qres = $conn->query($q)) {\r\n //add results to $task_db_results\r\n $qres->data_seek(0);\r\n array_push($task_db_results, $qres->fetch_assoc());\r\n //close query\r\n $qres->close();\r\n }\r\n }\r\n //if the limit is specified, shorten the results to the limit length\r\n if ($limit > 1) {\r\n $task_db_results = array_slice($task_db_results, 0, $limit);\r\n }\r\n\r\n if ($json==false) {\r\n return $json;\r\n return $task_db_results;\r\n }\r\n //write the output as json in the $out string\r\n $out = '{\"content\":[ ';\r\n foreach ($task_db_results as $row) {\r\n if (is_array($row)) {\r\n $out = $out.'{';\r\n foreach ($row as $key => $value) {\r\n $out = $out.'\"'.$key.'\":\"'.$value.'\",';\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.'},';\r\n } else {\r\n $out = $out.'\"\",';\r\n }\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.\"]\";\r\n //write types as types attr\r\n $out = $out.',\"types\": [';\r\n foreach($task_attributes as $ind => $type) {\r\n $out = $out.'\"'.$type.'\",';\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.']';\r\n $out = $out.\"}\";\r\n\r\n } else {\r\n return 'hi';\r\n }\r\n }\r\n //return output\r\n return $out;\r\n}", "title": "" }, { "docid": "acf40c98619cbecad4aa073d8cbdbf9e", "score": "0.5127817", "text": "function getAllVRSRead()\n\t\t {\n\t\t $date = date('Y-m-d');\n $day = date('l',strtotime($date));\n if($day=='Monday')\n {\n $from = date('Y-m-d',strtotime('-1 Monday', time()));\n }\n else{\n $from = date('Y-m-d',strtotime('-2 Monday', time()));\n }\n\t\t\t $to = date('Y-m-d',strtotime('Last Saturday', time()));\n\t\t \t\t \n\t\t$sql =\"SELECT * FROM pof_candidates LEFT JOIN be_users ON pof_candidates.user_id=be_users.id WHERE stage IN (SELECT id FROM segment_name WHERE segment_type_id='5' ) AND (date BETWEEN '\".$from.\"' AND '\".$to.\"') GROUP BY pof_candidates.user_id ORDER BY be_users.username ASC;\";\n\t $q = $this->db->query($sql);\n\t\tif($q->num_rows() > 0)\n\t\t{\n\t\t\tforeach($q->result() as $row)\n\t\t\t{\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\t\t\n\t}", "title": "" }, { "docid": "82d72d9499aca59ec781db2385599089", "score": "0.5127582", "text": "function get_user_resources($connection, $user_id){\n\t$query = \"SELECT `army`,`money`,`land` FROM `users` WHERE `user_id`='$user_id' LIMIT 1\";\n\t$query_row = mysqli_fetch_assoc(mysqli_query($connection, $query));\n\n\treturn $query_row;\n}", "title": "" }, { "docid": "7d9eacd6cd78a0a9e640690cfb0b7e10", "score": "0.5115543", "text": "public function get_rooms_of_teachers(\n\t\t \t\t\t\t\t\t\t\t $res_room_code=NULL,\n\t\t\t\t\t\t\t\t\t\t $tm_row=NULL,\n\t\t\t\t\t\t\t\t\t\t $res_todate)\n\t\t{\n \t\t//\t$where = \" and res_todate = '\". date(\"Y-m-d\").\"'\";\n\t\t// if(!empty($res_todate))\n\t\t\t// $where = \" and res_todate = '\".date('Y-m-d',strtotime($res_todate)).\"'\";\n\t\t \n\t\t\t\t$where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\". date(\"Y-m-d\").\"'\";\n\t\t if(!empty($res_todate))\n\t\t\t $where = \" and DATE_FORMAT(res_time_start,'%Y-%m-%d') = '\".date('Y-m-d',strtotime($res_todate)).\"'\";\n\t \n \t\t\t$Oth_reservs = $this->db->query(\"select Distinct te_name from \n\t\t\t\t\t\t\t\t\t\t\t\t\t reservations , \n\t\t\t\t\t\t\t\t\t\t\t\t\t teachers\n \t\t\t where res_room_code = \".$res_room_code.\"\n\t\t\t\t\t\t\t and res_teach_code = te_code \n \t\t\t\t\t\t\t and DATE_FORMAT(res_time_start, '%H:%i') <= '\".$tm_row.\"'\n\t\t\t\t\t\t\t and DATE_FORMAT(res_time_end, '%H:%i') >= '\".$tm_row.\"' \".\n\t\t\t\t\t\t $where .\n \t\t\t\t\t\t\t \" order by res_code desc \")->result();\n \t\t\t //\t \n\t \n\t\t\treturn $Oth_reservs;\n\t\t}", "title": "" }, { "docid": "78b746f4f4e6fd9cbf753dc3f40f556e", "score": "0.5113317", "text": "public function run()\n {\n $reservations = [\n [\n 'user_id' => '1',\n 'room_id' => '1',\n 'num_of_guests' => '4',\n 'arrival' => '2020/5/18',\n 'departure' => '2020/5/28'\n ],\n [\n 'user_id' => '1',\n 'room_id' => '2',\n 'num_of_guests' => '1',\n 'arrival' => '2020/5/10',\n 'departure' => '2020/5/12'\n ],\n [\n 'user_id' => '1',\n 'room_id' => '3',\n 'num_of_guests' => '3',\n 'arrival' => '2020/5/6',\n 'departure' => '2020/5/7'\n ],\n [\n 'user_id' => '1',\n 'room_id' => '4',\n 'num_of_guests' => '2',\n 'arrival' => '2020/5/12',\n 'departure' => '2020/5/15'\n ],\n [\n 'user_id' => '1',\n 'room_id' => '2',\n 'num_of_guests' => '2',\n 'arrival' => '2020/5/20',\n 'departure' => '2020/5/24'\n ]\n ];\n\n foreach($reservations as $reservation) {\n Reservation::create(array(\n 'user_id' => $reservation['user_id'],\n 'room_id' => $reservation['room_id'],\n 'num_of_guests' => $reservation['num_of_guests'],\n 'arrival' => $reservation['arrival'],\n 'departure' => $reservation['departure']\n ));\n }\n }", "title": "" }, { "docid": "ef3e9bbb578e21545758b1b3f71359f3", "score": "0.5107615", "text": "function getRemissions($fecha, $usuario) {\n\n $sql = \"SELECT\n sum(re.rem_total) AS cant1,\n re.cli_codigo, \n re.cod_caja, \n c.cli_nombre_empresa \n FROM remisiones AS re, cliente AS c \n WHERE re.rem_fecha='$fecha'\n AND re.cli_codigo = c.cli_codigo\n AND re.rem_estado = '1'\n AND re.rem_anulada LIKE 'No'\n AND re.usu_codigo = '$usuario' \n GROUP BY cli_codigo, cod_caja\";\n\n// die($sql);\n $stmt = $this->getEntityManager()\n ->getConnection()\n ->prepare($sql);\n $stmt->execute();\n $client = $stmt->fetchAll();\n return $client;\n }", "title": "" }, { "docid": "834b7a7cde3ac65c716f91d125719020", "score": "0.5102749", "text": "function check_availability($room, $fromTime, $toTime) {\n global $DB;\n\n //Case 1: startTime(new)->starttime(existing)->endTime(new)->endtime(existing)\n if ($reservation = get_reservation_byTime($room, $fromTime)) {\n\n return $reservation;\n\n }\n //Case 2: starttime(existing)->startTime(new)->endtime(existing)->endTime(new)\n else if ($reservation = get_reservation_byTime($room, $toTime - 600)) {\n \n return $reservation;\n }\n //Case 3: starttime(existing)->startTime(new)->endTime(new)->endtime(existing)\n //is a combination of case 1 and 2 and is therefore already taken care of\n //Case 4: startTime(new)->starttime(existing)->endtime(existing)->endTime(new)\n \n else if ($reservation = $DB->get_records_select('roomscheduler_reservations', 'location=\\'' . $room . '\\' AND active=\\'1\\' AND startdate>=\\'' . $fromTime . '\\' AND enddate<=\\'' . $toTime . '\\'',$params=null, $sort='', $fields='*', $limitfrom=0, $limitnum=1)) {\n\n if(is_array($reservation)){\n return end($reservation);\n}\n }\n //Case 5: no conflict\n else {\n return false;\n }\n}", "title": "" }, { "docid": "6d4fc092cd3f5a24572efa9b557e94ff", "score": "0.5101242", "text": "public function index(Request $request)\n {\n if ($request->has('technician_id'))\n {\n $appointments = Appointment::where('technician_id',$request->technician_id)->get();\n foreach ($appointments as $ap)\n {\n $ap->user;\n\n }\n unset($ap);\n\n }else\n {\n $appointments = Appointment::where('user_id',$request->user_id)->get();\n }\n\n return response (['appointments' => AppointmentResource::collection($appointments), 'message' => 'Retrieved successfully'], 200);\n }", "title": "" }, { "docid": "f3cf4f45ecd15fc23eb3dd7e89d6ebf7", "score": "0.51007617", "text": "public function bringUserPurchases($user){\n try\n {\n $query=\"SELECT * \n FROM \".$this->tableName.\" \n WHERE idUser= :idUser\";\n\n $parameters[\"idUser\"]=$user->getIdUser();\n\n $this->connection = Connection::GetInstance();\n\n $resultSet=$this->connection->Execute($query, $parameters);\n\n $purchaseList=array();\n\n foreach ($resultSet as $row ) {\n $purchase=new Purchase($row[\"purchaseDate\"], $row[\"total\"], $row[\"discount\"],$this->helper->helpUserById($row[\"idUser\"]));\n $purchase->setIdPurchase($row[\"idPurchase\"]);\n\n $query2=\"SELECT * \n FROM \".$this->ticketTable.\" T \n JOIN \".$this->tableName.\" P \n ON T.idPurchase=P.idPurchase \n WHERE T.idPurchase= :idPurchase;\";\n\n $parameters2[\"idPurchase\"]=$purchase->getIdPurchase();\n\n $this->connection = Connection::GetInstance();\n \n $resultSet2=$this->connection->Execute($query2, $parameters2);\n\n $tickets=array();\n\n foreach($resultSet2 as $row2){\n $ticket=new Ticket();\n $ticket->setTicketNumber($row2[\"idTicket\"]);\n $ticket->setQR($row2[\"QR\"]);\n $ticket->setMovieFunction($this->helper->helpFunctionById($row2[\"idMovieFunction\"]));\n array_push($tickets,$ticket);\n }\n\n $purchase->setTickets($tickets);\n\n array_push($purchaseList,$purchase);\n }\n\n return $purchaseList;\n }\n catch(Exception $ex)\n {\n throw $ex;\n }\n }", "title": "" }, { "docid": "5f2849a0e2af5dada6f47f95e53ad30e", "score": "0.50923955", "text": "public function getUserBookings(User $user)\n {\n if ($user) {\n $data['success'] = true;\n $data['bookings'] = Booking::join('rooms', 'rooms.id', '=', 'bookings.room_id')\n ->join('hotels', 'hotels.id', '=', 'rooms.hotel_id')\n ->select('bookings.id', 'bookings.check_in', 'bookings.check_out', 'hotels.name', 'hotels.city', 'hotels.image', 'rooms.price', 'bookings.created_at')\n ->groupBy('bookings.id', 'bookings.check_in', 'bookings.check_out', 'hotels.name', 'hotels.city', 'hotels.image', 'rooms.price', 'bookings.created_at')\n ->orderBy('bookings.created_at', 'desc')\n ->where('bookings.user_id', $user->id)\n ->paginate(6);\n }\n return response()->json(['data' => $data]);\n }", "title": "" }, { "docid": "825a619adc6bdb6d4ebd60ba1002d93a", "score": "0.5075732", "text": "function reservation_user($data,$config, $offset){\n\t\t$this->db->select('trajet.voiture,trajet.villedepart,trajet.villearrive,trajet.datedepart,trajet.datearrive,trajet.prixplace, trajet.statut,trajet.place_disponible,reservations.place,reservations.date,reservations.id,reservations.status,reservations.trajet');\n\t\t$this->db->from('trajet');\n\t\t$this->db->join('reservations','reservations.trajet=trajet.id');\n\t\t$this->db->where('reservations.pseudo',$data['pseudo']);\n\t\t$this->db->limit($config[\"per_page\"],$offset);\n\t\t$query=$this->db->get();\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "b7610f93f8287c725c9f9816e0f9bb02", "score": "0.5066701", "text": "public function show(Reservation $reservation)\n {\n \n }", "title": "" }, { "docid": "f9704d27fe7651c721c036cb627c1d27", "score": "0.506405", "text": "public function getAllUserRequests($user_id) {\n $stmt = $this->conn->prepare(\"SELECT r.* , e.name, e.mobile from service_request r inner join employee e on (r.employee_id = e.id) where r.user_id= ? && (r.status = 0 || r.status = 1)\");\n $stmt->bind_param(\"i\", $user_id);\n $stmt->execute();\n $requests = $stmt->get_result();\n $stmt->close();\n return $requests;\n }", "title": "" }, { "docid": "b51652e861dd679775fc7fcbf5ec52bb", "score": "0.50537866", "text": "public function fetchSchedules()\n {\n // Prepare a select query.\n $statement = $this->oConnection->prepare(\"\n SELECT\n ts.id, tc.courseCode AS title, ts.coursePrice, ts.fromDate AS start, ts.toDate AS end,\n ts.numSlots, ts.remainingSlots, ts.instructorId, ts.recurrence, ts.numRepetitions,\n tv.id AS venueId, tv.venue,\n CONCAT(tu.firstName, ' ', tu.lastName) AS instructor, tc.id AS courseId, ts.status,\n CASE\n WHEN tv.venue = 'Manila' THEN '#4fa242'\n WHEN tv.venue = 'Makati' THEN '#b169ec'\n END AS color\n FROM tbl_schedules ts\n INNER JOIN tbl_courses tc\n ON ts.courseId = tc.id\n INNER JOIN tbl_venue tv\n ON ts.venueId = tv.id\n INNER JOIN tbl_users tu\n ON ts.instructorId = tu.userId\n \");\n\n // Execute the above statement.\n $statement->execute();\n\n // Return the number of rows returned by the executed query.\n return $statement->fetchAll();\n }", "title": "" }, { "docid": "e0fa0576c4b1237fd5627a029838cef8", "score": "0.5052654", "text": "public function show(Reservation $reservation)\n {\n //\n }", "title": "" }, { "docid": "e0fa0576c4b1237fd5627a029838cef8", "score": "0.5052654", "text": "public function show(Reservation $reservation)\n {\n //\n }", "title": "" }, { "docid": "e0fa0576c4b1237fd5627a029838cef8", "score": "0.5052654", "text": "public function show(Reservation $reservation)\n {\n //\n }", "title": "" }, { "docid": "1594d10dbaa0e5762dd28b5c3c1fa716", "score": "0.50496674", "text": "function cancelPending() {\n\t\tself::$_db->saveQry(\"SELECT `ID` FROM `#_reservations` \".\n\t\t\t\t\"WHERE (`status` = 'pending' OR `status` = 'prefered') \".\n\t\t\t\t\"AND ? >= `startTime` \",\n\t\t\t\tCalendar::startCancel());\n\t\t\n\n\t\twhile($res = self::$_db->fetch_assoc())\n\t\t\tReservation::load($res['ID'])->failed();\n\t\t\n\t\t\n\t\t// TagesEnde - BuchungsCancelZeit ist kleiner als Aktueller Zeitblock\n\t\tif(Calendar::calculateTomorrow()) {\n\t\t\t$opening = Calendar::opening(date('Y-m-d', strtotime(\"tomorrow\")));\n\t\t\tself::$_db->saveQry(\"SELECT * FROM `#_reservations` \".\n\t\t\t\t\t\"WHERE (`status` = 'pending' OR `status` = 'prefered') \".\n\t\t\t\t\t\"AND ? <= `startTime` AND `startTime` <= ? \",\n\t\t\t\t\t$opening->format(\"Y-m-d H:i\"), \n\t\t\t\t\tCalendar::startCancel($opening));\n\t\t\t\n\t\t\twhile($res = self::$_db->fetch_assoc())\n\t\t\t\tReservation::load($res['ID'])->failed();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "891b967969ce5112ad0c33f57987217e", "score": "0.50496423", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->container->get('security.token_storage')->getToken()->getUser();\n\n\n\n\n $reservationbooks = $em->getRepository('BooksBundle:Reservationbook')->findBy(array(\"idetd\"=>$user->getId()));\n\n return $this->render('reservationbook/index.html.twig', array(\n 'reservationbooks' => $reservationbooks,\n ));\n }", "title": "" }, { "docid": "244befcc593b12d5bcd8c821b2a5e289", "score": "0.50358045", "text": "function getAppointments($disAccess){\n\t//echo \"<br>Get executed\";\n $db = dbConnect();\n\t\n\t// If disability access required\n\tif ($disAccess == 1){\n \t\t// Find appointments in future based on time and disability access\n \t \t$sql = \"SELECT Appointment.id, Appointment.start_date, Dentist.id AS 'dentist_id', Dentist.rating, Practice.lat, Practice.lng, Practice.city AS 'practice_city'\n\t\t\t \tFROM Appointment \n\t\t\t\t\tINNER JOIN PracticeDentist\n\t\t\t\t\t\tON Appointment.practiceDentist_id = PracticeDentist.id\n\t\t\t\t\tINNER JOIN Practice\n\t\t\t\t\t\tON PracticeDentist.practice_id = Practice.id \n\t\t\t\t\tINNER JOIN Dentist\n\t\t\t\t\t\tON PracticeDentist.dentist_id = Dentist.id\t\n\t\t\t\tWHERE Appointment.dis_access = 1 AND Appointment.start_date > DATE_ADD(NOW(), INTERVAL 45 MINUTE) AND Appointment.timestamp <= NOW() AND Appointment.type = 0 AND (Appointment.status = 0 OR Appointment.status = 1)\";\n\t// if disability access not required\n\t} else { \n\t\t// Find appointments in future based on time and no disability access\n \t \t$sql = \"SELECT Appointment.id, Appointment.start_date, Dentist.id AS 'dentist_id', Dentist.rating, Practice.lat, Practice.lng, Practice.city AS 'practice_city'\n\t\t\t \tFROM Appointment \n\t\t\t\t\tINNER JOIN PracticeDentist\n\t\t\t\t\t\tON Appointment.practiceDentist_id = PracticeDentist.id\n\t\t\t\t\tINNER JOIN Practice\n\t\t\t\t\t\tON PracticeDentist.practice_id = Practice.id \n\t\t\t\t\tINNER JOIN Dentist\n\t\t\t\t\t\tON PracticeDentist.dentist_id = Dentist.id\n\t\t\t\tWHERE (Appointment.status = 0 OR Appointment.status = 1) AND Appointment.start_date > DATE_ADD(NOW(), INTERVAL 45 MINUTE) AND Appointment.timestamp <= NOW() AND Appointment.type = 0\";\n\t}\n // Execute Query\n $result = $db->query($sql);\n // Return Result Array \n return $result;\n}", "title": "" }, { "docid": "c9bf5b800308923b28214ed9119119bf", "score": "0.5032605", "text": "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "title": "" }, { "docid": "dbcd9f0bfceeb3dcb88823b2f9e741ab", "score": "0.50248617", "text": "function getInterrupts($details){ \r\n\tglobal $pdo;\r\n\t$from_date = date('Y-m-d', get_strtotime($details['from_date']));\r\n\t$to_date = date('Y-m-d', get_strtotime($details['to_date']));\r\n/*\r\necho \"SELECT *, HOUR(down_date) as dn_hr, MINUTE(down_date) as dn_min,DATE(down_date) as dn_date\r\n FROM interrupts WHERE location_id = '$details[location_id]' AND (DATE(down_date) BETWEEN '$from_date' AND '$to_date') ORDER BY down_date\";\r\n*/\r\n\ttry{\r\n\t\t$select = $pdo->prepare(\"SELECT *, HOUR(down_date) as dn_hr, MINUTE(down_date) as dn_min,DATE(down_date) as dn_date\r\n\t\t\t\tFROM interrupts WHERE location_id = ? AND (DATE(down_date) BETWEEN ? AND ?) ORDER BY down_date\");\r\n\t\t$select->execute(array($details['location_id'], $from_date, $to_date));\r\n\t\t$report_data = array();\r\n\t\treturn $select->fetchAll(PDO::FETCH_ASSOC);\r\n\t}catch(PDOException $e){\r\n\t\t$this->setError($e->getMessage());\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "bedabaf681930c1219788fefccc2294c", "score": "0.5020284", "text": "public function find(Request $request)\n {\n\n $date = $request[0]['calendar'];\n $res = explode(\"/\", $date);\n $changedDate = $res[2].\"-\".$res[0].\"-\".$res[1];\n\n $today = $changedDate.'%';\n\n $list=CalendarModel::with('patient')->where('start', 'like', $today)->where('user_id',$request[0]['user_id'])\n ->where('status','active')->orderBy('id','desc')->get();\n return $list;\n }", "title": "" }, { "docid": "6b59078597ca247942397e76be6a3d29", "score": "0.5019679", "text": "public function index()\n {\n\n if(auth()->user()->admin ==1){\n $reservations = Reservation::get();\n }else{\n $reservations = Reservation::where('user_id', auth()->user()->id)->get();\n }\n\n return view('reservations.index', [\n 'reservations' => $reservations\n ]);\n }", "title": "" }, { "docid": "fee1dd238aefbdbdaa82eb787ec8026b", "score": "0.5018796", "text": "function get_time_conflicts($room_id,$room_section,$user_id,$date,$start_time,$end_time,$otf,$reschedule_reservation_id=null)\n{\n\tglobal $db;\n\n\t$conflicts = array();\n\n\t$rooms = load_rooms(null,array('id'=>$room_id));\n\tforeach($rooms as $room)\n\t\tbreak;\n\n\t$hours = load_hours($db,$date);\n\n\t// check to make sure there aren't any conflicts for the room\n\t$select_conflicts = \"select * from reservations where room_id like '$room_id' and room_section like '$room_section' and ((sched_end_time > '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_start_time <= '\".date('Y-m-d H:i:s',strtotime($start_time)).\"') OR (sched_end_time >= '\".date('Y-m-d H:i:s',strtotime($end_time)).\"' AND sched_start_time < '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') OR (sched_start_time >= '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_end_time <= '\".date('Y-m-d H:i:s',strtotime($end_time)).\"')) AND cancelled like '0' AND key_checkin_time is null and active like '1'\";\n\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t//print(\"select: $select_conflicts<br>\\n\");\n\t$res_conflicts = $db->query($select_conflicts);\n\t$num_conflicts = $res_conflicts->numRows();\n\tif($num_conflicts > 0)\n\t{\n\t\tunset($conflict);\n\t\tif($num_conflicts == 1)\n\t\t\t$conflict->message = \"The room reservation you selected conflicts with an existing room reservation.\";\n\t\telse\n\t\t\t$conflict->message = \"The room reservation you selected conflicts with multiple existing room reservations.\";\n\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t$conflict->data[] = $res;\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// check to make sure there aren't any conflicts for the patron\n\t$select_conflicts = \"select * from reservations where user_id like '$user_id' and (sched_end_time > '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' AND sched_start_time < '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') AND cancelled like '0' AND status not like 'Cancelled' AND status not like 'Completed' AND active like '1'\";\n\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t//print(\"select: $select_conflicts<br>\\n\");\n\t$res_conflicts = $db->query($select_conflicts);\n\t$num_conflicts = $res_conflicts->numRows();\n\tif($num_conflicts > 0)\n\t{\n\t\tunset($conflict);\n\t\tif($num_conflicts == 1)\n\t\t\t$conflict->message = \"An existing reservation overlaps with this reservation.\";\n\t\telse\n\t\t\t$conflict->message = \"Multiple existing reservations overlap with this reservation.\";\n\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t$conflict->data[] = $res;\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check the libary is not closed\n\tif(strtotime($start_time) < strtotime($hours->open_time) || strtotime($end_time) > strtotime($hours->close_time))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that falls outside of the available hours for \" . date('m/d/Y',strtotime($date)) . \".\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check the reservation is not for a time too far in the future\n\t$max_date_hours = load_hours($db,date('Y-m-d',strtotime(\"+\".(MAX_FUTURE_RES_DAYS-1).\" days\",strtotime('now'))));\n\tif(strtotime($start_time) > strtotime($max_date_hours->close_time))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that is too far in the future. Reservations may only be made as far as \".MAX_FUTURE_RES_DAYS.\" days in advance.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check to make sure the reservation length is not greater than the max allowed\n\t$res_length = round((strtotime($end_time) - strtotime($start_time))/60);\n\tif($res_length > DEFAULT_MAX_RES_LEN && strcmp($otf,\"1\"))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a reservation that exceeds the maximum allowed duration of \".DEFAULT_MAX_RES_LEN.\" minutes.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check to make sure the reservation length is not shorter than the min allowed\n\tif($res_length < DEFAULT_MIN_RES_LEN)\n\t{\n\t\tif((in_array('Staff',$_SESSION['LibRooms']['Roles']) || in_array('Admin',$_SESSION['LibRooms']['Roles'])) && !strcmp($otf,\"1\"))\n\t\t{\n\t\t\t// on the fly checkouts are allowed to be shorter than the minimum reservation length\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset($conflict);\n\t\t\t$conflict->message = \"You have selected a reservation that is shorter than the minimum allowed duration of \".DEFAULT_MIN_RES_LEN.\" minutes.\";\n\t\t\t$conflicts[] = $conflict;\n\t\t}\n\t}\n\n\t// double-check that the end time comes after the start time\n\tif($res_length <= 0)\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected an invalid start time or end time for your reservation.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// double-check reservation start time is for a time in the future (if staff/admin -> minus 1 res_precision)\n\tif(isset($_SESSION['LibRooms']['Roles']) && (in_array('Staff',$_SESSION['LibRooms']['Roles']) || in_array('Admin',$_SESSION['LibRooms']['Roles'])))\n\t\t$min_start_time = strtotime(RES_PRECISION . \" minutes ago\",strtotime('now'));\n\telse\n\t\t$min_start_time = strtotime('now');\n\tif(strtotime($start_time) < $min_start_time)\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You have selected a start time in the past.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\n\t// double-check room is not out-of-order\n\tif(!strcmp($room->out_of_order,'Yes'))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"The room you selected is currently out of order.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// confirm user has a staff or admin role before allowing first come first serve reservations\n\tif(isset($_SESSION['LibRooms']['Roles']) && !in_array('Staff',$_SESSION['LibRooms']['Roles']) && !in_array('Admin',$_SESSION['LibRooms']['Roles']) && !strcmp($room->fcfs,'Yes'))\n\t{\n\t\tunset($conflict);\n\t\t$conflict->message = \"You do not have permission to reserve first come first serve rooms.\";\n\t\t$conflicts[] = $conflict;\n\t}\n\n\t// if back-to-back reservations are not allowed, check to make sure this is not a back-to-back\n\tif(!strcmp(BACK_TO_BACK_RESERVATIONS,\"No\"))\n\t{\n\t\t$select_conflicts = \"select * from reservations where user_id like '$user_id' and room_id like '$room_id' and (sched_end_time like '\".date('Y-m-d H:i:s',strtotime($start_time)).\"' OR sched_start_time like '\".date('Y-m-d H:i:s',strtotime($end_time)).\"') AND cancelled like '0' and active like '1'\";\n\t\tif($reschedule_reservation_id && $reschedule_reservation_id > 0)\n\t\t\t$select_conflicts .= \" AND id not like '$reschedule_reservation_id'\";\n\t\t//print(\"select: $select_conflicts<br>\\n\");\n\t\t$res_conflicts = $db->query($select_conflicts);\n\t\t$num_conflicts = $res_conflicts->numRows();\n\t\tif($num_conflicts > 0)\n\t\t{\n\t\t\tunset($conflict);\n\t\t\t$conflict->message = \"Back to back reservations by the same patron for the same room are not allowed.\";\n\t\t\twhile($res_conflicts->fetchInto($res))\n\t\t\t\t$conflict->data[] = $res;\n\t\t\t$conflicts[] = $conflict;\n\t\t}\n\t}\n\n\treturn($conflicts);\n}", "title": "" }, { "docid": "9dc24082e95b973dc5ade4884ae00d1b", "score": "0.50177383", "text": "function store(){\n\n date_default_timezone_set( 'Asia/Manila' );\n\n $buffer = '2 Hours';\n\n //INITIAL CHECKS\n if( $_POST['startTime'] < date( 'H:i:s', strtotime( '8:00 am' ) ) || $_POST['startTime'] > date( 'H:i:s', strtotime( '5:00 pm' ) ) ){\n redirect( route( 'reservations?alert=1' ) );\n return false;\n }\n\n $request_start = date( 'Y-m-d H:i:s', strtotime( $_POST['reservation_startdate'].\" \".$_POST['startTime'] ) );\n $duration = where( 'reservation_categories', \"reservation_category = '{$_POST['reservation']}'\")[0]['reservation_duration'];\n\n //Get and Set End of Requested event\n $request_end = date_add(\n date_create( $request_start ),\n date_interval_create_from_date_string( $duration ));\n\n $request_end = date_format( $request_end, 'Y-m-d H:i:s' );\n //END\n\n //Get and Set request date with buffer\n $request_buffered = date_sub(\n date_create( $request_start ),\n date_interval_create_from_date_string( $buffer )\n );\n\n $request_buffered = date_format( $request_buffered, 'Y-m-d H:i:s' );\n //END\n\n\n //First line of defense in checking whether there is already an existing reservation\n $first_check = where( 'reservations', \"'{$request_buffered}' < reservation_enddate AND reservation_enddate < '{$request_end}'\" );\n\n if( !empty( $first_check )){\n\n redirect( route( 'dashboard/reservation/create?alert=1' ) );\n return false;\n\n }\n\n //Last line of defense to check an existing reservation\n $second_check = where( 'reservations', \"'{$request_buffered}' < reservation_startdate AND reservation_startdate < '{$request_end}'\" );\n\n if( !empty( $second_check ) ){\n\n redirect( route( 'dashboard/reservation/create?alert=1' ) );\n return false;\n }\n\n\n\n $data = [\n\n 'reserver_name' => $_POST['reserver_name'],\n 'reserver_contact' => $_POST['reserver_contact'],\n 'reservation' => $_POST['reservation'],\n 'reservation_startdate' => $request_start,\n 'reservation_enddate' => $request_end,\n 'facilitator' => $_POST['facilitator'],\n 'approved_by' => $_POST['approved_by'],\n 'approved_date' => date( 'Y-m-d H:i:s' ),\n 'reservation_status' => 'Approved',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n\n\n ];\n\n\n insert('reservations', $data );\n\n //START SMS\n $settings = get( 'settings', 1);\n\n if( !insert('reservations', $data ) ){\n redirect( route( 'reservations?alert=2' ) );\n }\n\n $number = $_POST['reserver_contact'];\n $message = $settings[0]['approved_message'];\n $apicode = $settings[0]['sms_key'];\n\n //Notify admin\n itexmo( $number, $message, $apicode );\n\n redirect( route( 'dashboard/reservation' ) );\n return true;\n}", "title": "" }, { "docid": "a4b253c680753d7db9ec8f4d5755e89f", "score": "0.5017284", "text": "function getAllBookings($userID){\n $query = $this->db->query(\"SELECT bookings.*,buildings.name as buildingName, buildings.id as buildingID ,rooms.name as roomName,rooms.floorNumber , rooms.type from bookings join rooms on rooms.roomId = bookings.roomID join buildings on buildings.id = rooms.buildingId where userID = $userID\");\n\n if($query->num_rows()>0)\n {\n $response['status'] = 'success';\n $response['data']=$this->getParticipantsForMeetings($query->result_array());\n }\n else\n {\n $response['status'] = 'failure';\n $response['code'] = 'database failure';\n\n }\n return $response;\n }", "title": "" }, { "docid": "31db5138af7e1253ab7b27759f7aabd4", "score": "0.50092864", "text": "public function run()\n {\n $reservation1 = new Reservation();\n $reservation1->total_price = 150;\n $reservation1->start_date = '2019-11-14';\n $reservation1->end_date = '2019-11-16';\n $reservation1->user_id = 1;\n $reservation1->room_id = 2;\n $reservation1->save();\n\n $reservation2 = new Reservation();\n $reservation2->total_price = 2071.5;\n $reservation2->start_date = '2019-12-14';\n $reservation2->end_date = '2020-01-20';\n $reservation2->user_id = 1;\n $reservation2->room_id = 1;\n $reservation2->save();\n\n $reservation3 = new Reservation();\n $reservation3->total_price = 13020;\n $reservation3->start_date = '2019-12-19';\n $reservation3->end_date = '2020-01-28';\n $reservation3->user_id = 1;\n $reservation3->room_id = 5;\n $reservation3->save();\n }", "title": "" }, { "docid": "2d9a791a4185e7fff0d084690f80380c", "score": "0.5000966", "text": "public function disable_reservation_couch_user() {\n $query = 'UPDATE reservations ';\n $query .= 'SET state_id = 3 ';\n $query .= 'WHERE state_id IN (1,2) ';\n $query .= 'AND couch_id IN ' ;\n $query .= '(SELECT couch_id FROM couchs ';\n $query .= ' WHERE enabled=1 ';\n $query .= ' AND user_id=' . $this->id .')';\n\n $connection = get_connection();\n $query_result = $connection->query($query);\n\n $connection->close();\n\n return $query_result;\n }", "title": "" }, { "docid": "81da0ba7ebc9b0b26aa6f76078f247d4", "score": "0.4989685", "text": "function if_user_has_booking($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id';\";\n $result = $db->query($sql);\n return $result;\n}", "title": "" }, { "docid": "202d9d99e4b4df39c1444696c8e49d2e", "score": "0.4988379", "text": "function getAvailableSlotByCase_managerByDate($date, $case_manager) {\n $weekday = strftime(\"%A\", $date);\n\n $this->db->where('date', $date);\n $this->db->where('case_manager', $case_manager);\n $holiday = $this->db->get('holidays')->result();\n\n if (empty($holiday)) {\n $this->db->where('date', $date);\n $this->db->where('case_manager', $case_manager);\n $query = $this->db->get('patient_care')->result();\n\n\n $this->db->where('case_manager', $case_manager);\n $this->db->where('weekday', $weekday);\n $this->db->order_by('s_time_key', 'asc');\n $query1 = $this->db->get('time_slot')->result();\n\n $availabletimeSlot = array();\n $bookedTimeSlot = array();\n\n foreach ($query1 as $timeslot) {\n $availabletimeSlot[] = $timeslot->s_time . ' To ' . $timeslot->e_time;\n }\n foreach ($query as $bookedTime) {\n if ($bookedTime->status != 'Cancelled') {\n $bookedTimeSlot[] = $bookedTime->time_slot;\n }\n }\n\n $availableSlot = array_diff($availabletimeSlot, $bookedTimeSlot);\n } else {\n $availableSlot = array();\n }\n\n return $availableSlot;\n }", "title": "" }, { "docid": "0f67bc18ab382e7ceec818b83cfb2e9b", "score": "0.49869677", "text": "public function show(Reservation $reservation)\n {\n }", "title": "" }, { "docid": "339575921dc496fd9bd73fb2d3478e76", "score": "0.4985602", "text": "function vrsRead($from,$to,$userid)\n\t {\n\t\t $sql = \"UPDATE pof_candidates SET is_read='1' WHERE user_id =\".$userid.\" AND stage IN (SELECT id FROM segment_name WHERE segment_type_id='5' ) AND (date BETWEEN '\".$from.\"' AND '\".$to.\"')\";\n\t\t\t $q = $this->db->query($sql);\n\t\t\t return $q;\n\t\t }", "title": "" }, { "docid": "67023ed0341bea5136570a542f708cfc", "score": "0.49852836", "text": "function bookRooms($roomID,$title,$userID,$startDate, $endDate,$otherUsers){\n\n $result = $this->canBookRoom($startDate,$endDate,$roomID);\n if ($result == \"FALSE\")\n {\n $response['status'] = 'failure';\n $response['code'] = 'This room is already Booked on these time slots';\n return $response;\n }\n $add_data = array(\"roomID\"=>$roomID,\"title\"=>$title,\"startDate\"=>$startDate,\"endDate\"=>$endDate,\"userID\"=>$userID);\n if ($this->db->insert('bookings', $add_data)) {\n $insert_id = $this->db->insert_id();\n for ($i = 0 ; $i < count($otherUsers); $i++)\n {\n $obj = $otherUsers[$i];\n\n $data = array(\"bookingID\"=>$insert_id,\"userID\"=>$obj);\n $this->db->insert('booking_invitations', $data);\n\n\n }\n $response['status'] = 'success';\n $response['code']=\"Meeting Created Successfuly\";\n }\n else\n {\n $response['status'] = 'failure';\n $response['code'] = 'database failure';\n }\n return $response;\n\n }", "title": "" }, { "docid": "cd1e46ea1c6f07718fee140194a547bb", "score": "0.49828154", "text": "public function userViewAllBookings($id)//user_id is beign passed to this method through url\n {\n\n //find all new bookings where user_id and old_new match the given ones.\n $bookings = Booking::select('id','paid','scheduled_date','scheduled_time','total_amount','status')\n ->where('user_id',$id)\n ->where('old_new',1)\n ->where('status','!=','done')\n ->get();\n return response()->json(['data'=>$bookings]);\n\n }", "title": "" }, { "docid": "dfddaadae258bae325ec8a836d0f106b", "score": "0.49787632", "text": "public function getUserDetails(Request $request){\n if($request->ajax()){\n $id = $request->id;\n $name = Reservation::where('id',$id)->where('status',1)->first()->name;\n return response($name);\n }\n }", "title": "" }, { "docid": "ef9fdde6e082eeefc32b61d253b8d5b8", "score": "0.49760878", "text": "function searchForReservations() {\r\n $type = ($_POST['searchType']);\r\n \r\n if ($type == \"Select Search Type\") {\r\n echo (\"Please choose what you're searching for from the drop down menu below.\");\r\n } else if ($type == \"Request ID\") {\r\n \r\n $roomReservationRequestId = ($_POST[\"searchParam\"]);\r\n error_log(\"searching by request id = \".$roomReservationRequestId);\r\n $Reservation = retrieve_RoomReservationActivity_byRequestId($roomReservationRequestId);\r\n // retrieval routine returns just one reservation, so return an array consisting of one record\r\n if (!$Reservation)\r\n { \r\n error_log(\"retrieve_RoomReservationActivity_byRequestID returned false\");\r\n $Reservations = false;\r\n }\r\n else\r\n {\r\n $Reservations = array();\r\n $Reservations[] = $Reservation;\r\n }\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Social Worker (Last Name)\") {\r\n $socialWorkerLastName = ($_POST[\"searchParam\"]);\r\n // $Reservations = array();\r\n $Reservations = (retrieve_SocialWorkerLastName_RoomReservationActivity($socialWorkerLastName));\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Staff Approver (Last Name)\") {\r\n $rmhStaffLastName = ($_POST[\"searchParam\"]);\r\n // $Reservations = array();\r\n $Reservations = (retrieve_RMHStaffLastName_RoomReservationActivity($rmhStaffLastName));\r\n return $Reservations;\r\n\r\n /* if (!$Reservations) {\r\n echo (\"No reservations found! Try entering your search again.\");\r\n } */\r\n } else if ($type == \"Family (Last Name)\") {\r\n $parentLastName = ($_POST[\"searchParam\"]);\r\n \r\n $Reservations = (retrieve_FamilyLastName_RoomReservationActivity($parentLastName));\r\n return $Reservations;\r\n } else if ($type == \"Status\") {\r\n $status = ($_POST[\"searchParam\"]);\r\n $Reservations = (retrieve_RoomReservationActivity_byStatus($status));\r\n return $Reservations;\r\n } else if ($type == \"Last Activity\") {\r\n $activity = ($_POST[\"searchParam\"]);\r\n $Reservations = (retrieve_RoomReservationActivity_byLastActivity($activity));\r\n return $Reservations;\r\n }\r\n}", "title": "" }, { "docid": "4005da70fe793af401a9f3a13cd7acea", "score": "0.49749678", "text": "function getSchedule($userId)\n{\n\tglobal $db;\n\t$sql = \"SELECT * FROM `schedules` WHERE `user_id` = ? ;\";\n\t$query = $db->prepare($sql);\n\t$query->bind_param(\"i\", $userId);\n\t$query->execute();\n\n\t$courses = array();\n\t$queryResult = $query->get_result();\n\t$row = $queryResult->fetch_assoc();\n\tfor ($i = 0; $i < 10; $i++)\n\t{\n\t\t$strIndex = (string)($i+1);\n\t\tif (isset($row[\"course_id_\" . $strIndex]) && $row[\"course_id_\" . $strIndex] != 0)\n\t\t{\n\t\t\t$currentCourse = getCourse($row[\"course_id_\" . $strIndex]);\n\t\t\t$currentCourse->courseInstructor = $row[\"course_instructor_\" . $strIndex];\n\t\t\tarray_push($courses, $currentCourse);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $courses;\n}", "title": "" }, { "docid": "d422079e8388f0228f935766bd627944", "score": "0.49738577", "text": "function getResource( $arrangementid, $resourceid )\n\t{\n\t\t$sql = \"SELECT * FROM \" .DB_tbl_booking_resource\n\t\t.\" WHERE arrangementid=$arrangementid AND id=$resourceid\";\n\t\t$this->Booking_resource( $sql );\n\t}", "title": "" }, { "docid": "053f60dc2e643fc4e9a2212f315b4ee0", "score": "0.49728543", "text": "public function index()\n {\n return UserResource::collection(User::restaurant()->with(['lastAttendance'])->get());\n }", "title": "" }, { "docid": "64e94d859b85620bab78580b11b742a9", "score": "0.49711803", "text": "public function query(User $model)\n {\n\n $users = User::select('id','name','email','status', 'created_at', 'updated_at');\n if($this->request()->get('startDate')) {\n $st = $this->request()->get('startDate');\n $dt = ($this->request()->get('endDate') == '') ? date('Y-m-d') : $this->request()->get('endDate');\n $users->whereDate('created_at','<=', \"$dt\");\n $users->whereDate('created_at','>=', \"$st\");\n }\n if($this->request()->get('status') == '0' || $this->request()->get('status') == '1') {\n $users->where('status', $this->request()->get('status'));\n }\n $users->where('role',3)\n // $users->orderBy('created_at','DESC') \n ->get();\n\n return $this->applyScopes($users);\n\n }", "title": "" }, { "docid": "481fa80d1307d217a7bb5f0a73087012", "score": "0.49685663", "text": "public function index( Request $request ) {\n\t\ttry {\n\t\t\t// $requests = UserRequests::RequestHistory()->paginate($this->perpage);\n\t\t\t// $pagination=(new Helper)->formatPagination($requests);\n\n\t\t\t$from_date = $request->input( 'from_date' );\n\t\t\t$to_date = $request->input( 'to_date' );\n\t\t\t$type = $request->input( 'date_filter' );\n\n\t\t\t$fleet_id = 0;\n\t\t\t$userAdminIds = User::where( 'fleet_id', $fleet_id)->pluck( 'id' )->toArray();\n\t\t\t$providerAdminIds = Provider::where('fleet',$fleet_id)->pluck('id')->toArray();\n\n\t\t\t$req_query =\n\t\t\t\tUserRequests::with( 'payment', 'user', 'provider' )\n\t\t\t\t\t->whereIn( 'user_id', $userAdminIds )\n\t\t\t\t\t->orderBy( 'user_requests.created_at', 'desc' );\n\n\t\t\t// $providerAdminRequests =\n\t\t\t// \tUserRequests::with( 'payment', 'user', 'provider' )\n\t\t\t// \t\t->whereIn( 'provider_id', $providerAdminIds )\n\t\t\t// \t\t->orderBy( 'user_requests.created_at', 'desc' );\n\n\t\t\t// $req_query = $providerAdminRequests->union($userAdminRequests);\n\n//\t\t\t$req_query = UserRequests::RequestHistory();\n\t\t\t// if ( $from_date && $to_date ) {\n\t\t\t// \tswitch ( $type ) {\n\t\t\t// \t\tcase 'tday':\n\t\t\t// \t\tcase 'yday':\n\t\t\t// \t\t\t$req_query = $req_query->whereDate( 'created_at',\n\t\t\t// \t\t\t\tdate( 'Y-m-d', strtotime( $from_date ) ) );\n\t\t\t// \t\t\tbreak;\n\t\t\t// \t\tdefault:\n\t\t\t// \t\t\t$req_query = $req_query->whereBetween( 'created_at',\n\t\t\t// \t\t\t\t[\n\t\t\t// \t\t\t\t\tCarbon::createFromFormat( 'Y-m-d', $from_date ),\n\t\t\t// \t\t\t\t\tCarbon::createFromFormat( 'Y-m-d', $to_date ),\n\t\t\t// \t\t\t\t] );\n\t\t\t// \t\t\tbreak;\n\t\t\t// \t}\n\t\t\t// }\n\n\t\t\t\n\n\t\t\tif ( $request->from_date && $request->to_date ) {\n\t\t\t\tif ( $request->from_date == $request->to_date ) {\n\t\t\t\t\t$req_query = $req_query->whereDate( 'user_requests.created_at',\n\t\t\t\t\t\tdate( 'Y-m-d', strtotime( $request->from_date ) ) );\n\t\t\t\t\t// $providerFleetRequests->whereDate( 'user_requests.created_at',\n\t\t\t\t\t// \tdate( 'Y-m-d', strtotime( $request->from_date ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$req_query = $req_query->whereBetween( 'user_requests.created_at',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\tCarbon::createFromFormat( 'Y-m-d',\n\t\t\t\t\t\t\t\t$request->from_date ),\n\t\t\t\t\t\t\tCarbon::createFromFormat( 'Y-m-d',\n\t\t\t\t\t\t\t\t$request->to_date ),\n\t\t\t\t\t\t] );\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$requests = $req_query->get();\n\t\t\tforeach ( $requests as $key => $value ) {\n\t\t\t\tif ( $value->user === null ) {\n\t\t\t\t\tunset( $requests[ $key ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$admin = Admin::where( 'id', 1 )->first();\n\t\t\t$trips = $requests;\n\t\t\t// dd($trips);\n\t\t\t// return view('admin.request.index', compact('requests', 'pagination', 'trips', 'admin', 'dates'));\n\n\t\t\t$dates['yesterday'] = Carbon::yesterday()->format( 'Y-m-d' );\n\t\t\t$dates['today'] = Carbon::today()->format( 'Y-m-d' );\n\t\t\t$dates['pre_week_start'] =\n\t\t\t\tdate( \"Y-m-d\", strtotime( \"last week monday\" ) );\n\t\t\t$dates['pre_week_end'] =\n\t\t\t\tdate( \"Y-m-d\", strtotime( \"last week sunday\" ) );\n\t\t\t$dates['cur_week_start'] =\n\t\t\t\tCarbon::today()->startOfWeek()->format( 'Y-m-d' );\n\t\t\t$dates['cur_week_end'] =\n\t\t\t\tCarbon::today()->endOfWeek()->format( 'Y-m-d' );\n\t\t\t$dates['pre_month_start'] =\n\t\t\t\tCarbon::parse( 'first day of last month' )->format( 'Y-m-d' );\n\t\t\t$dates['pre_month_end'] =\n\t\t\t\tCarbon::parse( 'last day of last month' )->format( 'Y-m-d' );\n\t\t\t$dates['cur_month_start'] =\n\t\t\t\tCarbon::parse( 'first day of this month' )->format( 'Y-m-d' );\n\t\t\t$dates['cur_month_end'] =\n\t\t\t\tCarbon::parse( 'last day of this month' )->format( 'Y-m-d' );\n\t\t\t$dates['pre_year_start'] =\n\t\t\t\tdate( \"Y-m-d\", strtotime( \"last year January 1st\" ) );\n\t\t\t$dates['pre_year_end'] =\n\t\t\t\tdate( \"Y-m-d\", strtotime( \"last year December 31st\" ) );\n\t\t\t$dates['cur_year_start'] =\n\t\t\t\tCarbon::parse( 'first day of January' )->format( 'Y-m-d' );\n\t\t\t$dates['cur_year_end'] =\n\t\t\t\tCarbon::parse( 'last day of December' )->format( 'Y-m-d' );\n\t\t\t$dates['nextWeek'] =\n\t\t\t\tCarbon::today()->addWeek()->format( 'Y-m-d' );\n\n\t\t\treturn view( 'admin.request.index',\n\t\t\t\tcompact( 'requests',\n\t\t\t\t\t'trips',\n\t\t\t\t\t'admin',\n\t\t\t\t\t'dates',\n\t\t\t\t\t'from_date',\n\t\t\t\t\t'to_date' ) );\n\t\t} catch ( Exception $e ) {\n\t\t\treturn back()->with( 'flash_error',\n\t\t\t\ttrans( 'admin.something_wrong' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "f97ee4db63d694374bd8440a84ce2662", "score": "0.49682194", "text": "function unattended() {\n\t\tself::$_db->saveQry(\"SELECT `ID` FROM `#_reservations` \".\n\t\t\t\t\"WHERE (`status` = 'queued') \".\n\t\t\t\t\"AND `startTime` <= ?\",\n\t\t\t\tCalendar::unattended());\n\t\t\n\t\twhile($res = self::$_db->fetch_assoc())\n\t\t\tReservation::load($res['ID'])->unattended();\n\t}", "title": "" }, { "docid": "14b24fb4438cdaeb587fc11577d1c1a5", "score": "0.4966256", "text": "function get_amout_room($date_from,$date_end)\n {\n\t\t$sql1 = '\n\t\t SELECT \n\t\t\t\t\t\trs.id,\n\t\t\t\t\t\trs.change_price,\n\t\t\t\t\t\trr.tax_rate, \n\t\t\t\t\t\tservice_rate,\n\t\t\t\t\t\trs.in_date,\n\t\t\t\t\t\trr.arrival_time,\n rr.net_price,\n\t\t\t\t\t\trr.departure_time,\n\t\t\t\t\t\trr.price,\n\t\t\t\t\t\trs.status,\n\t\t\t\t\t\trr.id as reservation_room_id\n\t\t\t\t\tFROM \n\t\t\t\t\t\troom_status rs \n\t\t\t\t\t\tINNER JOIN reservation_room rr ON rr.id = rs.reservation_room_id \n\t\t\t\t\t\tINNER JOIN reservation r on rr.reservation_id = r.id\n\t\t\t\t\tWHERE \n\t\t\t\t\t\t(rs.status =\\'OCCUPIED\\' OR rs.status =\\'BOOKED\\')\n\t\t\t\t\t\tAND rs.in_date >= \\''.$date_from.'\\' \n\t\t\t\t\t\tAND rs.in_date <= \\''.$date_end.'\\' ';\n\t\t$room_totals = DB::fetch_all($sql1);\n\t\t// tinh tien phong su dung trong ngay\n\t\t$amount_room_days =array();\n\t\tforeach($room_totals as $key=>$value)\n {\n\t\t\t// tinh tien phong va phi dich phong thue cho tung phong rui cong thanh tog tien trong ngay\n\t\t\t$amount_room_days['id'] = $value['in_date'];\n\t\t\t$service_room = 0;\n\t\t\t$pay_room = 0;\n\t\t\t$tax_room = 0;\n\t\t\t$deposit_room = 0;\n\t\t\t$net=0;\n\t\t\t//if(($value['arrival_time'] != $value['departure_time'] \n// and $value['in_date'] < $value['departure_time'] and \n// ($value['status'] == 'OCCUPIED' ||$value['status'] == 'BOOKED')) \n// || ($value['arrival_time'] == $value['in_date']))\n if (1 == 1)\n {\n\t\t\t\t$service_room = ($value['change_price'] * $value['service_rate'])/100;\n\t\t\t\t// tien phong + dv 1 phong\n\t\t\t\t$pay_room = $value['change_price'] + $service_room ;\t\n\t\t\t\t// tinh tien thue cua 1 phong \n\t\t\t\t$tax_room = ($pay_room * $value['tax_rate'])/100;\t\n\t\t\t\t$net = $pay_room + $tax_room;\n\t\t\t}\n\t\t\t$room_totals[$key]['room_total'] = $net;// - $deposit_room;\n\t\t if (User::is_admin() and $value['in_date'] == '31-DEC-13' and $net > 0)\n {\n //echo System::display_number($net).'__'.$value['reservation_room_id'].'<br>';\n }\n\t\t\tif(!isset($amount_room_days[$value['in_date']]['amount_total']))\n {\n $amount_room_days[$value['in_date']]['count'] = 1; \n if ($net == 0)\n {\n $amount_room_days[$value['in_date']]['count'] = 0;\n }\n\t\t\t\t $amount_room_days[$value['in_date']]['amount_total'] = $room_totals[$key]['room_total'];\n\t\t\t}\n else\n {\n $amount_room_days[$value['in_date']]['count'] += 1;\n if ($net == 0)\n {\n $amount_room_days[$value['in_date']]['count'] -= 1;\n }\n\t\t\t\t $amount_room_days[$value['in_date']]['amount_total'] += $room_totals[$key]['room_total'];\n\t\t\t}\n\t\t}\n if (User::is_admin())\n {\n //System::debug($amount_room_days);\n }\n\t\treturn $amount_room_days;\n\t}", "title": "" } ]
99fedfc072e294877e0168c1b37b92a9
/ Usage: auth_pop3_ssl('username', 'password', 'pop3.example.com') If the host is using SSL, prepend $popserver with "ssl://" Original code from: Modified by Lord Matt: Updates and fixes by Andrew Peng: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see
[ { "docid": "225c91f7897b5ba25317a83676c9fe05", "score": "0.87244534", "text": "function auth_pop3_ssl($username, $password, $popserver)\n\t{\n\n\t\t$isSSL = 0;\n\n\t\tif(substr($popserver, 0, 6) == \"ssl://\")\n\t\t{\n\t\t\t$isSSL = 1;\n\t\t}\n\n\t\tif(trim($username)=='')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tif($isSSL)\n\t\t\t{\t\n\t\t\t\t$fp = fsockopen(\"$popserver\", 995, &$errno, &$errstr);\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$fp = fsockopen(\"$popserver\", 110, &$errno, &$errstr);\n\t\t\t}\n\n\t\t\tif(!$fp)\n\t\t\t{\n\t\t\t\t// failed to open POP3\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\tset_socket_blocking($fp,-1); // Turn off blocking\n\n\t\t\t\t/*\n\t\t\t\tClear the POP server's Banner Text.\n\t\t\t\teg.. '+OK Welcome to etc etc'\n\t\t\t\t*/\n\n\t\t\t\t$trash = fgets($fp,128); // Trash to hold the banner\n\t\t\t\tfwrite($fp,\"USER $username\\r\\n\"); // POP3 USER CMD\n\t\t\t\t$user = fgets($fp,128);\n\t\t\t\t$user = ereg_replace(\"\\n\",\"\",$user);\n\n\t\t\t\tif ( ereg (\"^\\+OK(.+)\", $user ) )\n\t\t\t\t{\n\t\t\t\t\tfwrite($fp,\"PASS $password\\r\\n\"); // POP3 PASS CMD\n\t\t\t\t\t$pass = fgets($fp,128);\n\t\t\t\t\t$pass = ereg_replace(\"\\n\",\"\",$pass);\n\n\t\t\t\t\tif ( ereg (\"^\\+OK(.+)\", $pass ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// User has successfully authenticated\n\t\t\t\t\t\t$auth = true;\n\t\t\t\t\t}\n\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// bad password\n\t\t\t\t\t\t$auth = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// bad username\n\t\t\t\t\t$auth = false;\n\t\t\t\t}\n\n\t\t\t\tfwrite($fp,\"QUIT\\r\\n\");\n\t\t\t\tfclose($fp);\n\t\t\t\treturn $auth;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "d7aade9807ba6d51d7a8da282d200e6a", "score": "0.68369836", "text": "private function authSecurePOP3($theMailserver, $theUsername, $thePassword)\n\t{\n\t\t/* check if the input for $theMailserver is blank */\n\t\tif( $theMailserver!=\"\" )\n\t\t{\n\t\t\t/* input for $theMailserver is not blank */\n\t\t\t\n\t\t\t/* imap_open(), check out http://php.net/manual/en/function.imap-open.php for more info */\n\t\t\t$linkToIITGmailsrv=imap_open( \"{\".$theMailserver.\":995/pop3/ssl/novalidate-cert}\",$theUsername,$thePassword );\n\t\t\t\n\t\t\t/* check authentication status */\n\t\t\tif($linkToIITGmailsrv)\n\t\t\t{\n\t\t\t\t/* authentication was successful, close $linkToIITGmailsrv, return 0 */\n\t\t\t\timap_close($linkToIITGmailsrv);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* authentication was NOT successful, close $linkToIITGmailsrv, return 1 */\n\t\t\t\timap_close($linkToIITGmailsrv);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* input for $theMailserver is blank, return 2 */\n\t\t\treturn 2;\n\t\t}\n\t}", "title": "" }, { "docid": "977d0de53c32ef916e7a50f6e424c942", "score": "0.67438316", "text": "function check_user_password( $username, $password ) {\n\tglobal $CFG;\n\n\tif( !isset( $CFG['pop3_mapping'] ) )\n\t\treturn(null);\n\n\t$popuser = '';\n\tforeach( $CFG['pop3_mapping'] as $d => $s ) {\n\t\tif( preg_match( \"/^(.+)($d)$/\", $username, $match ) ) {\n\t\t\t$nick = $match[1];\n\t\t\tlist($popuser, $domain) = split( '@', $username );\n\t\t\t$server = $s;\n\t\t}\n\t}\n\n\tif( $popuser == '' )\n\t\treturn(null);\n\n/*\n\t$domain = strstr( $username, '@' );\n\tif( !$domain || !isset( $CFG['pop3_mapping'][$domain] ) )\n\t\treturn(null);\n\n\t$popuser = preg_replace( '/@.+$/', \"\", $username );\n\n\t$server = $CFG['pop3_mapping'][$domain];\n*/\n\n\tif( preg_match( '/^(\\w+):\\/\\/([^\\/]+)\\/?$/', $server, $match ) ) {\n\t\t$protocol = $match[1];\n\t\t$server = $match[2];\n\t}\n\n\tif( $protocol == 'pop3s' )\n\t\t$default_port = 995;\t/* POP3 over SSL */\n\telse\n\t\t$default_port = 110;\t/* POP3 */\n\n\tif( strstr( $server, ':' ) )\n\t\tlist( $server, $port ) = split( ':', $server );\n\telse\n\t\t$port = $default_port;\n\n\tif( $protocol == 'pop3s' )\n\t\t$sock = @fsockopen( \"ssl://$server\", $port, $errno, $errstr, 5 );\n\telse\n\t\t$sock = @fsockopen( $server, $port );\n\n\tif( !$sock )\n\t\treturn(null);\n\n\tsocket_set_timeout( $sock, 10, 0 );\n\n\t$msg = fgets( $sock, 256 );\n\tif( !strstr( $msg, \"+OK\" ) ) {\n\t\tfclose( $sock );\n\t\treturn(null);\n\t}\n\n\tfputs( $sock, \"USER $popuser\\r\\n\" );\n\n\t$msg = fgets( $sock, 256 );\n\tif( !strstr( $msg, \"+OK\" ) ) {\n\t\tfclose( $sock );\n\t\treturn(null);\n\t}\n\n\tfputs( $sock, \"PASS $password\\r\\n\" );\n\n\t$msg = fgets( $sock, 256 );\n\tif( !strstr( $msg, \"+OK\" ) ) {\n\t\tfclose( $sock );\n\t\treturn(null);\n\t}\n\n\tfputs( $sock, \"QUIT\\r\\n\" );\n\tfclose( $sock );\n\n\t$userinfo['%u'] = $nick;\n\t$userinfo['%e'] = $username;\n\n\treturn( $userinfo );\n}", "title": "" }, { "docid": "bc1334f2cb38be995d9b68c1a2b63a27", "score": "0.56997347", "text": "function _login()\n\t{\n\t\tm2f_log::log(M2F_LOG_NORMAL, $this->class, 'pop_login', __LINE__, __FILE__); \n\n\t\tif (!$this->pop->connect($this->host, $this->port))\n\t\t{\n\t\t\treturn m2f::raise_error('Cannot connect to the POP3 server at \"' . $this->host . '\", port \"' . $this->port . '\".', __LINE__, __FILE__);\n\t\t}\n\n\t $login = $this->pop->login($this->user, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->pass , \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@$this->apop == '1' ? 'APOP' : 'USER'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t if (m2f::is_error($login))\n\t\t{\n\t\t\treturn m2f::raise_error('Cannot login to the POP3 server with username \"' . $this->user . '\". Error returned was \"' . $login->getMessage() . '\".', __LINE__, __FILE__);\n\t\t}\n\n\t return TRUE;\n\t}", "title": "" }, { "docid": "4d64b839b6f584ceb215ce8bd867cb4a", "score": "0.54932314", "text": "function login($user, $pass, $apop = \"0\"){\r\n if(!$this->socket){\r\n $this->error = \"POP3 login() - Error: No connection avalible.\";\r\n $this->_cleanup();\r\n return FALSE;\r\n }\r\n\r\n if( $this->_checkstate(\"login\") ){\r\n\r\n if($this->apop_detect){\r\n if($this->apop_banner != \"\"){\r\n $apop = \"1\";\r\n }\r\n }\r\n\r\n if($apop == \"0\"){\r\n\r\n $response = \"\";\r\n $cmd = \"USER $user\";\r\n if(!$this->_logging($cmd)) return FALSE;\r\n if(!$this->_putline($cmd)) return FALSE;\r\n\r\n $response = $this->_getnextstring();\r\n\r\n if(!$this->_logging($response)) return FALSE;\r\n\r\n if(substr($response,0,1) == \"-\" ){\r\n $this->error = \"POP3 login() - Error: \".$response;\r\n $this->_cleanup();\r\n return FALSE;\r\n }\r\n\r\n $response = \"\";\r\n $cmd = \"PASS $pass\";\r\n if(!$this->_logging(\"PASS \".md5($pass))) return FALSE;\r\n if(!$this->_putline($cmd)) return FALSE;\r\n $response = $this->_getnextstring();\r\n if(!$this->_logging($response)) return FALSE;\r\n if(substr($response,0,1) == \"-\" ){\r\n $this->error = \"POP3 login() - Error: \".$response;\r\n $this->_cleanup();\r\n return FALSE;\r\n }\r\n $this->state = \"TRANSACTION\";\r\n if(!$this->_logging(\"STATUS: TRANSACTION\")) return FALSE;\r\n return TRUE;\r\n\r\n }elseif($apop == \"1\"){\r\n // APOP Section\r\n\r\n // Check is Server Banner for APOP Command given !!!\r\n if(empty($this->apop_banner)){\r\n $this->error = \"POP3 login() (APOP) - Error: No Server Banner -- aborted and close connection\";\r\n $this->_cleanup();\r\n return FALSE;\r\n }\r\n echo $this->apop_banner;\r\n\r\n $response = \"\";\r\n\r\n // Send APOP Command !!!\r\n\r\n $cmd = \"APOP \". $user .\" \". md5($this->apop_banner.$pass);\r\n\r\n if(!$this->_logging($cmd)) return FALSE;\r\n if(!$this->_putline($cmd)) return FALSE;\r\n $response = $this->_getnextstring();\r\n\r\n if(!$this->_logging($response)) return FALSE;\r\n // Check the response !!!\r\n if(substr($response,0,1) != \"+\" ){\r\n $this->error = \"POP3 login() (APOP) - Error: \".$response;\r\n $this->_cleanup();\r\n return FALSE;\r\n }\r\n $this->state = \"TRANSACTION\";\r\n if(!$this->_logging(\"STATUS: TRANSACTION\")) return FALSE;\r\n return TRUE;\r\n\r\n }else{\r\n $this->error = \"POP3 login() - Error: Please set apop var !!! (1 [true] or 0 [false]).\";\r\n $this->_cleanup();\r\n return FALSE;\r\n }\r\n\r\n }\r\n\r\n return FALSE;\r\n }", "title": "" }, { "docid": "70f8a1629f6f8bcb542a20e10a5f9ff0", "score": "0.5415087", "text": "function mcve_setssl($conn, $host, $port) {}", "title": "" }, { "docid": "6f203affdae9ace5e83d5817a39d8103", "score": "0.53736323", "text": "function _ssl_auth($auth_string)\n\t{\n\t\tif (empty($this->ssh_login))\n\t\t{\n\t\t\tif ($this->curl_bin)\n\t\t\t{\n\t\t\t\texec(\"$this->curl -m 60 -LkI $this->nexus\", $header);\n\t\t\t\t$header = implode($header, null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ch = curl_init($this->nexus);\n\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_NOBODY, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\t// curl_setopt($ch, CURLOPT_TIMEOUT, 2);\n\n\t\t\t\t$header = curl_exec($ch);\n\n\t\t\t\tcurl_close($ch);\n\t\t\t}\n\n\t\t\tpreg_match ('/DALogin=(.*?),/', $header, $out);\n\n\t\t\tif (isset($out[1]))\n\t\t\t{\n\t\t\t\t$slogin = $out[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$slogin = $this->ssh_login;\n\t\t}\n\n\n\t\tif ($this->curl_bin)\n\t\t{\n\t\t\t$header1 = '\"Authorization: Passport1.4 OrgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,sign-in='.$this->passport.',pwd='.$this->password.','.$auth_string.'\"';\n\n\t\t\texec(\"$this->curl -m 60 -LkI -H $header1 https://$slogin\", $auth_string);\n\n\t\t\t$header = null;\n\n\t\t\tforeach ($auth_string as $key => $value)\n\t\t\t{\n\t\t\t\tif (strstr($value, 'Unauthorized'))\n\t\t\t\t{\n\t\t\t\t\techo 'Unauthorised';\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telseif (strstr($value, 'Authentication-Info'))\n\t\t\t\t{\n\t\t\t\t\t$header = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ch = curl_init('https://'.$slogin);\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t\t\t\t\t'Authorization: Passport1.4 OrgVerb=GET,OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom,sign-in='.$this->passport.',pwd='.$this->password.','.$auth_string,\n\t\t\t\t\t\t\t'Host: login.passport.com'\n\t\t\t\t\t\t\t));\n\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_NOBODY, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t// curl_setopt($ch, CURLOPT_TIMEOUT, 2);\n\n\t\t\t$header = curl_exec($ch);\n\n\t\t\tcurl_close($ch);\n\t\t}\n\n\t\tpreg_match (\"/from-PP='(.*?)'/\", $header, $out);\n\n\t\treturn (isset($out[1])) ? $out[1] : false;\n\t}", "title": "" }, { "docid": "6299f3ecaadc8417a0db187154f2dfa7", "score": "0.531517", "text": "function login($user, $pass, $apop){\n if(!$this->socket){\n $this->error = \"POP3 login() - Error: No connection avalible.\";\n $this->_cleanup();\n return FALSE;\n }\n\n if($this->_checkstate(\"login\")){\n if($apop == \"0\"){\n\n $response = \"\";\n $cmd = \"USER $user\";\n if(!$this->_logging($cmd)) return FALSE;\n if(!$this->_putline($cmd)) return FALSE;\n\n $response = $this->_getnextstring();\n\n if(!$this->_logging($response)) return FALSE;\n\n if(substr($response,0,1) == \"-\" ){\n $this->error = \"POP3 login() - Error: \".$response;\n $this->_cleanup();\n return FALSE;\n }\n \n $response = \"\";\n $cmd = \"PASS $pass\";\n $cmd_1 = \"PASS \".md5($pass);\n if(!$this->_logging($cmd_1)) return FALSE;\n if(!$this->_putline($cmd)) return FALSE;\n $response = $this->_getnextstring();\n if(!$this->_logging($response)) return FALSE;\n if(substr($response,0,1) == \"-\" ){\n $this->error = \"POP3 login() - Error: \".$response;\n $this->_cleanup();\n return FALSE;\n }\n $this->state = \"TRANSACTION\";\n if(!$this->_logging(\"STATUS: TRANSACTION\")) return FALSE;\n return TRUE;\n\n }elseif($apop == \"1\"){\n // APOP Section\n\n // Check is Server Banner for APOP Command given !!!\n if(empty($this->apop_banner)){\n $this->error = \"POP3 login() (APOP) - Error: No Server Banner -- aborted and close connection\";\n $this->_cleanup();\n return FALSE;\n }\n\n $response = \"\";\n\n // Send APOP Command !!!\n\n $cmd = \"APOP $user \".md5($this->apop_banner.$pass);\n\n if(!$this->_logging($cmd)) return FALSE;\n if(!$this->_putline($cmd)) return FALSE;\n $response = $this->_getnextstring();\n\n if(!$this->_logging($response)) return FALSE;\n // Check the response !!!\n if(substr($response,0,1) != \"+\" ){\n $this->error = \"POP3 login() (APOP) - Error: \".$response;\n $this->_cleanup();\n return FALSE;\n }\n $this->state = \"TRANSACTION\";\n if(!$this->_logging(\"STATUS: TRANSACTION\")) return FALSE;\n return TRUE;\n\n }else{\n $this->error = \"POP3 login() - Error: Please set apop var !!! (1 [true] or 0 [false]).\";\n $this->_cleanup();\n return FALSE;\n }\n\n }\n \n return FALSE;\n }", "title": "" }, { "docid": "0d99383cad663d465cde673c9bf19ca5", "score": "0.5269518", "text": "function connect( $server, $port=\"110\", $timeout = \"25\" , $sock_timeout = \"10,500\")\r\n {\r\n if($this->socket)\r\n {\r\n $this->error = \"POP3 connect() - Error: Connection also avalible !!!\";\r\n return FALSE;\r\n }\r\n\r\n if(!trim($server))\r\n {\r\n $this->error = \"POP3 connect() - Error: Please give a server address.\";\r\n return FALSE;\r\n }\r\n\r\n if($port < \"1\" && $port > \"65535\" || !trim($port))\r\n {\r\n $this->error = \"POP3 connect() - Error: Port not set or out of range (1 - 65535)\";\r\n return FALSE;\r\n }\r\n\r\n if($timeout < 0 && $timeout > 25 || !trim($timeout))\r\n {\r\n $this->error = \"POP3 connect() - Error: Connection Timeout not set or out of range (0 - 25)\";\r\n return FALSE;\r\n }\r\n $sock_timeout = explode(\",\",$sock_timeout);\r\n if( !trim($sock_timeout[0]) || ($sock_timeout[0] < 0 && $sock_timeout[0] > 25) ) // || !preg_match(\"^[0-9]\",sock_timeout[1]) )\r\n {\r\n $this->error = \"POP3 connect() - Error: Socket Timeout not set or out of range (0 - 25)\";\r\n return FALSE;\r\n }\r\n /*\r\n if(!ereg(\"([0-9]{2}),([0-9]{3})\",$sock_timeout))\r\n {\r\n $this->error = \"POP3 connect() - Error: Socket Timeout in invalid Format (Right Format xx,xxx \\\"10,500\\\")\";\r\n return FALSE;\r\n }\r\n */\r\n // Check State\r\n if(!$this->_checkstate(\"connect\")) return FALSE;\r\n\r\n\r\n if( !$this->socket = @fsockopen($server, $port, $errno, $errstr, $timeout ))\r\n {\r\n $this->error = \"POP3 connect() - Error: Can't connect to Server. Error: \".$errno.\" -- \".$errstr;\r\n return FALSE;\r\n }\r\n\r\n if(!$this->_logging(\"Connecting to \\\"\".$server.\":\".$port.\"\\\" !!!\")) return FALSE;\r\n\r\n // Set Socket Timeout\r\n // It is valid for all other functions !!\r\n socket_set_timeout($this->socket,$sock_timeout[0],$sock_timeout[1]);\r\n socket_set_blocking($this->socket,true);\r\n\r\n $response = $this->_getnextstring();\r\n\r\n if(!$this->_logging($response))\r\n {\r\n $this->_cleanup();\r\n return FALSE;\r\n }\r\n\r\n if(substr($response,0,1) != \"+\")\r\n {\r\n $this->_cleanup();\r\n $this->error = \"POP3 connect() - Error: \".$response;\r\n return FALSE;\r\n }\r\n\r\n // Get the server banner for APOP\r\n $this->apop_banner = $this->_parse_banner($response);\r\n\r\n $this->state = \"AUTHORIZATION\";\r\n if(!$this->_logging(\"STATUS: AUTHORIZATION\")) return FALSE;\r\n\r\n return TRUE;\r\n\r\n }", "title": "" }, { "docid": "2db47ae748aa2998c6923eba56a69286", "score": "0.52531564", "text": "function pass ($pass = \"\")\n\t{\n\t\t// returns false (undef) on Auth failure\n\n\t\tif(empty($pass))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 pass: no password submitted\";\n\t\t\treturn false;\n\t\t}\n\t\tif(!isset($this->FP))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 pass: connection not established\";\n\t\t\treturn false;\n\t\t}\n\t\t$reply = $this->send_cmd(\"PASS $pass\");\n\t\t//echo \"$reply\\n\";\n\t\tif(!$this->is_ok($reply))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 pass: authentication failed [$reply]\";\n\t\t\t$this->quit();\n\t\t\treturn false;\n\t\t}\n\t\t//\tAuth successful.\n\t\t$count = $this->last(\"count\");\n\n\t\t$this->COUNT = $count;\n\t\t\n\t\t$this->RFC1939 = $this->noop();\n\t\tif(!$this->RFC1939)\n\t\t{\n\t\t\t$this->ERROR = \"POP3 pass: NOOP failed. Server not RFC 1939 compliant\";\n\t\t\t$this->quit();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "3ce07fcfa11e19681f3aa75a2f387f6e", "score": "0.5176306", "text": "function authOrkut(){\r\n $url = ( $_SERVER['HTTPS'] ? \"https://\" : \"http://\" ) .\r\n $_SERVER['HTTP_HOST'] .\r\n $_SERVER['PHP_SELF'];\r\n \r\n\r\n //Orkut's public key certificate\r\n\r\n $cert = <<<EOD\r\n-----BEGIN CERTIFICATE-----\r\nMIIDHDCCAoWgAwIBAgIJAMbTCksqLiWeMA0GCSqGSIb3DQEBBQUAMGgxCzAJBgNV\r\nBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIG\r\nA1UEChMLR29vZ2xlIEluYy4xDjAMBgNVBAsTBU9ya3V0MQ4wDAYDVQQDEwVscnlh\r\nbjAeFw0wODAxMDgxOTE1MjdaFw0wOTAxMDcxOTE1MjdaMGgxCzAJBgNVBAYTAlVT\r\nMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChML\r\nR29vZ2xlIEluYy4xDjAMBgNVBAsTBU9ya3V0MQ4wDAYDVQQDEwVscnlhbjCBnzAN\r\nBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAseBXZ4NDhm24nX3sJRiZJhvy9eDZX12G\r\nj4HWAMmhAcnm2iBgYpAigwhVHtOs+ZIUIdzQHvHeNd0ydc1Jg8e+C+Mlzo38OvaG\r\nD3qwvzJ0LNn7L80c0XVrvEALdD9zrO+0XSZpTK9PJrl2W59lZlJFUk3pV+jFR8NY\r\neB/fto7AVtECAwEAAaOBzTCByjAdBgNVHQ4EFgQUv7TZGZaI+FifzjpTVjtPHSvb\r\nXqUwgZoGA1UdIwSBkjCBj4AUv7TZGZaI+FifzjpTVjtPHSvbXqWhbKRqMGgxCzAJ\r\nBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEU\r\nMBIGA1UEChMLR29vZ2xlIEluYy4xDjAMBgNVBAsTBU9ya3V0MQ4wDAYDVQQDEwVs\r\ncnlhboIJAMbTCksqLiWeMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEA\r\nCETnhlEnCJVDXoEtSSwUBLP/147sqiu9a4TNqchTHJObwTwDPUMaU6XIs2OTMmFu\r\nGeIYpkHXzTa9Q6IKlc7Bt2xkSeY3siRWCxvZekMxPvv7YTcnaVlZzHrVfAzqNsTG\r\nP3J//C0j+8JWg6G+zuo5k7pNRKDY76GxxHPYamdLfwk=\r\n-----END CERTIFICATE-----\r\nEOD;\r\n\r\n //Compute the raw form of the signed request using the OAuth library.\r\n $req = new OAuthRequest(\"GET\", $url, $_REQUEST);\r\n $sig = array(\r\n urlencode($req->get_normalized_http_method()),\r\n urlencode($req->get_normalized_http_url()),\r\n urlencode($req->get_signable_parameters()),\r\n );\r\n $raw = implode(\"&\", $sig);\r\n\r\n \r\n\r\n //Get the signature passed in the query and urldecode it\r\n\r\n $signature = base64_decode($_REQUEST[\"oauth_signature\"]);\r\n\r\n \r\n\r\n //Pull the public key ID from the certificate\r\n $publickeyid = openssl_get_publickey($cert);\r\n\r\n \r\n\r\n //Check the computer signature against the one passed in the query\r\n $ok = openssl_verify($raw, $signature, $publickeyid); \r\n\r\n \r\n\r\n //Release the key resource\r\n openssl_free_key($publickeyid);\r\n\r\n //Pass boolean data back\r\n\r\n return $ok;\r\n \r\n }", "title": "" }, { "docid": "5319b25dbc8032e02d8438f02a2d1956", "score": "0.5139735", "text": "function mysqli_ssl_set($link, $key , $cert , $ca , $capath , $cipher) {}", "title": "" }, { "docid": "5decf4f37729fb3783c27f667544f438", "score": "0.5058259", "text": "function POP3 ( $server = \"\", $timeout = \"\" )\n\t{\n\t\tsettype($this->BUFFER,\"integer\");\n\t\tif(!empty($server))\n\t\t{\n\t\t\t// Do not allow programs to alter MAILSERVER\n\t\t\t// if it is already specified. They can get around\n\t\t\t// this if they -really- want to, so don't count on it.\n\t\t\tif(empty($this->MAILSERVER))\n\t\t\t{\n\t\t\t\t$this->MAILSERVER = $server;\n\t\t\t}\n\t\t}\n\t\tif(!empty($timeout))\n\t\t{\n\t\t\tsettype($timeout,\"integer\");\n\t\t\t$this->TIMEOUT = $timeout;\n\t\t\tset_time_limit($timeout);\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2b4aac602bfe3b46b303660bb18be793", "score": "0.50193435", "text": "function authgMail($from, $namefrom, $to, $nameto, $subject, $message)\n{\n\n$smtpServer = \"tls://smtp.gmail.com\"; //does not accept STARTTLS\n$port = \"465\"; // try 587 if this fails\n$timeout = \"45\"; //typical timeout. try 45 for slow servers\n$username = \"XXX@gmail.com\"; //your gmail account\n$password = \"XXXX\"; //the pass for your gmail\n$localhost = $_SERVER['REMOTE_ADDR']; //requires a real ip\n$newLine = \"\\r\\n\"; //var just for newlines\n\n\n\n\n \n/* you shouldn't need to mod anything else */\n\n//connect to the host and port\n$smtpConnect = fsockopen($smtpServer, $port, $errno, $errstr, $timeout);\n//echo $errstr.\" - \".$errno;\n$smtpResponse = fgets($smtpConnect, 4096);\nif(empty($smtpConnect))\n{\n $output = \"Failed to connect: $smtpResponse\";\n //echo $output;\n return $output;\n}\nelse\n{\n $logArray['connection'] = \"Connected to: $smtpResponse\";\n // echo \"connection accepted<br>\".$smtpResponse.\"<p />Continuing<p />\";\n}\n\n//you have to say HELO again after TLS is started\n fputs($smtpConnect, \"HELO $localhost\". $newLine);\n $smtpResponse = fgets($smtpConnect, 4096);\n $logArray['heloresponse2'] = \"$smtpResponse\";\n \n//request for auth login\nfputs($smtpConnect,\"AUTH LOGIN\" . $newLine);\n$smtpResponse = fgets($smtpConnect, 4096);\n$logArray['authrequest'] = \"$smtpResponse\";\n\n//send the username\nfputs($smtpConnect, base64_encode($username) . $newLine);\n$smtpResponse = fgets($smtpConnect, 4096);\n$logArray['authusername'] = \"$smtpResponse\";\n\n//send the password\nfputs($smtpConnect, base64_encode($password) . $newLine);\n$smtpResponse = fgets($smtpConnect, 4096);\n$logArray['authpassword'] = \"$smtpResponse\";\n\n//email from\nfputs($smtpConnect, \"MAIL FROM: <$from>\" . $newLine);\n$smtpResponse = fgets($smtpConnect, 4096);\n$logArray['mailfromresponse'] = \"$smtpResponse\";\n\n//email to\nfputs($smtpConnect, \"RCPT TO: <$to>\" . $newLine);\n$smtpResponse = fgets($smtpConnect, 4096);\n$logArray['mailtoresponse'] = \"$smtpResponse\";\n\n//the email\nfputs($smtpConnect, \"DATA\" . $newLine);\n$smtpResponse = fgets($smtpConnect, 4096);\n$logArray['data1response'] = \"$smtpResponse\";\n\n//construct headers\n$headers = \"MIME-Version: 1.0\" . $newLine;\n$headers .= \"Content-type: text/html; charset=iso-8859-1\" . $newLine;\n$headers .= \"To: $nameto <$to>\" . $newLine;\n$headers .= \"From: $namefrom <$from>\" . $newLine;\n\n//observe the . after the newline, it signals the end of message\nfputs($smtpConnect, \"To: $to\\r\\nFrom: $from\\r\\nSubject: $subject\\r\\n$headers\\r\\n\\r\\n$message\\r\\n.\\r\\n\");\n$smtpResponse = fgets($smtpConnect, 4096);\n$logArray['data2response'] = \"$smtpResponse\";\n\n// say goodbye\nfputs($smtpConnect,\"QUIT\" . $newLine);\n$smtpResponse = fgets($smtpConnect, 4096);\n$logArray['quitresponse'] = \"$smtpResponse\";\n$logArray['quitcode'] = substr($smtpResponse,0,3);\nfclose($smtpConnect);\n//a return value of 221 in $retVal[\"quitcode\"] is a success\nreturn($logArray);\n}", "title": "" }, { "docid": "ae36493cce20856b491099e08f9588a0", "score": "0.49892774", "text": "function cert_authenticate()\n{\n function _setguest() {\n $guest = new User(null);\n Zend_Registry::set(\"user\", $guest);\n slog(\"guest access from \".$_SERVER[\"REMOTE_ADDR\"]);\n }\n\n if(isset($_SERVER[\"SSL_CLIENT_S_DN\"]) && $_SERVER[\"SSL_CLIENT_VERIFY\"] == \"SUCCESS\") {\n $usercert = new User($_SERVER[\"SSL_CLIENT_S_DN\"]);\n if(!is_null($usercert->getDNPersonID())) {\n\t$_SESSION[\"logged_in\"] = $_SERVER[\"SSL_CLIENT_S_DN\"]; \n }\n }\n\n /*\n if(!isset($_SERVER[\"HTTPS\"])) {\n if(config()->force_https and !isbot()) {\n //reload as https (if not bot)\n $SERVER_NAME=$_SERVER[\"SERVER_NAME\"];\n $REQUEST_URI=$_SERVER[\"REQUEST_URI\"];\n slog(\"Forwarding to HTTPS\");\n header (\"Location: https://$SERVER_NAME$REQUEST_URI\");\n exit;\n } else {\n //can't authenticate through http - so let's just assume a guest user\n _setguest();\n }\n } else {\n if(isset($_SERVER[\"SSL_CLIENT_S_DN\"]) && $_SERVER[\"SSL_CLIENT_VERIFY\"] == \"SUCCESS\") {\n $dn = $_SERVER[\"SSL_CLIENT_S_DN\"];\n\n //apply dn override (for debugging)\n if(isset(config()->dn_override[$dn])) {\n $override = config()->dn_override[$dn];\n $dn = $override;\n slog(\"Overriding DN to $dn\");\n }\n\n $user = new User($dn);\n if(is_null($user->getPersonID())) {\n //not yet registered?\n Zend_Registry::set(\"unregistered_dn\", $dn);\n _setguest();\n } if($user->isDisabled()) {\n Zend_Registry::set(\"disabled_dn\", $dn);\n _setguest();\n } else {\n //TODO - see if DN / contact is enabled\n //all good\n Zend_Registry::set(\"user\", $user);\n slog(\"authenticate: \".$user->getPersonName().\"($dn)\". \" from \".$_SERVER[\"REMOTE_ADDR\"]);\n }\n } else {\n //no client cert provided\n _setguest();\n }\n }\n */\n\n if(isset($_SESSION[\"email\"])){\n // print \"hello: \" .$_SESSION[\"email\"];\n $dn = $_SESSION[\"email\"];\n //apply dn override (for debugging)\n if(isset(config()->dn_override[$dn])) {\n\t$override = config()->dn_override[$dn];\n\t$dn = $override;\n\tslog(\"Overriding DN to $dn\");\n }\n $user = new User($dn);\n if(is_null($user->getPersonID())) {\n\t//not yet registered?\n\tZend_Registry::set(\"unregistered_dn\", $dn);\n\t_setguest();\n } else if($user->isDisabled()) {\n\tZend_Registry::set(\"disabled_dn\", $dn);\n\t_setguest();\n } else {\n\tZend_Registry::set(\"user\", $user);\n\tslog(\"authenticated:\".$user->getPersonName().\"($dn)\". \" from \".$_SERVER[\"REMOTE_ADDR\"]);\n }\n } else {\n //no client cert provided\n _setguest();\n }\n // session_destroy();\n // _setguest(); \n\n}", "title": "" }, { "docid": "32d9d075593b01f12424c7899e168c2c", "score": "0.49636328", "text": "function connect ($server, $port = 110)\n\t{\n\t\t//\tport defaults to 110. Returns true on success, false on fail\n\n\t\tif(empty($server))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 connect: No server specified\";\n\t\t\tunset($this->FP);\n\t\t\treturn false;\n\t\t}\n\n\t\t//$fp = fsockopen(\"$server\", $port, &$errno, &$errstr);\n\t\t$fp = fsockopen(\"$server\", $port, $errno, $errstr);\n\n\t\tif(!$fp)\n\t\t{\n\t\t\t$this->ERROR = \"POP3 connect: Error [$errno] [$errstr]\";\n\t\t\tunset($this->FP);\n\t\t\treturn false;\n\t\t}\n\n\t\t//set_socket_blocking($fp,-1);\n\t\tstream_set_blocking($fp,-1);\n\t\t$this->update_timer();\n\t\t$reply = fgets($fp,$this->BUFFER);\n\t\t$reply = $this->strip_clf($reply);\n\t\tif($this->DEBUG) { error_log(\"POP3 SEND [connect: $server] GOT [$reply]\",0); }\n\t\tif(!$this->is_ok($reply))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 connect: Error [$reply]\";\n\t\t\tunset($this->FP);\n\t\t\treturn false;\n\t\t}\n\t\t$this->FP = $fp;\n\t\t//$this->BANNER = $this->parse_banner($reply);\n\t\t\n\t\t$this->RFC1939 = $this->noop();//\"+OK done\";\n\t\t// changed following ---smita\n\t\tif($this->RFC1939)\n\t\tif(!$this->RFC1939)\n\t\t{\n\t\t\t$this->ERROR = \"POP3: premature NOOP OK, NOT an RFC 1939 Compliant server\";\n\t\t\t$this->quit();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ade518b4820a98c1cd48e4bb989e0766", "score": "0.47676748", "text": "function owly_ssl(){\n\t$ssl = '';\n\tif( is_ssl() ) $ssl = 's';\n\treturn $ssl;\n}", "title": "" }, { "docid": "5d5f1de0d65b1ad53ffbb0247e3e5a29", "score": "0.47641703", "text": "public function getSslVerifyPeer();", "title": "" }, { "docid": "d94734c88f7dac70211d5ea020ae2b88", "score": "0.47633633", "text": "public function test_yourls_plugin_url_ssl_mode_3() {\n $plugin = rand_str();\n\n yourls_add_filter( 'is_ssl', 'yourls_return_true' );\n yourls_add_filter( 'needs_ssl', 'yourls_return_true' );\n $plugin_url = yourls_plugin_url( $plugin );\n $this->assertStringStartsWith( 'https://', $plugin_url );\n }", "title": "" }, { "docid": "b2bbddf3b901605016f00cd358483e91", "score": "0.47327888", "text": "function onAuthenticate( $credentials, $options, &$response )\r\n\t{\r\n\t\t$username = $credentials['username'];\r\n\t\t$password = $credentials['password'];\r\n\t\t\r\n\t\t// Prevent recursion\r\n\t\tif(defined('_REMOTE_AUTH')) { $response->status = JAUTHENTICATE_STATUS_FAILURE; $response->error_message = \"Remote Auth already active\"; return false; }\r\n\t\t// Params\r\n\t\t$suffix = '';//'.localdomain';\r\n\t\t// Grab details from the username\r\n\t\t// Example: pasamio@localhost/~pasamio/workspace/joomla_trunk\r\n\t\t//echo 'Attempting with '. print_r($username,1) .'<br>';\r\n\t\t$response->username = trim($username,'/');\t\t// Chop off last / where relevant\r\n\t\t$parts = explode('@', $username);\r\n\t\t$username = $parts[0];\r\n\t\tif(count($parts) > 1) {\r\n\t\t\t// There should be at least one part, or there should be two or more parts => 2\r\n\t\t\t$parts = explode('/',$parts[1]);\r\n\t\t\t$host = array_shift($parts); // get rid of the first element\r\n\t\t\t$path = implode('/',$parts); // And put it back together\r\n\t\t} else {\r\n\t\t\t$response->status = JAUTHTENTICATE_STATUS_FAILURE;\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Create XML RPC Object and Connect to server\r\n\t\tjimport('phpxmlrpc.xmlrpc');\r\n\t\t\r\n\t\t$client=new xmlrpc_client($path.'/xmlrpc/index.php', $host.$suffix);\r\n\t\t// Create message and ask for auth\r\n\t\t//$client->return_type = 'xmlrpcvals';\r\n\t\t$client->setDebug(1);\r\n\t\t$msg =& new xmlrpcmsg('joomla.remoteAuth');\r\n\t\t$username =& new xmlrpcval($username, 'string');\r\n\t\t$password =& new xmlrpcval($password, 'string');\r\n\t\t$msg->addparam($username);\r\n\t\t$msg->addparam($password);\t\t\r\n\t\t$result =& $client->send($msg, 0, '');\r\n\t\tif ($result->faultcode()) { $response->status = JAUTHENTICATE_STATUS_FAILURE; return false;}\r\n//\t\techo print_r(php_xmlrpc_decode($result->value())); die();\r\n//\t\tprint_r($result); die();\r\n\t\t$data = php_xmlrpc_decode($result->value());\r\n\t\t$response->email = $data['email'];\r\n\t\t$response->fullname = $data['fullname'];\r\n\t\tswitch($result->errno) {\r\n\t\t\tcase 5:\r\n\t\t\t\t// Wrong URL (.htm not .php ?)\r\n\t\t\tcase 3:\r\n\t\t\t\t// Wrong param count, shouldn't happen\r\n\t\t\tcase 1:\r\n\t\t\t\t// Unknown method, not enabled\r\n\t\t\t\tbreak;\r\n\t\t\tcase 0:\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t}\r\n\t\t// Return result\r\n\t\t$response->status \t= JAUTHENTICATE_STATUS_SUCCESS;\r\n//\t\tprint_r($response); die();\r\n\t}", "title": "" }, { "docid": "ac2a177fd719d67ec7665f75b2161ef7", "score": "0.47016597", "text": "function auth()\n {\n $ret = false;\n $auth = base64_encode(\"\\x00\" . $this->_username . \"\\x00\" . $this->_password);\n $this->_send('<auth xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\" mechanism=\"PLAIN\">' . $auth . '</auth>');\n $res = $this->_recv();\n\n if (!empty($res['STREAM:STREAM/SUCCESS'])) {\n $this->_xmppauth = true;\n $this->_xmppinfo['features']['auth'] = true;\n\n // Reset Stream\n $this->_xmppInit();\n // Asked to Bind?\n //print_r($this->_xmpprecv);\n if ($this->_xmpprecv['STREAM:STREAM/IQ']['attr']['TYPE'] == 'result') {\n if (!empty($this->_xmpprecv['STREAM:STREAM/IQ/BIND/JID']['text'])) {\n $this->_xmppbind = $this->_xmpprecv['STREAM:STREAM/IQ/BIND/JID']['text'];\n }\n }\n if ($this->_xmppbind) {\n $this->_send('<iq xmlns=\"jabber:client\" type=\"set\" id=\"2\"><session xmlns=\"urn:ietf:params:xml:ns:xmpp-session\" /></iq>');\n $x = $this->_recv();\n // print_r($x);\n }\n // <iq xmlns='jabber:client' type='set' id='2'><session xmlns='urn:ietf:params:xml:ns:xmpp-session' /></iq>\n $ret = true;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "b71632c083950e3f59028fecffa71364", "score": "0.4671301", "text": "function &getAuthConnection($uname, $xortify_auth_method = 'soap')\r\n\t{\r\n\t\t\r\n\t\t$conn = mysql_connect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS);\r\n\t\t@mysql_select_db(XOOPS_DB_NAME);\r\n\t\t$sql[0] = \"SELECT mid FROM `\".XOOPS_DB_PREFIX.\"_modules` WHERE dirname = 'xortify'\";\t\t\r\n\t\tlist($modid) = @mysql_fetch_row(mysql_query($sql[0]));\r\n\t\t$sql[1] = \"SELECT conf_value FROM `\".XOOPS_DB_PREFIX.\"_config` WHERE conf_name = 'xortify_providers' and conf_modid = '\".$modid.\"'\";\r\n\t\tlist($cvalue) = @mysql_fetch_row(mysql_query($sql[1]));\r\n\t\t$sql[2] = \"SELECT conf_value FROM `\".XOOPS_DB_PREFIX.\"_config` WHERE conf_name = 'protocol' and conf_modid = '\".$modid.\"'\";\r\n\t\tlist($capi) = @mysql_fetch_row(mysql_query($sql[2]));\r\n\t\t$GLOBALS['xortify_api'] = $capi;\r\n\t\t$sql[3] = \"SELECT conf_value FROM `\".XOOPS_DB_PREFIX.\"_config` WHERE conf_name = 'xortify_urisoap' and conf_modid = '\".$modid.\"'\";\r\n\t\tlist($xortify_urisoap) = @mysql_fetch_row(mysql_query($sql[3]));\r\n\t\t$GLOBALS['xortify_urisoap'] = $xortify_urisoap;\r\n\t\t$sql[4] = \"SELECT conf_value FROM `\".XOOPS_DB_PREFIX.\"_config` WHERE conf_name = 'xortify_uricurl' and conf_modid = '\".$modid.\"'\";\r\n\t\tlist($xortify_urisoap) = @mysql_fetch_row(mysql_query($sql[4]));\r\n\t\t$GLOBALS['xortify_uricurl'] = $xortify_urisoap;\r\n\t\t$sql[5] = \"SELECT conf_value FROM `\".XOOPS_DB_PREFIX.\"_config` WHERE conf_name = 'xortify_urijson' and conf_modid = '\".$modid.\"'\";\r\n\t\tlist($xortify_urisoap) = @mysql_fetch_row(mysql_query($sql[5]));\r\n\t\t$GLOBALS['xortify_urijson'] = $xortify_urisoap;\t\t\r\n\t\t\r\n\t\tstatic $auth_instance;\t\t\r\n\t\tif (!isset($auth_instance)) {\r\n\t\t\trequire_once XOOPS_ROOT_PATH.'/modules/xortify/class/auth/auth.php';\r\n\t\t\t// Verify if uname allow to bypass LDAP auth \r\n\t\t\t$file = XOOPS_ROOT_PATH . '/modules/xortify/class/auth/auth_' . $xortify_auth_method . '.php';\t\t\t\r\n\t\t\trequire_once $file;\r\n\t\t\t$class = 'XortifyAuth' . ucfirst($xortify_auth_method);\r\n\t\t\tswitch ($xortify_auth_method) {\r\n\t\t\t\tcase 'soap';\r\n\t\t\t\t\t$dao = null;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t\t\t$auth_instance = new $class($dao);\r\n\t\t}\r\n\t\treturn $auth_instance;\r\n\t}", "title": "" }, { "docid": "2543e41a85401cddeb07cc7503123283", "score": "0.4642422", "text": "function check()\n {\n\n\t\t$accounts = getManyAssocArrays( 'select * from webmail_accounts where user_id = \"'.\n\t\t\t$GLOBALS['appshore_data']['current_user']['user_id'].'\" AND is_enable = \"Y\"');\n\t\t\n\t\t// no account set for this user\n\t\tif( $accounts == null )\n\t\t\treturn false;\n\t\t\t\n\t\t// retrieve the folder_id of Inbox of this user\n\t\t$inbox_id = getOneColOneRow( 'select folder_id from webmail_folders where user_id = \"'.$GLOBALS['appshore_data']['current_user']['user_id'].'\" and folder_type = \"inbox\"');\n\n\t\tforeach( $accounts as $key => $val)\n\t\t{\n \t$val['pop3_password'] = base64_decode( $val['pop3_password']);\n\n\t\t\tif( $val['pop3_ssl'] == 'N' )\n\t\t\t\t$options = '/pop3/notls';\n\t\t\telse\n\t\t\t\t$options = '/pop3/ssl/novalidate-cert';\n\n\t\t\t$mailbox = @imap_open('{'.$val['pop3_server'].':'.$val['pop3_port'].$options.'}INBOX', $val['pop3_username'], $val['pop3_password']);\n \t \n \tif( $mailbox )\n \t{\n\n\t\t\t\t$mailbox_status = imap_status($mailbox, '{'.$val['pop3_server'].':'.$val['pop3_port'].$options.'}INBOX', SA_ALL);\n#\t\t\t\tif ($mailbox_status) {\n#\t\t\t\t messagebox(\"Messages: \" . $mailbox_status->messages, ERROR);\n#\t\t\t\t messagebox(\"Recent: \" . $mailbox_status->recent, ERROR);\n#\t\t\t\t messagebox(\"Unseen: \" . $mailbox_status->unseen, ERROR);\n#\t\t\t\t messagebox(\"UIDnext: \" . $mailbox_status->uidnext, ERROR);\n#\t\t\t\t messagebox(\"UIDvalidity:\" . $mailbox_status->uidvalidity, ERROR);\n#\t\t\t\t} else {\n#\t\t\t\t messagebox(\"imap_status failed: \" . imap_last_error(), ERROR);\n#\t\t\t\t} \n\n\t\t\t\t$headers = imap_fetch_overview($mailbox,'1:'.$mailbox_status->messages,0);\n\t\t\t\t\n\t\t\t\tfor( $mailnum = 0; $mailnum < $mailbox_status->messages; $mailnum++) \n\t\t\t\t{ \t\t \t \n\t\t\t\t\t// get the raw header, generate unique md5 and check that this email is not already stored\n\t\t\t\t\t$mail_id = md5($val['pop3_username'].$headers[$mailnum]->date.$headers[$mailnum]->from.$headers[$mailnum]->to.$headers[$mailnum]->size.$headers[$mailnum]->subject);\t\n\n# messagebox($headers[$mailnum]->uid.', '.$headers[$mailnum]->date.', '.$headers[$mailnum]->from.', '.$headers[$mailnum]->to.', '.$headers[$mailnum]->size.', '.\n# \t$headers[$mailnum]->subject.', '.$headers[$mailnum]->seen.', '.$headers[$mailnum]->flagged, ERROR);\n\t\t\n\t\t\t\t\tif( getOneColOneRow('select mail_id from webmail where mail_id = \"'.$mail_id.'\"') == null )\n\t\t\t\t\t\t$this->fetchMail( $mailbox, $mailnum+1, $mail_id, $val['account_id'], $GLOBALS['appshore_data']['current_user']['user_id'], $inbox_id);\n\n\t\t\t\t\tif ($val['pop3_lmos'] == 'N') \n\t\t\t\t\t\timap_delete( $mailbox, $mailnum+1);\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// if preferences say N we suppress all the email from email server\n\t\t\t\tif ($val['pop3_lmos'] == 'N') \n\t\t\t\t\timap_expunge( $mailbox);\n\t\t\t\t\n\t\t\t\timap_close( $mailbox);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmessagebox( $val['account_name'].', account unreachable, check your parameters', WARNING);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "71369dfb3fbffa01b3bd122e94663f11", "score": "0.46414497", "text": "public function useTLS();", "title": "" }, { "docid": "304ce9a046b995094eb7a3fb556d0430", "score": "0.46380553", "text": "function netsnmp_session_set_auth_protocol($snmp_session_s, $prot) {}", "title": "" }, { "docid": "b613d77b9db95ca4347a66ed7c2a3a6d", "score": "0.46207473", "text": "function ftp_ssl_connect($host, $port = null, $timeout = null) {}", "title": "" }, { "docid": "9fdd641ce1e35bf8bc4d36fedc2676d6", "score": "0.4607091", "text": "function web3_sha3($data);", "title": "" }, { "docid": "bfef68dd8f291fd41dae3325747c86f1", "score": "0.46017823", "text": "public function proxyauth($proxyauth,$proxypasse='')\r\n\t{\r\n\t\t// $this->proxyauth(\"darkfig:password\");\r\n\t\tif(empty($proxypasse))\r\n\t\t{\r\n\t\t\tpreg_match(\"/^(.*):(.*)$/\",$proxyauth,$proxautharr);\r\n\t\t\t$proxu = $proxautharr[1];\r\n\t\t\t$proxp = $proxautharr[2];\r\n\t\t\t$this->proxyuser=$proxu;\r\n\t\t\t$this->proxypass=$proxp;\r\n\t\t}\r\n\t\t// $this->proxyauth(\"darkfig\",\"password\");\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->proxyuser=$proxyauth;\r\n\t\t\t$this->proxypass=$proxypasse;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6e8a4141da6597f49c7640b1624bfb47", "score": "0.45809954", "text": "function connectToAPNS()\n {\n $ctx = stream_context_create();\n stream_context_set_option($ctx, 'ssl', 'local_cert', $this->certificate);\n stream_context_set_option($ctx, 'ssl', 'passphrase', $this->passphrase);\n\n $this->fp = stream_socket_client(\n 'ssl://' . $this->server, $err, $errstr, 60,\n STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);\n\n if (!$this->fp)\n {\n writeToLog(\"Failed to connect: $err $errstr\");\n return FALSE;\n }\n\n writeToLog('Connection OK');\n return TRUE;\n }", "title": "" }, { "docid": "f3bbc70bc36a3f18424e572af7645a0b", "score": "0.4569772", "text": "function imap_open($mailbox, $user, $password, $options = null) {}", "title": "" }, { "docid": "68a98ab8afe698635df7dbd4d9a13add", "score": "0.45506012", "text": "function rcmail_login($user, $pass, $host=NULL)\n {\n global $CONFIG, $IMAP, $DB, $sess_user_lang;\n $user_id = NULL;\n \n if (!$host)\n $host = $CONFIG['default_host'];\n\n // parse $host URL\n $a_host = parse_url($host);\n if ($a_host['host'])\n {\n $host = $a_host['host'];\n $imap_ssl = (isset($a_host['scheme']) && in_array($a_host['scheme'], array('ssl','imaps','tls'))) ? TRUE : FALSE;\n $imap_port = isset($a_host['port']) ? $a_host['port'] : ($imap_ssl ? 993 : $CONFIG['default_port']);\n }\n else\n $imap_port = $CONFIG['default_port'];\n\n\n /* Modify username with domain if required \n Inspired by Marco <P0L0_notspam_binware.org>\n */\n // Check if we need to add domain\n if ($CONFIG['username_domain'] && !strstr($user, '@'))\n {\n if (is_array($CONFIG['username_domain']) && isset($CONFIG['username_domain'][$host]))\n $user .= '@'.$CONFIG['username_domain'][$host];\n else if (!empty($CONFIG['username_domain']))\n $user .= '@'.$CONFIG['username_domain']; \n }\n\n\n // query if user already registered\n $sql_result = $DB->query(\"SELECT user_id, username, language, preferences\n FROM \".get_table_name('users').\"\n WHERE mail_host=? AND (username=? OR alias=?)\",\n $host,\n $user,\n $user);\n\n // user already registered -> overwrite username\n if ($sql_arr = $DB->fetch_assoc($sql_result))\n {\n $user_id = $sql_arr['user_id'];\n $user = $sql_arr['username'];\n }\n\n // try to resolve email address from virtuser table \n if (!empty($CONFIG['virtuser_file']) && strstr($user, '@'))\n $user = rcmail_email2user($user);\n\n\n // exit if IMAP login failed\n if (!($imap_login = $IMAP->connect($host, $user, $pass, $imap_port, $imap_ssl)))\n return FALSE;\n\n // user already registered\n if ($user_id && !empty($sql_arr))\n {\n // get user prefs\n if (strlen($sql_arr['preferences']))\n {\n $user_prefs = unserialize($sql_arr['preferences']);\n $_SESSION['user_prefs'] = $user_prefs;\n array_merge($CONFIG, $user_prefs);\n }\n\n\n // set user specific language\n if (strlen($sql_arr['language']))\n $sess_user_lang = $_SESSION['user_lang'] = $sql_arr['language'];\n \n // update user's record\n $DB->query(\"UPDATE \".get_table_name('users').\"\n SET last_login=now()\n WHERE user_id=?\",\n $user_id);\n }\n // create new system user\n else if ($CONFIG['auto_create_user'])\n {\n $user_id = rcmail_create_user($user, $host);\n }\n\n if ($user_id)\n {\n $_SESSION['user_id'] = $user_id;\n $_SESSION['imap_host'] = $host;\n $_SESSION['imap_port'] = $imap_port;\n $_SESSION['imap_ssl'] = $imap_ssl;\n $_SESSION['username'] = $user;\n $_SESSION['user_lang'] = $sess_user_lang;\n $_SESSION['password'] = encrypt_passwd($pass);\n\n // force reloading complete list of subscribed mailboxes \n $IMAP->clear_cache('mailboxes');\n\n return TRUE;\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "6e63d39165c0929d9f8ed0f9690689cc", "score": "0.4541965", "text": "function connect($server, $port=\"110\", $timeout, $sock_timeout){\n\n\n if($this->socket){\n $this->error = \"Connection also avalible !!!\";\n return FALSE;\n }\n\n if(!trim($server)){\n $this->error = \"Please give a server address.\";\n return FALSE;\n }\n\n if($port < \"1\" && $port < \"65535\" || !trim($port)){\n $this->error = \"Port not set or out of range (1 - 65535)\";\n return FALSE;\n }\n\n if($timeout < 0 && $timeout > 25 || !trim($timeout)){\n $this->error = \"Connection Timeout not set or out of range (0 - 25)\";\n return FALSE;\n }\n if($sock_timeout < 0 && $sock_timeout > 25 || !trim($sock_timeout)){\n $this->error = \"Socket Timeout not set or out of range (0 - 25)\";\n return FALSE;\n }\n // Check State\n if(!$this->_checkstate(\"connect\")) return FALSE;\n \n $this->socket = fsockopen($server, $port, $errno, $errstr, $timeout);\n if(!$this->socket){\n $this->error = \"Can't connect to Server. Error: $errno -- $errstr \";\n return FALSE;\n }\n\n if(!$this->_logging(\"Connecting to \\\"$server:$port\\\" !!!\")) return FALSE;\n // Set Socket Timeout\n // It is valid for all other functions !!\n\n $sock_timeout = explode(\",\",$sock_timeout);\n socket_set_timeout($this->socket,$sock_timeout[0],$sock_timeout[1]);\n socket_set_blocking($this->socket,true);\n\n $response = $this->_getnextstring();\n\n if(!$this->_logging($response)){\n $this->_cleanup();\n return FALSE;\n }\n\n if(substr($response,0,1) != \"+\"){\n $this->_cleanup();\n $this->error = \"POP3 connect() - Error: \".$response;\n return FALSE;\n }\n\n\n $this->apop_banner = $this->_parse_banner($response);\n\n $this->state = \"AUTHORIZATION\";\n if(!$this->_logging(\"STATUS: AUTHORIZATION\")) return FALSE;\n\n return TRUE;\n\n }", "title": "" }, { "docid": "8f19a989daead6d2ead501266156b781", "score": "0.4529544", "text": "function filterInboundEmailPopSelection($protocol)\n{\n if (!isset($GLOBALS['sugar_config']['allow_pop_inbound']) || !$GLOBALS['sugar_config']['allow_pop_inbound']) {\n if (isset($protocol['pop3'])) {\n unset($protocol['pop3']);\n }\n } else {\n $protocol['pop3'] = 'POP3';\n }\n\n return $protocol;\n}", "title": "" }, { "docid": "69d34823443d4b54599cba2f4d35cc68", "score": "0.452876", "text": "public function login($atom_url)\r\n\t{\t\r\n\t\t$parse = parse_url($atom_url);\r\n\t\t$atom_domain_name = $parse['host'];\r\n\t\t$retailer_file_path = $parse['path'];\r\n\r\n\t\t$_SESSION['SESSION_ID'] = session_id();\r\n\t\t$this->_cookie_filename = \"cookie\" . $_SESSION['SESSION_ID'] . \".txt\";\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . $atom_domain_name . \"/auth/auth/external_auth/1\");\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($ch, CURLOPT_NOPROGRESS, 0);\r\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 45);\r\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, $this->_cookie_filename);\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, $this->_cookie_filename);\r\n\t\tcurl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());\r\n\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\r\n\t\tcurl_setopt($ch, CURLOPT_USERPWD, 'demo:demo888');\r\n\t\tsession_write_close();\r\n\t\t$salt = curl_exec($ch);\r\n\t\t$server_error = curl_error($ch);\r\n\t\t$server_info = curl_getinfo($ch);\r\n\r\n\t\t# curl_close($ch);\r\n\t\t# print $salt . \"<br>\";\r\n\r\n\t\tif((!empty($salt)) && ($salt != \"REFUSED\"))\r\n\t\t{\r\n\t\t\t# $ch = curl_init();\r\n\t\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . $atom_domain_name . \"/auth/auth/external_auth/0/\" . Login_to_retailers::CV_LOGIN_NAME . \"/\" . md5(md5(Login_to_retailers::CV_PASSWORD) . $salt));\r\n\t\t\t$result = curl_exec($ch);\r\n\t\t\t$server_error = curl_error($ch);\r\n\t\t\t$server_info = curl_getinfo($ch);\r\n\r\n\t\t\t$result_arr = explode(',', $result);\r\n\t\t\tcurl_close($ch);\r\n\t\t\tif ($result_arr[0] == \"OK\")\r\n\t\t\t{\r\n\t\t\t\t$this->_successful_login_session = $_SESSION['atom_login_session'] = $result_arr[1];\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "553fb6661e0a4f65982ef15b334f83e3", "score": "0.44853547", "text": "function sslScan($content, $args, $privateStore) {\n\t$filterName = \"ssl\";\n\t$result = \"OK\";\t\t\t\t\t\t// default result\n\t$url = $args['url'];\n\tif (isset($args['useragent'])) {\n\t\t$userAgent = $args['useragent'];\n\t}\n\t\n\t// $content is the URL being checked right now\n\t// $args are arguments/parameters/properties from the main PHP script\n\t// $store is my own private and persistent store, maintained by the main script, and\n\t// available only for use by this plugin filter.\n\t$message = \"\";\n\n\techoIfVerbose(\"The [SSL] filter was invoked \\n\");\n\t$domain = domainOnly($url);\n\t$fqdn = $domain;\n\techoIfVerbose(\"Checking $domain \\n\");\n\t\n\t// NOTE: if more than one url= directive uses the [dns] condition, it will really only report\n\t// changes for the first url= line that contains 'dns'\n\t$newURL = !isset($privateStore[$filterName][$domain]['soa']) || (strlen($privateStore[$filterName][$domain]['soa']) == 0);\n\techoIfVerbose(\"New domain? $newURL \\n\");\n\t\n\t///////////////////////////////// \n\t// General strategy:\n\t// Try to get the cert. Note that the URL has already been spidered, but we do a\n\t// separate HTTP GET here using php5-curl in order to get a lot more informaiton.\n\t// Other filters will use the \"other\" copy of the GET and any info it provided.\n\t\n\tif (!function_exists('curl_init')) {\n\t\t$result = \"Critical\";\n\t\t$message = \"php5-curl is required by the SSL filter, but has not been installed on this server.\";\n\t\treturn array($message, $result, $privateStore);\n\t}\n\t\n\t$result = \"OK\";\n\t$versionInfo = curl_version();\n\t$message = '';\t\t\t\t// message to be returned\n\t$analysisMessage = '';\t\t// detailed analysis messages from libCurl\n\t$needErrString = false;\n\t$certs = '';\n\t$analysis = '';\n\n\t$message .= \"Verify SSL/HTTPS on $fqdn using php5-curl (libcurl '$versionInfo[version]') with OpenSSL '$versionInfo[ssl_version]'\\n\";\n\t\t\n\ttry {\n\t\t$stderrString='';\n\t\t//// Get the cert information using cURL (requires PHP 5.3.2 or later)\n\t\t// Check for version\n\t\t$cv = phpversion();\n\t\tif (version_compare($cv, '5.3.2') < 0) {\n\t\t\t$result = \"Critical\";\n\t\t\t$message .= INDENT.\"The 'ssl' filter requires PHP version 5.3.2 or later on the CyberSpark server.\\n\";\n\t\t\t$message .= INDENT.\"The version being used is $cv\\n\";\n\t\t\t$message .= INDENT.\"This is a CyberSpark configuration error, NOT an error on the monitored site or URL.\\n\";\n\t\t\t$message .= \"\\n\".$stderrString.\"\\n\";\n\t\t}\n\t\telse {\n\t\t\ttry {\n\t\t\t\tif ($tf = tmpfile()) { \n\t\t\t\t\t$ch = curl_init();\n\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_URL, 'https://'.$fqdn);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_STDERR, $tf);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_CERTINFO, 1);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_VERBOSE, true);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_NOBODY, 1);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n//\t\t\t\t\tcurl_setopt($ch, CURLOPT_SSLVERSION, 3);\n\t\t\t\t\tif (isset($userAgent) && strlen($userAgent)) {\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT,\t\t$userAgent);\n\t\t\t\t\t}\n\t\t\t\t\t// Reminder you can do this if you need specific additional CA certs\n\t\t\t\t\t// curl_setopt ($ch, CURLOPT_CAINFO, \"pathto/cacert.pem\");\n\t\t\t\t\t//\n\t\t\t\t\t\n\t\t\t\t\t$curlResult = curl_exec($ch);\n\t\t\t\t\t\n\t\t\t\t\tcurl_errno($ch);\n\t\t\t\t\t// Get and save the cert info from all SSL certs that were presented\n\t\t\t\t\t$ci = curl_getinfo($ch);\n\t\t\t\t\tforeach ($ci['certinfo'] as $certinfo) {\n\t\t\t\t\t\tob_start();\n\t\t\t\t\t\t\tprint_r($certinfo);\n\t\t\t\t\t\t$analysis .= ob_get_clean();\n\t\t\t\t\t\t// Save the actual certs\n\t\t\t\t\t\t$certs .= $certinfo['Cert'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfseek($tf, 0); // rewind\n\t\t\t\t\t// Get the full analysis that was returned from the SSL connection\n\t\t\t\t\t// Note there is an absolute maximum size used, and although it's very high,\n\t\t\t\t\t// there is a chance the report could be truncated. Mostly what this \n\t\t\t\t\t// would mean is you'd have no \"OK\" final result found in the result.\n\t\t\t\t\t$s = fread($tf, SSL_FILTER_BUFFER_SIZE);\n\t\t\t\t\tif ($s !== false) {\n\t\t\t\t\t\t$stderrString .= $s;\n\t\t\t\t\t}\n\t\t\t\t\t// Remove any certs from the stderr stream\n\t\t\t\t\t$i = strpos($stderrString, '-----BEGIN CERTIFICATE-----');\n\t\t\t\t\twhile ($i !== false) {\n\t\t\t\t\t\t$s2048 = substr($stderrString, $i, CURL_ERR_BUFFER_SIZE);\n\t\t\t\t\t\t$j = strpos($s2048, '-----END CERTIFICATE-----');\n\t\t\t\t\t\tif ($j !== false) {\n\t\t\t\t\t\t\t// There's an -----END CERTIFICATE-----\n\t\t\t\t\t\t\t// Remove any slack between it and the next \"*\" \n\t\t\t\t\t\t\t// (libcurl may leave junk there -- it's a bug)\n\t\t\t\t\t\t\t$tail2048 = substr($stderrString, ($i+$j+25));\n\t\t\t\t\t\t\t$k = strpos($tail2048, '*');\n\t\t\t\t\t\t\tif ($k !== false) {\n\t\t\t\t\t\t\t\t$tail2048 = substr($tail2048, $k);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$stderrString = substr($stderrString, 0, $i) . \"\\n{CERTIFICATE removed here}\\n\" . $tail2048;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (strlen($s2048) == CURL_ERR_BUFFER_SIZE) {\n\t\t\t\t\t\t\t\t// Remove 2048 characters exactly because there's no END\n\t\t\t\t\t\t\t\t$stderrString = substr($stderrString, 0, $i) . \"\\n{CERTIFICATE removed here}\\n\" . substr($stderrString, ($i + CURL_ERR_BUFFER_SIZE));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t// Remove less than 2048 because we're at end of string\n\t\t\t\t\t\t\t\t$stderrString = substr($stderrString, 0, $i) . \"\\n{CERTIFICATE removed here}\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$i = strpos($stderrString, '-----BEGIN CERTIFICATE-----');\n\t\t\t\t\t}\n\t\t\t\t\tfclose($tf);\n\t\t\t\t\tcurl_close($ch);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception $certx) {\n\t\t\t\t$result = \"Critical\";\n\t\t\t\t$message .= INDENT.\"The 'ssh' filter got snarled trying to use cURL. Exception:'\".$certx->getMessage().\"\\n\";\n\t\t\t\t$message .= INDENT.\"INTERACTION:\\n\" .$stderrString.\"\\n\\n\";\n\t\t\t\t$needErrString = false;\n\t\t\t}\n\t\t}\n\t\t//// If got the cert information, look for certain telltales.\n\t\t// If errors, insert notification here.\n\t\t$reported = false;\n\t\tforeach (array('failure', 'failed', 'problem') as $failureType) {\n\t\t\t$i = stripos($stderrString,$failureType);\n\t\t\tif ($i !== false) {\n\t\t\t\tif (!$reported) {\n\t\t\t\t\t// cURL is reporting a problem directly - return everything it said.\n\t\t\t\t\t// This does NOT include any cert, so we don't update the store.\n\t\t\t\t\t$result = \"Critical\";\n\t\t\t\t\t$message .= INDENT.\"There is a critical problem with the SSL certificate (HTTPS) for this site!\\n\";\n\t\t\t\t\t$reported = true;\n\t\t\t\t}\n\t\t\t\t$i = ($i>SSL_FILTER_EXCERPT_BACKSPACE)?($i-SSL_FILTER_EXCERPT_BACKSPACE):0;\n\t\t\t\t$message .= INDENT.INDENT.\"The word '$failureType' appears near '\".substr($stderrString, $i, SSL_FILTER_EXCERPT_LENGTH).\"'\\n\";\n\t\t\t}\n\t\t}\n// >>>\n\t\t//// Insert other information\n\t\t$analysisMessage .= INDENT.\"CERTIFICATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\" .$certs.\"\\n\\n\";\n\t\t$analysisMessage .= INDENT.\"ANALYSIS from libcurl >>>>>>>>>>>>>>>>>>>>>\\n\" .$analysis.\"\\n\\n\";\n\t\t$analysisMessage .= INDENT.\"INTERACTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\";\n\t\t$analysisMessage .= INDENT.\"(Actual CERTS have been removed below.) >>>\\n\" .$stderrString.\"\\n\\n\";\n\t\t$needErrString = false;\n\t\tif (stripos($stderrString,'subjectaltname does not match')>0) {\n\t\t\t//// cURL is reporting a problem directly - return everything it said.\n\t\t\t// This does NOT include any cert, so we don't update the store.\n\t\t\t$result = \"Critical\";\n\t\t\t$analysisMessage .= INDENT.\"There is a critical problem with the SSL certificate (HTTPS) for this site!\\n\";\n\t\t\t$analysisMessage .= INDENT.\"The name in the certificate does not match the site domain.\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"CERTIFICATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\" .$certs.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"ANALYSIS from libcurl >>>>>>>>>>>>>>>>>>>>>\\n\" .$analysis.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"INTERACTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\";\n\t\t\t$analysisMessage .= INDENT.\"(Actual CERTS have been removed below.) >>>\\n\" .$stderrString.\"\\n\\n\";\n\t\t}\n\t\telse if (stripos($stderrString,'SSL peer certificate or SSH remote key was not OK')>0) {\n\t\t\t// cURL is reporting a problem directly - return everything it said.\n\t\t\t// This does NOT include any cert, so we don't update the store.\n\t\t\t$result = \"Critical\";\n\t\t\t$analysisMessage .= INDENT.\"There is a critical problem with the SSL certificate (HTTPS) for this site!\\n\";\n\t\t\t$analysisMessage .= INDENT.\"The difficulty might be with the root CA signature.\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"CERTIFICATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\" .$certs.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"ANALYSIS from libcurl >>>>>>>>>>>>>>>>>>>>>\\n\" .$analysis.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"INTERACTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\";\n\t\t\t$analysisMessage .= INDENT.\"(Actual CERTS have been removed below.) >>>\\n\" .$stderrString.\"\\n\\n\";\n\t\t\t$needErrString = false;\n\t\t}\n\t\telse if (stripos($stderrString,'SSL connection timeout')>0) {\n\t\t\t// cURL timed out when attempting to connect.\n\t\t\t// This does NOT include any cert, so we don't update the store.\n\t\t\t$result = \"Critical\";\n\t\t\t$analysisMessage .= INDENT.\"The HTTPS connection timed out, so there is no new (current) certificate info.\\n\";\n\t\t\t$analysisMessage .= INDENT.\"The previous cert information will be retained for comparison during the next attempt.\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"CERTIFICATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\" .$certs.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"ANALYSIS from libcurl >>>>>>>>>>>>>>>>>>>>>\\n\" .$analysis.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"INTERACTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\";\n\t\t\t$analysisMessage .= INDENT.\"(Actual CERTS have been removed below.) >>>\\n\" .$stderrString.\"\\n\\n\";\n\t\t\t$needErrString = false;\n\t\t}\n\t\telse if ((!SSL_FILTER_REQUIRE_EXPLICIT_OK) || (stripos($stderrString,'SSL certificate verify ok')>0)) {\n\t\t\t// The cert is valid.\n\t\t\t$result = \"OK\";\n\t\t\t// Check the cert(s) that were presented to us against the BASELINE cert we have from last time\n\t\t\tif (isset($privateStore[$filterName][$domain]['SSL_BASELINE_CERT'])) {\n\t\t\t\t// Compare the cert(s) against what we have in our store\n\t\t\t\tif (strcmp($certs, $privateStore[$filterName][$domain]['SSL_BASELINE_CERT']) != 0) {\n\t\t\t\t\t// This cert does not match the BASELINE cert!\n\t\t\t\t\t$result = \"Critical\";\n\t\t\t\t\t$analysisMessage .= INDENT.\"The SSL certificate presented by the server is valid but doesn't match the previous cert! \\n\";\n\t\t\t\t\t$analysisMessage .= INDENT.\"This is either a serious error or they've updated the cert. Check it carefully!\\n\\n\";\n\t\t\t\t\t$analysisMessage .= INDENT.\"CERTIFICATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\" .$certs.\"\\n\\n\";\n\t\t\t\t\t$analysisMessage .= INDENT.\"ANALYSIS from libcurl >>>>>>>>>>>>>>>>>>>>>\\n\" .$analysis.\"\\n\\n\";\n\t\t\t\t\t$analysisMessage .= INDENT.\"INTERACTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\";\n\t\t\t\t\t$analysisMessage .= INDENT.\"(Actual CERTS have been removed below.) >>>\\n\" .$stderrString.\"\\n\\n\";\n\t\t\t\t\t$analysisMessage .= INDENT.\"PREVIOUS CERT(S):\\n\" .$privateStore[$filterName][$domain]['SSL_BASELINE_CERT'].\"\\n\\n\";\n\t\t\t\t\t$needErrString = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// First time we've seen this server, so record a BASELINE version of the cert\n\t\t\t\t$result = \"Critical\";\n\t\t\t\t$analysisMessage .= INDENT.\"First time we've seen this certificate. Examine the interaction carefully. Things may be just fine. \\n\";\n\t\t\t\t$analysisMessage .= INDENT.\"Here is a transcript of the interaction with the HTTPS server.\\n\\n\";\n\t\t\t\t$analysisMessage .= INDENT.\"CERTIFICATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\" .$certs.\"\\n\\n\";\n\t\t\t\t$analysisMessage .= INDENT.\"ANALYSIS from libcurl >>>>>>>>>>>>>>>>>>>>>\\n\" .$analysis.\"\\n\\n\";\n\t\t\t\t$analysisMessage .= INDENT.\"INTERACTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\";\n\t\t\t\t$analysisMessage .= INDENT.\"(Actual CERTS have been removed below.) >>>\\n\" .$stderrString.\"\\n\\n\";\n\t\t\t\t$needErrString = false;\n\t\t\t}\n\t\t\t// Save just the cert(s). (Only save if there IS a cert.)\n\t\t\tif ($certs != '') {\n\t\t\t\t$privateStore[$filterName][$domain]['SSL_BASELINE_CERT'] = $certs;\n\t\t\t}\n\t\t}\n\t\telse if (strcasecmp($privateStore[$filterName][$domain]['SSL_VERBOSE_RESULT'], $stderrString) != 0) {\n\t\t\t// The \"verbose\" result returned by the CURLOPT_SSL_VERIFY option is neither OK nor failed\n\t\t\t// so report out what it contains.\n\t\t\t// This is a kind of ambiguous situation and many times we see this on a\n\t\t\t// cert that verifies just fine using other methods.\n\t\t\t$result = \"Critical\";\n\t\t\t$analysisMessage .= INDENT.\"Something is odd here. The certificate is neither 'valid' nor 'failed' - - \\n\";\n\t\t\t$analysisMessage .= INDENT.\"Examine the details carefully under 'CURRENT' below. \\n\";\n\t\t\t$analysisMessage .= INDENT.\"These are transcripts of the interactions with the HTTPS server.\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"PREVIOUS:\\n\".$privateStore[$filterName][$domain]['SSL_VERBOSE_RESULT'].\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"CERTIFICATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\" .$certs.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"ANALYSIS from libcurl >>>>>>>>>>>>>>>>>>>>>\\n\" .$analysis.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"INTERACTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\";\n\t\t\t$analysisMessage .= INDENT.\"(Actual CERTS have been removed below.) >>>\\n\" .$stderrString.\"\\n\\n\";\n\t\t\t$needErrString = false;\n\t\t}\n\t\t$privateStore[$filterName][$domain]['SSL_VERBOSE_RESULT'] = $stderrString;\n\t\tif ($needErrString) {\n\t\t\t$analysisMessage .= INDENT.\"CERTIFICATES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\" .$certs.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"ANALYSIS from libcurl >>>>>>>>>>>>>>>>>>>>>\\n\" .$analysis.\"\\n\\n\";\n\t\t\t$analysisMessage .= INDENT.\"INTERACTION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\";\n\t\t\t$analysisMessage .= INDENT.\"(Actual CERTS have been removed below.) >>>\\n\" .$stderrString.\"\\n\\n\";\n\t\t}\n\t}\n\tcatch (Exception $dax) {\n\t\t$result = \"ssl\";\n\t\t$message .= INDENT . \"Exception in filter:SSL:SSLScan() $dax \\n\";\n\t\techoIfVerbose(\"Exception in filter:SSL:SSLScan() $dax\\n\");\t\n\t}\n\n\tif (!isNotifyHour($args['notify']) || ($result != 'OK')) {\n\t\t// Outside of the notify hour, or if the result is not 'OK', report the full \n\t\t// certificate analysis from libCurl\n\t\t//\n\t\t// During the notify hour, if the result is 'OK' then don't return any analysis\n\t\t//\t This makes for smaller notifications during the notification process, once a day,\n\t\t// as long as the SSL keep checking out OK.\n\t\t$message .= $analysisMessage;\n\t}\n\telse {\n\t\t// Add an abbreviated message\n\t\t$message = trim($message , \"\\n\");\t\t\t\t// remove any trailing LF\n\t\t$message .= \" » The SSL cert is valid. A full analysis will be sent if it changes.\\n\";\n\t}\n\t\n\t$message = trim($message , \"\\n\");\t\t\t\t// remove any trailing LF\n\treturn array($message, $result, $privateStore);\n\t\n}", "title": "" }, { "docid": "c1306ae25529c69478ca92892c02cfdc", "score": "0.446356", "text": "function has_ssl($domain) {\n\t$res = false;\n\t$orignal_parse = $domain;\n\t$stream = @stream_context_create( array( 'ssl' => array( 'capture_peer_cert' => true ) ) );\n\t$socket = @stream_socket_client( 'ssl://' . $orignal_parse . ':443', $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $stream );\n\n\t// If we got a ssl certificate we check here, if the certificate domain\n\t// matches the website domain.\n\tif ( $socket ){\n\t\t$cont = stream_context_get_params( $socket );\n\t\t$cert_ressource = $cont['options']['ssl']['peer_certificate'];\n\t\t$cert = openssl_x509_parse( $cert_ressource );\n\t\t$listdomains=explode(',', $cert[\"extensions\"][\"subjectAltName\"]);\n\n\t\tforeach ($listdomains as $v) {\n\t\t\tif (strpos($v, $orignal_parse) !== false) {\n\t\t\t\t$res=true;\n\t\t\t}\n\t\t}\n\t}\n\treturn $res;\n}", "title": "" }, { "docid": "ac01700603db9eb43ed2985e06f4d67c", "score": "0.44566265", "text": "function avelsieve_initialize(&$sieve) {\n sqgetGlobalVar('sieve_capabilities', $sieve_capabilities, SQ_SESSION);\n sqgetGlobalVar('rules', $rules, SQ_SESSION);\n\n if(!is_object($sieve)) {\n sqgetGlobalVar('key', $key, SQ_COOKIE);\n sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION);\n sqgetGlobalVar('authz', $authz, SQ_SESSION);\n global $imapServerAddress, $username, $avelsieve_imapproxymode, $avelsieve_cyrusadmins_map, $sieveport,\n $avelsieve_imapproxyserv, $sieve_preferred_sasl_mech;\n\n /* Need the cleartext password to login to timsieved */\n $acctpass = OneTimePadDecrypt($key, $onetimepad);\n\n if(isset($authz)) {\n $imap_server = sqimap_get_user_server ($imapServerAddress, $authz);\n } else {\n $imap_server = sqimap_get_user_server ($imapServerAddress, $username);\n \n if ($avelsieve_imapproxymode == true) { /* Need to do mapping so as to connect directly to server */\n $imap_server = $avelsieve_imapproxyserv[$imap_server];\n }\n }\n if(isset($authz)) {\n if(isset($avelsieve_cyrusadmins_map[$username])) {\n $bind_username = $avelsieve_cyrusadmins_map[$username];\n } else {\n $bind_username = $username;\n }\n $sieve=new sieve($imap_server, $sieveport, $bind_username, $acctpass, $authz, $sieve_preferred_sasl_mech);\n } else {\n $sieve=new sieve($imap_server, $sieveport, $username, $acctpass, $username, $sieve_preferred_sasl_mech);\n }\n avelsieve_login($sieve);\n }\n}", "title": "" }, { "docid": "52e724393e628d3c309205691ac70e64", "score": "0.4450605", "text": "public function parsedCertIsSslServer(&$cert=null) {\n\tif (!is_array($cert)) { return false; }\n\tif (!isset($cert['certificate']['version'])) { return false; }\n\tif (!is_numeric($cert['certificate']['version'])) { return false; }\n\t// below v3 we can't know...\n\tif ($cert['certificate']['version'] < 3) { return true; }\n\tif ($this->parsedCertIsCa($cert) === true) { return false; }\n\t// We have to have either netscape-cert-type, id-ce-keyUsage, or\n\t// id-cd-extKeyUsage to know anything...\n\t$nsCertType = (isset($cert['certificate']['extensions']['supported']['netscape-cert-type']));\n\tif ($nsCertType) {\n\t\t$nsCertType = $cert['certificate']['extensions']['supported']['netscape-cert-type'];\n\t\tif (!is_string($nsCertType) or strlen($nsCertType) < 1) { $nsCertType = false; }\n\t\t}\n\t$keyUsage = (isset($cert['certificate']['extensions']['supported']['id-ce-keyUsage']['usages']));\n\t$extUsage = (isset($cert['certificate']['extensions']['supported']['id-ce-extKeyUsage']));\n\tif ($keyUsage) {\n\t\t$keyUsage = $cert['certificate']['extensions']['supported']['id-ce-keyUsage']['usages'];\n\t\tif (!is_array($keyUsage) or count($keyUsage) < 1) { $keyUsage = false; }\n\t\t}\n\tif ($extUsage) {\n\t\t$extUsage = $cert['certificate']['extensions']['supported']['id-ce-extKeyUsage'];\n\t\tif (!is_array($extUsage) or count($extUsage) < 1) { $extUsage = false; }\n\t\t}\n\tif (!$nsCertType and !$keyUsage and !$extUsage) { return false; }\n\t// Try keyUsage\n\tif (!($keyUsage === false)) {\n\t\tif (!in_array('keyEncipherment',$keyUsage)) { return false; }\n\t\t}\n\t// Try extUsage\n\tif (!($extUsage === false)) {\n\t\tif (in_array('id_kp_serverAuth',$extUsage)) {\n\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t// Try netscape-cert-type\n\tif (!($nsCertType === false)) {\n\t\t$pos = strpos($nsCertType,'SSL server');\n\t\tif (!($pos === false)) { return true; }\n\t\t}\n\treturn false;\n\t}", "title": "" }, { "docid": "dc71bf2765a3a7ebde360b567fc2ea55", "score": "0.4446345", "text": "private function authWWW()\n {\n if (!$this->username)\n {\n throw new PhpSIPException(\"Missing auth username\");\n }\n \n if (!$this->password)\n {\n throw new PhpSIPException(\"Missing auth password\");\n }\n \n $qop_present = false;\n if (strpos($this->rx_msg,'qop=') !== false)\n {\n $qop_present = true;\n \n // we can only do qop=\"auth\"\n if (strpos($this->rx_msg,'qop=\"auth\"') === false)\n {\n throw new PhpSIPException('Only qop=\"auth\" digest authentication supported.');\n }\n }\n \n // realm\n $m = array();\n if (!preg_match('/^WWW-Authenticate: .* realm=\"(.*)\"/imU',$this->rx_msg, $m))\n {\n throw new PhpSIPException(\"Can't find realm in www-auth\");\n }\n \n $realm = $m[1];\n \n // nonce\n $m = array();\n if (!preg_match('/^WWW-Authenticate: .* nonce=\"(.*)\"/imU',$this->rx_msg, $m))\n {\n throw new PhpSIPException(\"Can't find nonce in www-auth\");\n }\n \n $nonce = $m[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n if ($qop_present)\n {\n $cnonce = md5(time());\n \n $res = md5($ha1.':'.$nonce.':00000001:'.$cnonce.':auth:'.$ha2);\n }\n else\n {\n $res = md5($ha1.':'.$nonce.':'.$ha2);\n }\n \n $this->auth = 'Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n \n if ($qop_present)\n {\n $this->auth.= ', qop=\"auth\", nc=\"00000001\", cnonce=\"'.$cnonce.'\"';\n }\n }", "title": "" }, { "docid": "080af918a8ab9ccec70329bba0f560ad", "score": "0.4444365", "text": "function send_cmd ( $cmd = \"\" )\n\t{\n\t\t//\tPOP server and returns the results. Useful for\n\t\t//\tnon-compliant or custom POP servers.\n\t\t//\tDo NOT include the \\r\\n as part of your command\n\t\t//\tstring - it will be appended automatically.\n\n\t\t//\tThe return value is a standard fgets() call, which\n\t\t//\twill read up to $this->BUFFER bytes of data, until it\n\t\t//\tencounters a new line, or EOF, whichever happens first.\n\n\t\t//\tThis method works best if $cmd responds with only\n\t\t//\tone line of data.\n\n\t\tif(!isset($this->FP))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 send_cmd: No connection to server\";\n\t\t\treturn false;\n\t\t}\n\n\t\tif(empty($cmd))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 send_cmd: Empty command string\";\n\t\t\treturn \"\";\n\t\t}\n\n\t\t//if(!ereg(\"^RETR \",$cmd)) {echo \"$cmd is command\\n\";}\n\t\t$fp = $this->FP;\n\t\t$buffer = $this->BUFFER;\n\t\t$this->update_timer();\n\t\t$bytes = fwrite($fp,\"$cmd\\r\\n\");\n\t\t$reply = fgets($fp,$buffer);\n\t\t/*\n\t\tif(!ereg(\"^RETR \",$cmd)) {\n\t\t\tif($reply){\n\t\t\t\techo \"$reply is reply\\n\";\n\t\t\t} else {\n\t\t\t\techo \"fgets failed\\n\";\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t$reply = $this->strip_clf($reply);\n\t\tif($this->DEBUG) { @error_log(\"POP3 SEND [$cmd] GOT [$reply]\",0); }\n\t\treturn $reply;\n\t}", "title": "" }, { "docid": "5084b5a3af23ca7e066cc3992a15a1b2", "score": "0.44414416", "text": "function sendMsg3($serverUrl, $msg,$handshakeToken) {\n\n\t\t$authMsg = \"SCRAM handshakeToken=\".$handshakeToken.\", data=\".rtrim(strtr(base64_encode($msg), '+/', '-_'), '=');\n\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $serverUrl);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER , true);\n\t\tcurl_setopt($ch, CURLOPT_FAILONERROR, false);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t \"Authorization: \" .$authMsg\n\t\t ));\n\t\t$serverMsg = curl_exec($ch);\n\t\t$serverMsg = $this->get_string_between($serverMsg,\"authToken=\",\",\");\n\n\t\tcurl_close($ch);\n\n\t return $serverMsg;\n\t}", "title": "" }, { "docid": "aa17e10b9bf373140de2e3db388bc151", "score": "0.44372904", "text": "function idisk_linkpop_download($url, $tempDir, $noCertificateCheck) {\n if ($tempDir=='') {\n $tempDir = null;\n }\n if ($tempDir==null || !is_dir($tempDir) || !is_writable($tempDir)) {\n $tempDir = ini_get('upload_tmp_dir');\n if ($tempDir==='' || $tempDir===false) {\n $tempDir = null;\n }\n }\n if ($tempDir==null || !is_dir($tempDir) || !is_writable($tempDir)) {\n $tempDir = sys_get_temp_dir();\n }\n\n // create path to temporary file\n $tempFile = null;\n if ($tempDir!=null && is_dir($tempDir) && is_writable($tempDir)) {\n $tempFile = $tempDir . DIRECTORY_SEPARATOR . 'idisk-linkpop-' . md5( $url ) . '.txt';\n }\n\n // load content from temporary file\n $tempContent = null;\n if ($tempFile!=null && is_file($tempFile)) {\n $tempContent = file_get_contents($tempFile);\n }\n\n // use content from temporary file, if its maximal age is not exceeded\n $minAge = time() - 86400;\n if ($tempFile!=null && is_file($tempFile) && filemtime($tempFile)>$minAge) {\n return $tempContent;\n }\n\n $content = null;\n\n // load the content via file_get_contents,\n // if allow_url_fopen is enabled in the PHP runtime\n if (ini_get('allow_url_fopen')=='1' || ini_set('allow_url_fopen', '1')!==false) {\n $context = null;\n\n // disable certificate checks, if it was explicitly disabled\n // or if PHP does not support SNI (Server Name Indication)\n if ($noCertificateCheck || !defined('OPENSSL_TLSEXT_SERVER_NAME') || !OPENSSL_TLSEXT_SERVER_NAME) {\n $opts = array(\n 'ssl'=>array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n )\n );\n $context = stream_context_create($opts);\n }\n\n $content = file_get_contents($url, false, $context);\n }\n\n // alternatively load the content via cURL,\n // if it is available in the PHP runtime\n else if (function_exists('curl_init')) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HEADER, false);\n\n // disable certificate checks, if it was explicitly disabled\n if ($noCertificateCheck) {\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n }\n\n $content = curl_exec($curl);\n curl_close($curl);\n }\n\n // return an error message, if the download is not possible\n else {\n return idisk_linkpop_error('Ihr Webspace unterstützt weder <strong>allow_url_fopen</strong> noch <strong>cURL</strong>!');\n }\n\n if ($content===false || $content=='') {\n $content = null;\n }\n\n // write downloaded content into the temporary file\n if ($content!=null && $tempFile!=null) {\n file_put_contents($tempFile, $content);\n }\n\n // use temporary content, in case the download failed\n if ($content==null && $tempContent!=null) {\n $content =& $tempContent;\n }\n\n return $content;\n}", "title": "" }, { "docid": "854cfa17ca856dd3ee363c00f7d52bc3", "score": "0.44279963", "text": "function proxyauth($proxyauth,$proxypass='')\r\n\t{\r\n\t\tif(empty($proxypass))\r\n\t\t{\r\n\t\t\t$posvirg = strpos($proxyauth,':');\r\n\t\t\t$this->proxyuser = substr($proxyauth,0,$posvirg);\r\n\t\t\t$this->proxypass = substr($proxyauth,$posvirg+1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->proxyuser = $proxyauth;\r\n\t\t\t$this->proxypass = $proxypass;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0609367c211100933bcc27534f13632f", "score": "0.4392432", "text": "function isSSLPrefs(){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "89bf7bab1f06e8339cb7c17d938c873a", "score": "0.43909597", "text": "public function testIsSsl_SslMode_WithSslShopUrl()\n {\n oxTestModules::addFunction( \"oxUtilsServer\", \"getServerVar\", '{ if ( $aA[0] == \"HTTPS\" ) { return 1; } else { return array(); } }' );\n\n $oConfig = $this->getMock( 'oxconfig', array( 'getConfigParam' ) );\n $oConfig->expects( $this->once() )->method( 'getConfigParam')->with( $this->equalTo( 'sSSLShopURL' ) )->will( $this->returnValue( 'https://eshop/' ) );\n\n $this->assertTrue( $oConfig->isSsl() );\n }", "title": "" }, { "docid": "0873ace0013cc6f0cf26e9acca1f16fa", "score": "0.43797165", "text": "function set_postfix_files( $site_url, $site_service_dir ) {\n\n\t$fs = new Filesystem();\n\t$fs->mkdir( $site_service_dir . '/postfix/ssl' );\n\t$ssl_dir = $site_service_dir . '/postfix/ssl';\n\n\tif ( ! EE::exec( sprintf( \"openssl req -new -x509 -nodes -days 365 -subj \\\"/CN=smtp.%s\\\" -out $ssl_dir/server.crt -keyout $ssl_dir/server.key\", $site_url ) )\n\t && EE::exec( \"chmod 0600 $ssl_dir/server.key\" ) ) {\n\t\tthrow new \\Exception( 'Unable to generate ssl key for postfix' );\n\t}\n}", "title": "" }, { "docid": "9c7d3f051868e5496f6d70bf5973ee79", "score": "0.4377949", "text": "public function getUseSsl();", "title": "" }, { "docid": "c1f6cc4e04676b7d2cce67c3a0cb2177", "score": "0.4377159", "text": "function validate_remote_user($account_info, $user_url, $key) {\r\n\t\t#if key is not valid in remote url, check if there is an indication on where the user has been created. If there is no indication, game over!\r\n\t\t$db = CreateObject('s3dbapi.db');\r\n\t \t$db->Halt_On_Error = 'no';\r\n $db->Host = $GLOBALS['s3db_info']['server']['db']['db_host'];\r\n $db->Type = $GLOBALS['s3db_info']['server']['db']['db_type'];\r\n $db->Database = $GLOBALS['s3db_info']['server']['db']['db_name'];\r\n $db->User = $GLOBALS['s3db_info']['server']['db']['db_user'];\r\n $db->Password = $GLOBALS['s3db_info']['server']['db']['db_pass'];\r\n $db->connect();\r\n\r\n\t\t#$sql = \"select * from s3db_account where account_status = 'A' and (account_lid = '\".$user_url.\"' or account_lid = '\".$user_url.'#'.$account_info['account_lid'].\"')\";\r\n\t\t$sql = \"select * from s3db_account where account_status = 'A' and account_id = '\".$user_url.\"'\";\r\n\t\t$db->query($sql, __LINE__, __FILE__);\r\n\t\tif($db->next_record()) {\r\n\t\t\t$account_id = $db->f('account_id');\r\n\t\t\t$account_lid = $db->f('account_lid');\r\n\t\t\t$sql =\"insert into s3db_access_log (login_timestamp, session_id, login_id, ip) values(now(), 'remote login:\".$user_url.\"','\".$account_info['account_id'].\"','\".$_SERVER['REMOTE_ADDR'].\"')\";\r\n\t\t\t$db->query($sql, __LINE__, __FILE__);\r\n\t\t\t$sql = \"update s3db_account set account_lid = '\".$account_id.'#'.$account_info['account_lid'].\"', account_uname = '\".$account_info['account_uname'].\"', account_email = '\".$account_info['account_email'].\"' where account_id = '\".$account_id.\"'\";\r\n\t\t\t$db->query($sql, __LINE__, __FILE__);\r\n\r\n\t\t\t#$sql = \"insert into s3db_access_keys (key_id, account_id, expires, notes) values ('\".$key.\"', '\".$account_id.\"', '\".date('Y-m-d',time() + (1 * 24 * 60 * 60)).\"', 'Remote key, will expire in 24h')\";\r\n\t\t\t$sql = \"insert into s3db_access_keys (key_id, account_id, expires, notes) values ('\".$key.\"', '\".$account_id.\"', '\".date('Y-m-d H:i:s',time() + (1 * 1 * 60 * 60)).\"', 'Remote key, will expire in 1h')\";\r\n\t\t\t$db->query($sql, __LINE__, __FILE__);\r\n\t\t\treturn True;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "6686ef5437da01ab9db7d87b378e3fc0", "score": "0.43591106", "text": "function logon($username = NULL, $password = NULL, $server = DEFAULT_SERVER, $sslcert_file = NULL, $sslcert_pass = NULL)\n\t\t{\n\t\t\t$result = NOERROR;\n\n\t\t\tif(is_string($username) && is_string($password)) {\n\t\t\t\tif(function_exists(\"openssl_decrypt\")) {\n\t\t\t\t\t// In PHP 5.3.3 the iv parameter was added\n\t\t\t\t\tif(version_compare(phpversion(), \"5.3.3\", \"<\")) {\n\t\t\t\t\t\t$password = openssl_decrypt($password,\"des-ede3-cbc\",PASSWORD_KEY,0);\n\t\t\t\t\t} else { \n\t\t\t\t\t\t$password = openssl_decrypt($password,\"des-ede3-cbc\",PASSWORD_KEY,0,PASSWORD_IV);\n\t\t\t\t\t}\n\t\t\t\t} else if (function_exists(\"mcrypt_decrypt\")) {\n\t\t\t\t\t$password = trim(mcrypt_decrypt(MCRYPT_TRIPLEDES, PASSWORD_KEY, base64_decode($password), MCRYPT_MODE_CBC, PASSWORD_IV));\n\t\t\t\t}\n\t\t\t\t// logon\n\t\t\t\t$this->session = mapi_logon_zarafa($username, $password, $server, $sslcert_file, $sslcert_pass);\n\t\t\t\t$result = mapi_last_hresult();\n\n\t\t\t\tif(function_exists(\"openssl_encrypt\")) {\n\t\t\t\t\t// In PHP 5.3.3 the iv parameter was added\n\t\t\t\t\tif(version_compare(phpversion(), \"5.3.3\", \"<\")) {\n\t\t\t\t\t\t$password = openssl_encrypt($password,\"des-ede3-cbc\",PASSWORD_KEY,0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$password = openssl_encrypt($password,\"des-ede3-cbc\",PASSWORD_KEY,0,PASSWORD_IV);\n\t\t\t\t\t}\n\t\t\t\t} else if (function_exists(\"mcrypt_encrypt\")) {\n\t\t\t\t\t$password = base64_encode(mcrypt_encrypt(MCRYPT_TRIPLEDES, PASSWORD_KEY, $password, MCRYPT_MODE_CBC, PASSWORD_IV));\n\t\t\t\t}\n\n\t\t\t\tif ($result == NOERROR && $this->session !== false){\n\t\t\t\t\t$this->session_info[\"username\"] = $username;\n\t\t\t\t\t$this->session_info[\"password\"] = $password;\n\t\t\t\t\t$this->session_info[\"server\"] = $server;\n\t\t\t\t\t\n\t\t\t\t\t// we are authenticated\n\t\t\t\t\t$this->session_info[\"auth\"] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "fe43253534429121387512b39503dc3a", "score": "0.43586382", "text": "public function httpsSupport();", "title": "" }, { "docid": "6cd2999281bd9084472544b72ed757ec", "score": "0.43443304", "text": "private function connectToMySQLDBSSL($hostname,$username, $password, $dbname, $port, $socket ,$flags)\n {\n //$link = new mysqli($hostname,$username, $password, $dbname, $port);\n $link = mysqli_init();\n mysqli_options($link, MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, true);\n mysqli_ssl_set($link, self::PATH_TO_SSL_CLIENT_KEY_FILE , self::PATH_TO_SSL_CLIENT_CERT_FILE, self::PATH_TO_CA_CERT_FILE, null, null);\n mysqli_real_connect($link, $hostname,$username, $password, $dbname, $port, $socket ,$flags);\n if($link->connect_error) \n die('Connect Error (' . $link->connect_errno . ') ' . $link->connect_error);\n\n return $link;\n }", "title": "" }, { "docid": "807a7e569e6f9c8871aebeb34d11241a", "score": "0.4343786", "text": "function send_notification($device,$message,$apnsCert='Mycab.pem')\r\n//function send_notification($device,$message,$apnsCert='goalMachine.pem')\r\n{\r\n\t$payload['aps'] = array('alert' => $message, 'badge' => 1, 'sound' => 'default');\r\n\t$payload['server'] = array('serverId' => $serverId, 'name' => $name);\r\n\t$payload = json_encode($payload);\r\n\t\r\n\t//$apnsCert = 'key.pem';\r\n\t\r\n\t$streamContext = stream_context_create();\r\n\tstream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert);\r\n\t\r\n\t$apns = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);\r\n\t\r\n\t$apnsMessage = chr(0) . chr(0) . chr(32) . pack('H*', str_replace(' ', '', $device)) . chr(0) . chr(strlen($payload)) . $payload;\r\n\tfwrite($apns, $apnsMessage);\r\n\t\r\n\t//socket_close($apns);\r\n\tfclose($apns);\r\n}", "title": "" }, { "docid": "6e41a7385febda77e9b41aed7ac817a0", "score": "0.43421534", "text": "function http_exec($url, $method = NULL, $data = NULL, $username = NULL, $password = NULL, $verify_peer = 1, $verify_host = 1) {\n\t$ch = curl_init();\n\n\t#curl_setopt($ch, CURLOPT_VERBOSE, 1);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $verify_peer);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $verify_host);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n\tif ( ($username != NULL) and ($password != NULL) ) {\n\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;\n\t\tcurl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);\n\t}\n\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\n\t$headers = array('X-XSRF-Header: dummy');\n\tif ($method == \"POST\") {\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t} else if ($method == \"PUT\") {\n\t\t$headers[] = 'Content-type: application/json';\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t}\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n\t$result = curl_exec($ch);\n\tprint_r(curl_error($ch));\n\tcurl_close($ch);\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "cdae36705168e68c74f2f2a77b3bf382", "score": "0.4340783", "text": "function openssl_get_publickey($cert) {}", "title": "" }, { "docid": "1b1a8376a83672b0fd794b4949fbf0e1", "score": "0.4338419", "text": "function servicefun($service,$username,$password){\n\nif ($service == \"gmail\"){\n\n//------------------------------------------------------------------ GMAIL START -----------------------------------------------------------------\t\n$display_array = array();\n\n$refering_site = \"http://mail.google.com/mail/\";//setting the site for refer\n\n$browser_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7\";//setting browser type\n\n$mycookie = $username.'.cookie';\n$fh = fopen($mycookie,'w');\nfclose($fh);\n\n$path_to_cookie = realpath(\"$mycookie\");\n\n$setcookie = fopen($path_to_cookie,'wb');//this opens the file and resets it to zero length\nfclose($setcookie);\n\n//---------------------------------------------------STEP 1\n\n$url = \"http://mail.google.com/mail/\";\n$page_result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\n\n//---------------------------------------------------STEP 2\n\n$postal_data = \"ltmpl=yj_blanco&ltmplcache=2&continue=http%3A%2F%2Fmail.google.com%2Fmail%3F&service=mail&rm=false&ltmpl=yj_blanco&Email=\".\n $username.\"&Passwd=\".$password.\"&rmShown=1&null=Sign+in\";\n$url = 'https://www.google.com/accounts/ServiceLoginAuth';\n$result = config::curl_post($path_to_cookie,$browser_agent,$url,$postal_data,1,0);\n// [pick up forwarding url]\npreg_match_all(\"/location.replace.\\\"(.*?)\\\"/\",$result,$matches);\n$matches = $matches[1][0];\n\n//---------------------------------------------------STEP 3\n\n$url = $matches;\n$result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\n\n//---------------------------------------------------STEP 4 - html only\n\n$url = 'https://mail.google.com/mail/?ui=html&zy=e';\n$result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\n\n//---------------------------------------------------STEP 5 - open export contacts page\n$url = 'https://mail.google.com/mail/?ui=1&ik=&view=sec&zx=';\n$result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/value=\\\"(.*?)\\\"/\",$result,$matches);\n$matches = $matches[1][0];\n//echo $matches;\n\n//---------------------------------------------------STEP 6 - download csv\n\n$postal_data = 'at='.$matches.'&ecf=g&ac=Export Contacts';\n$url = 'https://mail.google.com/mail/?ui=1&view=fec';\n$result = config::curl_post($path_to_cookie,$browser_agent,$url,$postal_data,1,0);\n@unlink ($path_to_cookie);\n\n//------------------------------------------------------------------GMAIL - END -----------------------------------------------------------------\n}\n\n\n\nif ($service == 'hotmail'){\n//------------------------------------------------------------------HOTMAIL START -----------------------------------------------------------------\t\n$display_array = array();\n\n$refering_site = \"http://mail.hotmail.com/\"; //setting the site for refer\n\n$browser_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)\"; //setting browser type\n\n$mycookie = $username.'.cookie';\n$fh = fopen($mycookie,'w');\nfclose($fh);\n\n$path_to_cookie = realpath(\"$mycookie\");\n$setcookie = fopen($path_to_cookie,'wb');//this opens the file and resets it to zero length\nfclose($setcookie);\n\n\n//---------------------------------------------------STEP 1\n\n$url = \"http://login.live.com/login.srf?id=2&vv=400&lc=1033\";\n$page_result =config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/name=\\\"PPFT\\\" id=\\\"i0327\\\" value=\\\"(.*?)\\\"/\", $page_result, $matches1); \n$found1 = $matches1[1][0]; \npreg_match_all(\"/name=\\\"PPSX\\\" value=\\\"(.*?)\\\"/\", $page_result, $matches2); \n$found2 = $matches2[1][0]; \npreg_match_all(\"/name=\\\"PwdPad\\\" id=\\\"i0340\\\" value=\\\"(.*?)\\\"/\", $page_result, $matches3); \n$found3= $matches3[1][0]; \npreg_match_all(\"/method=\\\"POST\\\" target=\\\"_top\\\" action=\\\"(.*?)\\\"/\", $page_result, $matches4); \n$found4= $matches4[1][0]; \npreg_match_all(\"/name=\\\"LoginOptions\\\" id=\\\"i0136\\\" value=\\\"(.*?)\\\"/\", $page_result, $matches5); \n$found5= $matches5[1][0];\n\n//---------------------------------------------------STEP 2\n\n$postal_data ='PPSX='.$found2.'&'.'PwdPad='.$found3.'&'.'login='.$username.'&'.'passwd='.$password.'&'.'LoginOptions='.$found5.'&'.'PPFT='.$found1;\n$url = $found4;\n$result =config::curl_post($path_to_cookie,$browser_agent,$url,$postal_data,1,0);\npreg_match_all(\"/replace\\(\\\"(.*?)\\\"/\", $result, $matches);\t\n$matches = $matches[1][0];\n\n//---------------------------------------------------STEP 3\n\n$url = $matches;\n$result =config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\n\n//---------------------------------------------------STEP 4 - OPEN ADDREDD CHERRY PICKER\n\n$url = 'http://by101fd.bay101.hotmail.msn.com/cgi-bin/AddressPicker?Context=InsertAddress&_HMaction=Edit&qF=to';\n$result =config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all('%<option[^>]*value=\"([^\"]*)\"[^>]*>([^<]*)&lt;[^>]*&gt;</option>%', $result, $matches, PREG_SET_ORDER);\n@unlink ($path_to_cookie);\n\n//------------------------------------------------------------------HOTMAIL - END -----------------------------------------------------------------\n}\n\n\n\n\nif ($service == \"yahoo\"){\n\n//------------------------------------------------------------------YAHOO START-----------------------------------------------------------------\t\t\t\n$display_array = array();\n\n$refering_site = \"http://yahoo.com/\"; //setting the site for refer\n\n$browser_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)\"; //setting browser type\n\n$mycookie = $username.'.cookie';\n\n$fh = fopen($mycookie,'w');\nfclose($fh);\n\n$path_to_cookie = realpath(\"$mycookie\");\n\n\n$setcookie = fopen($path_to_cookie,'wb');//this opens the file and resets it to zero length\nfclose($setcookie);\n\n//---------------------------------------------------STEP 1\n\n$url = \"https://login.yahoo.com/config/mail?.intl=us\";\n$page_result =config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/name=\\\".tries\\\" value=\\\"(.*?)\\\"/\", $page_result, $tries); \n$tries_found = $tries[1][0]; \npreg_match_all(\"/name=\\\".src\\\" value=\\\"(.*?)\\\"/\", $page_result, $src); \n$src_found = $src[1][0]; \npreg_match_all(\"/name=\\\".u\\\" value=\\\"(.*?)\\\"/\", $page_result, $u); \n$u_found = $u[1][0]; \npreg_match_all(\"/name=\\\".v\\\" value=\\\"(.*?)\\\"/\", $page_result, $v); \n$v_found = $v[1][0]; \npreg_match_all(\"/name=\\\".challenge\\\" value=\\\"(.*?)\\\"/\", $page_result, $challenge); \n$challenge_found = $challenge[1][0];\n\n//---------------------------------------------------STEP 2 - submit login info\n\n$postal_data ='.tries='.$tries_found.'&.src='.$src_found.'&.md5=&.hash=&.js=&.last=&promo=&.intl=us&.bypass=&.partner=&.u=6bu841h2d7p4o&.v=0&.challenge='.$challenge_found.'&.yplus=&.emailCode=&pkg=&stepid=&.ev=&hasMsgr=1&.chkP=Y&.done=http://mail.yahoo.com&.pd=ym_ver%253d0&login='.$username.'&passwd='.$password;\n$url = 'https://login.yahoo.com/config/login?';\n$result =config::curl_post($path_to_cookie,$browser_agent,$url,$postal_data,1,0);\npreg_match_all(\"/replace\\(\\\"(.*?)\\\"/\", $result, $matches);\t\n\n$matches = $matches[1][0];\n\t\n//---------------------------------------------------STEP 3 - Redirect\n\n$url = $matches;\n$result =config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\n//---------------------------------------------------STEP 4 - Redirect\n\n$url = 'http://us.rd.yahoo.com/mail_us/pimnav/ab/*http://address.mail.yahoo.com';\n$result =config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\n\n//var_dump($result);\n//---------------------------------------------------STEP 5 - Open address book\n\n$url = 'http://address.mail.yahoo.com';\n$result =config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/rand=(.*?)\\\"/\", $result, $array_names);\t\n$rand_value = str_replace('\"', '', $array_names[0][0]);\n//---------------------------------------------------STEP 6 - Export address book\n\n$url = 'http://address.mail.yahoo.com/?1&VPC=import_export&A=B&.rand='.$randURL;\n$result =config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/id=\\\"crumb1\\\" value=\\\"(.*?)\\\"/\", $result, $array_names);\t\n$matches = $array_names[1][0];\n\n\n//---------------------------------------------------STEP 7 - Checking if address book is empty\n\nIF (empty($matches)){\n\n $show = 1;\n $error_message = \"No contacts found - check your login details and try again\";\n\n}ELSE{\n\n\n\n\n//---------------------------------------------------STEP 8 - submit login info\n\n$postal_data ='.crumb='.$matches.'&VPC=import_export&A=B&submit%5Baction_export_yahoo%5D=Export+Now';\n$url = 'http://address.mail.yahoo.com/index.php';\n$result =config::curl_post($path_to_cookie,$browser_agent,$url,$postal_data,1,0);\n\n\n$matches = 1;\n}\n@unlink ($path_to_cookie);\n\n//------------------------------------------------------------------YAHOO END-----------------------------------------------------------------\t\t\t\n}\n\nif ($service == \"live\"){\n//------------------------------------------------------------------LIVE START -----------------------------------------------------------------\t\t\n$display_array = array();\n\n$refering_site = \"http://mail.live.com/\";//setting the site for refer\n\n$browser_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)\";//setting browser type\n\n$mycookie = $username.'.cookie';\n$fh = fopen($mycookie,'w');\nfclose($fh);\n\n$path_to_cookie = realpath(\"$mycookie\");\n$setcookie = fopen($path_to_cookie,'wb');//this opens the file and resets it to zero length\nfclose($setcookie);\n\n//---------------------------------------------------STEP 1\n\n$url = \"http://login.live.com/login.srf?id=64855\";\n$page_result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/name=\\\"PPFT\\\" id=\\\"i0327\\\" value=\\\"(.*?)\\\"/\",$page_result,$matches1);\n$found1 = $matches1[1][0];\npreg_match_all(\"/srf_uPost='(.*?)';var/\",$page_result,$matches2);\n$found2 = $matches2[1][0];\n\n//---------------------------------------------------STEP 2\n\n$postal_data = 'idsbho=1&PwdPad=IfYouAreReadingThisYouHaveTooMuc&LoginOptions=3&login='.\n $username.'&passwd='.$password.'&NewUser=1&PPFT='.$found1;\n$url = $found2;\n$result = config::curl_post($path_to_cookie,$browser_agent,$url,$postal_data,1,0);\n// [pick up forwarding url]\npreg_match_all(\"/replace\\(\\\"(.*?)\\\"/\",$result,$matches);\n$found3 = $matches[1][0];\n\n//---------------------------------------------------STEP 3\n\n$ch = curl_init();\ncurl_setopt($ch,CURLOPT_URL,$found3);\ncurl_setopt($ch,CURLOPT_USERAGENT,$browser_agent);\ncurl_setopt($ch,CURLOPT_RETURNTRANSFER,1);\ncurl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);\ncurl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);\n//curl_setopt($ch,CURLOPT_REFERER,$login_page2);\ncurl_setopt($ch,CURLOPT_COOKIEFILE,$path_to_cookie);\ncurl_setopt($ch,CURLOPT_COOKIEJAR,$path_to_cookie);\n$page_result = curl_exec($ch);\ncurl_close($ch);\n\npreg_match_all(\"/href=\\\"(.*?)\\\"/\",$page_result,$matches);\n$found4 = $matches[1][0];\n$found100 = preg_replace(\"/\\/mail.*/\",'',$found4);\n$found101 = $found100.'/mail/mail.aspx';\n\n//---------------------------------------------------STEP 4\n\n$url = $found101;\n$page_result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/\\\"\\/(.*?)\\\"/\",$page_result,$matches);\n$found = $matches[1][0];\n$found101 = $found100.'/'.$found;\n\n//---------------------------------------------------STEP 5\n\n$url = $found101;\n$page_result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/InboxLight.aspx.n=(.*?)\\\"/\",$page_result,$matches);\n$found = $matches[1][0];\n$found101 = $found100.'/mail/InboxLight.aspx?n='.$found;\n\n//---------------------------------------------------STEP 6\n\n$url = $found101;\n$page_result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\n\n//---------------------------------------------------STEP 7\n\n$url = $found101;\n$page_result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/EditMessageLight.aspx._ec=1&n.(.*?)\\\"/\",$page_result,$matches);\n$found = $matches[1][0];\n$found101 = $found100.'/mail/EditMessageLight.aspx?_ec=1&n='.$found;\n\n//---------------------------------------------------STEP 8\n\n$url = $found101;\n$page_result = config::curl_get($path_to_cookie,$browser_agent,$url,1,0);\npreg_match_all(\"/href=\\\"javascript:pickContact.'(.*?)', '(.*?)'/\",$page_result,\n $matches,PREG_SET_ORDER);\n@unlink ($path_to_cookie);\n\n//------------------------------------------------------------------LIVE END -----------------------------------------------------------------\t\t\n}\n\n\n\n$arr=array();\n$arr[0]=$matches;\n$arr[1]=$result;\n$arr[2]=$path_to_cookie;\nreturn $arr;\n}", "title": "" }, { "docid": "19f7a104406e6d0f507ed844318179f4", "score": "0.4335848", "text": "function bitshares_init_auth_url() {\n global $authUrl;\n\n bitshares_load();\n try {\n $client = new apiClient();\n $client->configInstance_forSMF();\n $authUrl = $client->createAuthUrl();\n }\n catch(Exception $e) {\n $authUrl = '';\n }\n}", "title": "" }, { "docid": "5232b9e7bdd4ff29a1bde535f4a4811c", "score": "0.43337783", "text": "public function test_yourls_plugin_url_ssl_mode_2() {\n $plugin = rand_str();\n\n yourls_add_filter( 'is_ssl', 'yourls_return_true' );\n yourls_add_filter( 'needs_ssl', 'yourls_return_false' );\n $plugin_url = yourls_plugin_url( $plugin );\n $this->assertStringStartsWith( 'https://', $plugin_url );\n }", "title": "" }, { "docid": "ebfbb0e5dca316033d9a81a3d555ab23", "score": "0.43303564", "text": "function dohandshake(WsUser $user,$headers);", "title": "" }, { "docid": "598a4878722f7c07476de7d0f9911e99", "score": "0.43227443", "text": "function ssl_connect() {\n\t\t$this->_resetError();\n\t\t$this->_setError(-1,\"ssl_connect not supported\");\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8d20059ff7e8700b84c7cc4f646cd7ef", "score": "0.4320043", "text": "private function auth()\n {\n if (!$this->username)\n {\n throw new PhpSIPException(\"Missing username\");\n }\n \n if (!$this->password)\n {\n throw new PhpSIPException(\"Missing password\");\n }\n \n // realm\n $m = array();\n if (!preg_match('/^Proxy-Authenticate: .* realm=\"(.*)\"/imU',$this->rx_msg, $m))\n {\n throw new PhpSIPException(\"Can't find realm in proxy-auth\");\n }\n \n $realm = $m[1];\n \n // nonce\n $m = array();\n if (!preg_match('/^Proxy-Authenticate: .* nonce=\"(.*)\"/imU',$this->rx_msg, $m))\n {\n throw new PhpSIPException(\"Can't find nonce in proxy-auth\");\n }\n \n $nonce = $m[1];\n \n $ha1 = md5($this->username.':'.$realm.':'.$this->password);\n $ha2 = md5($this->method.':'.$this->uri);\n \n $res = md5($ha1.':'.$nonce.':'.$ha2);\n \n $this->auth = 'Proxy-Authorization: Digest username=\"'.$this->username.'\", realm=\"'.$realm.'\", nonce=\"'.$nonce.'\", uri=\"'.$this->uri.'\", response=\"'.$res.'\", algorithm=MD5';\n }", "title": "" }, { "docid": "68c98766a6c2cf3d89cbeb94eec0c6ae", "score": "0.4311091", "text": "private function _verifySystemProperties () {\n\t\tif (!function_exists('version_compare') || version_compare('4.3', phpversion(), '>=')) {\n\t\t\t$error_message = \"PHP version must be v4.3+ (current version is \". phpversion() .\") to use \\\"SSL\\\" encryption\";\n\t\t\ttrigger_error ($error_message, E_USER_WARNING);\n\t\t\tdie();\n\t\t} elseif (!function_exists('openssl_open')) {\n\t\t\t$error_message = \"PHP must be compiled using --with-openssl to use \\\"SSL\\\" encryption\";\n\t\t\ttrigger_error ($error_message, E_USER_WARNING);\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "7c1e912225b3750f7b0d80fbf4583095", "score": "0.43076104", "text": "function mailchimpSF_authorized() {\n\t$user_id = stripslashes($_GET['user_id']);\n\tif ($user_id !== null) {\n\t\twp_set_current_user($user_id);\n\t}\n\n\t$nonce = stripslashes($_POST['id']);\n\t$salt = stripslashes($_GET['salt']);\n\n\tif (mailchimpSF_verify_nonce( $nonce, mailchimpSF_auth_nonce_key( $salt ) ) === false) {\n\t\twp_die('Cheatin&rsquo; huh?');\n\t}\n\n\t$response = stripslashes_deep($_POST['response']);\n\n\tif (!isset($response['keys']) || !isset($response['user'])) {\n\t\twp_die('Something went wrong, please try again');\n\t}\n\n\tupdate_option('mc_sopresto_user', $response['user']);\n\tupdate_option('mc_sopresto_dc', $response['dc']);\n\tupdate_option('mc_sopresto_public_key', $response['keys']['public']);\n\tupdate_option('mc_sopresto_secret_key', $response['keys']['secret']);\n\texit;\n}", "title": "" }, { "docid": "c599607e440322ad7c42b43056338d56", "score": "0.42981306", "text": "function encrypt($certificate_id)\n\t\t{\n\t\t# since this is a shared class, but certs are site-specific, go through include_paths to find realpath\n\t\tforeach(explode(':', ini_get('include_path')) as $path)\n\t\t\t{\n\t\t\tif(file_exists($path . '/paypal/paypal.cert'))\n\t\t\t\t{\n\t\t\t\t$public_file = realpath($path . '/paypal/public.cert');\n\t\t\t\t$private_file = realpath($path . '/paypal/private.cert');\n\t\t\t\t$paypal_file = realpath($path . '/paypal/paypal.cert');\n\t\t\t\t$public_cert = openssl_x509_read(file_get_contents($public_file));\n\t\t\t\t$private_cert = openssl_get_privatekey(file_get_contents($private_file));\n\t\t\t\tif(openssl_x509_check_private_key($public_cert, $private_cert) === false) { return false; }\n\t\t\t\t$paypal_cert = openssl_x509_read(file_get_contents($paypal_file));\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t$clear_text = 'cert_id=' . $certificate_id;\n\t\tforeach($this->postvars() as $k => $v)\n\t\t\t{\n\t\t\t$clear_text .= \"\\n\" . $k . '=' . $v;\n\t\t\t}\n\t\t$clear_file = tempnam('/tmp/', 'clear_'); # alt: sys_get_temp_dir()\n\t\t$signed_file = preg_replace('/clear/', 'signed', $clear_file);\n\t\t$encrypted_file = preg_replace('/clear/', 'encrypted', $clear_file);\n\t\tfile_put_contents($clear_file, $clear_text);\n\t\tif(!openssl_pkcs7_sign($clear_file, $signed_file, $public_cert, $private_cert, array(), PKCS7_BINARY)) { return false; }\n\t\tlist($x, $signed_text) = explode(\"\\n\\n\", file_get_contents($signed_file)); #?\n\t\tfile_put_contents($signed_file, base64_decode($signed_text));\n\t\tif(!openssl_pkcs7_encrypt($signed_file, $encrypted_file, $paypal_cert, array(), PKCS7_BINARY)) { return false; }\n\t\tlist($x, $encrypted_text) = explode(\"\\n\\n\", file_get_contents($encrypted_file)); #?\n\t\t$this->encrypted = \"\\n-----BEGIN PKCS7-----\\n$encrypted_text\\n-----END PKCS7-----\\n\";\n\t\t@unlink($clear_file);\n\t\t@unlink($signed_file);\n\t\t@unlink($encrypted_file);\n\t\t}", "title": "" }, { "docid": "497a83286e86b254cd36fdc9b6bd4b6b", "score": "0.42875668", "text": "public static function push( $url, $user = null, $pwd = null )\n {\n \n // es wird nur https zugelassen. punkt\n if( $user && $pwd )\n $url = 'https://'.$user.':'.$pwd.'@'.$url;\n else \n $url = 'https://'.$url;\n\n $message = Process::execute( 'hg push -f \"'.$url.'\"' );\n \n Console::outln( $message );\n \n }", "title": "" }, { "docid": "18a01395f0a8e287fdffe0a598d7af80", "score": "0.427752", "text": "public function &setSslVerifyPeer($value);", "title": "" }, { "docid": "d852d486581c8fc3ce3e6629820450cd", "score": "0.4273653", "text": "public function do_ssl_check()\n {\t\t\n if ($this->CI->config->item('environment') == 'production')\n { \n \t\tif ($_SERVER['SERVER_PORT'] == '443') \n \t\t{\n \t\t // ssl in use - we are good\n \t\t} \n \t\telse \n \t\t{\n // redirect to SSL version\n $uri_string = $this->CI->uri->uri_string();\n \n // keep any flash session vars we might be trying to use\n $this->CI->session->keep_flashdata('success_msg');\n $this->CI->session->keep_flashdata('error_msg');\n $this->CI->session->keep_flashdata('message');\n \n header('Location: https://app.trackstreet.com' . $uri_string);\n \t\n exit();\n \t\t} \t\n }\t\t\n }", "title": "" }, { "docid": "57821fe5cbfeaab2c749240457f52579", "score": "0.42680034", "text": "public function test_yourls_plugin_url_ssl_mode_1() {\n $plugin = rand_str();\n\n yourls_add_filter( 'is_ssl', 'yourls_return_false' );\n yourls_add_filter( 'needs_ssl', 'yourls_return_false' );\n $plugin_url = yourls_plugin_url( $plugin );\n $this->assertStringStartsWith( 'http://', $plugin_url );\n }", "title": "" }, { "docid": "52cda56e27d5ef377c395cd4d6bd25b6", "score": "0.42595428", "text": "public function login($theUsername,$thePassword,$theMailserver)\n\t{\n\t\t/* check login credentials */\n\t\tif($this->authSecurePOP3($theMailserver,$theUsername,$thePassword) == 0)\n\t\t{\n\t\t\t/* Login successful, set PHP SESSION variables & return TRUE */\n\t\t\t$_SESSION['loggedin'] = true;\n\t\t\t$_SESSION['username'] = $theUsername;\n\t\t\treturn true;\n\t\t}else{\n\t\t\t/* Login NOT successful, return FALSE */\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b4d57a0a9971e0b6e67e574955c45e7d", "score": "0.4254529", "text": "public function test_yourls_plugin_url_ssl_mode_4() {\n $plugin = rand_str();\n\n yourls_add_filter( 'is_ssl', 'yourls_return_false' );\n yourls_add_filter( 'needs_ssl', 'yourls_return_true' );\n $plugin_url = yourls_plugin_url( $plugin );\n $this->assertStringStartsWith( 'https://', $plugin_url );\n }", "title": "" }, { "docid": "0d3fe5f636ab52013db02abe454cf927", "score": "0.42540997", "text": "public function init()\n {\n $this->current_directory = dirname(__FILE__).DIRECTORY_SEPARATOR;\n include($this->current_directory.'includes/smtp.php');\n include($this->current_directory.'includes/basic_sasl_client.php');\n include($this->current_directory.'includes/cram_md5_sasl_client.php');\n include($this->current_directory.'includes/digest_sasl_client.php');\n include($this->current_directory.'includes/login_sasl_client.php');\n include($this->current_directory.'includes/ntlm_sasl_client.php');\n include($this->current_directory.'includes/plain_sasl_client.php');\n include($this->current_directory.'includes/sasl.php');\n\n $this->smtp_object = new smtp_class;\n $this->smtp_object->host_name = $this->host_name;\n $this->smtp_object->host_port = $this->host_port;\n $this->smtp_object->ssl = $this->ssl;\n\n $this->smtp_object->http_proxy_host_name = $this->http_proxy_host_name;\n $this->smtp_object->http_proxy_host_port = $this->http_proxy_host_port;\n\n $this->smtp_object->socks_host_name = $this->socks_host_name;\n $this->smtp_object->socks_host_port = $this->socks_host_port;\n $this->smtp_object->socks_version = $this->socks_version;\n\n $this->smtp_object->start_tls = $this->start_tls;\n $this->smtp_object->localhost = $this->localhost;\n $this->smtp_object->direct_delivery = $this->direct_delivery;\n $this->smtp_object->timeout = $this->timeout;\n $this->smtp_object->data_timeout = $this->data_timeout;\n\n $this->smtp_object->debug = $this->debug;\n $this->smtp_object->html_debug = $this->html_debug;\n $this->smtp_object->pop3_auth_host = $this->pop3_auth_host;\n $this->smtp_object->user = $this->user;\n $this->smtp_object->realm = $this->realm;\n $this->smtp_object->password = $this->password;\n $this->smtp_object->workstation = $this->workstation;\n $this->smtp_object->authentication_mechanism = $this->authentication_mechanism;\n\n if($this->direct_delivery)\n {\n if(!function_exists(\"GetMXRR\"))\n {\n $_NAMESERVERS=array();\n include($this->current_directory.\"includes/getmxrr.php\");\n }\n }\n if($this->needToCreateTable()) $this->autoCreateTable();\n }", "title": "" }, { "docid": "1148e0f65b957ac09c97c7b061760c53", "score": "0.4232862", "text": "function mcve_ub($conn, $username, $password) {}", "title": "" }, { "docid": "085fc437c1916530c81f3951e975d160", "score": "0.42269182", "text": "public function testIsSsl_SslMode_WithSslShopUrl_forSubshop()\n {\n oxTestModules::addFunction( \"oxUtilsServer\", \"getServerVar\", '{ if ( $aA[0] == \"HTTPS\" ) { return 1; } else { return array(); } }' );\n\n $oConfig = $this->getMock( 'oxconfig', array( 'getConfigParam' ) );\n $oConfig->expects( $this->at(0) )->method( 'getConfigParam')->with( $this->equalTo( 'sSSLShopURL' ) )->will( $this->returnValue( '' ) );\n $oConfig->expects( $this->at(1) )->method( 'getConfigParam')->with( $this->equalTo( 'sMallSSLShopURL' ) )->will( $this->returnValue( 'https://subshop/' ) );\n\n $this->assertTrue( $oConfig->isSsl() );\n }", "title": "" }, { "docid": "c34bb5338e56d0a5c098072aa927f0dd", "score": "0.42266878", "text": "function makeAuthRequest($username, $password)\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, 'https://simsweb.esu3.org/processlogin.cfm?sdist=plv');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"userid=\" . $username . \"&password=\" . $password);\n curl_setopt($ch, CURLOPT_POST, 1);\n $result = curl_exec($ch);\n\n //grab the link from curl info, then shut down the request\n $curl_array = curl_getinfo($ch);\n $number_array = array_values($curl_array);\n $auth_complete_link = $number_array[25];\n curl_close($ch);\n return $auth_complete_link;\n }", "title": "" }, { "docid": "8abae86ef7d47f7274beff74bccb52c4", "score": "0.42208785", "text": "function verify_credentials($signature)\n{\n global $passw_file;\n // The time interval, to accept a server timestamp as valid (10\n // minutes in seconds, should be longer than cycle_timeout into\n // g['signer'] object into common.js)\n $server_timestamp_validity = 600;\n list($user, $rand, $time, $s_sig, $u_sig) = explode(':', $signature);\n if ((time() - $time) > $server_timestamp_validity)\n return 'The last message from the server is too old, please login again.';\n $data = file_get($passw_file, 'r');\n if ($s_sig != sign_salt($rand, $time, $data['server_pass']))\n return 'Wrong server signature';\n if ($u_sig != md5($rand.':'.$time.':'.$s_sig.':'.$data['user_pass'][$user]))\n return 'Wrong password';\n return '';\n}", "title": "" }, { "docid": "76a3ab1a739f6e5c56ff7be25c4b9689", "score": "0.41950873", "text": "private function _connect($url, $auth)\n {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC ) ;\n //curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array($auth));\n\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "title": "" }, { "docid": "1a36ab50810862d6b9703fc08b9196ba", "score": "0.41917908", "text": "function sendMsg1($serverUrl, $msg) {\n\n\n\t\t$authMsg = \"HELLO username=\".rtrim(strtr(base64_encode($msg), '+/', '-_'), '=');\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $serverUrl);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HEADER , true);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t \"Authorization: \". $authMsg,\n\t\t \"WWW-Authenticate: SCRAM\"\n\t\t ));\n\t\t$serverMsg = curl_exec($ch);\n\n\t\tcurl_close($ch);\n\n\t\treturn $serverMsg;\n\t}", "title": "" }, { "docid": "e9ce849e0737c759c173bb0e979ab661", "score": "0.41844025", "text": "function isSiteSSL() { return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443; }", "title": "" }, { "docid": "951e33dfeacafa322126f12eed72b451", "score": "0.41832995", "text": "public function setAuthProtocol(string $protocol): SnmpReq\n {\n $protocols = ['MD5', 'SHA'];\n try {\n if (in_array($protocol, $protocols)) {\n $this->auth_protocol = $protocol;\n return $this;\n } else {\n throw new \\Exception('Auth protocol should be either MD5 or SHA.');\n }\n } catch (Exception $ex) {\n $trace = $ex->getTrace();\n echo $ex->getMessage() . \n ' FILE: ' . $trace[0]['file'] .\n ' LINE: ' . $trace[0]['line'];\n }\n }", "title": "" }, { "docid": "fbe9cdb3d32327ae41b3113736eaee6a", "score": "0.41807935", "text": "function automedia_secure()\n{\n\treturn\n\t\t(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')\n\t\t|| $_SERVER['SERVER_PORT'] == 443;\n}", "title": "" }, { "docid": "5a1695f9bcecfc13cb5fe971a438a3bc", "score": "0.41773564", "text": "public static function SendP3pCookieHeader()\n {\n\n \\header( 'P3P: CP=\"NOI NID ADMa OUR IND UNI COM NAV\"' );\n\n }", "title": "" }, { "docid": "34fb3bc489ad388b0a6a5bc497f33d9e", "score": "0.41743156", "text": "function openssl_pkey_get_public($cert) {}", "title": "" }, { "docid": "1ee0240f3cf1e25b83053f922cc831c7", "score": "0.41677216", "text": "abstract protected function fetchPrivateCert( Request $request );", "title": "" }, { "docid": "eea7ec7805a8d4064104f2df864b05e8", "score": "0.41672185", "text": "public function applyCertificates() {\n $sock = new HTTPSocket();\n $sock->connect('127.0.0.1', 2222);\n $sock->set_login('admin');\n $sock->set_method('POST');\n $sock->query('/CMD_API_SSL', [\n 'domain' => $this->getHostname(),\n 'action' => 'save',\n 'type' => 'paste',\n 'certificate' => $this->domainKeys->getPrivate() . PHP_EOL . $this->getCertificate(),\n 'submit' => 'Save'\n ]);\n $result = $sock->fetch_parsed_body();\n\n if ($result['error'] != 0) {\n throw new \\Exception('Error while executing first API request: ' . $result['details']);\n }\n\n $sock = new HTTPSocket();\n $sock->connect('127.0.0.1', 2222);\n $sock->set_login('admin');\n $sock->set_method('POST');\n $sock->query('/CMD_API_SSL', [\n 'domain' => $this->getHostname(),\n 'action' => 'save',\n 'type' => 'cacert',\n 'active' => 'yes',\n 'cacert' => implode(\"\\n\", $this->getCertificateAuthorityCertificates()),\n 'submit' => 'Save'\n ]);\n $result = $sock->fetch_parsed_body();\n\n if ($result['error'] != 0) {\n throw new \\Exception('Error while executing second API request: ' . $result['details']);\n }\n\n return true;\n }", "title": "" }, { "docid": "e2cf4a0443b70c7b3fc60ffc79999862", "score": "0.41638", "text": "protected function send3DSecureAuthRequest($mpi_data = array())\n {\n $mpi = '';\n foreach ($mpi_data as $name => $value) {\n $mpi .= \"<{$name}>{$value}</{$name}>\\n\";\n }\n if (!empty($mpi)) {\n $mpi = \"<mpi>\\n$mpi</mpi>\";\n }\n\n $request = <<<REQUEST\n <request timestamp=\"{$this->request_data['TIMESTAMP']}\" type=\"auth\">\n <merchantid>{$this->request_data['MERCHANT_ID']}</merchantid>\n <account>{$this->request_data['ACCOUNT']}</account>\n <orderid>{$this->request_data['ORDER_ID']}</orderid>\n <amount currency=\"{$this->request_data['CURRENCY']}\">{$this->request_data['AMOUNT']}</amount>\n <card>\n <number>{$this->card['number']}</number>\n <expdate>{$this->card['exp_month']}{$this->card['exp_year']}</expdate>\n <chname>{$this->card['cardholder_name']}</chname>\n <type>{$this->card['type']}</type>\n <cvn>\n <number>{$this->card['cvv2']}</number>\n <presind>1</presind>\n </cvn>\n </card>\n <autosettle flag=\"{$this->request_data['AUTO_SETTLE_FLAG']}\" />\n $mpi\n <tssinfo>\n <custnum>{$this->order_info['user_id']}</custnum>\n <custipaddress>{$this->order_info['ip_address']}</custipaddress>\n <address type=\"billing\">\n <code>{$this->request_data['BILLING_CODE']}</code>\n <country>{$this->request_data['BILLING_CO']}</country>\n </address>\n <address type=\"shipping\">\n <code>{$this->request_data['SHIPPING_CODE']}</code>\n <country>{$this->request_data['SHIPPING_CO']}</country>\n </address>\n </tssinfo>\n <sha1hash>{$this->request_data['SHA1HASH']}</sha1hash>\n </request>\nREQUEST;\n\n Registry::set('log_cut_data', array('card', 'sha1hash'));\n $response_data = Http::post(\n self::REALEX_REMOTE_3DSECURE_URL,\n $request,\n array(\n 'headers' => array(\n 'Content-type: text/xml',\n 'Connection: close'\n )\n )\n );\n\n return $response_data;\n }", "title": "" }, { "docid": "87f30d04587f48a19e0513452f6c88f6", "score": "0.4160699", "text": "public function smtpCredential(){\r\n\t\r\n\t $config = Array(\r\n\t\t\t\t\t\t'protocol' => 'smtp',\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'smtp_host' => 'ssl://smtp.gmail.com',\r\n\t\t\t\t\t\t'smtp_port' => 465,\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'smtp_user' =>'help@cityexplorers.in',\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t'smtp_pass' =>'1cesb241',\t\t\t\t\t\t\r\n\t\t\t\t\t\t'mailtype' => 'html', \r\n\t\t\t\t\t\t'charset' => 'iso-8859-1'\r\n\t\t\t\t\t\t);\t\r\n\t\treturn $config;\t\t\t\t\r\n\t\r\n}", "title": "" }, { "docid": "950e8cd9e7736b61e334536001482c77", "score": "0.41539523", "text": "function test($args = array()) {\n\t\tif ( function_exists( 'fsockopen' ) && ( isset($args['ssl']) && !$args['ssl'] ) )\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "18edaebc9beea684f5f20269c85c3448", "score": "0.41449812", "text": "public function __construct($host,$port,$user,$pass,$host_fingerprint='')\r\n\t{\r\n\t\t$this->host=$host;\r\n\t\t$this->port=$port;\r\n\t\t$this->user=$user;\r\n\t\t$this->pass=$pass;\r\n\r\n\t\t$this->ssh_methods=array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'kex'\t\t\t\t\t\t\t\t=> 'diffie-hellman-group1-sha1',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'client_to_server'\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'crypt' => '3des-cbc',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'comp' => 'none'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'server_to_client'\t=> array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'crypt' => 'aes256-cbc,aes192-cbc,aes128-cbc',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'comp' => 'none'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t$this->ssh_callbacks=array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//NONE OF THIS CRAP WORKS WITH SSH2 CONNECTION .....\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//NOT IN class::function form ...NOT AS SINGLE FUNCTION !!! ...\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Feel free to prove me wrong !!!...\r\n\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ignore'\t\t\t=> array($this, '_ssh_callback_Ignore'),\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t'debug'\t\t\t\t=> array($this, '_ssh_callback_Debug'),\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t'macerror'\t\t=> array($this, '_ssh_callback_MACerror'),\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t'disconnect'\t=> array($this, '_ssh_callback_Disconnect'),\r\n\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ignore'\t\t\t=> '_ssh_callback_Ignore',\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t'debug'\t\t\t\t=> '_ssh_callback_Debug',\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t'macerror'\t\t=> '_ssh_callback_MACerror',\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t'disconnect'\t=> '_ssh_callback_Disconnect',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t}", "title": "" }, { "docid": "42e801f7bec229d25ef86cd92afbee9d", "score": "0.41411993", "text": "function snmp3_get($host, $sec_name, $sec_level, $auth_protocol, $auth_passphrase, $priv_protocol, $priv_passphrase, $object_id, $timeout = null, $retries = null) {}", "title": "" }, { "docid": "e59bf2f278bcde8cc83e648f26689694", "score": "0.41398022", "text": "function cubrid_pconnect(string $host, int $port, string $dbname, string $userid = NULL, string $passwd = NULL) {}", "title": "" }, { "docid": "182e2ef60af238ac7b9b0ef871d75d2a", "score": "0.41393453", "text": "protected function authNtlmMessageType3( $challenge, $user, $password, $workstation, $domain )\n {\n $domain = chunk_split( $domain, 1, \"\\x00\" );\n $user = chunk_split( $user, 1, \"\\x00\" );\n $workstation = chunk_split( $workstation, 1, \"\\x00\" );\n $lm = '';\n $ntlm = $this->authNtlmResponse( $challenge, $password );\n $session = '';\n\n $domainOffset = 64;\n $userOffset = $domainOffset + strlen( $domain );\n $workstationOffset = $userOffset + strlen( $user );\n $lmOffset = $workstationOffset + strlen( $workstation );\n $ntlmOffset = $lmOffset + strlen( $lm );\n $sessionOffset = $ntlmOffset + strlen( $ntlm );\n\n $parts = array(\n \"NTLMSSP\\x00\",\n \"\\x03\\x00\\x00\\x00\",\n $this->authNtlmSecurityBuffer( $lm, $lmOffset ),\n $this->authNtlmSecurityBuffer( $ntlm, $ntlmOffset ),\n $this->authNtlmSecurityBuffer( $domain, $domainOffset ),\n $this->authNtlmSecurityBuffer( $user, $userOffset ),\n $this->authNtlmSecurityBuffer( $workstation, $workstationOffset ),\n $this->authNtlmSecurityBuffer( $session, $sessionOffset ),\n \"\\x01\\x02\\x00\\x00\",\n $domain,\n $user,\n $workstation,\n $lm,\n $ntlm\n );\n\n return implode( '', $parts );\n }", "title": "" }, { "docid": "73e4a03b9d12e9c794334c3b6d59a850", "score": "0.41365725", "text": "function is_ssl() {\n if(isset($_SERVER['HTTPS']) && ('1' == $_SERVER['HTTPS'] || 'on' == strtolower($_SERVER['HTTPS']))){\n return true;\n }elseif(isset($_SERVER['SERVER_PORT']) && ('443' == $_SERVER['SERVER_PORT'] )) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "53bff779f2c815922bba9b8cabe42f0b", "score": "0.4135", "text": "public function ssl_set($key , $cert , $ca , $capath , $cipher) {}", "title": "" }, { "docid": "e50c45ef96201ee83fc4fdcd4853dd81", "score": "0.41341949", "text": "function initialiseSocket() {\n\t$out = \"<message>\";\n\t$out .= \"<header>\";\n\t$out .= \"<sender>website</sender>\";\n\t$out .= \"<receiver>server</receiver>\";\n\t$out .= \"</header>\";\n\t$out .= \"<function>authentication</function>\";\n\t$out .= \"<context>\";\n\t$out .= \"<password>solarwinds123</password>\";\n\t$out .= \"<clientName>Website</clientName>\";\n\t$out .= \"<type>website</type>\";\n\t$out .= \"</context>\";\n\t$out .= \"</message>\";\n\n\treturn xmlCheckAck(messageSocket($out));\n}", "title": "" }, { "docid": "e89a407cbed789ee8774b35a258d5088", "score": "0.41336372", "text": "function user ($user = \"\")\n\t{\n\n\t\tif(empty($user))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 user: no user id submitted\";\n\t\t\treturn false;\n\t\t}\n\t\tif(!isset($this->FP))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 user: connection not established\";\n\t\t\treturn false;\n\t\t}\n\t\t$reply = $this->send_cmd(\"USER $user\");\n\n\t\tif(!$this->is_ok($reply))\n\t\t{\n\t\t\t$this->ERROR = \"POP3 user: Error [$reply]\";\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "159527bbe203d6717a9ffa419c0e8abd", "score": "0.41269112", "text": "function MyApp_Session_User_Init()\n {\n $this->GoHTTPS();\n if (!$this->MyApp_Session_User_InitBySID())\n {\n $this->MyApp_Session_User_InitByAuth();\n }\n }", "title": "" }, { "docid": "a693d8d203e6d706c04d2407aeb4a750", "score": "0.41266537", "text": "public function includeHtpassToUrl($url)\n {\n $parsedUrl = parse_url($url);\n if (isset($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) && !isset($parsedUrl['user']) && !isset($parsedUrl['password'])) {\n $http = 'http://';\n $https = 'https://';\n $htpsw = $_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW'] . '@';\n $url = str_replace(array($http, $https), array($http . $htpsw, $https . $htpsw), $url);\n }\n\n return $url;\n }", "title": "" }, { "docid": "e8623c5a97affec2439724228b3e43a2", "score": "0.4124847", "text": "function login($silent=false){\n\tglobal $salt;\n\tglobal $saltroot;\n\t$salt2=$saltroot.$_SERVER['REMOTE_ADDR'].date('Y-m-j-h',time()-3600);\n\tglobal $_COOKIE;\n\tglobal $_SERVER;\n\t\n\t//check cookie authenticity\n\t$login=isset($_COOKIE['login'])?$_COOKIE['login']:null;\n\t$dispname=isset($_COOKIE['dispname'])?$_COOKIE['dispname']:null;\n\t$userid=isset($_COOKIE['userid'])?$_COOKIE['userid']:null;\n\t$auth=isset($_COOKIE['auth'])?$_COOKIE['auth']:null;\n\n\t$groupnames=isset($_COOKIE['groupnames'])?$_COOKIE['groupnames']:null;\n\t\n\t$auth_=md5($salt.$userid.$groupnames.$salt.$login.$salt.$dispname);\n\t$auth2_=md5($salt2.$userid.$groupnames.$salt2.$login.$salt2.$dispname);\n\t\n\tif (!isset($login)||(!hash_equals($auth,$auth_)&&!hash_equals($auth,$auth2_))||$auth=='') {\n\t\t$tail='';\n\t\tif (isset($_GET['keynav'])) $tail='?keynav';\n\t\t\t\t\n\t\tif (!$silent) header('location: login.php?from='.$_SERVER['PHP_SELF'].$tail); else {header('HTTP/1.0 403 Forbidden');header('X-STATUS: 403');die('.');}\n\t\tdie();\n\t}\n\tif ($auth==$auth2_){\n\t\tsetcookie('auth',$auth_);\n\t}\n\n}", "title": "" }, { "docid": "687989dd7f7a110214c0235676973a23", "score": "0.41215828", "text": "function wpc_url_login(){\n\treturn \"http://ThisIsD3.com/\"; // your URL here\n}", "title": "" }, { "docid": "a48a2fed4e2ae410a4920451ce4acb87", "score": "0.41199023", "text": "public static function useSS2() {\n return function_exists('openssl_pkey_get_public');\n }", "title": "" }, { "docid": "875799ad03cd7de753a308ca2888729d", "score": "0.41161576", "text": "public function testIsValidSignUsingX509certMulti()\n {\n $settingsDir = TEST_ROOT .'/settings/';\n include $settingsDir.'settings6.php';\n \n $settings = new OneLogin_Saml2_Settings($settingsInfo);\n\n $xml = file_get_contents(TEST_ROOT . '/data/responses/signed_message_response.xml.base64');\n $response = new OneLogin_Saml2_Response($settings, $xml);\n $this->assertTrue($response->isValid());\n }", "title": "" }, { "docid": "56da275ffdbebc23c172bf520ea890a6", "score": "0.41152358", "text": "function cu_phpmailer_init($PHPMailer) {\n\n $smc_keychain = new smc_keychain('petethepanther!');\n\n $PHPMailer->IsSMTP();\n $PHPMailer->SMTPAuth = true;\n $PHPMailer->SMTPSecure = 'tls';\n $PHPMailer->Host = 'smtp.gmail.com';\n $PHPMailer->Port = 587;\n $PHPMailer->Username = $smc_keychain->get('email_username');\n $PHPMailer->Password = $smc_keychain->get('email_password');\n\n }", "title": "" } ]
68c80ac76bc202448bb43e572b7d140d
Provide support for website id filter
[ { "docid": "b455fc06ab7e5505f12fc52cdef85ddd", "score": "0.0", "text": "public function addFieldToFilter($field, $condition = null)\n {\n if ($field == 'website_ids') {\n return $this->addWebsiteFilter($condition);\n }\n\n if ($field == 'customer_ids') {\n return $this->addCustomerFilter($condition);\n }\n\n parent::addFieldToFilter($field, $condition);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "43ceaa8e4eb0461436dc96664eb60667", "score": "0.65592295", "text": "public function getWebSiteId();", "title": "" }, { "docid": "fef95a1a0ea98b88437d6158f781df6a", "score": "0.61742526", "text": "function add_id_to_ucfhb($url) {\n if ( (false !== strpos($url, 'bar/js/university-header.js')) || (false !== strpos($url, 'bar/js/university-header-full.js')) ) {\n remove_filter('clean_url', 'add_id_to_ucfhb', 10, 3);\n return \"$url' id='ucfhb-script\";\n }\n return $url;\n}", "title": "" }, { "docid": "f20bd13674033470984765ada33918bf", "score": "0.58723146", "text": "public function checkWebsiteId()\n {\n if (!Mage::getStoreConfig('shoppimon/settings/website_id')) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);\n $url = self::SHOPPIMON_BASE_URL . 'website?base_url=' . $baseUrl;\n $headers = [\n 'Content-Type: application/json',\n 'Authorization: Bearer ' . Mage::getSingleton('admin/session')->getShoppimonToken()\n ];\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n $websiteCollection = curl_exec($ch);\n\n if ($websiteCollection) {\n $websiteCollection = json_decode($websiteCollection);\n if (\n isset($websiteCollection->_embedded) &&\n isset($websiteCollection->_embedded->website) &&\n 1 == count($websiteCollection->_embedded->website)\n ) {\n $websiteId = $websiteCollection->_embedded->website[0]->id;\n Mage::getConfig()->saveConfig('shoppimon/settings/website_id', $websiteId, 'default', 0);\n Mage::app()->getStore()->resetConfig();\n }\n }\n }\n }", "title": "" }, { "docid": "5efc2c41aeecc2bebeeaabffe80478bc", "score": "0.5779844", "text": "function fix_get_id ( $w ) \r\n\t{\r\n\t \t preg_match(\"#(.*)(-|/)(.*)(-|/)(.*)#\", $w, $match);\r\n\t\t return array($match[3],$match[1] . '-' . $match[3] . '-' . $match[5]);\r\n\t}", "title": "" }, { "docid": "6a3bd0de956433fdef0ba992897d3658", "score": "0.5713102", "text": "function getwebsiteid($user_id, $website_name)\n {\n //$this->database->query($query);\n $sql = \"select * from website where website_name = '$website_name' and user_id = '$user_id'\";\n $result_set = $this->database->query($sql);\n return $result_set; \n }", "title": "" }, { "docid": "12285d76fa6fa4a6917b457664e3c0b3", "score": "0.5685136", "text": "function html_uniqueIDs($xml){\n\t\t\t$idArray = array();\n\t\t\tforeach($xml->xpath(\"//@id\") as $xres){\n\t\t\t\t$actID = (string)$xres;\n\t\t\t\tif(!stristr($actID, 'tb-page-id')){\n\t\t\t\t $actID = \"PC-TB-\".$actID;\n\t\t\t\t}\n\t\t\t\tif(in_array($actID, $idArray)){\n\t\t\t\t\t $actID = $actID.\"-\".count($idArray);\n\t\t\t\t\t $idArray[] = $actID;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $idArray[] = $actID;\n\t\t\t\t}\n\t\t\t\t$xres[0] = $actID;\n\t\t\t}\n\t\t\treturn $xml;\n\t}", "title": "" }, { "docid": "2678c3b75f09c080d1f286e8fb08493c", "score": "0.5679929", "text": "static function url_to_id($module,$url,$all_alias){\n\t\t\t$id = '';\n\t\t\t$clear_url = trim($url,' /');\n\t\t foreach ($all_alias[$module] as $key => $value) {\n\t\t \tif($clear_url == $value['varUrlAlias']){\n\t\t\t\t\t$id = $key;\n\t\t \t}\n\t\t }\n\t\t return $id;\n\t}", "title": "" }, { "docid": "afd1ba8a1237b9b9ed77c254f0672c12", "score": "0.5616004", "text": "function preg_get_handle_by_webid($array) {\n $webid = urldecode($array[1]);\n if (preg_match('/^http(s?):/', $webid)) {\n $person = new MyProfile($webid, BASE_URI, SPARQL_ENDPOINT);\n $person->load();\n $name = $person->get_name();\n $nick = $person->get_nick();\n \n $ret = ' <a href=\"view.php?webid=' . urlencode($webid) . '\">';\n $ret .= ($nick != null) ? '@' . $nick : '@' . $name;\n $ret .= '</a>';\n return $ret;\n }\n}", "title": "" }, { "docid": "cda973c5da524945261e4a1f08fcacb3", "score": "0.56145436", "text": "function get_url_id($str) {\r\n\t$search = array('%F1','%E1','%FA','%E9','%ED','%F3','+');\r\n\t$replace= array('n', 'a', 'u', 'e', 'i', 'o', '_');\r\n\t\r\n\treturn str_replace($search, $replace, urlencode(strtolower($str)));\r\n}", "title": "" }, { "docid": "aa1e290b4f81e35785455ebfc32514ca", "score": "0.55864555", "text": "public function id()\n {\n /**\n * @see http://stackoverflow.com/a/5831191/1942303\n */\n preg_match( '~https?://\n (?:[0-9A-Z-]+\\.)? # Optional subdomain.\n (?: # Group host alternatives.\n youtu\\.be/ # Either youtu.be,\n | youtube # or youtube.com or\n (?:-nocookie)? # youtube-nocookie.com\n \\.com # followed by\n \\S* # Allow anything up to VIDEO_ID,\n [^\\w\\s-] # but char before ID is non-ID char.\n ) # End host alternatives.\n ([\\w-]{11}) # $1: VIDEO_ID is exactly 11 chars.\n (?=[^\\w-]|$) # Assert next char is non-ID or EOS.\n (?! # Assert URL is not pre-linked.\n [?=&+%\\w.-]* # Allow URL (query) remainder.\n (?: # Group pre-linked alternatives.\n [\\'\"][^<>]*> # Either inside a start tag,\n | </a> # or inside <a> element text contents.\n ) # End recognized pre-linked alts.\n ) # End negative lookahead assertion.\n [?=&+%\\w.-]* # Consume any URL (query) remainder.\n ~ix', $this->url, $matches );\n\n return $matches[1];\n }", "title": "" }, { "docid": "11d81ef53f29bbd24b35fca4755cfe25", "score": "0.5563787", "text": "public function getIdPId(){\n return \"https://www.idp.com\";\n }", "title": "" }, { "docid": "0c2a898a736f46a8e7f528b645da29f7", "score": "0.5555151", "text": "public function getIdweb()\n {\n return $this->idweb;\n }", "title": "" }, { "docid": "b1e25d8f7d751f7e91028924e5ec99c8", "score": "0.5512997", "text": "function site_id_callback() {\n\n echo \"<input name='livefyre_site_id' value='\" . esc_attr( get_option( 'livefyre_site_id' ) ) . \"' />\";\n\n }", "title": "" }, { "docid": "8f8320d0c0834025178c9897144345a3", "score": "0.5500738", "text": "public function getCurrentSiteId();", "title": "" }, { "docid": "90f92e215f09edf43ee8700fbf335a4a", "score": "0.54985154", "text": "function UserID_Filtering(&$filter) {\r\n\r\n\t\t// Enter your code here\r\n\t}", "title": "" }, { "docid": "90f92e215f09edf43ee8700fbf335a4a", "score": "0.54985154", "text": "function UserID_Filtering(&$filter) {\r\n\r\n\t\t// Enter your code here\r\n\t}", "title": "" }, { "docid": "81a579a74da8a26720316ac6c56c96b7", "score": "0.548266", "text": "function idsearch( $wp ) {\n\tglobal $pagenow;\n\n\t// If it's not the post listing return\n\tif( 'edit.php' != $pagenow )\n\t\treturn;\n\n\t// If it's not a search return\n\tif( !isset( $wp->query_vars['s'] ) )\n\t\treturn;\n\n\t// If it's a search but there's no prefix, return\n\tif( '#' != substr( $wp->query_vars['s'], 0, 1 ) )\n\t\treturn;\n\n\t// Validate the numeric value\n\t$id = absint( substr( $wp->query_vars['s'], 1 ) );\n\tif( !$id )\n\t\treturn; // Return if no ID, absint returns 0 for invalid values\n\n\t// If we reach here, all criteria is fulfilled, unset search and select by ID instead\n\tunset( $wp->query_vars['s'] );\n\t$wp->query_vars['p'] = $id;\n}", "title": "" }, { "docid": "7b2507eb53aaa0c774783493439b8ea0", "score": "0.54665965", "text": "public function getSiteCode();", "title": "" }, { "docid": "27808c3bcaefda4e939bb806e6fb20be", "score": "0.5455865", "text": "public function beforeSaveComputeTypeId(){\n if($this->type == 'youtube'){\n preg_match('/.*?=([^#]*)[#|$]?/', urldecode($this->url), $match);\n $this->type_id = $match[1];\n }\n }", "title": "" }, { "docid": "eefca3edaa6b88b65529cd1592f0b484", "score": "0.54536104", "text": "function getIdFromURL() {\n return \\dispatcher\\DefaultDispatcher::instance()->getMatched()->getParam(\"id\");\n}", "title": "" }, { "docid": "ec1236f6838812222340d1adea7bc342", "score": "0.5452663", "text": "public static function articleIdProvider()\n {\n return array(\n array('http://www.huffingtonpost.com/2012/04/20/vegan-is-love-book_n_1441699.html?ncid=edlinkusaolp00000003', 1441699),\n array('http://www.huffingtonpost.com/2012/05/03/daniel-chong-cell-four-days-survival-mode_n_1473753.html', 1473753),\n array('http://www.huffingtonpost.com/2012/05/02/cardinal-anthony-bevilacqua-punished-priest_n_1472169.html?ref=topbar', 1472169),\n array('http://www.huffingtonpost.com/2012/04/27/dentist-dropped-tool-down-throat-lena-david-wb-galbreath_n_1459745.html', 1459745),\n array('http://www.huffingtonpost.com/randy-fox/cleveland-ohio-and-its-accordion-king_b_1465943.html?ref=travel', 1465943),\n );\n }", "title": "" }, { "docid": "6de3f87b87e0f08e67e0e0024258c893", "score": "0.54309887", "text": "function custom_query_vars_filter($vars) {\n $vars[] = 'kraanid' ;\n\t$vars[] .= 'lijst_id';\nreturn $vars;\n}", "title": "" }, { "docid": "efb3fa4b15cf2bc016d60ce46eb12db9", "score": "0.54113793", "text": "function getId()\r\n\t{\t\t\t\r\n\t\t//check for embed code format\r\n\t\t//$pos_e = strpos($this->url, \"youtube.com/v/\");\r\n\t\t$pos_u = strpos($this->url, \"video/\");\r\n\r\n\t\t////TODO: User regular expression instead\r\n\t\tif ($pos_u === false) {\r\n\t\t\treturn null;\r\n\t\t} else if ($pos_u) {\r\n\t\t\t$pos_u_start = $pos_u + 6;\r\n\r\n\t\t\t$code = substr($this->url, $pos_u_start);\r\n\t\t\t$code = strip_tags($code );\r\n\t\t\t$code = preg_replace(\"/[^a-zA-Z0-9s_-]/\", \"\", $code);\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\treturn $code;\r\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.5402068", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.5402068", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.5402068", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "24731ee8c9385a46357948648f039b4d", "score": "0.53967345", "text": "public function getIdFromUrl($url);", "title": "" }, { "docid": "a525cee7bcb9b39e663ac364cc3433ac", "score": "0.5384717", "text": "protected function _prepareWebsiteIds()\n {\n return $this;\n }", "title": "" }, { "docid": "5408ded86eb0f682c750dabba67f02db", "score": "0.5384495", "text": "protected function extractID()\n {\n }", "title": "" }, { "docid": "bda293e6843756441cb12219c627c22d", "score": "0.5383174", "text": "function _get_list_id($link){\n $start = strpos($link, \"list=\") + 5;\n $end = strpos($link, \"&\", $start);\n if($end) return substr($link, $start, $end-$start);\n else return substr($link, $start);\n }", "title": "" }, { "docid": "0255e77f84c922cc11b30b38b7405267", "score": "0.5362461", "text": "public static function getUserIDFilter() {\n\n if(\\Drupal::request()->query->has('filter_uid')) {\n return \\Drupal::request()->query->getInt('filter_uid');\n }\n\n return NULL;\n }", "title": "" }, { "docid": "e5fde20ea82faecf700b5310ef34476e", "score": "0.53598535", "text": "function idQuery ($id = '') {\n global $CFG;\n global $OAI;\n\n $query = \"\n SELECT \n MD5(url) as oaiid,\n doctype,\n itemtype,\n docdate as datestamp,\n 'globalsearch' as `set`\n FROM \n {$CFG->prefix}block_search_documents \n WHERE \n \";\n\n if ($id == '') {\n $query .= 'id = id';\n } else {\n $query .= \" MD5(url) = '$id' \";\n }\n\n return $query;\n}", "title": "" }, { "docid": "c3666a585578e256f326274b290bfc4c", "score": "0.5358126", "text": "function filterId($string)\n{\n if ($string === null)\n return null;\n return preg_replace('/[^a-zA-Z0-9_-]/', '', $string);\n}", "title": "" }, { "docid": "49a9f30420fc94faf4a44701b0febcba", "score": "0.5355054", "text": "public function constructId()\n {\n $stri_index=$this->stri_url;\n //construction de l'identifiant du menu\n $stri_index=strtr($stri_index,\".&=?/- \",\"_______\");\n \n return $stri_index;\n }", "title": "" }, { "docid": "48e48c61e588ab990882237e4c9d2f57", "score": "0.53476894", "text": "public function externalId();", "title": "" }, { "docid": "82f4cfc2138eddee007d8ed32497a1f5", "score": "0.5347412", "text": "public function getWebsiteId()\n {\n return $this->_storeManager->getStore(true)->getWebsite()->getId();\n }", "title": "" }, { "docid": "ae3ff7d05c2f5dcb3c82c1eaffb24a5e", "score": "0.53462887", "text": "function idg_base_theme_add_id_to_header( $content ) {\n\n\t\t$pattern = '#(?P<full_tag><(?P<tag_name>h\\d)(?P<tag_extra>[^>]*)>(?P<tag_contents>[^<]*)</h\\d>)#i';\n\t\tif ( preg_match_all( $pattern, $content, $matches, PREG_SET_ORDER ) ) {\n\t\t\tforeach ( $matches as $match ) {\n\t\t\t\t$find[] = $match['full_tag'];\n\t\t\t\t$tag_id = sanitize_title( $match['tag_contents'] );\n\t\t\t\t$id_attr = sprintf( ' id=\"%s\"', $tag_id );\n\t\t\t\t$replace[] = sprintf( '<%1$s%2$s%3$s>%4$s</%1$s>', $match['tag_name'], $match['tag_extra'], $id_attr, $match['tag_contents'] );\n\t\t\t}\n\t\t\t$content = str_replace( $find, $replace, $content );\n\t\t}\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "5fe87a0c0bebf7018148f94f6787ce11", "score": "0.534212", "text": "protected function getSiteId()\n {\n return config('supercollege_browse.site_id');\n }", "title": "" }, { "docid": "efc61d424441e1864e35f3606cd8cefd", "score": "0.53370696", "text": "public function setSiteId( $value );", "title": "" }, { "docid": "fe443f97ff19df481f8195871782677c", "score": "0.53220904", "text": "public function getWebId() {\n return $this->web_id;\n }", "title": "" }, { "docid": "ca7817b5f76059e68958d6d71c8790f8", "score": "0.5317225", "text": "private function getDaftUniqueId($url)\n {\n $parsed = parse_url($url);\n $host = str_replace('www.', '', $parsed['host']);\n $path = trim($parsed['path'], '/');\n $arguments = explode('/', $path);\n $ad_id = end($arguments);\n\n switch ($host) {\n case ('daft.ie') :\n if (!is_numeric($ad_id)) { // normal url; numeric part is 7 chars long, missing type number\n $type = '';\n\n switch ($arguments[1]) { // analize url fragment speaking about type of property\n case ('houses-for-sale') :\n case ('apartments-for-sale'):\n case ('duplexes-for-sale'):\n case ('sites-for-sale'):\n $type = 1;\n break;\n\n case ('houses-for-rent') :\n case ('apartments-for-rent') :\n $type = 2;\n break;\n\n case ('house-share') :\n $type = 3;\n break;\n\n case ('parking-spaces-for-rent') :\n case ('parking-spaces-for-sale') :\n $type = 4;\n break;\n\n case ('commercial-property-for-rent') :\n case ('commercial-property-for-sale') :\n case ('commercial-property') :\n $type = 5;\n break;\n\n case ('holiday-homes') :\n $type = 6;\n break;\n }\n\n $aux = explode('-', $ad_id);\n $ad_id = $type . end($aux);\n }\n break;\n\n case ('rent.ie') :\n $type = \"\";\n\n switch ($arguments[0]) {\n case (\"houses-to-let\") :\n case (\"short-lets\") :\n $type = \"2\";\n break;\n\n case (\"rooms-to-rent\"):\n $type = \"3\";\n break;\n\n case (\"parking-spaces\"):\n $type = \"4\";\n break;\n\n case (\"holiday-homes\"):\n $type = \"6\";\n break;\n }\n\n $ad_id = $type . $ad_id;\n break;\n\n case (\"property.ie\") :\n $type = \"\";\n\n switch ($arguments[0]) {\n case (\"property-for-sale\") :\n $type = \"1\";\n break;\n\n case (\"property-to-let\"):\n $type = \"2\";\n break;\n }\n\n $ad_id = $type . $ad_id;\n break;\n }\n\n return intval($ad_id);\n }", "title": "" }, { "docid": "e976f2d3a72d2420a1d616c4aa224d7a", "score": "0.5313704", "text": "public function getSearchableId();", "title": "" }, { "docid": "b7e76fa4526b4250b4ad8f055f436b7f", "score": "0.53125167", "text": "public function getWebsiteId()\n {\n return $this->_storeManager->getStore()->getWebsiteId();\n }", "title": "" }, { "docid": "969fee1f2ea1e0efd1a0fc111931cdad", "score": "0.53078765", "text": "public function Generate_Blog_ID($id) {\n\n $id = str_replace(\"~\", \"_\", $id);\n $id = str_replace(\"-\", \"_\", $id);\n $id = str_replace(\" \", \"_\", $id);\n $id = str_replace(\"ä\", \"ae\", $id);\n $id = str_replace(\"ö\", \"oe\", $id);\n $id = str_replace(\"ü\", \"ue\", $id);\n $id = str_replace(\"Ä\", \"ae\", $id);\n $id = str_replace(\"Ö\", \"oe\", $id);\n $id = str_replace(\"Ü\", \"ue\", $id);\n $id = str_replace(\"ß\", \"ss\", $id);\n\n $id = str_replace(\".\", \"\", $id);\n $id = str_replace(\":\", \"\", $id);\n $id = str_replace(\",\", \"\", $id);\n $id = str_replace(\";\", \"\", $id);\n $id = str_replace(\"|\", \"\", $id);\n $id = str_replace(\"<\", \"\", $id);\n $id = str_replace(\">\", \"\", $id);\n $id = str_replace(\"@\", \"\", $id);\n $id = str_replace(\"µ\", \"\", $id);\n $id = str_replace(\"#\", \"\", $id);\n $id = str_replace(\"+\", \"\", $id);\n $id = str_replace(\"'\", \"\", $id);\n $id = str_replace(\"#\", \"\", $id);\n $id = str_replace(\"!\", \"\", $id);\n $id = str_replace(\"?\", \"\", $id);\n $id = str_replace(\"\\\\\", \"\", $id);\n $id = str_replace(\"*\", \"\", $id);\n $id = str_replace(\"{\", \"\", $id);\n $id = str_replace(\"}\", \"\", $id);\n $id = str_replace(\"(\", \"\", $id);\n $id = str_replace(\")\", \"\", $id);\n $id = str_replace(\"[\", \"\", $id);\n $id = str_replace(\"]\", \"\", $id);\n $id = str_replace(\"=\", \"\", $id);\n $id = str_replace(\"´\", \"\", $id);\n $id = str_replace(\"`\", \"\", $id);\n $id = str_replace('\"', \"\", $id);\n $id = str_replace(\"§\", \"\", $id);\n $id = str_replace(\"%\", \"\", $id);\n $id = str_replace(\"&\", \"und\", $id);\n $id = str_replace(\"/\", \"\", $id);\n\n $id = htmlentities(strtolower($id));\n\n\n return $id;\n }", "title": "" }, { "docid": "e7f078bd1c996cd94e5f416475c7d1d8", "score": "0.52998024", "text": "function filter_documents_pipeline_id( string $id ) : string {\n\tif ( get_index_version() === 2 ) {\n\t\treturn $id;\n\t}\n\treturn 'attachments';\n}", "title": "" }, { "docid": "19095f8e0544f0c970e3912466f32c66", "score": "0.5290874", "text": "function prepare_id() {\n\t\t\t// Prepare group ID\n\t\t\tif (isset($_GET[$this->url_param_grp]) && $_GET[$this->url_param_grp] != '') {\n\t\t\t\t$this->group_id = $_GET[$this->url_param_grp];\n\t\t\t} else {\n\t\t\t\t$this->group_id = false;\n\t\t\t}\n\t\t\t// Prepare image ID\n\t\t\tif (isset($_GET[$this->url_param_img]) && $_GET[$this->url_param_img] != '') {\n\t\t\t\t$this->focus_id = $_GET[$this->url_param_img];\n\t\t\t} else {\n\t\t\t\t$this->focus_id = false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c75c22b8bd2994a1b2fc9af622840daf", "score": "0.52885973", "text": "public function getModuleActiveStoresIds($idWebsite){\n // get config by id\n // get config by id\n $resource = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter('scope','stores')\n ->addFieldToFilter('value',$idWebsite);\n // now filter again by is active \n $scope_id = array();\n foreach ($resource as $val) {\n $scope_id[] = $val->getData('scope_id');\n }\n // now filter with the config set to enabledwebsite = 1\n $resource = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter('scope','stores')\n ->addFieldToFilter('scope_id',array(\"in\"=>$scope_id))\n ->addFieldToFilter('path','avisverifies/system/enabledwebsite')\n ->addFieldToFilter('value','1');\n \n $usedSotersIds = array();\n foreach ($resource as $val) {\n $usedSotersIds[] = $val->getData('scope_id');\n }\n return $usedSotersIds;\n }", "title": "" }, { "docid": "1102d7f66879c8d7ab5a543e5c9af10a", "score": "0.5261817", "text": "public static function sanitize_id( $field ) {\n\t\treturn sanitize_key( str_replace( '[', '-', str_replace( ']', '', $field['settings'] ) ) );\n\t}", "title": "" }, { "docid": "fed4ffa2bfb560c38c501f4d5835d02b", "score": "0.52588373", "text": "function web12_get_custom_id() {\n\t\t#-> example: add to template page: $templateID = 'portfolio';\n\t\t# used in header, inc/badge, footer\n\t\t\n\t\tglobal $templateID;\n\t\tif (is_home()) { return 'home'; }\n\n\t\telseif ($templateID != \"\") {\n\t\t\tif ($templateID == 468) { # DMA105: local (424?) remote 468\n\t\t\t\treturn 'dma';\n\t\t\t}\n\t\t\telseif ($templateID == 374) { # ART125: local & Remote 374\n\t\t\t\treturn 'art125';\n\t\t\t}\n\t\t\telseif ($templateID == 'post') { \t\n\t\t\t\t$category = get_the_category();\t\t\t\n\t\t\t\treturn $category[0]->slug;\n\t\t\t}\n\t\t\telseif ($templateID == 'homework') {\n\t\t\t\tif (get_the_terms( $post->ID, 'class' ) != null ) {\n\t\t\t\t\t$classArray = get_the_terms( $post->ID, 'class');\n\t\t\t\t\tforeach ( $classArray as $class ) {\n\t\t\t\t\t\t$templateID .= \" \" . $class->name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn $templateID; \n\t\t}\n\t\treturn 'general';\n\t}", "title": "" }, { "docid": "ad5b7dbe350bb41bde968999ac7e1bfe", "score": "0.5237928", "text": "function element_id($text = '') {\n $output = '';\n\n if(trim($text)){\n $output = preg_replace('/[^\\w]/','-', strtolower(strip_tags(trim($text))) );\n $output = preg_replace('/(-)\\1+/','-', $output );\n }\n\n return $output;\n}", "title": "" }, { "docid": "a3a216fdfa93b1fe247ff09506875d1c", "score": "0.5218776", "text": "private function getAllWebsiteIds()\n {\n $adapter = $this->destination->getAdapter();\n $query = $adapter->getSelect()\n ->from(\n $this->destination->addDocumentPrefix('store_website'),\n ['website_id']\n )\n ->where(\"website_id != 0\")\n ;\n $result = $query->getAdapter()->fetchAll($query);\n if ($result) {\n $websiteIds = [];\n foreach ($result as $website) {\n $websiteIds[] = (int)$website['website_id'];\n }\n return $websiteIds;\n }\n return false;\n }", "title": "" }, { "docid": "6fce80a461badfc5a3a6c7b925c1ef51", "score": "0.52122515", "text": "protected function getStoreId($id = '')\r\n {\r\n $id .= ':'.$this->getState('filter.search');\r\n $id .= ':'.$this->getState('filter.published');\r\n $id .= ':'.$this->getState('filter.user_id');\r\n $id .= ':'.$this->getState('filter.person_status');\r\n $id .= ':'.$this->getState('filter.sripf_id');\r\n $id .= ':'.$this->getState('filter.payment_status');\r\n $id .= ':'.$this->getState('filter.subscription_status');\r\n $id .= ':'.$this->getState('filter.by_year');\r\n\r\n return parent::getStoreId($id);\r\n }", "title": "" }, { "docid": "f0ecf9655bd1e17f85eaa24d15b35920", "score": "0.518671", "text": "protected function getStoreId($id = '')\r\n\t{\r\n\t\t$id\t.= ':'.$this->getState('filter.search');\t\t\r\n\t\t\r\n\t\treturn parent::getStoreId($id);\r\n\t}", "title": "" }, { "docid": "d4173357db4614640802211094f498b2", "score": "0.5175563", "text": "protected function getStoreId ($id = '')\r\n\t{\r\n\t // Compile the store id.\r\n\t $id .= ':' . $this->getState('filter.search');\t \r\n\t $id .= ':' . $this->getState('filter.published');\t \r\n\t $id .= ':' . serialize($this->getState('filter.author_id'));\r\n\t $id .= ':' . serialize($this->getState('filter.contest_id'));\r\n\t \r\n\t return parent::getStoreId($id);\r\n\t}", "title": "" }, { "docid": "11c3fad196b355a7b0340f0b0fca5ead", "score": "0.51751405", "text": "private function _setSafeId($id){\n return preg_replace('/[^A-Za-z0-9\\-]/', '', str_replace(array(' ', '-'), '_', $id)); // Removes special chars.\n }", "title": "" }, { "docid": "810a05690b180d66424033c9b7086ada", "score": "0.51507837", "text": "function _getShorturlID($len){\r\n\t$mask = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n\t$buffer = \"\";\r\n\t\r\n\tfor($x = 0;$x<$len;$x++){\r\n\t\t$buffer .= $mask[rand(0,strlen($mask) -1)];\r\n\t}\r\n\treturn $buffer;\r\n}", "title": "" }, { "docid": "4ea97540a71385ab1891cc450d793e76", "score": "0.5149267", "text": "function idclean(string $input, int $max = Wcms\\Model::MAX_ID_LENGTH): string\n{\n $regex = '%[^a-z0-9-_]%';\n $input = urldecode($input);\n $input = strip_tags($input);\n\n if (preg_match($regex, $input)) {\n $search = ['é', 'à', 'è', 'ç', 'ù', 'ü', 'ï', 'î', ' '];\n $replace = ['e', 'a', 'e', 'c', 'u', 'u', 'i', 'i', '-'];\n $input = str_replace($search, $replace, $input);\n\n $input = preg_replace($regex, '', strtolower(trim($input)));\n\n $input = substr($input, 0, $max);\n }\n return $input;\n}", "title": "" }, { "docid": "8a8b379b57bd53356d18a6beda184cc3", "score": "0.5141258", "text": "private function createSliceID()\n {\n $urlFilter = URLSegmentFilter::create();\n if ($sliceID = $urlFilter->filter($this->getField('Title'))) {\n if (!PageSlice::get()->find('SliceID', $sliceID) || PageSlice::get()->find('SliceID', $sliceID)->ID === $this->ID) {\n $this->setField('SliceID', $sliceID);\n } else {\n $this->setField('SliceID', \"$sliceID-{$this->ID}\");\n }\n }\n }", "title": "" }, { "docid": "9a8ecf76a038b81ff7deee3fa461b3d0", "score": "0.51383084", "text": "function get_id($url) {\n $e = explode('/', $url);\n $last = end($e);\n $id = str_replace('watch?v=', '', $last);\n\n return $id;\n }", "title": "" }, { "docid": "a1a796d56fca27a13a31c5954d74392c", "score": "0.5122503", "text": "public function sanitize_field_id( $id ) {\n\t\t\\the_seo_framework()->_deprecated_function( 'the_seo_framework()->sanitize_field_id()', '4.0.0', 'the_seo_framework()->s_field_id()' );\n\t\treturn preg_replace( '/[^a-zA-Z0-9\\[\\]_\\-@]/', '', $id );\n\t}", "title": "" }, { "docid": "e5d62b6fed2509abc0bd596aff36f2ab", "score": "0.5116668", "text": "function getExactEntityId($enttName)\r\n{\r\n\tglobal $stdentities;\r\n\t//print_r($stdentities);\r\n\t//pattern:- EntityList_Id EntityName inactive desc_name\r\n\t$exact_ennt_id = 0;\r\n\tforeach ($stdentities as $key => $value) {\r\n\t\t$split_stdentities = explode('#', $value); \r\n\t\tif(strtolower($split_stdentities[1]) == strtolower($enttName)) {\r\n\t\t\t$exact_ennt_id = $split_stdentities[0];\r\n\t\t\tbreak;\r\n\t\t}\t\t\t\t\r\n\t}\t\t\r\n\tif($exact_ennt_id == 0)\r\n\t{\r\n\t\treturn $exact_ennt_id;\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn $exact_ennt_id;\r\n\t}\r\n}", "title": "" }, { "docid": "d5fd16d9ce42e4d7842e074baf21e629", "score": "0.5109826", "text": "function build_listing_id()\n{\n\tglobal $_REQUEST;\n\tglobal $scripts_variables;\n\t$result_vars=\"\";\n\n\tfor($i=0;$i<count($scripts_variables);$i++) \n\t{\n\t\t$value=\"\";\n\t\tif(isset($_REQUEST[$scripts_variables[$i]]))\n\t\t{\n\t\t\t$value=result($_REQUEST[$scripts_variables[$i]]);\n\t\t}\n\t\t\t$result_vars.=$i.\"-\".$value;\n\n\t}\n\n\treturn $result_vars;\n}", "title": "" }, { "docid": "ab095dec5b3408df896985e0f9d5bbbb", "score": "0.51097846", "text": "public function getExternalId();", "title": "" }, { "docid": "ab095dec5b3408df896985e0f9d5bbbb", "score": "0.51097846", "text": "public function getExternalId();", "title": "" }, { "docid": "d092bca9ae7a9b3704c1b7b9fb5fa12d", "score": "0.5089731", "text": "function encode_id_for_url($id) {\n\treturn (random_number(2) . ($id + $id) . random_number(2));\n}", "title": "" }, { "docid": "29defe16a1571c053cdd4167fbb3a91d", "score": "0.50865686", "text": "function getRedById($str) {\n\t\t$pos = strpos($str, 'link=');\t\t\n\t\tif($pos!=false){\n\t\t\treturn substr($str, $pos+5);\t\t\t\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "4f719d35edc81c41cfdb667a14164d16", "score": "0.5073246", "text": "function add_query_vars_filter( $vars ){\n\t\t$vars[] = \"payment_id\";\n\t\t$vars[] = \"id\";\n\t\treturn $vars;\n\t\t}", "title": "" }, { "docid": "aab70fe5410a20a5805de439e46d1522", "score": "0.5061279", "text": "function get_Analytics_ID()\r\n{\r\n\tif(!isset($_COOKIE['_ga'])) {\r\n\t\treturn \"n/a\";\r\n\t}\r\n\telse {\t\r\n\t\t$temp = filter_var_array(explode(\".\",preg_replace(\"/[^0-9\\.]/\",\"\",$_COOKIE['_ga'])),FILTER_VALIDATE_INT);\r\n\t\treturn $temp[2].\".\".$temp[3];\r\n\t}\r\n}", "title": "" }, { "docid": "162428a5f982e95435b757157dfac453", "score": "0.5053594", "text": "function fubik_id_safe($string) {\n // Strip accents\n $accents = '/&([A-Za-z]{1,2})(tilde|grave|acute|circ|cedil|uml|lig);/';\n $string = preg_replace($accents, '$1', htmlentities(utf8_decode($string)));\n // Replace with dashes anything that isn't A-Z, numbers, dashes, or underscores.\n $string = strtolower(preg_replace('/[^a-zA-Z0-9_-]+/', '-', $string));\n // If the first character is not a-z, add 'n' in front.\n if (!ctype_lower($string{0})) { // Don't use ctype_alpha since its locale aware.\n $string = 'id' . $string;\n }\n return $string;\n}", "title": "" }, { "docid": "a859c9ac97cbbb25c099bd1f09453b0a", "score": "0.5038163", "text": "function yourls_filter_unique_id($function) {\n // If given a string (function name)\n if ( is_string( $function ) ) {\n return $function;\n }\n\n if ( is_object( $function ) ) {\n // Closures are implemented as objects\n $function = [ $function, '' ];\n }\n else {\n $function = (array)$function;\n }\n\n // Object Class Calling\n if ( is_object( $function[0] ) ) {\n return spl_object_hash( $function[0] ).$function[1];\n }\n\n // Last case, static Calling : $function[0] is a string (Class Name) and $function[1] is a string (Method Name)\n return $function[0].'::'.$function[1];\n}", "title": "" }, { "docid": "41254daee5818bdc9e3e25011d9f8eec", "score": "0.5037956", "text": "public function get_version_id_filter() {\n return $this->get_filter_value(self::FILTER_VERSIONID);\n }", "title": "" }, { "docid": "b5f331872aad827cafad0f248db9676e", "score": "0.50310385", "text": "public function addIdFilter($ids)\n {\n if (is_array($ids)) {\n if (empty($ids)) {\n $this->addFieldToFilter('website_id', null);\n } else {\n $this->addFieldToFilter('website_id', array('in' => $ids));\n }\n } else {\n $this->addFieldToFilter('website_id', $ids);\n }\n return $this;\n }", "title": "" }, { "docid": "4702a51a8ba522f9386157494970f4eb", "score": "0.5019683", "text": "function FeedId ()\n\t{\n\t\t$this->id = md5($this->url);\n\t}", "title": "" }, { "docid": "e10f164c915dce5a1e8ddea425ee4d28", "score": "0.50171983", "text": "private function getFilterValueFromUrl($value)\n {\n try {\n if ($item = $this->iriConverter->getItemFromIri($value)) {\n return $this->propertyAccessor->getValue($item, 'id');\n }\n } catch (\\InvalidArgumentException $e) {\n // Do nothing, return the raw value\n }\n\n return $value;\n }", "title": "" }, { "docid": "0d642a5a163500a33b0de58fb2f037a3", "score": "0.5016573", "text": "function getUrlId($url){\r\n $conn = connect();\r\n\r\n $sql= $conn->query(\"SELECT id FROM shorturl WHERE original_url='$url'\") or die(\"id retrieve fail\");\r\n \r\n if($sql->num_rows ==1 ){\r\n return $sql->fetch_assoc()['id'];\r\n }else{\r\n return false;\r\n }\r\n \r\n}", "title": "" }, { "docid": "28060f5d1ea59ef37cbdf657a81bf6a9", "score": "0.50158244", "text": "public function getSiteId() : string\n {\n return $this->site_id;\n }", "title": "" }, { "docid": "0c93daa9c62b3d22268465e3c23789d0", "score": "0.501141", "text": "protected static function filterToken($id) {\n\t\treturn str_replace(array('\\\\', '*', '(', ')', \"\\0\", \t',', '+', '\"', '<', '>', ';'), \n\t\t\t\t\t\tarray('\\\\5c', '\\\\2a', '\\\\28', '\\\\29', '\\\\00','\\\\,', '\\\\+', '\\\\\"', '\\\\<', '\\\\>', '\\\\;'), \n\t\t\t\t\t\t$id);\n\t}", "title": "" }, { "docid": "b4443c4823c9b304b74b7643a0267073", "score": "0.50056314", "text": "function getUrlId($strPrefix='') {\n return (SID == '') ? '' : $strPrefix . encodeText(SID);\n}", "title": "" }, { "docid": "a5ed9f06310c3d7ef3aeab8ff2880987", "score": "0.50051075", "text": "public function setWebsiteFilter($websiteId)\n {\n return $this->addFieldToFilter('website_id', $websiteId);\n }", "title": "" }, { "docid": "e441806e70348280c2e3d015a5bfac87", "score": "0.5003169", "text": "function VideoID($url){\n\n if(strpos($url, \"vimeo.com\")){\n if(strpos($url, 'vimeo.com/')){\n $val = strrpos($url, 'vimeo.com/')+10;\n $str = substr($url, $val);\n return '<iframe src=\"https://player.vimeo.com/video/'.$str.'\" width=\"854\" height=\"480\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';\n } \n }else if(strpos($url, \"youtube.com\")){\n if(strpos($url, '?v=')){\n $val = strrpos($url, '?v=')+3;\n $str = substr($url, $val);\n return '<iframe width=\"854\" height=\"480\" src=\"https://www.youtube.com/embed/'.$str.'\" frameborder=\"0\" allowfullscreen></iframe>';\n } \n }\n }", "title": "" }, { "docid": "cddf518b980a360daa9bff75bebe3b05", "score": "0.50017864", "text": "public function get_policy_id_filter() {\n return $this->get_filter_value(self::FILTER_POLICYID);\n }", "title": "" }, { "docid": "ddf42000bdff32f8752da8ca44592031", "score": "0.4997488", "text": "protected function getStoreId($id = ''): string\n\t{\n\t\t$id .= ':' . $this->getState('filter.search');\n\t\t$id .= ':' . $this->getState('filter.published');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "16a8e0cabab32260cf5af41875adc9eb", "score": "0.4997439", "text": "function clientId(){\n $id = webUserId();\n if($id=='0'){\n $id = webTempUserId();\n }\n\n return $id;\n}", "title": "" }, { "docid": "67b710e3ce21c46e853ac46802a9f32f", "score": "0.4993974", "text": "function getFacebookId();", "title": "" }, { "docid": "b9538bd2ae2db75c1eefc13bb171d3a5", "score": "0.4992799", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id .= ':' . $this->getState('filter.search');\n\t\t$id .= ':' . $this->getState('filter.state');\n\n \n return parent::getStoreId($id);\n \n\t}", "title": "" }, { "docid": "6aa998bd2161648ab62dcb4160f79c53", "score": "0.49874735", "text": "function filter_url($filter = array()) {\n\t\tforeach ($filter as $patern ) {\n\t\t\n\t\t\tif ( strpos($this->url_in, $patern) !== FALSE ) {\n\t\t\t\n\t\t\t\tunset($this->get_vars);\n\t\t\t\t$this->url = $this->url_in;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "f0bfbb80217d86b412bd447d740382d1", "score": "0.49845755", "text": "function configurar_identidad(){\n\tecrire_meta('slogan_site', _T('observatorio:identidad_titulo_sitio'));\n\tecrire_meta('nom_site', _T('observatorio:identidad_eslogan_sitio'));\n\tecrire_meta('descriptif_site', _T('observatorio:identidad_descripcion_sitio'));\n}", "title": "" }, { "docid": "235f04d503ca5b69799f0471ca6621f2", "score": "0.4981138", "text": "function dfcg_ui_id() {\r\n\tglobal $dfcg_options;\r\n\t?>\r\n\t\r\n\t<div class=\"dfcg-panel-id-opts <?php if( $dfcg_options['populate-method'] !== 'id-method' ) echo 'hidden'; ?>\">\r\n\t\r\n\t<h3 class=\"not-top\" id=\"id-method\">ID METHOD <?php _e('Settings', DFCG_DOMAIN); ?></h3>\r\n\t<p><?php _e('Configure the ID Method settings here.', DFCG_DOMAIN); ?></p>\r\n\t<table class=\"optiontable form-table\">\r\n\t\t<tbody>\r\n\t\t\t<tr>\r\n\t\t\t\t<th scope=\"row\"><?php _e('Page/Post ID numbers:', DFCG_DOMAIN); ?></th>\r\n\t\t\t\t<td width=\"30px\"><a class=\"dfcg-local-tip\" href=\"#dfcg-tip-id-numbers\" rel=\"#dfcg-tip-id-numbers\" title=\"<?php _e('Tip: Page/Post ID numbers', DFCG_DOMAIN); ?>\"><img src=\"<?php echo DFCG_TIP_URL . '/help.png'; ?>\" alt=\"\" /></a></td>\r\n\t\t\t\t<td><input name=\"dfcg_plugin_settings[ids-selected]\" id=\"dfcg-ids-selected\" size=\"75\" value=\"<?php echo $dfcg_options['ids-selected']; ?>\" /></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th scope=\"row\"><?php _e('Use Custom Image Order:', DFCG_DOMAIN); ?></th>\r\n\t\t\t\t<td><a class=\"dfcg-local-tip\" href=\"#dfcg-tip-id-sort\" rel=\"#dfcg-tip-id-sort\" title=\"<?php _e('Tip: Custom Image Order', DFCG_DOMAIN); ?>\"><img src=\"<?php echo DFCG_TIP_URL . '/help.png'; ?>\" alt=\"\" /></a></td>\r\n\t\t\t\t<td><input name=\"dfcg_plugin_settings[id-sort-control]\" id=\"dfcg-id-sort-control\" type=\"checkbox\" value=\"1\" <?php checked('true', $dfcg_options['id-sort-control']); ?> /></td>\r\n\t\t\t</tr>\r\n\t\t\r\n\t\t\t<?php if ( !is_multisite() ) : ?>\r\n\t\r\n\t\t\t<tr>\r\n\t\t\t\t<th scope=\"row\"><?php _e('Specify a default image:', DFCG_DOMAIN); ?></th>\r\n\t\t\t\t<td><a class=\"dfcg-local-tip\" href=\"#dfcg-tip-id-def\" rel=\"#dfcg-tip-id-def\" title=\"<?php _e('Tip: Default Image', DFCG_DOMAIN); ?>\"><img src=\"<?php echo DFCG_TIP_URL . '/help.png'; ?>\" alt=\"\" /></a></td>\r\n\t\t\t\t<td><input name=\"dfcg_plugin_settings[defimgid]\" id=\"dfcg-defimgid\" size=\"75\" value=\"<?php echo $dfcg_options['defimgid']; ?>\" /></td>\r\n\t\t\t</tr>\r\n\t\t\t\r\n\t\t\t<?php endif; // End if MS ?>\r\n\t\t\t\r\n\t\t</tbody>\r\n\t</table>\r\n\t\r\n\t</div><!-- end .dfcg-panel-id-opts -->\r\n\t\r\n\t<!-- Tool tips -->\r\n\t<?php if ( !is_multisite() ) : ?>\r\n\t<div class=\"dfcg-tip-hidden\" id=\"dfcg-tip-id-def\">\r\n\t\t<p><?php _e(\"This image will be displayed in the event that your selected Page/Post ID's do not have an image specified in the DCG Metabox Image URL field.\", DFCG_DOMAIN); ?></p>\r\n\t\t<p><?php _e('Upload a suitable image to your server and enter the absolute URL to this default image.', DFCG_DOMAIN); ?></p>\r\n\t\t<p><?php _e('For example: ', DFCG_DOMAIN); ?><em>http://www.yourdomain.com/somefolder/anotherfolder/mydefaultimage.jpg</em></p>\r\n\t</div>\r\n\t<?php endif; // End if MS ?>\r\n\r\n\t<div class=\"dfcg-tip-hidden\" id=\"dfcg-tip-id-numbers\">\r\n\t\t<p><?php _e(\"Enter ID's in a comma separated list with no spaces, eg: 2,7,8,19,21\", DFCG_DOMAIN); ?></p>\r\n\t</div>\r\n\t<div class=\"dfcg-tip-hidden\" id=\"dfcg-tip-id-sort\">\r\n\t\t<p><?php _e(\"Check the box if you want to apply your own ordering to the images in the Gallery.\", DFCG_DOMAIN); ?></p><p><?php _e(\"This option activates a Sort Order field in the DCG Metabox. This lets you specify a sort order for the images in the gallery.\", DFCG_DOMAIN); ?></p><p><?php _e('The Sort Order field works in the same way that Pages Order works for ordering Pages in a menu.', DFCG_DOMAIN); ?></p>\r\n\t</div>\r\n\t<!-- end Tool tips -->\r\n<?php }", "title": "" }, { "docid": "939064599b9f190db1f6943cddad888d", "score": "0.49644032", "text": "function get_site_id($this_table,$this_field, $this_field_val) {\n $Query = \"SELECT site_id from \" . $this_table . \" WHERE \" . $this_field . \"=\" . $this_field_val;\n $Result = db_query($Query);\n $Row = row_fetch($Result);\n\n return ($Row[0] ? $Row[0] : NULL);\n }", "title": "" }, { "docid": "2ab4e64194ccdfa2d92fac91a3bfa293", "score": "0.49633667", "text": "public function search_mobile_number_filter() {\n\t\t\n\t\t$type = 'service_management';\n\t\t\n\t\tif ( isset( $_GET['post_type'] ) ) {\n\t\t\t$type = $_GET['post_type'];\n\t\t}\n\t\t\n\t\tif ( $type == 'service_management' ) {\n\t\t\t$current_v = isset( $_GET['filter_by_mobile_number'] ) ? $_GET['filter_by_mobile_number'] : '';\n\t\t\t?>\n <input type=\"text\" name=\"filter_by_mobile_number\" value=\"<?php esc_attr_e( $current_v ); ?>\"\n class=\"regular-text\" placeholder=\"Mobile number....\"/>\n\t\t<?php }\n\t}", "title": "" }, { "docid": "cad1e4dac1f61403b955db1fcbf2e034", "score": "0.4948055", "text": "function setId_detecteur($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "ea6585ca30c1c2cb26e5f6e77a2e56cf", "score": "0.4947596", "text": "function shr_get_youtube_id( $url ) {\n // https://www.youtube.com/watch?v=OmGM3T4L\n // http://youtu.be/OmGM3T4L\n // http://www.youtube.com/attribution_link?a=VGixIntYNbo&u=%2Fwatch%3Fv%3DOmGM3T4L%26feature%3Dshare\n // http://youtu.be/OmGM3T4L?t=1s\n // https://www.youtube.com/watch?feature=player_embedded&amp;v=OmGM3T4L\n // http://www.youtube.com/playlist?list=PLC63wGLyaVgJNRS6sNz9Q4fPkBni9cuzf must return false\n \n $url = htmlspecialchars_decode( urldecode( $url ) );\n \n $host = str_replace( 'www.', '', parse_url( $url, PHP_URL_HOST ) );\n \n switch( $host ) {\n case 'youtube.com':\n preg_match( '/v=([^&#\\?]*)/', parse_url( $url, PHP_URL_QUERY ), $matches );\n break;\n \n case 'youtu.be':\n preg_match( '!be/([^&#\\?]*)!', $url, $matches );\n break;\n }\n \n return ( isset( $matches[1] ) ? $matches[1] : false );\n}", "title": "" }, { "docid": "6713c7b0f8c1a2bf24984fe0ee2ea3ca", "score": "0.49432492", "text": "function clients_getFilter($id) {\n\tglobal $Auth;\n\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\t\n\t## prepare the db-object\n\t$db = new DB_Sql();\n\n\t## then get the correct values\n\t$query = \"SELECT * FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"_filters WHERE id='$id'\";\n\n\t$result = $db->query($query);\t\n\t$counter = 0;\n\t$return_value = array();\n\tif($db->next_record(MYSQL_ASSOC)) {\n\t\t$return_value = $db->Record;\n\t}\n\treturn $return_value;\t\n}", "title": "" }, { "docid": "1757ee6caca38eec4d40a539ec801d7b", "score": "0.49402535", "text": "function get_sesh_id($sesh)\n{\n return '_' . preg_replace('/[^A-Za-z0-9]/', '', $sesh['title']) . '_' . (string)$sesh['sessionKey'];\n}", "title": "" }, { "docid": "dacf05fd61fdd0320bb375f3bc34e111", "score": "0.49374154", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id\t.= ':'.$this->getState('filter.search');\n\t\t$id\t.= ':'.$this->getState('filter.access');\n\t\t$id\t.= ':'.$this->getState('filter.state');\n\t\t$id\t.= ':'.$this->getState('filter.country_id');\n\t\t$id\t.= ':'.$this->getState('filter.state_id');\n\t\t$id .= ':'.$this->getState('filter.language');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "414d96029b1204ef0436c1397e7dc455", "score": "0.493695", "text": "public function getModuleSecretKey($idWebsite){\n $resource = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter('scope','stores')\n ->addFieldToFilter('value',$idWebsite);\n // now filter again by is active \n $scope_id = array();\n foreach ($resource as $val) {\n $scope_id[] = $val->getData('scope_id');\n }\n // now filter with the config set to enabledwebsite = 1\n $resource = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter('scope','stores')\n ->addFieldToFilter('scope_id',array(\"in\"=>$scope_id))\n ->addFieldToFilter('path','avisverifies/system/enabledwebsite')\n ->addFieldToFilter('value','1')->getFirstItem();\n // use the first element to get the config\n $resource = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter('scope','stores')\n ->addFieldToFilter('path','avisverifies/system/secretkey')\n ->addFieldToFilter('scope_id',$resource->getData('scope_id'))\n ->getFirstItem();\n\n return $resource->getData('value');\n }", "title": "" }, { "docid": "dee7e0bc77635e3ef7555f406bde5264", "score": "0.49338657", "text": "function url_to_custompostid( $url ) {\n\t\tglobal $wp_rewrite, $wpdb;\n\n\t\t$moreName = '';\n\t\t$url = apply_filters( 'url_to_postid', $url );\n\t\t$rewrite = $wp_rewrite->wp_rewrite_rules();\n\t\tif ( empty( $rewrite ) )\n\t\t\t\treturn 0;\n\t\n\t\t$url_split = explode( '#', $url );\n\t\t$url = $url_split[0];\n\t\t$url_split = explode( '?', $url );\n\t\t$url = $url_split[0];\n\t\n\t\tif ( false !== strpos( home_url(), '://www.' ) && false === strpos( $url, '://www.' ) )\n\t\t\t\t$url = str_replace( '://', '://www.', $url ); // Add 'www.' if it is absent and should be there\n\t\n\t\tif ( false === strpos( home_url(), '://www.' ) )\n\t\t\t\t$url = str_replace( '://www.', '://', $url ); // Strip 'www.' if it is present and shouldn't be\n\t\n\t\tif ( ! $wp_rewrite->using_index_permalinks() )\n\t\t\t\t$url = str_replace( 'index.php/', '', $url ); // Strip 'index.php/' if we're not using path info permalinks\n\tif ( false !== strpos( $url, home_url() ) ) {\n\t\t\n\t\t$url = str_replace( home_url(), '', $url ); // Chop off http://domain.com\n\t} else {\n\t\t\n\t\t$home_path = parse_url( home_url() ); // Chop off /path/to/blog\n\t\t$home_path = isset( $home_path['path'] ) ? $home_path['path'] : '';\n\t\t$url = str_replace( $home_path, '', $url );\n\t}\n\t\n\t\t$url = trim( $url, '/' ); // Trim leading and lagging slashes\n\t\t$request = $url;\n\t\n\t\t$request_match = $request; // Look for matches.\n\tforeach ( ( array ) $rewrite as $match => $query ) {\n\t\t\tif ( ! empty( $url ) && ( $url != $request ) && ( strpos( $match, $url ) === 0 ) )\n\t\t\t\t\t$request_match = $url . '/' . $request;\n\t\tif ( preg_match( \"!^$match!\", $request_match, $matches ) ) {\n\t\t\tif ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\\$matches\\[([0-9]+)\\]/', $query, $varmatch ) ) {\n\t\t\t\tif ( ! get_page_by_path( $matches[$varmatch[1]] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t$query = preg_replace( '!^.+\\?!', '', $query );\n\t\t\t\t$query = addslashes( WP_MatchesMapRegex::apply( $query, $matches ) );\n\t\t\t\tglobal $wp;\n\t\t\t\tglobal $wpdb;\n\t\t\t\tparse_str( $query, $query_vars );\n\t\t\t\t$query = array();\n\t\t\tforeach ( ( array ) $query_vars as $key => $value ) {\n\t\t\t\tif ( in_array( $key, $wp->public_query_vars ) ) {\n\t\t\t\t\t\t$query[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! empty( $query['videogallery'] ) ) {\n\t\t\t\t\t$moreName = $wpdb->get_var( 'SELECT ID FROM ' . $wpdb->prefix . 'posts WHERE post_name=\"' . $query['videogallery'] . '\" LIMIT 1' );\n\t\t\t}\n\t\t\t\treturn $moreName;\n\t\t}\n\t}\n\t\treturn 0;\n}", "title": "" }, { "docid": "33388fd2eca5b41f256d7bf8f0809b42", "score": "0.49322572", "text": "public function checkIdUrl()\n {\n return [\n 'type' => self::STRING_TYPE,\n 'location' => self::URL,\n ];\n }", "title": "" }, { "docid": "591c2c05ed01fae5ae4685ebd22a4bf2", "score": "0.49306", "text": "private static function obtainId($url) {\n preg_match('~/\\w{32}/(items/\\w+|tasks)/([\\w-_]+)/?$~', $url, $matches);\n return $matches[2];\n }", "title": "" }, { "docid": "7e984078a951790b943e4bd5286525f9", "score": "0.49266937", "text": "protected function getStoreId($id = '')\n\t{\n\t\t$id .= ':'.$this->getState('filter.published');\n\t\t$id .= ':'.$this->getState('filter.access');\n\t\t$id .= ':'.$this->getState('filter.todo_id');\n\t\t$id .= ':'.$this->getState('filter.todo_id.include');\n\t\t$id .= ':'.$this->getState('filter.category_id');\n\t\t$id .= ':'.$this->getState('filter.category_id.include');\n\t\t$id .= ':'.$this->getState('filter.date_filtering');\n\t\t$id .= ':'.$this->getState('filter.date_field');\n\t\t$id .= ':'.$this->getState('filter.start_date_range');\n\t\t$id .= ':'.$this->getState('filter.end_date_range');\n\t\t$id .= ':'.$this->getState('filter.relative_date');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "d22b494cbdb4a94cc09287114b13e14d", "score": "0.49220878", "text": "public function getWebsiteIds()\n {\n $websiteIds = [];\n $websites = $this->_storeManager->getWebsites();\n foreach ($websites as $website) {\n $websiteIds[] = $website->getId();\n }\n\n return $websiteIds;\n }", "title": "" } ]
0cb806c02c6a7b818fab4c4926635a73
Convenient way to add query parameters.
[ { "docid": "db6df5bb23869997999d4d017e59b5e7", "score": "0.0", "text": "private function addParameters($aggregation, array $parameters): void\n {\n foreach ($parameters as $key => $parameter) {\n $aggregation->addParameter($key, $parameter);\n }\n }", "title": "" } ]
[ { "docid": "39f6cf473facfbcf54488118c84e7238", "score": "0.8101697", "text": "function addQueryParam($key, $value);", "title": "" }, { "docid": "2f39178de32007ea9920a6f63cf8509b", "score": "0.7324299", "text": "public function addParametersToUrl(){\n if(sizeof($this->parameters)>0){\n $parameters = http_build_query($this->parameters);\n $this->url = $this->url.\"?\".$parameters;\n }\n }", "title": "" }, { "docid": "9ac2219a13b8da7f8152cf17a465da56", "score": "0.7219051", "text": "public function addQueryParam(string $param_name, $param_value): self {\n $this->queryParams[$param_name] = $param_value;\n return $this;\n }", "title": "" }, { "docid": "bccbfd1b8577652afef03587a6b5ca61", "score": "0.70591116", "text": "public function addUrlQueryParameter($key, $value = null);", "title": "" }, { "docid": "7943b6337f92f9cf5575d1ea4a117bc8", "score": "0.68625224", "text": "public function withQueryParam($key, $value)\n {\n $params = $this->getQueryParams();\n $params[$key] = $value;\n $this->queryParams = $params;\n }", "title": "" }, { "docid": "d76b9ac295d5064f89595289dcd16304", "score": "0.6698494", "text": "public function set_query_params( $params ) {\n\t\t$this->params['GET'] = $params;\n\t}", "title": "" }, { "docid": "97dbf72adb99ff54bf4f7f8665494934", "score": "0.66832393", "text": "public function addParam($name ,$value) {}", "title": "" }, { "docid": "a75090e00c2bff2a154b0107e104b189", "score": "0.66554445", "text": "function addQueryString($name, $value, $preencoded = false)\n {\n if ($preencoded) {\n $this->querystring[$name] = $value;\n } else {\n $this->querystring[$name] = is_array($value) ? array_map('rawurlencode', $value): rawurlencode($value);\n }\n }", "title": "" }, { "docid": "6e242ef68a4401785453743b0564d0a3", "score": "0.6649666", "text": "public static function add_query_arg() {\n $args = func_get_args();\n if (is_array($args[0])) {\n if (count($args) < 2 || false === $args[1]) {\n $uri = $_SERVER['REQUEST_URI'];\n } else {\n $uri = $args[1];\n }\n } else {\n if (count($args) < 3 || false === $args[2]) {\n $uri = $_SERVER['REQUEST_URI'];\n } else {\n $uri = $args[2];\n }\n }\n\n if ($frag = strstr($uri, '#')) {\n $uri = substr($uri, 0, -strlen($frag));\n } else {\n $frag = '';\n }\n\n if (0 === stripos($uri, 'http://')) {\n $protocol = 'http://';\n $uri = substr($uri, 7);\n } elseif (0 === stripos($uri, 'https://')) {\n $protocol = 'https://';\n $uri = substr($uri, 8);\n } else {\n $protocol = '';\n }\n\n if (strpos($uri, '?') !== false) {\n list($base, $query) = explode('?', $uri, 2);\n $base .= '?';\n } elseif ($protocol || strpos($uri, '=') === false) {\n $base = $uri . '?';\n $query = '';\n } else {\n $base = '';\n $query = $uri;\n }\n\n self::wp_parse_str($query, $qs);\n $qs = self::urlencode_deep($qs); // this re-URL-encodes things that were already in the query string\n if (is_array($args[0])) {\n foreach ($args[0] as $k => $v) {\n $qs[$k] = $v;\n }\n } else {\n $qs[$args[0]] = $args[1];\n }\n\n foreach ($qs as $k => $v) {\n if ($v === false) {\n unset($qs[$k]);\n }\n }\n\n $ret = self::build_query($qs);\n $ret = trim($ret, '?');\n $ret = preg_replace('#=(&|$)#', '$1', $ret);\n $ret = $protocol . $base . $ret . $frag;\n $ret = rtrim($ret, '?');\n\n return $ret;\n }", "title": "" }, { "docid": "25eb46e2ba15e604ec994b2c8f7ade93", "score": "0.6649268", "text": "public function queryParam($name, $value){\n // build the query string for this name/value pair\n $querystring = http_build_query(array($name => $value));\n\n // append it to the list of query strings\n $this->querystrings[] = $querystring;\n\n return $this;\n }", "title": "" }, { "docid": "d7d0f80752cbc1bda0a8ebd920ed3d0f", "score": "0.662829", "text": "function add_query_vars($qvars) {\n\t$qvars[] = 'api';\n\t$qvars[] = 'department';\n\t$qvars[] = 'field';\n\t$qvars[] = 'program';\n\t$qvars[] = 'ayear';\n\t$qvars[] = 'popup';\n\treturn $qvars;\n}", "title": "" }, { "docid": "9fe833a5dcbe2db5f3292a39564c07d7", "score": "0.6624114", "text": "public function addParam($key, $value);", "title": "" }, { "docid": "9fe833a5dcbe2db5f3292a39564c07d7", "score": "0.6624114", "text": "public function addParam($key, $value);", "title": "" }, { "docid": "cd6ac1bf6d68eee320afb1c2d77c525a", "score": "0.6597519", "text": "public function add($key, $value){\r\n\t\t$this->queryParams[$key] = $value;\r\n\t\treturn $this->queryParams;\r\n\t}", "title": "" }, { "docid": "ebc9d1369f83e260067703c50b016930", "score": "0.6595767", "text": "public function queryParameters($query, $request)\n {\n return $query;\n }", "title": "" }, { "docid": "1c8be485d2a8b1997ab32213d6abe411", "score": "0.6528468", "text": "function parameter_queryvars( $qvars ) {\r\r\n $qvars[] = 'rental';\r\r\n return $qvars;\r\r\n}", "title": "" }, { "docid": "b222f3a0e32685ced150c2f054d12d13", "score": "0.6517559", "text": "public function addParams($params) {\n $this->requestParams = array_merge($this->requestParams, $params);\n }", "title": "" }, { "docid": "5c3d1211397dc138abcdf8d29b7f4694", "score": "0.6501431", "text": "function addParameter($field, $operator, $value)\n {\n $this->query[] = [$field, $operator, $value];\n }", "title": "" }, { "docid": "9072be0fd5240ed6c59a4d994fa5b04a", "score": "0.6438334", "text": "public function addQueryArgument(string $name, $value, bool $overwrite = false): RequestInterface;", "title": "" }, { "docid": "f4a13b8464456ca2cecde2adb9ad8589", "score": "0.64164406", "text": "function parameter_queryvars( $qvars ) {\n\t$qvars[] = 'articles';\n\treturn $qvars;\n}", "title": "" }, { "docid": "c60cd72d3f1951687d06f3f937ff7c20", "score": "0.64018863", "text": "public function getQueryParams()\n {\n }", "title": "" }, { "docid": "a27202a4d312fca6eb118a2227547d06", "score": "0.63682145", "text": "function addRawQueryString($querystring)\n {\n $this->querystring = $this->_parseRawQueryString($querystring);\n }", "title": "" }, { "docid": "b078c7570bfacd3552ec38dab2e860cc", "score": "0.6346681", "text": "public static function addQuery($key, $value){}", "title": "" }, { "docid": "40814e536d8b75e12190cfd2ab06d04a", "score": "0.6342411", "text": "function AppendQueryParams($url, $arrAddFields = null, $arrRemoveFields = null)\n {\n $qs = $this->GetQueryParams($arrAddFields, $arrRemoveFields);\n\n if ($qs != '')\n {\n $lastChar = substr($url, -1);\n if ($lastChar == '/') {\n $location = $url.$qs;\n }\n else if (strpos($url, '/') >0) {\n $location = $url.';'.$qs;\n }\n else {\n $location = $url.'/'.$qs;\n }\n }\n else $location = $url;\n\n return $location;\n }", "title": "" }, { "docid": "bb14df3ea385b5ecf57bf2d6a29b4a0f", "score": "0.63349926", "text": "function sb_querystring_append($query_string, $new_args)\n{\n\t\n\t$params = null;\n\tparse_str($query_string, $params);\n\tif( !$params )\n\t\treturn $query_string;\n\tforeach($new_args as $arg => $value)\n\t{\n\t\t//if( isset($params[$arg]) )\n\t\t//\tcontinue;\n\t\t$params[$arg] = $value;\n\t}\n\t\n\treturn http_build_query($params);\n\t\n}", "title": "" }, { "docid": "53d0460c25e1c6fdfc90a860adb242f8", "score": "0.63272524", "text": "public function withQueryParams(array $query)\n {\n }", "title": "" }, { "docid": "9249a8f791d1de9732dfa551eebd1d05", "score": "0.62650037", "text": "private function setQueryParam($key, $value): void\n {\n // Do not set value if it was null because it was optional.\n if (! is_null($value)) {\n $this->queryParams[$key] = $value;\n }\n }", "title": "" }, { "docid": "1464794615e2c7dada5daa43514f82a0", "score": "0.6242121", "text": "public function addParam($param, $value) {\n $this->requestParams[$param] = $value;\n }", "title": "" }, { "docid": "94e2f34202b89a5b59948df811829327", "score": "0.6239885", "text": "function appendQueryParams(string $uri, array $queryParams): string {\n\tif (empty($queryParams)) {\n\t\treturn $uri;\n\t}\n\t\n\t$queryString = buildQueryString($queryParams);\n\t$separator = parse_url($uri, \\PHP_URL_QUERY) ? '&' : '?';\n\t$uri = rtrim($uri, '?&');\n\treturn \"{$uri}{$separator}{$queryString}\";\n}", "title": "" }, { "docid": "7d6e3e0427ae9ad055ebdf1ccee4890a", "score": "0.62280685", "text": "public function add_query_vars($vars){\n\t\t$vars[] = '__api';\n\t\t$vars[] = 'rfid';\n\t\t$vars[] = 'access';\n\t\t$vars[] = 'doors';\n\t\t$vars[] = 'doorstatus';\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "a9c8aed541868838f426953173bef9fb", "score": "0.6223312", "text": "public function getUrlQueryParameters();", "title": "" }, { "docid": "71c5839261d2bfd6c2c52e38dd9133c4", "score": "0.6213053", "text": "private function set_querystring(){\r\n $this->querystring = '';\r\n\r\n $exclude = array('pg','page','i','ipp');\r\n\r\n if (isset($_GET)) {\r\n $this->querystring .= FaqFuncs::get_all_get_params($exclude);\r\n }\r\n\r\n if (isset($_POST)) {\r\n $pparams = FaqFuncs::get_all_post_params($exclude, true);\r\n\r\n if(FaqFuncs::not_null($pparams)){\r\n $this->querystring .= (FaqFuncs::not_null($this->querystring) ? '&':'') . $pparams;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "607f293375861f3129f5cb888c1a0281", "score": "0.6189556", "text": "public function add_query_vars( $vars ) {\n $vars[] = '__sg_api';\n $vars[] = 'token';\n\n return $vars;\n }", "title": "" }, { "docid": "c675842d83817f5c60b4007f25790f89", "score": "0.6180335", "text": "public function setAddedQueryParamters($paramters)\n {\n $this->added_parameters = $paramters;\n $this->added_query_string = urldecode(http_build_query($this->added_parameters));\n return $this;\n }", "title": "" }, { "docid": "8e602e5013d10a8da0fa5c1b6d948498", "score": "0.61727685", "text": "public function addParameter($name, $value);", "title": "" }, { "docid": "e179d55605030e8fe87637986b70f51f", "score": "0.6162635", "text": "public function addRequestParam($name, $value = null)\n {\n if (is_array($name)) {\n $this->requestParams = $name + $this->requestParams;\n } elseif (is_string($name) && $value === null) {\n parse_str($name, $params);\n if (!empty($params)) {\n $this->requestParams = $params + $this->requestParams;\n }\n } else {\n $this->requestParams[$name] = $value;\n }\n }", "title": "" }, { "docid": "310dd3262b10d92d470ec85aff2fa3fa", "score": "0.6161794", "text": "private function queryParams() {\n\t\tif (!is_null($this->query_string)) {\n\t\t\t$queryParams = array();\n\t\t\t$tmpQuery = array_filter(explode('&', $this->query_string));\n\n\t\t\tforeach ($tmpQuery as $value) {\n\t\t\t\tif (strpos($value, '=') !== false) {\n\t\t\t\t\t$arrTemp = explode('=', $value);\n\t\t\t\t\t$queryParams[$arrTemp[0]] = $arrTemp[1];\n\t\t\t\t} else {\n\t\t\t\t\t$queryParams[] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->query_params = $queryParams;\n\t\t}\n\t}", "title": "" }, { "docid": "9f65dcd66d012e51f509ad47c1435cb6", "score": "0.615988", "text": "public function queryParameters($query, $request)\n {\n return $query->with('page');\n }", "title": "" }, { "docid": "e9a3b8c73b18cf7b5190a8e98057e17f", "score": "0.61531526", "text": "protected function addParam(string $value): string\n\t{\n\t\t$param = ':dreamQueryParam_' . self::$paramCount++;\n\t\t$this->params[$param] = $value;\n\t\treturn $param;\n\t}", "title": "" }, { "docid": "e2e0f8535e368657c4b8ae69301d0678", "score": "0.6112614", "text": "function my_register_query_vars( $qvars ){\n $qvars[] = 'key'; \n $qvars[] = 'id';\n return $qvars;\n}", "title": "" }, { "docid": "7d5a5cc35b718d980a0214a933d395e9", "score": "0.61125904", "text": "public function addParameter($key, $value)\r\n {\r\n $this->requestParamters[$key] = $value;\r\n }", "title": "" }, { "docid": "0c2d66aabc6aabc1fd2beb7d3bba2100", "score": "0.6102547", "text": "private function queryString() {\n\t\tif (isset($_SERVER['QUERY_STRING'])) {\n\t\t\t$this->query_string = $_SERVER['QUERY_STRING'];\n\t\t}\n\t}", "title": "" }, { "docid": "602bf4017e4771edb2b0153c95df8068", "score": "0.6094364", "text": "public function setQueryStringParameter($key, $value) {\n\t\t$this->queryStringParameters[$key] = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d1dd6aa1b19fb05383864a1f948cd0f4", "score": "0.60908425", "text": "public final function addParam($name, $value){\n\t\t$this->params[$name] = $value;\n\n\t}", "title": "" }, { "docid": "fe723669a920fda94fed025234907d17", "score": "0.60856307", "text": "public function getQueryParameters();", "title": "" }, { "docid": "b874a9c5b2a97875ba32d053be45ec9c", "score": "0.6070726", "text": "public function addParam($name, $value) {\n\t\t$this->params[$name] = $value;\n\t}", "title": "" }, { "docid": "410e33f29bcccf80b72744dbb544dd9f", "score": "0.6045159", "text": "public function setQuery(array $params = []): RequestInterface;", "title": "" }, { "docid": "25f08a681ff09b575075d12de986677c", "score": "0.6041799", "text": "function addUrlParams($new_params) {\n\n\t\t// get current url\n\t\t$url = $_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"];\n\n\t\t// parse current url\n\t\t$query = parse_url($url, PHP_URL_QUERY);\n\n\t\t// set params array\n\t\t$params = array();\n\n\t\t// throw any current params to an array\n\t\tparse_str($query, $params);\n\n\t\t// merge the current params array, with the suplied new params array\n\t\t$params = array_merge($params, $new_params);\n\n\t\t// build new URL\n\t\t$query = http_build_query($params);\n\n\t\t// last, is this actually being show with AJAX. If yes, well just return OUR DESIRED PARAMS\n\t\t// because ajax will prevent default behaviour, no problem passing just the requested params\n\t\tif (isset($params[\"type\"]) and ($params[\"type\"] == \"ajax_paginate\")) {\n\t\t\treturn \"?coms_page=\".$new_params[\"coms_page\"].\"&ipp=\".$new_params[\"ipp\"].\"\";\n\t\t}\n\n\t\t// return the full current url with new params\n\t\treturn $_SERVER[\"PHP_SELF\"] . \"?\" . $query;\n\t}", "title": "" }, { "docid": "e171532079ca2fc6a6367399c69f8abb", "score": "0.6023203", "text": "function extra_query_args() {\n\t$s = '';\n\tif(count($_GET)) {\n\t\tforeach($_GET as $k => $v) {\n\t\t\t// these are request vars we don't want to duplicate\n\t\t\tif(! in_array($k, array('q','f','zid','page','PHPSESSID'))) {\n\t\t\t\t$s .= '&' . $k . '=' . urlencode($v);\n\t\t\t}\n\t\t}\n\t}\n\tif(count($_POST)) {\n\t\tforeach($_POST as $k => $v) {\n\t\t\t// these are request vars we don't want to duplicate\n\t\t\tif(! in_array($k, array('q','f','zid','page','PHPSESSID'))) {\n\t\t\t\t$s .= '&' . $k . '=' . urlencode($v);\n\t\t\t}\n\t\t}\n\t}\n\treturn $s;\n}", "title": "" }, { "docid": "aeae5ff6eac1180d56579827af1f1211", "score": "0.6018556", "text": "private function prepare() {\n\t\tif (!$this->prepared) {\n\t\t\t$queryString = $this->query->GetQueryString();\n\t\t\t$queryParameters = $this->query->GetParameters();\n\t\t\t\n\t\t\tforeach($queryParameters as $name => $value) {\n\t\t\t\t$occurances = 0;\n\t\t\t\t// TODO: Måste även kolla om parametern finns och isf. öka igen tills det går\n\t\t\t\t$queryString = preg_replace_callback('/' . self::QueryParamPrefix . $name . '/', function($match) use (&$occurances, &$queryParameters, &$value) {\n\t\t\t\t\t$newName = $match[0] . ($occurances++ ?: '');\n\t\t\t\t\t$queryParameters[$newName] = $value;\n\t\t\t\t\treturn $newName;\n\t\t\t\t}, $queryString);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "92880d603be30ffc1130bfbd412f1341", "score": "0.60138446", "text": "public function addParams($params) {\n\t\t$this->params = array_merge($this->params, $params);\n\t}", "title": "" }, { "docid": "563de9d6a7a916eacfb4c05d781cd938", "score": "0.59826195", "text": "public static function addParam($url, $param, $value) {\n $url = self::prepareForParams($url);\n return $url.http_build_query(array($param=>$value));\n }", "title": "" }, { "docid": "c997973ac7403bf476b2e1751eeffa4e", "score": "0.597917", "text": "public function queryParams($params)\n {\n $this->data_array = $params;\n }", "title": "" }, { "docid": "176bcd7e44e8ae3d55f142aab48cbe87", "score": "0.5963237", "text": "public function addParam(string $key, $value): void {\r\n\t\t$this->params[$key] = $value;\r\n\t}", "title": "" }, { "docid": "5d78489a904676fd7999bf9b61d22a8e", "score": "0.59062535", "text": "public function withQueryParams(array $query)\n {\n $params = $this->getQueryParams();\n\n foreach ($query as $key => $value) {\n $params[$key] = $value;\n }\n\n $this->queryParams = $params;\n }", "title": "" }, { "docid": "c35aee92120a1fd15d855e3f921b9792", "score": "0.59016174", "text": "public function add(string $val='?',?string $param=null):self {\n if($this->query!=='') $this->query.= ',';\n $this->query.= $val;\n $this->params[] = $param;\n return $this;\n }", "title": "" }, { "docid": "991f96c722fef4e90311ab0de54d7717", "score": "0.5892027", "text": "function UrlAddQuery($url, $qry) {\n\tif (strval($qry) == \"\")\n\t\treturn $url;\n\treturn $url . (ContainsString($url, \"?\") ? \"&\" : \"?\") . $qry;\n}", "title": "" }, { "docid": "9971b7269632574bb8d5bb54d463661b", "score": "0.5873743", "text": "public function add_query_arg( $url ) {\n\t\treturn add_query_arg( [ 'pro' => 1 ], $url );\n\t}", "title": "" }, { "docid": "a46992727a45f69cdac914a59d16852f", "score": "0.58692086", "text": "public function params($name = null, $value = null){\n if($name){\n $this->params[$name] = $value;\n return $this;\n }else{\n return $this->params;\n }\n }", "title": "" }, { "docid": "c34ae8faa2159f1028ce046025f8bff8", "score": "0.5868528", "text": "public function add_query_vars( $vars ) {\n\t\t$vars[] = 'wc-api';\n\t\t$vars[] = 'wc-api-version';\n\t\t$vars[] = 'wc-api-route';\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "4cdf7c2dcba7caec0d268b1200f7fd58", "score": "0.5846425", "text": "public function toQueryString();", "title": "" }, { "docid": "be44462fa4287a6029efc8f3d278e5d9", "score": "0.5826771", "text": "function getQueryString($options=array(), $prepend='?') {\n // parse query string into array\n $query = array();\n parse_str($_SERVER['QUERY_STRING'], $query);\n\n // Modify the existing query string with new options\n $query = array_merge($query, $options);\n\n // Return the modified querystring\n return $prepend . htmlentities(http_build_query($query));\n}", "title": "" }, { "docid": "ccc906e4e43b52cfb719c9ec57ea4469", "score": "0.5816043", "text": "public function query (string $query, array $params = null);", "title": "" }, { "docid": "54619e96192466264f42c5b6fe10b7a4", "score": "0.58060724", "text": "public function queryParams(string $query, array $params): \\Amp\\Promise {\n // @todo delegate to pool member\n }", "title": "" }, { "docid": "d70d25103516972b495724a6c18f6a70", "score": "0.58046985", "text": "public function testAddQueryParams($url, $add, $expected)\n {\n $utility = $this->utility($url)->addQueryParameter($add);\n\n $this->assertEquals($expected, $utility->value());\n }", "title": "" }, { "docid": "1970be19e82af018441dd1fbf1a0667f", "score": "0.5767747", "text": "function queryBuild($params) {\n\n\t$poleHodnot = $_GET;\n\n\tforeach ($params as $key => $value) {\n\t\t$poleHodnot[$key] = $value;\n\t}\n\t\n return '?' . http_build_query($poleHodnot);\n}", "title": "" }, { "docid": "3c86dc29581b15aa0b826d1f482c73a6", "score": "0.57675964", "text": "public function Append() {\n\n\t\tif (count((array)$_GET) > 0) {\n\t\t\tforeach ($_GET as $strParam => $mixValue) {\n\t\t\t\t$this->$strParam = $mixValue;\n\t\t\t}\n\t\t}\n\n\t\tif (count((array)$_POST) > 0) {\n\t\t\tforeach ($_POST as $strParam => $mixValue) {\n\t\t\t\t$this->$strParam = $mixValue;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e2621431fee6980316cac19022339fa3", "score": "0.57625675", "text": "public function addFilter($name, $query = array());", "title": "" }, { "docid": "4757db96a32c8ab5f7e42c67ae98576b", "score": "0.57617563", "text": "public static function addAndParams(&$request, $and)\n {\n if (!isset($request['$and'])) {\n $request['$and'] = array();\n }\n \n $request['$and'][] = $and;\n }", "title": "" }, { "docid": "55e5ba66188d6086adc807e1a6204aff", "score": "0.5759778", "text": "public function addQueryValue($value)\n\t{\n\t\ttry {\n\n\t\t\t$params = [];\n\t\t\t$urlParts = $this->getURLParts();\n\t\t\t\t\n\t\t\tif (isset($urlParts['query'])) {\n\t\t\t\tparse_str($urlParts['query'], $params);\n\t\t\t}\n\t\t\t\t\n\t\t\t$params[$this->getQueryKey()] = $this->_validateValue($value);\n\t\t\t\t\n\t\t\treturn (isset($urlParts['path']) ? $urlParts['path'] : '/') . '?' . http_build_query($params);\n\t\t\t \n\t\t} catch (\\Exception $e) {\n\t\t\tthrow new \\Exception('Could not paginate.');\n\t\t}\n\t}", "title": "" }, { "docid": "6379a15fa697e8839c075f1ab974a9af", "score": "0.57537746", "text": "function addQuery($query)\n\t{\n\t\t$this->addClause('query', $query);\n\t}", "title": "" }, { "docid": "98bfc4cc89124d9faecc029d5abbc099", "score": "0.575236", "text": "function add_query_vars_filter( $vars ){\n $vars[] = 'estado';\n $vars[] = 'servicio';\n return $vars;\n}", "title": "" }, { "docid": "0a8e90f9dd11c6e2eb9d2ce2299a7705", "score": "0.574093", "text": "private function _setQueryString($querystring) {\r\n $this->_queryString = $querystring;\r\n }", "title": "" }, { "docid": "f082a61b5641ea35066152bfca433cab", "score": "0.5737485", "text": "protected function addParamsToUrl($url)\n {\n $params = '';\n foreach ($this->get_fields as $key => $value) {\n $params .= $key.'='.rawurlencode($value).'&';\n }\n if ($params) {\n $url .= (strpos($url, '?') === false ? '?' : '&').$params;\n }\n return rtrim($url, '&');\n }", "title": "" }, { "docid": "c81f6ba5fdf51ef4bc6a6b5a1143c5e3", "score": "0.5728555", "text": "function addWhere($query)\n\t{\n\t\tif (isset($query))\n\t\t$this->addClause('where', $query);\n\t}", "title": "" }, { "docid": "7d15f69d13d6983fbe7e9d1577480f98", "score": "0.5718732", "text": "public function get_query_params() {\n\t\treturn $this->params['GET'];\n\t}", "title": "" }, { "docid": "f48de7dffa2f730bcd2eb6593e391459", "score": "0.5713471", "text": "public function setQueryParam($param, $value=null)\n {\n if (is_array($param)) $this->queryParams = $param = $this->queryParams;\n else $this->queryParams[$param] = $value;\n \n return $this;\n }", "title": "" }, { "docid": "0c7d887dc569741b759659de469d4f12", "score": "0.5710232", "text": "public function addParams($params)\n {\n if (!empty($params)) {\n if (empty($this->params)) {\n $this->params = $params;\n } else {\n foreach ($params as $name => $value) {\n if (is_integer($name)) {\n $this->params[] = $value;\n } else {\n $this->params[$name] = $value;\n }\n }\n }\n }\n return $this;\n }", "title": "" }, { "docid": "4569797d9620e0bcf7036f634a206566", "score": "0.56991607", "text": "protected function addCursorParameter(array &$query)\n {\n // Check if the cursor has been defined\n if ($this->cursor !== null) {\n $query['cursor'] = $this->cursor;\n }\n }", "title": "" }, { "docid": "acdd3300342185f77fbfff0413d2a470", "score": "0.56801105", "text": "private function prepareQueryParamsForFilter()\n {\n $this->queryParametersForFiltering = Request::query();\n foreach ($this->excludeQueryParamsFromFilter as $value) {\n unset($this->queryParametersForFiltering[$value]);\n }\n }", "title": "" }, { "docid": "7377b00669c6728088f542e59d15ea56", "score": "0.5679705", "text": "private function getQueryParameters()\n {\n return Filters::filterKeyValuePairs($_GET);\n }", "title": "" }, { "docid": "e5590c5789bcd41d4253be7c6ddc33da", "score": "0.56794554", "text": "function isys_glob_add_to_query($p_key, $p_value, $p_url = null)\n{\n /* Get default get-params */\n if (empty($p_url))\n {\n $p_url = $_GET;\n }\n else\n {\n /* Remove '?' from the beginning of the delivered query */\n if (is_string($p_url) && isys_strlen($p_url) && $p_url[0] == \"?\") $p_url = substr($p_url, 1);\n\n /* Explode it to an array */\n $p_url = explode(\"&\", $p_url);\n }\n\n /* Set/Replace the given KEY in our params-array */\n $p_url[$p_key] = $p_value;\n\n return \"?\" . http_build_query($p_url);\n}", "title": "" }, { "docid": "9513f0dfba00c7d9117084ac95f9f063", "score": "0.5678521", "text": "private function queryStringSession()\r\n {\r\n // Save the query string, adding to what's already saved.\r\n if (count($_GET) > 0) {\r\n $existing_saved = (isset($_SESSION['qs'])) ? $_SESSION['qs'] : array();\r\n $_SESSION['qs'] = array_merge($existing_saved, $_GET);\r\n }\r\n\r\n // Load query string variables, unless they're already present.\r\n if (isset($_SESSION['qs']) && count($_SESSION['qs']) > 0) {\r\n $has_new = false; // Whether there's anything in SESSION that's not in GET\r\n foreach ($_SESSION['qs'] as $key => $val) {\r\n if (!isset($_GET[$key])) {\r\n $_GET[$key] = $val;\r\n $has_new = true;\r\n }\r\n }\r\n if ($has_new) {\r\n /*$query = '?';\r\n foreach ($_SESSION['qs'] as $key=>$val) {\r\n $query .= \"&$key=$val\";\r\n }*/\r\n header('Location:?' . http_build_query($_SESSION['qs']));\r\n /*$query = URL::query($_SESSION['qs']);\r\n $_SESSION['qs'] = array();\r\n $uri = $this->url(FALSE, TRUE).$this->request->uri.$query;\r\n $this->request->redirect($uri);*/\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b8e450f000a14cc548beb4a8e681a447", "score": "0.56768787", "text": "public function addKrefParam($url)\n {\n if (!$url instanceof Zend_Uri_Http) {\n return $url;\n }\n\n $query = array_merge(\n $url->getQueryAsArray(),\n $this->getKrefParam()\n );\n\n $url->setQuery($query);\n\n return $url;\n }", "title": "" }, { "docid": "9da2e877b4f097bad4e92c30d6926d69", "score": "0.56708676", "text": "static function query(\n\t $fields,\n\t $more_fields = array())\n\t{\n\t\t$query_array = array();\n\t\tforeach ($fields as $field => $default) {\n\t\t\t$query_array[$field] = array_key_exists($field, $_GET)\n\t\t\t ? $_GET[$field]\n\t\t\t : $default;\n\t\t}\n\t\t$query_array = array_merge($query_array, $more_fields);\n\t\t$query = http_build_query($query_array);\n\t}", "title": "" }, { "docid": "8b068566f8785db14a4f2c987487b1d3", "score": "0.5669996", "text": "public function AddParam($name, $value)\n {\n if (!empty($name))\n $this->parameters[$name] = $value;\n }", "title": "" }, { "docid": "9992d49ebcead4751c21fd73289b7454", "score": "0.5660074", "text": "function add_query_vars($aVars) {\n $aVars[] = \"port_cat\";\n\t$aVars[] = \"port_cat1\";\n\t// represents the name of the product category as shown in the URL\n return $aVars;\n}", "title": "" }, { "docid": "b1103188cbea65aef95e94527ad14b62", "score": "0.5647989", "text": "function atc_add_query_var( $vars ) { \n\t$vars[] = 'tennisadmin'; \n\treturn $vars;\n}", "title": "" }, { "docid": "b4a22f96ac62beb8638aa7da82aa0c65", "score": "0.5644123", "text": "function GetQueryParams($arrAddFields = null, $arrRemoveFields = null)\n {\n $qs = '';\n $arrAppendFields = array();\n $arrUpdateFields = array();\n\n $queryList = $this->ParseQuery($_SERVER['REQUEST_URI']);\n\n // sort the AddFields in 2 arrays: update and append\n if ($arrAddFields != null)\n {\n foreach ($arrAddFields as $key=>$val)\n {\n if (!array_key_exists($key, $queryList))\n $arrAppendFields[$key] = $val;\n else\n $arrUpdateFields[$key] = $val;\n }\n }\n\n if (count($arrAppendFields) == 0) $arrAppendFields = null;\n if (count($arrUpdateFields) == 0) $arrUpdateFields = null;\n\n\n\n foreach ($queryList as $key=>$val)\n {\n $fieldUpdated = false;\n if ($arrUpdateFields != null)\n {\n if (array_key_exists($key, $arrUpdateFields)) // if key found, updates the value\n {\n $qs .= ';'.$key.'='.$arrUpdateFields[$key];\n $fieldUpdated = true;\n }\n }\n\n if (!$fieldUpdated)\n if ($arrRemoveFields == null || ($arrRemoveFields != null && !in_array($key, $arrRemoveFields)))\n $qs .= ';'.$key.'='.$val;\n }\n\n if ($arrAppendFields != null)\n {\n foreach ($arrAppendFields as $key=>$val)\n {\n $qs .= ';'.$key.'='.$val;\n }\n }\n\n if ($qs != '')\n $qs = substr($qs, 1);\n\n return $qs;\n }", "title": "" }, { "docid": "8f15565806ad9e27083560ad11f33547", "score": "0.5637135", "text": "public function get_query_args() {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "60b812c146b06a78500ecf4b77c91d81", "score": "0.5634798", "text": "function bookswp_add_query_vars_filter( $vars ){\n $vars[] = \"booksearch\";\n return $vars;\n}", "title": "" }, { "docid": "2183b7f2640db62f0afd1fe110f3e162", "score": "0.5630131", "text": "public function appendQueryParams($originalUrl, array $params)\n {\n $url = Http::createFromString($originalUrl);\n $queryPairs = Query::parse($url->getQuery());\n $query = Query::createFromPairs($queryPairs)\n ->append(\n Query::build($params)\n )\n ->getContent();\n return $url->withQuery($query)->__toString();\n }", "title": "" }, { "docid": "40a4a81b7edd3a8542f15eafd4265b78", "score": "0.5612883", "text": "public function add_parameter($name, $value) {\n\t\t// i = integer, d = double, s = string, b = blob\n\t\t$type = gettype($value);\n\n\t\tswitch ($type) {\n\t\t\tcase 'boolean':\n\t\t\tcase 'integer':\n\t\t\t\t$this->paramTypes[$name] = 'i';\n\t\t\t\t$this->params[$name] = intval($value);\n\t\t\t\tbreak;\n\t\t\tcase 'double':\n\t\t\tcase 'float':\n\t\t\t\t$this->paramTypes[$name] = 'd';\n\t\t\t\t$this->params[$name] = floatval($value);\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\t$this->paramTypes[$name] = 's';\n\t\t\t\t$this->params[$name] = \"'\".self::escape_string(strval($value)).\"'\";\n\t\t\t\tbreak;\n\t\t\tcase 'array':\n\t\t\t\t$this->add_parameter($name, strval(json_encode($value)));\n\t\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\tif ($value instanceof \\DateTime) {\n\t\t\t\t\t$this->add_parameter($name, strval($value->format('Y-m-d H:i:s')));\n\t\t\t\t} else {\n\t\t\t\t\t$this->add_parameter($name, strval(json_encode($value)));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'NULL':\n\t\t\t\t$this->paramTypes[$name] = 'b';\n\t\t\t\t$this->params[$name] = 'NULL';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// ignore\n\t\t}\n\n\t\t$this->queryParsed = '';\n\t}", "title": "" }, { "docid": "2621b8fd6fa5d10e5044046a49ff3595", "score": "0.5610681", "text": "public function addParam($sName, $sValue);", "title": "" }, { "docid": "0183f740b253f31b0053d72da3ae4a46", "score": "0.55979675", "text": "public function addParams( $value){\n return $this->_add(6, $value);\n }", "title": "" }, { "docid": "7565604c5aee436526917282d2359a14", "score": "0.5597034", "text": "public function getQueryParameters(): array;", "title": "" }, { "docid": "7565604c5aee436526917282d2359a14", "score": "0.5597034", "text": "public function getQueryParameters(): array;", "title": "" }, { "docid": "740f506a5ffad92e2f6e6cc71d29af37", "score": "0.5585429", "text": "public function addParams($url = '', $params = array(), $urlencode = true) \n {\n if(count($params)>0) {\n foreach($params as $key=>$value){\n if(parse_url($url, PHP_URL_QUERY)) {\n if($urlencode) {\n $url .= '&'.$key.'='.$this->prepareParams($value); \n }\n else {\n $url .= '&'.$key.'='.$value; \n }\n } else {\n if($urlencode) {\n $url .= '?'.$key.'='.$this->prepareParams($value); \n }\n else {\n $url .= '?'.$key.'='.$value; \n }\n }\n }\n }\n return $url;\n }", "title": "" }, { "docid": "02d5f986d927fab39f65b031ffb1ebf9", "score": "0.5585374", "text": "public function setQueryString(array $query) {\n $this->components['query'] = $query;\n return $this;\n }", "title": "" }, { "docid": "a6304df7312ed424fffae8252c5192cb", "score": "0.55847347", "text": "public function apply_filters_in_request() {\n\n\t\t$args = jet_smart_filters()->query->get_query_args();\n\n\t\tif ( ! $args ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_filter( 'jet-engine/listing/grid/posts-query-args', array( $this, 'add_query_args' ), 10, 2 );\n\n\t}", "title": "" }, { "docid": "2d31bcbf084819983e8f75aedb3575ab", "score": "0.5581034", "text": "public function queryString($qs) {\n if (empty($qs) || !is_array($qs)) {\n throw new InvalidArgumentException(t('TigerfishImage::queryString requires an array as a parameter'));\n }\n\n $this->queryString = $qs;\n return $this;\n }", "title": "" } ]